diff options
Diffstat (limited to 'hosts')
| -rw-r--r-- | hosts/common/default.nix | 5 | ||||
| -rw-r--r-- | hosts/common/desktop/default.nix | 6 | ||||
| -rw-r--r-- | hosts/common/desktop/gnome.nix | 6 | ||||
| -rw-r--r-- | hosts/common/documentation.nix | 6 | ||||
| -rw-r--r-- | hosts/common/fonts.nix | 36 | ||||
| -rw-r--r-- | hosts/common/hardware/default.nix | 1 | ||||
| -rw-r--r-- | hosts/common/options.nix | 14 | ||||
| -rw-r--r-- | hosts/common/packages.nix (renamed from hosts/glados-wsl/packages.nix) | 0 | ||||
| -rw-r--r-- | hosts/common/security.nix | 10 | ||||
| -rw-r--r-- | hosts/common/systemd.nix | 6 | ||||
| -rw-r--r-- | hosts/glados-wsl/default.nix | 33 | ||||
| -rw-r--r-- | hosts/glados/boot.nix | 2 | ||||
| -rw-r--r-- | hosts/glados/default.nix | 5 | ||||
| -rw-r--r-- | hosts/glados/network.nix | 2 | ||||
| -rw-r--r-- | hosts/glados/packages.nix | 6 | ||||
| -rw-r--r-- | hosts/glados/services.nix | 3 |
16 files changed, 67 insertions, 74 deletions
diff --git a/hosts/common/default.nix b/hosts/common/default.nix index 2923ae0..5448bbb 100644 --- a/hosts/common/default.nix +++ b/hosts/common/default.nix @@ -1,9 +1,10 @@ -{lib, ...}: { +{config, ...}: { imports = [ - ./options.nix ./documentation.nix ./fonts.nix ./locale.nix + ./options.nix + ./packages.nix ./security.nix ./systemd.nix ./users.nix diff --git a/hosts/common/desktop/default.nix b/hosts/common/desktop/default.nix index d5cc99f..74faa77 100644 --- a/hosts/common/desktop/default.nix +++ b/hosts/common/desktop/default.nix @@ -1,8 +1,4 @@ -{ - config, - lib, - ... -}: { +{lib, ...}: { programs.xwayland.enable = true; xdg.portal.enable = true; environment.noXlibs = lib.mkForce false; diff --git a/hosts/common/desktop/gnome.nix b/hosts/common/desktop/gnome.nix index 76e02cb..e05a0cd 100644 --- a/hosts/common/desktop/gnome.nix +++ b/hosts/common/desktop/gnome.nix @@ -1,8 +1,4 @@ -{ - config, - pkgs, - ... -}: { +{pkgs, ...}: { imports = [ ./. ]; diff --git a/hosts/common/documentation.nix b/hosts/common/documentation.nix index 85de6f9..ad7300d 100644 --- a/hosts/common/documentation.nix +++ b/hosts/common/documentation.nix @@ -1,8 +1,4 @@ -{ - config, - pkgs, - ... -}: { +{pkgs, ...}: { environment.systemPackages = with pkgs; [man-pages man-pages-posix]; documentation = { dev.enable = true; diff --git a/hosts/common/fonts.nix b/hosts/common/fonts.nix index 9cec045..c49f99c 100644 --- a/hosts/common/fonts.nix +++ b/hosts/common/fonts.nix @@ -2,11 +2,11 @@ config, pkgs, ... -}: { - fonts = { - fonts = with pkgs; - if config.system.gui-stuff - then [ +}: let + guiFonts = + if config.sys.gui.enable + then + with pkgs; [ noto-fonts noto-fonts-extra noto-fonts-emoji @@ -14,15 +14,21 @@ fira-code (nerdfonts.override {fonts = ["FiraCode"];}) ] - else []; - fontconfig.defaultFonts = - if config.system.gui-stuff - then { - serif = ["Noto Serif"]; - sansSerif = ["Noto Sans"]; - emoji = ["Noto Color Emoji"]; - monospace = ["Fira Code"]; - } - else {}; + else []; + + guiDefaultFonts = + if config.sys.gui.enable + then { + serif = ["Noto Serif"]; + sansSerif = ["Noto Sans"]; + emoji = ["Noto Color Emoji"]; + monospace = ["Fira Code"]; + } + else {}; +in { + fonts = { + enableDefaultFonts = true; + fonts = guiFonts; + fontconfig.defaultFonts = guiDefaultFonts; }; } diff --git a/hosts/common/hardware/default.nix b/hosts/common/hardware/default.nix index e7e6350..4d54961 100644 --- a/hosts/common/hardware/default.nix +++ b/hosts/common/hardware/default.nix @@ -1,6 +1,5 @@ _: { imports = [ ./nvidia.nix - ./zfs.nix ]; } diff --git a/hosts/common/options.nix b/hosts/common/options.nix index 2d532ed..8d4bf5b 100644 --- a/hosts/common/options.nix +++ b/hosts/common/options.nix @@ -1,14 +1,14 @@ {lib, ...}: { - options.system = with lib.types; { - devel-packages = lib.mkOption { - type = bool; + options.sys = with lib; { + gui.enable = mkOption { + type = types.bool; default = false; - description = "install development packages for neovim lsp"; + description = "install gui-related packages"; }; - gui-stuff = lib.mkOption { - type = bool; + wsl.enable = mkOption { + type = types.bool; default = false; - description = "install gui-related packages"; + description = "signifies that the flake is being installed in wsl"; }; }; } diff --git a/hosts/glados-wsl/packages.nix b/hosts/common/packages.nix index dbb0091..dbb0091 100644 --- a/hosts/glados-wsl/packages.nix +++ b/hosts/common/packages.nix diff --git a/hosts/common/security.nix b/hosts/common/security.nix index 32c2ff5..04ae595 100644 --- a/hosts/common/security.nix +++ b/hosts/common/security.nix @@ -1,8 +1,10 @@ -_: { +{config, ...}: let + value = config.sys.wsl.enable; +in { security = { - apparmor.enable = true; - audit.enable = true; - auditd.enable = true; + apparmor.enable = value; + audit.enable = value; + auditd.enable = value; rtkit.enable = true; sudo = { configFile = '' diff --git a/hosts/common/systemd.nix b/hosts/common/systemd.nix index 1c71cfc..9d44da4 100644 --- a/hosts/common/systemd.nix +++ b/hosts/common/systemd.nix @@ -1,10 +1,12 @@ -{config, ...}: { +{config, ...}: let + value = config.sys.wsl.enable; +in { services = { journald.extraConfig = '' MaxRetentionSec=1w ''; resolved = { - enable = true; + enable = value; dnssec = "allow-downgrade"; extraConfig = '' [Resolve] diff --git a/hosts/glados-wsl/default.nix b/hosts/glados-wsl/default.nix index d77baf6..bc9bdd2 100644 --- a/hosts/glados-wsl/default.nix +++ b/hosts/glados-wsl/default.nix @@ -1,22 +1,23 @@ { - config, - modulesPath, - pkgs, - ... + config, + modulesPath, + pkgs, + ... }: { - imports = [ - (modulesPath + "/profiles/minimal.nix") - ../common - ./packages.nix - ../../users/seth - ]; + imports = [ + (modulesPath + "/profiles/minimal.nix") + ../common + ../../users/seth + ]; - # enable non-free packages - nixpkgs.config.allowUnfree = true; + sys.wsl.enable = true; - # Enable nix flakes - nix.package = pkgs.nixFlakes; - nix.settings.experimental-features = ["nix-command" "flakes"]; + # enable non-free packages + nixpkgs.config.allowUnfree = true; - system.stateVersion = "22.11"; + # Enable nix flakes + nix.package = pkgs.nixFlakes; + nix.settings.experimental-features = ["nix-command" "flakes"]; + + system.stateVersion = "22.11"; } diff --git a/hosts/glados/boot.nix b/hosts/glados/boot.nix index d0f0b22..e856fb1 100644 --- a/hosts/glados/boot.nix +++ b/hosts/glados/boot.nix @@ -19,7 +19,5 @@ enable = true; pkiBundle = "/etc/secureboot"; }; - - supportedFilesystems = ["zfs"]; }; } diff --git a/hosts/glados/default.nix b/hosts/glados/default.nix index 39687a2..d6eba70 100644 --- a/hosts/glados/default.nix +++ b/hosts/glados/default.nix @@ -1,5 +1,4 @@ { - config, modulesPath, pkgs, ... @@ -12,11 +11,10 @@ ./boot.nix ./network.nix ./packages.nix + ./services.nix ../../users/seth ]; - system.gui-stuff = true; - # enable non-free packages nixpkgs.config.allowUnfree = true; @@ -25,4 +23,5 @@ nix.settings.experimental-features = ["nix-command" "flakes"]; system.stateVersion = "23.05"; + sys.gui.enable = true; } diff --git a/hosts/glados/network.nix b/hosts/glados/network.nix index e55a0a2..021a1e9 100644 --- a/hosts/glados/network.nix +++ b/hosts/glados/network.nix @@ -1,4 +1,4 @@ -{config, ...}: { +_: { networking = { hostId = "replace_me"; networkmanager = { diff --git a/hosts/glados/packages.nix b/hosts/glados/packages.nix index 2765f35..7066911 100644 --- a/hosts/glados/packages.nix +++ b/hosts/glados/packages.nix @@ -1,8 +1,4 @@ -{ - config, - pkgs, - ... -}: { +{pkgs, ...}: { environment.systemPackages = with pkgs; [ git gnupg1 diff --git a/hosts/glados/services.nix b/hosts/glados/services.nix index a71acbd..95a7882 100644 --- a/hosts/glados/services.nix +++ b/hosts/glados/services.nix @@ -1,4 +1,4 @@ -{config, ...}: { +_: { services = { dbus.enable = true; pipewire = { @@ -9,4 +9,5 @@ pulse.enable = true; }; }; + hardware.pulseaudio.enable = false; } |
