diff --git a/hosts/Reconix/configuration.nix b/hosts/Reconix/configuration.nix index 9d1f55b..c4b8981 100644 --- a/hosts/Reconix/configuration.nix +++ b/hosts/Reconix/configuration.nix @@ -24,7 +24,8 @@ in ../common/users/Winter/default.nix ../common/global/default.nix - ../common/features/Desktop.nix + ../common/features/DesktopNiri.nix + ../common/features/DesktopKDEPlasma.nix ../common/features/Applications.nix #../common/features/servers/minecraft.nix diff --git a/hosts/WarNyx/configuration.nix b/hosts/WarNyx/configuration.nix index 37a807c..96d4352 100644 --- a/hosts/WarNyx/configuration.nix +++ b/hosts/WarNyx/configuration.nix @@ -29,7 +29,8 @@ in ../common/global/default.nix ../common/users/Winter/default.nix ../common/users/Ekisha/default.nix - ../common/features/Desktop.nix + ../common/features/DesktopNiri.nix + ../common/features/DesktopKDEPlasma.nix ../common/features/Applications.nix ../common/features/servers/minecraft.nix diff --git a/hosts/common/features/DesktopKDEPlasma.nix b/hosts/common/features/DesktopKDEPlasma.nix new file mode 100644 index 0000000..872e4ad --- /dev/null +++ b/hosts/common/features/DesktopKDEPlasma.nix @@ -0,0 +1,20 @@ +# This is your system's configuration file. +# Use this to configure your system environment (it replaces /etc/nixos/configuration.nix) +{ + inputs, + lib, + config, + pkgs, + ... +}: { + # --- Display & window managers --- + services.displayManager.sddm.enable = true; + services.displayManager.sddm.wayland.enable = true; + services.desktopManager.plasma6.enable = true; + programs.gamescope.enable = true; + + environment.systemPackages = with pkgs; [ + # --- KDE extras --- + kdePackages.karousel + ]; +} diff --git a/hosts/common/features/Desktop.nix b/hosts/common/features/DesktopNiri.nix similarity index 82% rename from hosts/common/features/Desktop.nix rename to hosts/common/features/DesktopNiri.nix index 96ff83d..2d46ce0 100644 --- a/hosts/common/features/Desktop.nix +++ b/hosts/common/features/DesktopNiri.nix @@ -10,13 +10,11 @@ # --- Display & window managers --- services.displayManager.sddm.enable = true; services.displayManager.sddm.wayland.enable = true; - services.desktopManager.plasma6.enable = true; programs.niri.enable = true; programs.skwd-wall.enable = true; programs.gamescope.enable = true; services.gnome.gnome-keyring.enable = true; - security.pam.services.Winter.enableGnomeKeyring = true; programs.seahorse.enable = true; environment.systemPackages = with pkgs; [ @@ -29,7 +27,5 @@ mako swaylock inputs.awww.packages.${pkgs.stdenv.hostPlatform.system}.awww - # --- KDE extras --- - kdePackages.karousel ]; } diff --git a/hosts/common/users/Winter/default.nix b/hosts/common/users/Winter/default.nix index 88cdb66..b8a220a 100644 --- a/hosts/common/users/Winter/default.nix +++ b/hosts/common/users/Winter/default.nix @@ -4,9 +4,10 @@ lib, ... }: let + username = "Winter"; ifTheyExist = groups: builtins.filter (group: builtins.hasAttr group config.users.groups) groups; in { - users.users.Winter= { + users.users.${username} = { isNormalUser = true; extraGroups = ifTheyExist [ "audio" @@ -41,9 +42,10 @@ in { #}; # TODO: ensure correct paths - home-manager.users.Winter = import ../../../../home/Winter/${config.networking.hostName}.nix; + home-manager.users.${username} = import ../../../../home/${username}/${config.networking.hostName}.nix; security.pam.services = { swaylock = {}; + ${username}.enableGnomeKeyring = true; }; } diff --git a/hosts/common/users/default.nix b/hosts/common/users/default.nix new file mode 100644 index 0000000..a0f1e02 --- /dev/null +++ b/hosts/common/users/default.nix @@ -0,0 +1,50 @@ +{ + pkgs, + config, + lib, + ... +}: let + username = ""; + ifTheyExist = groups: builtins.filter (group: builtins.hasAttr group config.users.groups) groups; +in { + users.users.${username} = { + isNormalUser = true; + extraGroups = ifTheyExist [ + "audio" + "deluge" + "docker" + "git" + "i2c" + "libvirtd" + "minecraft" + "mysql" + "wpa_supplicant" + "plugdev" + "podman" + "tss" + "video" + "wheel" + "wireshark" + ]; + + # TODO: use as needed + #openssh.authorizedKeys.keys = lib.splitString "\n" (builtins.readFile ../../../../home/gabriel/ssh.pub); + #hashedPasswordFile = config.sops.secrets.gabriel-password.path; + #packages = [pkgs.home-manager]; + }; + + # unused for now, may add sops later on + #sops.secrets = { + # gabriel-password = { + # sopsFile = ../../secrets.yaml; + # neededForUsers = true; + # }; + #}; + +# TODO: ensure correct paths + home-manager.users.${username} = import ../../../../home/${username}/${config.networking.hostName}.nix; + + security.pam.services = { + swaylock = {}; + }; +}