diff --git a/nixos/profiles/common/core/default.nix b/nixos/profiles/common/core/default.nix index 7c2a528..6899f13 100644 --- a/nixos/profiles/common/core/default.nix +++ b/nixos/profiles/common/core/default.nix @@ -32,6 +32,7 @@ boot.initrd.systemd.enable = true; boot.loader.efi.canTouchEfiVariables = true; boot.loader.systemd-boot.enable = lib.mkDefault true; # mkDefault for Lanzaboote + boot.kernelPackages = lib.mkDefault pkgs.linuxPackages_zen; # mkDefault for server ### Default Programs environment.defaultPackages = []; diff --git a/nixos/profiles/common/graphical/default.nix b/nixos/profiles/common/graphical/default.nix index a0dbfc7..d212125 100755 --- a/nixos/profiles/common/graphical/default.nix +++ b/nixos/profiles/common/graphical/default.nix @@ -1,7 +1,32 @@ -{...}: { - imports = [ - ./gnome-keyring.nix - ./display-server.nix - ./polkit.nix - ]; +{pkgs, ...}: { + # plymouth + boot.plymouth.enable = true; + + # xserver + services.xserver = { + enable = true; + excludePackages = with pkgs; [xterm]; + displayManager.startx.enable = true; + }; + + # gnome keyring + services.gnome.gnome-keyring.enable = true; + programs.seahorse.enable = true; + + # polkit + security.polkit.enable = true; + environment.systemPackages = with pkgs; [polkit_gnome]; + systemd.user.services.polkit-gnome-authentication-agent-1 = { + description = "polkit-gnome-authentication-agent-1"; + wantedBy = ["graphical-session.target"]; + wants = ["graphical-session.target"]; + after = ["graphical-session.target"]; + serviceConfig = { + Type = "simple"; + ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"; + Restart = "on-failure"; + RestartSec = 1; + TimeoutStopSec = 10; + }; + }; } diff --git a/nixos/profiles/common/graphical/display-server.nix b/nixos/profiles/common/graphical/display-server.nix deleted file mode 100755 index 80b74d2..0000000 --- a/nixos/profiles/common/graphical/display-server.nix +++ /dev/null @@ -1,15 +0,0 @@ -{pkgs, ...}: { - services.xserver = { - enable = true; - excludePackages = with pkgs; [xterm]; - displayManager = { - startx.enable = true; - }; - desktopManager = { - #plasma5.enable = true; - }; - windowManager = { - #bspwm.enable = true; - }; - }; -} diff --git a/nixos/profiles/common/graphical/gnome-keyring.nix b/nixos/profiles/common/graphical/gnome-keyring.nix deleted file mode 100644 index 8d22c73..0000000 --- a/nixos/profiles/common/graphical/gnome-keyring.nix +++ /dev/null @@ -1,5 +0,0 @@ -_: { - # gnome keyring - services.gnome.gnome-keyring.enable = true; - programs.seahorse.enable = true; -} diff --git a/nixos/profiles/common/graphical/polkit.nix b/nixos/profiles/common/graphical/polkit.nix deleted file mode 100644 index cbcfb1e..0000000 --- a/nixos/profiles/common/graphical/polkit.nix +++ /dev/null @@ -1,21 +0,0 @@ -{pkgs, ...}: { - security.polkit.enable = true; - environment.systemPackages = with pkgs; [polkit_gnome]; - - # polkit_gnome autostart for wms - systemd = { - user.services.polkit-gnome-authentication-agent-1 = { - description = "polkit-gnome-authentication-agent-1"; - wantedBy = ["graphical-session.target"]; - wants = ["graphical-session.target"]; - after = ["graphical-session.target"]; - serviceConfig = { - Type = "simple"; - ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"; - Restart = "on-failure"; - RestartSec = 1; - TimeoutStopSec = 10; - }; - }; - }; -} diff --git a/nixos/profiles/common/physical/default.nix b/nixos/profiles/common/physical/default.nix new file mode 100644 index 0000000..71c670d --- /dev/null +++ b/nixos/profiles/common/physical/default.nix @@ -0,0 +1,6 @@ +_: { + networking.stevenblack.enable = true; + services.system76-scheduler.enable = true; + services.power-profiles-daemon.enable = true; + services.thermald.enable = true; +} diff --git a/nixos/profiles/desktop/default.nix b/nixos/profiles/desktop/default.nix index 4996797..e0618bf 100644 --- a/nixos/profiles/desktop/default.nix +++ b/nixos/profiles/desktop/default.nix @@ -1,14 +1,7 @@ -{pkgs, ...}: { +{...}: { imports = [ ../common/core ../common/graphical + ../common/physical ]; - - boot.kernelPackages = pkgs.linuxPackages_zen; - boot.plymouth.enable = true; - networking.stevenblack.enable = true; - services.system76-scheduler.enable = true; - services.power-profiles-daemon.enable = true; - services.thermald.enable = true; - #services.printing.enable = true; } diff --git a/nixos/profiles/laptop/default.nix b/nixos/profiles/laptop/default.nix index 14a9179..e0618bf 100644 --- a/nixos/profiles/laptop/default.nix +++ b/nixos/profiles/laptop/default.nix @@ -1,5 +1,7 @@ {...}: { imports = [ - ../desktop + ../common/core + ../common/graphical + ../common/physical ]; } diff --git a/nixos/profiles/server/default.nix b/nixos/profiles/server/default.nix index aea777d..112c56e 100644 --- a/nixos/profiles/server/default.nix +++ b/nixos/profiles/server/default.nix @@ -1,7 +1,9 @@ -{...}: +{pkgs, ...}: # no i dont actually own a server { imports = [ ../common/minimal ]; + + boot.kernelPackages = pkgs.linuxPackages; # mkDefault for server }