diff options
author | Freya Murphy <freya@freyacat.org> | 2025-06-24 10:39:28 -0400 |
---|---|---|
committer | Freya Murphy <freya@freyacat.org> | 2025-06-24 10:39:28 -0400 |
commit | 8fa39f6a1baaddfa642dc3a869b7535f0b5b09b4 (patch) | |
tree | ef0ec06dd39350b0c4d6eecf81e93b13838ef4d3 | |
parent | update commits (diff) | |
download | dotfiles-nix-8fa39f6a1baaddfa642dc3a869b7535f0b5b09b4.tar.gz dotfiles-nix-8fa39f6a1baaddfa642dc3a869b7535f0b5b09b4.tar.bz2 dotfiles-nix-8fa39f6a1baaddfa642dc3a869b7535f0b5b09b4.zip |
add minimal config option
-rw-r--r-- | modules/options.nix | 3 | ||||
-rw-r--r-- | system/default.nix | 26 |
2 files changed, 16 insertions, 13 deletions
diff --git a/modules/options.nix b/modules/options.nix index 53b59cb..f55b398 100644 --- a/modules/options.nix +++ b/modules/options.nix @@ -189,6 +189,9 @@ in { type = types.str; description = "Hostname of the system."; }; + minimal = mkEnableOption { + description = "Install only required system services, drivers, and programs."; + }; # # Primary user of the system diff --git a/system/default.nix b/system/default.nix index 2c7d42d..1a710d7 100644 --- a/system/default.nix +++ b/system/default.nix @@ -54,8 +54,8 @@ # appimage programs.appimage = { - enable = true; - binfmt = true; + enable = !config.minimal; + binfmt = !config.minimal; }; # use the latest kernel @@ -86,24 +86,24 @@ # hardware services.dbus.implementation = "broker"; services.fwupd.enable = true; - services.libinput.enable = true; + services.libinput.enable = config.desktop.enable; services.pipewire = { - enable = true; - alsa.enable = true; - pulse.enable = true; - jack.enable = true; + enable = config.desktop.enable; + alsa.enable = config.desktop.enable; + pulse.enable = config.desktop.enable; + jack.enable = config.desktop.enable; }; # power services.upower = { - enable = true; + enable = !config.minimal; percentageLow = 20; percentageCritical = 10; percentageAction = 4; criticalPowerAction = "Hibernate"; }; services.tlp = { - enable = true; + enable = !config.minimal; settings = { CPU_SCALING_GOVERNOR_ON_AC = "performance"; CPU_SCALING_GOVERNOR_ON_BAT = "powersave"; @@ -119,11 +119,11 @@ }; # printing - services.printing.enable = true; + services.printing.enable = config.desktop.enable; services.avahi = { - enable = true; - nssmdns4 = true; - openFirewall = true; + enable = config.desktop.enable; + nssmdns4 = config.desktop.enable; + openFirewall = config.desktop.enable; }; # create user account |