From 55c622408b0643a9dc835ca22bf79e924cbc6fcb Mon Sep 17 00:00:00 2001 From: Katherina Walshe-Grey Date: Thu, 29 May 2025 09:44:51 +0100 Subject: [PATCH 1/4] qenya/plasma: Move into kilgharrah's host config --- common/base-graphical/default.nix | 2 +- common/base-graphical/desktop.nix | 35 ------------------------------- common/base-graphical/gnome.nix | 21 +++++++++++++++++++ flake.nix | 6 +----- home/qenya/default.nix | 1 - home/qenya/plasma/default.nix | 11 ---------- hosts/kilgharrah/default.nix | 5 ++--- hosts/kilgharrah/plasma.nix | 23 ++++++++++++++++++++ 8 files changed, 48 insertions(+), 56 deletions(-) delete mode 100644 common/base-graphical/desktop.nix create mode 100644 common/base-graphical/gnome.nix delete mode 100644 home/qenya/plasma/default.nix create mode 100644 hosts/kilgharrah/plasma.nix diff --git a/common/base-graphical/default.nix b/common/base-graphical/default.nix index b014f3f..e77e434 100644 --- a/common/base-graphical/default.nix +++ b/common/base-graphical/default.nix @@ -6,7 +6,7 @@ let in { imports = [ - ./desktop.nix + ./gnome.nix ./sound.nix ]; diff --git a/common/base-graphical/desktop.nix b/common/base-graphical/desktop.nix deleted file mode 100644 index 7e6a92c..0000000 --- a/common/base-graphical/desktop.nix +++ /dev/null @@ -1,35 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - inherit (lib) mkIf mkMerge mkOption types; - cfg = config.qenya.base-graphical; -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 (mkMerge [ - (mkIf (cfg.desktop == "gnome") { - services.xserver.displayManager.gdm.enable = true; - services.xserver.desktopManager.gnome.enable = true; - # TODO: agree on this with randomcat as it affects her too, since for some reason this is system-wide - # environment.gnome.excludePackages = with pkgs.gnome; [ - # pkgs.gnome-tour - # epiphany # GNOME Web - # geary - # gnome-calendar - # gnome-contacts - # gnome-music - # ]; - }) - (mkIf (cfg.desktop == "plasma6") { - services.displayManager.sddm.enable = true; - services.displayManager.sddm.wayland.enable = true; - services.desktopManager.plasma6.enable = true; - }) - ]); -} diff --git a/common/base-graphical/gnome.nix b/common/base-graphical/gnome.nix new file mode 100644 index 0000000..1d077de --- /dev/null +++ b/common/base-graphical/gnome.nix @@ -0,0 +1,21 @@ +{ config, lib, pkgs, ... }: + +let + inherit (lib) mkIf mkMerge mkOption types; + cfg = config.qenya.base-graphical; +in +{ + config = mkIf cfg.enable { + services.xserver.displayManager.gdm.enable = true; + services.xserver.desktopManager.gnome.enable = true; + # TODO: agree on this with randomcat as it affects her too, since for some reason this is system-wide + # environment.gnome.excludePackages = with pkgs.gnome; [ + # pkgs.gnome-tour + # epiphany # GNOME Web + # geary + # gnome-calendar + # gnome-contacts + # gnome-music + # ]; + }; +} diff --git a/flake.nix b/flake.nix index deed6a3..bac5ec5 100644 --- a/flake.nix +++ b/flake.nix @@ -88,11 +88,7 @@ # However, note CppNix >= 2.22.3, >= 2.24 has blessed "homeModules": # https://github.com/NixOS/nix/pull/10858 flake.homeManagerModules = { - "qenya".imports = [ - inputs.plasma-manager.homeManagerModules.plasma-manager - ./home/qenya - ]; - + "qenya".imports = [ ./home/qenya ]; "qenya@shaw".imports = [ ./hosts/shaw/home.nix ]; }; diff --git a/home/qenya/default.nix b/home/qenya/default.nix index 8a1d6f3..fff0309 100644 --- a/home/qenya/default.nix +++ b/home/qenya/default.nix @@ -1,7 +1,6 @@ { imports = [ ./dconf - ./plasma ./firefox.nix ./fontconfig.nix ./git.nix diff --git a/home/qenya/plasma/default.nix b/home/qenya/plasma/default.nix deleted file mode 100644 index f35d05c..0000000 --- a/home/qenya/plasma/default.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ config, lib, pkgs, osConfig, ... }: - -let - isPlasma = osConfig.services.desktopManager.plasma6.enable || osConfig.services.xserver.desktopManager.plasma5.enable; -in -{ - programs.plasma.enable = isPlasma; - programs.plasma.overrideConfig = true; - - imports = [ ]; -} diff --git a/hosts/kilgharrah/default.nix b/hosts/kilgharrah/default.nix index c73d439..87505c6 100644 --- a/hosts/kilgharrah/default.nix +++ b/hosts/kilgharrah/default.nix @@ -9,6 +9,8 @@ in ./filesystems.nix ./hardware.nix ./networking.nix + ./plasma.nix + ./ftp.nix ]; @@ -20,7 +22,6 @@ in boot.kernelModules = [ "kvm-intel" ]; qenya.base-graphical.enable = true; - qenya.base-graphical.desktop = "plasma6"; time.timeZone = "Europe/London"; i18n.defaultLocale = "en_GB.UTF-8"; @@ -33,8 +34,6 @@ in fountain.admins = [ "qenya" ]; home-manager.users.qenya = { pkgs, ... }: { home.packages = with pkgs; [ obs-studio ]; - # For the moment, this hosts some network-accessible services, so we want it on 24/7 - programs.plasma.powerdevil.AC.autoSuspend.action = "nothing"; }; qenya.services.remote-builder = { diff --git a/hosts/kilgharrah/plasma.nix b/hosts/kilgharrah/plasma.nix new file mode 100644 index 0000000..90d1191 --- /dev/null +++ b/hosts/kilgharrah/plasma.nix @@ -0,0 +1,23 @@ +{ config, lib, pkgs, inputs, ... }: + +let + inherit (lib) mkForce; +in +{ + services.xserver.displayManager.gdm.enable = mkForce false; + services.xserver.desktopManager.gnome.enable = mkForce false; + services.displayManager.sddm.enable = true; + services.displayManager.sddm.wayland.enable = true; + services.desktopManager.plasma6.enable = true; + + home-manager.users.qenya = { pkgs, ... }: { + imports = [ + inputs.plasma-manager.homeManagerModules.plasma-manager + ]; + programs.plasma.enable = true; + programs.plasma.overrideConfig = true; + + # For the moment, this hosts some network-accessible services, so we want it on 24/7 + programs.plasma.powerdevil.AC.autoSuspend.action = "nothing"; + }; +} From 303335ee3bee209be775f3a350ad44e00ca57bc7 Mon Sep 17 00:00:00 2001 From: Katherina Walshe-Grey Date: Thu, 29 May 2025 11:48:32 +0100 Subject: [PATCH 2/4] kilgharrah: Move to nixpkgs unstable --- flake.nix | 98 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 51 insertions(+), 47 deletions(-) diff --git a/flake.nix b/flake.nix index bac5ec5..90c14c3 100644 --- a/flake.nix +++ b/flake.nix @@ -114,55 +114,59 @@ }; }; - flake.colmena = { - meta = { - nixpkgs = import nixpkgs-unstable { - system = "x86_64-linux"; - overlays = [ - inputs.lix-module.overlays.default + flake.colmena = + let + home-manager = inputs.home-manager.nixosModules.home-manager; + home-manager-unstable = inputs.home-manager-unstable.nixosModules.home-manager; + in + { + meta = { + nixpkgs = import nixpkgs-unstable { + system = "x86_64-linux"; + overlays = [ + inputs.lix-module.overlays.default + ]; + }; + nodeNixpkgs = { + kilgharrah = import nixpkgs-unstable { system = "x86_64-linux"; }; + tohru = import nixpkgs { system = "x86_64-linux"; }; + elucredassa = import nixpkgs-small { system = "x86_64-linux"; }; + yevaud = import nixpkgs-small { system = "x86_64-linux"; }; + orm = import nixpkgs-small { system = "x86_64-linux"; }; + kalessin = import nixpkgs-small { system = "aarch64-linux"; }; + tehanu = import nixpkgs-small { system = "aarch64-linux"; }; + }; + specialArgs = { + inherit self; + inherit inputs; + }; + }; + + defaults = { config, lib, pkgs, ... }: { + deployment.targetHost = lib.mkDefault config.networking.fqdn; + deployment.buildOnTarget = lib.mkDefault true; + + imports = [ + inputs.lix-module.nixosModules.default + inputs.agenix.nixosModules.default + inputs.birdsong.nixosModules.default + ./common + ./services + (builtins.toPath "${inputs.randomcat}/services/default.nix") ]; }; - nodeNixpkgs = { - kilgharrah = import nixpkgs { system = "x86_64-linux"; }; - tohru = import nixpkgs { system = "x86_64-linux"; }; - elucredassa = import nixpkgs-small { system = "x86_64-linux"; }; - yevaud = import nixpkgs-small { system = "x86_64-linux"; }; - orm = import nixpkgs-small { system = "x86_64-linux"; }; - kalessin = import nixpkgs-small { system = "aarch64-linux"; }; - tehanu = import nixpkgs-small { system = "aarch64-linux"; }; - }; - specialArgs = { - inherit self; - inherit inputs; - }; + + kilgharrah.deployment.targetHost = null; # disable remote deployment + tohru.deployment.targetHost = null; # disable remote deployment + elucredassa.deployment.targetHost = "10.127.3.2"; # no fqdn yet + + kilgharrah.imports = [ ./hosts/kilgharrah home-manager-unstable ]; + tohru.imports = [ ./hosts/tohru home-manager ]; + elucredassa.imports = [ ./hosts/elucredassa home-manager ]; + yevaud.imports = [ ./hosts/yevaud home-manager ]; + orm.imports = [ ./hosts/orm home-manager ]; + kalessin.imports = [ ./hosts/kalessin home-manager ]; + tehanu.imports = [ ./hosts/tehanu home-manager ]; }; - - defaults = { config, lib, pkgs, ... }: { - deployment.targetHost = lib.mkDefault config.networking.fqdn; - deployment.buildOnTarget = lib.mkDefault true; - - imports = [ - inputs.lix-module.nixosModules.default - inputs.home-manager.nixosModules.home-manager - inputs.agenix.nixosModules.default - inputs.birdsong.nixosModules.default - ./common - ./services - (builtins.toPath "${inputs.randomcat}/services/default.nix") - ]; - }; - - kilgharrah.deployment.targetHost = null; # disable remote deployment - tohru.deployment.targetHost = null; # disable remote deployment - elucredassa.deployment.targetHost = "10.127.3.2"; # no fqdn yet - - kilgharrah.imports = [ ./hosts/kilgharrah ]; - tohru.imports = [ ./hosts/tohru ]; - elucredassa.imports = [ ./hosts/elucredassa ]; - yevaud.imports = [ ./hosts/yevaud ]; - orm.imports = [ ./hosts/orm ]; - kalessin.imports = [ ./hosts/kalessin ]; - tehanu.imports = [ ./hosts/tehanu ]; - }; }; } From ee984ad59161a00f89a44ec8185528d31072d075 Mon Sep 17 00:00:00 2001 From: Katherina Walshe-Grey Date: Thu, 29 May 2025 11:49:08 +0100 Subject: [PATCH 3/4] qenya/fonts: Update deprecated options for NixOS 25.05 --- home/qenya/default.nix | 2 +- home/qenya/{fontconfig.nix => fonts.nix} | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename home/qenya/{fontconfig.nix => fonts.nix} (71%) diff --git a/home/qenya/default.nix b/home/qenya/default.nix index fff0309..f367f63 100644 --- a/home/qenya/default.nix +++ b/home/qenya/default.nix @@ -2,7 +2,7 @@ imports = [ ./dconf ./firefox.nix - ./fontconfig.nix + ./fonts.nix ./git.nix ./packages.nix ./tmux.nix diff --git a/home/qenya/fontconfig.nix b/home/qenya/fonts.nix similarity index 71% rename from home/qenya/fontconfig.nix rename to home/qenya/fonts.nix index 6d8e61a..e1b418f 100644 --- a/home/qenya/fontconfig.nix +++ b/home/qenya/fonts.nix @@ -13,5 +13,5 @@ mkIf isGraphical { meslo-lgs-nf ]; - programs.vscode.userSettings."terminal.integrated.fontFamily" = "MesloLGS NF"; + programs.vscode.profiles.default.userSettings."terminal.integrated.fontFamily" = "MesloLGS NF"; } From a299d94fc62b62195b7ea02850d2a442fc39dfc5 Mon Sep 17 00:00:00 2001 From: Katherina Walshe-Grey Date: Thu, 29 May 2025 15:36:17 +0100 Subject: [PATCH 4/4] kilgharrah: Apply Plasma theming --- hosts/kilgharrah/plasma.nix | 93 +++++++++++++++++++++++++++++++++++-- 1 file changed, 89 insertions(+), 4 deletions(-) diff --git a/hosts/kilgharrah/plasma.nix b/hosts/kilgharrah/plasma.nix index 90d1191..6312829 100644 --- a/hosts/kilgharrah/plasma.nix +++ b/hosts/kilgharrah/plasma.nix @@ -10,14 +10,99 @@ in services.displayManager.sddm.wayland.enable = true; services.desktopManager.plasma6.enable = true; + environment.systemPackages = with pkgs; [ + (catppuccin-kde.override { + flavour = [ "mocha" ]; + accents = [ "mauve" ]; + winDecStyles = [ "modern" ]; + }) + ]; + home-manager.users.qenya = { pkgs, ... }: { imports = [ inputs.plasma-manager.homeManagerModules.plasma-manager ]; - programs.plasma.enable = true; - programs.plasma.overrideConfig = true; - # For the moment, this hosts some network-accessible services, so we want it on 24/7 - programs.plasma.powerdevil.AC.autoSuspend.action = "nothing"; + programs.plasma = { + enable = true; + overrideConfig = true; + + workspace = { + lookAndFeel = "Catppuccin-Mocha-Mauve"; + colorScheme = "CatppuccinMochaMauve"; + splashScreen.engine = "KSplashQML"; + splashScreen.theme = "Catppuccin-Mocha-Mauve"; + windowDecorations.library = "org.kde.kwin.aurorae"; + windowDecorations.theme = "__aurorae__svg__CatppuccinMocha-Modern"; + }; + + # For the moment, this hosts some network-accessible services, so we want it on 24/7 + powerdevil.AC.autoSuspend.action = "nothing"; + + panels = [ + # Dock + { + height = 49; # 41 * 1.2 + lengthMode = "fit"; + location = "bottom"; + alignment = "center"; + hiding = "dodgewindows"; + widgets = [{ + name = "org.kde.plasma.icontasks"; + config.General = { + fill = false; + iconSpacing = 2; + launchers = lib.concatStringsSep "," [ + "applications:discord.desktop" + "applications:firefox.desktop" + "applications:codium-url-handler.desktop" + "applications:steam.desktop" + "applications:org.kde.dolphin.desktop" + "applications:org.kde.konsole.desktop" + "applications:org.kde.plasma-systemmonitor.desktop" + ]; + maxStripes = 1; + showOnlyCurrentDesktop = false; + showOnlyCurrentScreen = false; + }; + }]; + screen = "all"; + } + + # Top bar + { + height = 29; # 24 * 1.2 + location = "top"; + alignment = "left"; + floating = false; + widgets = [ + { + name = "org.kde.plasma.kickoff"; + config.General = { + lengthFirstMargin = 7; + }; + } + { name = "org.kde.plasma.panelspacer"; } + { + name = "org.kde.plasma.digitalclock"; + config.Appearance = { + autoFontAndSize = false; + customDateFormat = "dddd, d MMM"; + dateDisplayFormat = "BesideTime"; + dateFormat = "custom"; + fontFamily = "Inter"; + fontStyleName = "Bold"; + fontWeight = 700; + boldText = true; + showWeekNumbers = true; + }; + } + { name = "org.kde.plasma.panelspacer"; } + { name = "org.kde.plasma.systemtray"; } + ]; + screen = "all"; + } + ]; + }; }; }