From 2dfa73e0cf2c555be1777ca0dc36cceddd5adb5e Mon Sep 17 00:00:00 2001 From: Yusuf Bera Ertan Date: Tue, 26 Jan 2021 21:09:02 +0300 Subject: [PATCH] feat: switch to plasma because gnome bad --- flake.lock | 12 +++++------ hosts/lungmen.nix | 2 +- profiles/network/default.nix | 16 ++++++++++++++- profiles/network/nginx.nix | 2 +- users/patriot/default.nix | 40 ++++++++++++++++++++++++++++++++---- users/patriot/home.nix | 32 ++++++++++++++--------------- 6 files changed, 75 insertions(+), 29 deletions(-) diff --git a/flake.lock b/flake.lock index ff9003a..0dce3f1 100644 --- a/flake.lock +++ b/flake.lock @@ -90,11 +90,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1611544074, - "narHash": "sha256-wa+TRNehoT187YFOejXqHMZMhVjBbYZGF0EWYfGqbJI=", + "lastModified": 1611611233, + "narHash": "sha256-xDAvVVvHbQ3Sf+Q5GVNbiYFZ2PDwtCoeAFRytCZNq30=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "aa8868c7cca8d30706a68a876d048968c83e1cf1", + "rev": "fa0eac3dff5757f6ca106d7325db6c75d22f7e5e", "type": "github" }, "original": { @@ -115,11 +115,11 @@ ] }, "locked": { - "lastModified": 1611605212, - "narHash": "sha256-JZGt4FgYcH/iXtn4jepRjX8CzZaGa1RZkCj6l5C9/ZE=", + "lastModified": 1611666253, + "narHash": "sha256-YdDc66rBJ62u3oZTdZWxtFcppfC50B36/g3+tSwKxgM=", "owner": "colemickens", "repo": "nixpkgs-wayland", - "rev": "74afaa2b0886d2d40f5f21dc06a58c44ec1add57", + "rev": "e492f1af4e7c7550a1454feaec59a296dcce35be", "type": "github" }, "original": { diff --git a/hosts/lungmen.nix b/hosts/lungmen.nix index f43c7ff..741f864 100644 --- a/hosts/lungmen.nix +++ b/hosts/lungmen.nix @@ -166,7 +166,7 @@ in services.xserver = { videoDrivers = [ "amdgpu" ]; }; - virtualisation.docker.enable = true; + virtualisation.podman.enable = true; services.postgresql = { enable = false; enableTCPIP = true; diff --git a/profiles/network/default.nix b/profiles/network/default.nix index 2420b8d..a30fd8e 100644 --- a/profiles/network/default.nix +++ b/profiles/network/default.nix @@ -1,10 +1,24 @@ { imports = [ ./dns ]; + networking.networkmanager.enable = false; + networking.dhcpcd.enable = true; networking.useDHCP = false; - networking.dhcpcd.extraConfig = '' noarp nodelay ''; + + /*systemd.network = { + enable = true; + networks = { + internet0 = { + matchConfig = { Name = "enp6s0"; }; + networkConfig = { + Address = "192.168.1.33"; + Gateway = "192.168.1.255"; + }; + }; + }; + };*/ } diff --git a/profiles/network/nginx.nix b/profiles/network/nginx.nix index 428b5c8..89bb8f4 100644 --- a/profiles/network/nginx.nix +++ b/profiles/network/nginx.nix @@ -31,5 +31,5 @@ # }; # }; - networking.firewall.allowedTCPPorts = [ 8000 8448 ]; + # networking.firewall.allowedTCPPorts = [ 8000 8448 ]; } diff --git a/users/patriot/default.nix b/users/patriot/default.nix index 1432e8b..a5f321d 100644 --- a/users/patriot/default.nix +++ b/users/patriot/default.nix @@ -5,7 +5,7 @@ isNormalUser = true; createHome = true; home = "/home/patriot"; - extraGroups = [ "wheel" "adbusers" "dialout" "docker" ]; + extraGroups = [ "wheel" "adbusers" "dialout" ]; shell = pkgs.zsh; hashedPassword = "$6$spzqhAyJfhHy$iHgLBlhjGn1l8PnbjJdWTn1GPvcjMqYNKUzdCe/7IrX6sHNgETSr/Nfpdmq9FCXLhrAfwHOd/q/8SvfeIeNX4/"; @@ -30,15 +30,47 @@ }; }; - security.pam.services.patriot.enableGnomeKeyring = true; + security.pam.services.patriot = { + enableGnomeKeyring = true; + enableKwallet = false; + }; services = { gnome3 = { gnome-keyring.enable = true; }; xserver = { enable = true; - desktopManager.gnome3.enable = true; - displayManager.gdm.enable = true; + desktopManager = { + plasma5.enable = true; + gnome3.enable = false; + xterm.enable = false; + }; + displayManager = { + autoLogin = { + enable = true; + user = "patriot"; + }; + lightdm.enable = false; + gdm = { + enable = false; + wayland = true; + }; + sddm.enable = true; + startx.enable = false; + }; + }; + }; + + systemd.user.services.gnome-session-restart-dbus.serviceConfig = { + Slice = "-.slice"; + }; + systemd = { + targets = { + network-online.enable = false; + }; + services = { + systemd-networkd-wait-online.enable = false; + NetworkManager-wait-online.enable = false; }; }; } diff --git a/users/patriot/home.nix b/users/patriot/home.nix index 157323d..af67566 100644 --- a/users/patriot/home.nix +++ b/users/patriot/home.nix @@ -213,7 +213,7 @@ in font-awesome (nerdfonts.override { fonts = [ "Iosevka" ]; }) # Programs - gnome3.gnome-tweaks + latte-dock gnome3.seahorse wine-staging cachix @@ -228,7 +228,7 @@ in youtube-dl ffmpeg mupdf - transmission-gtk + transmission-qt gitAndTools.gh steam-run lutris @@ -464,23 +464,23 @@ in dotDir = ".config/zsh"; history.path = ".local/share/zsh/history"; envExtra = '' - export SDL_VIDEODRIVER=wayland + #export SDL_VIDEODRIVER=wayland # needs qt5.qtwayland in systemPackages - export QT_QPA_PLATFORM=wayland - export QT_WAYLAND_DISABLE_WINDOWDECORATION="1" + #export QT_QPA_PLATFORM=wayland + #export QT_WAYLAND_DISABLE_WINDOWDECORATION="1" # Fix for some Java AWT applications (e.g. Android Studio), # use this if they aren't displayed properly: - export _JAVA_AWT_WM_NONREPARENTING=1 + #export _JAVA_AWT_WM_NONREPARENTING=1 ''; - # loginExtra = - # let - # deCmd = if config.wayland.windowManager.sway.enable then "sway" else (if config.wayland.windowManager.hikari.enable then "hikari" else throw "Need a window manager to start!"); - # in - # '' - # if [ "$(${pkgs.coreutils}/bin/tty)" = "/dev/tty1" ]; then - # exec ${pkgBin deCmd} - # fi - # ''; + /*loginExtra = + let + #deCmd = if config.wayland.windowManager.sway.enable then "sway" else (if config.wayland.windowManager.hikari.enable then "hikari" else throw "Need a window manager to start!"); + in + '' + if [ "$(${pkgs.coreutils}/bin/tty)" = "/dev/tty1" ]; then + exec startplasma-x11 + fi + '';*/ initExtra = '' bindkey "$terminfo[kRIT5]" forward-word bindkey "$terminfo[kLFT5]" backward-word @@ -748,7 +748,7 @@ in maxCacheTtl = 3600 * 24; maxCacheTtlSsh = maxCacheTtl; grabKeyboardAndMouse = false; - pinentryFlavor = "gnome3"; + pinentryFlavor = "qt"; }; };