diff --git a/common/base-graphical/default.nix b/common/base-graphical/default.nix deleted file mode 100644 index 40542ce..0000000 --- a/common/base-graphical/default.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ config, lib, pkgs, ... }: - -with lib; -let - cfg = config.qenya.base-graphical; -in -{ - imports = [ - ./desktop.nix - ./sound.nix - ]; - - options.qenya.base-graphical.enable = mkEnableOption "Base configuration for graphical environments"; - - config = mkIf cfg.enable { - services.xserver.enable = true; - }; -} diff --git a/common/base-graphical/desktop.nix b/common/base-graphical/desktop.nix deleted file mode 100644 index 50ff84c..0000000 --- a/common/base-graphical/desktop.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - inherit (lib) mkIf mkOption types; - cfg = config.qenya.base-graphical; - - isGnome = cfg.desktop == "gnome"; - isPlasma6 = cfg.desktop == "plasma6"; -in -{ - options.qenya.base-graphical.desktop = mkOption { - type = types.enum [ "gnome" "plasma6" ]; - default = "gnome"; - example = "plasma6"; - description = "Which display manager and desktop manager to use."; - }; - - config = mkIf cfg.enable { - services.xserver.displayManager.gdm.enable = isGnome; - services.xserver.desktopManager.gnome.enable = isGnome; - - services.displayManager.sddm.enable = isPlasma6; - services.displayManager.sddm.wayland.enable = isPlasma6; - services.desktopManager.plasma6.enable = isPlasma6; - }; -} diff --git a/common/base-graphical/sound.nix b/common/base-graphical/sound.nix deleted file mode 100644 index bb0c847..0000000 --- a/common/base-graphical/sound.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ config, lib, pkgs, ... }: - -with lib; -let - cfg = config.qenya.base-graphical; -in -{ - config = mkIf cfg.enable { - security.rtkit.enable = true; - services.pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; - jack.enable = true; - }; - hardware.pulseaudio.enable = false; # this theoretically defaults to false but something else seems to be flipping it - environment.systemPackages = with pkgs; [ helvum ]; # patchbay - }; -} diff --git a/common/default.nix b/common/default.nix index fd0791c..849dc3d 100644 --- a/common/default.nix +++ b/common/default.nix @@ -1,7 +1,6 @@ { imports = [ - ./base-graphical - ./base-server + ./sysadmin ./users ./environment.nix ./home-manager.nix diff --git a/common/base-server/default.nix b/common/sysadmin/default.nix similarity index 68% rename from common/base-server/default.nix rename to common/sysadmin/default.nix index 47a82fa..3709583 100644 --- a/common/base-server/default.nix +++ b/common/sysadmin/default.nix @@ -2,10 +2,10 @@ with lib; let - cfg = config.qenya.base-server; + cfg = config.qenya.sysadmin; in { - options.qenya.base-server.enable = mkEnableOption "Base configuration for headless servers"; + options.qenya.sysadmin.enable = mkEnableOption "Base configuration for headless servers"; config = mkIf cfg.enable { time.timeZone = "Etc/UTC"; diff --git a/hosts/kalessin/configuration.nix b/hosts/kalessin/configuration.nix index 3250f27..4e2ddea 100644 --- a/hosts/kalessin/configuration.nix +++ b/hosts/kalessin/configuration.nix @@ -9,7 +9,7 @@ boot.loader.efi.canTouchEfiVariables = true; users.users.qenya.extraGroups = [ "wheel" ]; - qenya.base-server.enable = true; + qenya.sysadmin.enable = true; system.stateVersion = "23.11"; } diff --git a/hosts/kilgharrah/default.nix b/hosts/kilgharrah/default.nix index b4e969f..3a834fb 100644 --- a/hosts/kilgharrah/default.nix +++ b/hosts/kilgharrah/default.nix @@ -6,6 +6,7 @@ ./filesystems.nix ./hardware.nix ./networking.nix + ./sound.nix ]; nixpkgs.hostPlatform = "x86_64-linux"; @@ -16,12 +17,15 @@ targetHost = null; # disallow remote deployment }; - qenya.base-graphical.enable = true; - qenya.base-graphical.desktop = "plasma6"; - time.timeZone = "Europe/London"; + i18n.defaultLocale = "en_GB.UTF-8"; console.keyMap = "uk"; + + services.xserver.enable = true; + services.displayManager.sddm.enable = true; + services.displayManager.sddm.wayland.enable = true; + services.desktopManager.plasma6.enable = true; services.xserver.xkb.layout = "gb"; services.printing.enable = true; diff --git a/hosts/kilgharrah/sound.nix b/hosts/kilgharrah/sound.nix new file mode 100644 index 0000000..cb97bd4 --- /dev/null +++ b/hosts/kilgharrah/sound.nix @@ -0,0 +1,13 @@ +{ config, lib, pkgs, ... }: + +{ + security.rtkit.enable = true; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + jack.enable = true; + }; + environment.systemPackages = with pkgs; [ helvum ]; # patchbay +} \ No newline at end of file diff --git a/hosts/orm/configuration.nix b/hosts/orm/configuration.nix index c31dc6a..e0cbe89 100644 --- a/hosts/orm/configuration.nix +++ b/hosts/orm/configuration.nix @@ -9,7 +9,7 @@ boot.loader.efi.canTouchEfiVariables = true; users.users.qenya.extraGroups = [ "wheel" ]; - qenya.base-server.enable = true; + qenya.sysadmin.enable = true; age.secrets.wireguard-peer-orm.file = ../../secrets/wireguard-peer-orm.age; diff --git a/hosts/tohru/default.nix b/hosts/tohru/default.nix index eab9a11..c8d2ec3 100644 --- a/hosts/tohru/default.nix +++ b/hosts/tohru/default.nix @@ -18,15 +18,25 @@ targetHost = null; # disallow remote deployment }; - qenya.base-graphical.enable = true; - time.timeZone = "Europe/London"; + i18n.defaultLocale = "en_GB.UTF-8"; console.keyMap = "uk"; + + services.xserver.enable = true; + services.xserver.displayManager.gdm.enable = true; + services.xserver.desktopManager.gnome.enable = true; services.xserver.xkb.layout = "gb"; services.printing.enable = true; + sound.enable = true; + hardware.pulseaudio.enable = true; + # services.pipewire = { + # enable = true; + # pulse.enable = true; + # }; + age.secrets.user-password-tohru-qenya.file = ../../secrets/user-password-tohru-qenya.age; users.users.qenya.hashedPasswordFile = config.age.secrets.user-password-tohru-qenya.path; users.users.qenya.extraGroups = [ diff --git a/hosts/yevaud/configuration.nix b/hosts/yevaud/configuration.nix index 2fbd757..13b70b3 100644 --- a/hosts/yevaud/configuration.nix +++ b/hosts/yevaud/configuration.nix @@ -10,7 +10,7 @@ users.users.qenya.extraGroups = [ "wheel" ]; - qenya.base-server.enable = true; + qenya.sysadmin.enable = true; age.secrets.wireguard-peer-yevaud.file = ../../secrets/wireguard-peer-yevaud.age;