From db02ef369cd33720829450099289536e3fe18521 Mon Sep 17 00:00:00 2001 From: Tyler Starr Date: Sat, 28 Sep 2024 21:30:32 -0700 Subject: [PATCH] migrate to combined home/normal modules --- provision/home-modules/default.nix | 4 --- provision/home-modules/desktop/kitty.nix | 23 ----------------- provision/hosts/bulwark/configuration.nix | 18 +++---------- provision/hosts/bulwark/default.nix | 11 +++----- provision/hosts/kestrel/configuration.nix | 12 +++------ provision/hosts/kestrel/default.nix | 11 +++----- provision/hosts/shivan/configuration.nix | 16 ++---------- provision/hosts/shivan/default.nix | 11 +++----- provision/hosts/torus/configuration.nix | 8 ------ provision/hosts/torus/default.nix | 11 +++----- provision/hosts/wsl/default.nix | 9 ++----- provision/modules/default.nix | 2 +- .../desktop => modules/programs}/default.nix | 0 provision/modules/programs/kitty.nix | 25 +++++++++++++++++++ 14 files changed, 48 insertions(+), 113 deletions(-) delete mode 100644 provision/home-modules/default.nix delete mode 100644 provision/home-modules/desktop/kitty.nix rename provision/{home-modules/desktop => modules/programs}/default.nix (100%) create mode 100644 provision/modules/programs/kitty.nix diff --git a/provision/home-modules/default.nix b/provision/home-modules/default.nix deleted file mode 100644 index 6f69d8c4..00000000 --- a/provision/home-modules/default.nix +++ /dev/null @@ -1,4 +0,0 @@ -{ ... }: -{ - imports = [ ./desktop ]; -} diff --git a/provision/home-modules/desktop/kitty.nix b/provision/home-modules/desktop/kitty.nix deleted file mode 100644 index 77f0f93f..00000000 --- a/provision/home-modules/desktop/kitty.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ config, lib, pkgs, user, ... }: - -let cfg = config.modules.desktop.kitty; -in { - options.modules.desktop.kitty.enable = lib.mkEnableOption "kitty"; - config = lib.mkIf cfg.enable { - home.packages = with pkgs; [ - nerdfonts - ]; - - programs.kitty = { - enable = true; - theme = "Gruvbox Dark"; - font.name = "JetBrainsMono Nerd Font"; - shellIntegration.mode = "no-cursor"; - settings = { - disable_ligatures = "never"; - cursor_shape = "block"; - linux_display_server = "x11"; - }; - }; - }; -} diff --git a/provision/hosts/bulwark/configuration.nix b/provision/hosts/bulwark/configuration.nix index 2b4cee51..ea617e45 100644 --- a/provision/hosts/bulwark/configuration.nix +++ b/provision/hosts/bulwark/configuration.nix @@ -26,35 +26,23 @@ browser.enable = true; }; devel = { - engineering.enable = false; notes.enable = true; - python.enable = false; - tooling.enable = false; }; gaming = { steam.enable = true; emulation.enable = true; misc.enable = true; }; + programs = { + kitty.enable = true; + }; services = { - jellyfin.enable = false; - peripherals.enable = false; samba-client.enable = true; - virt-manager.enable = false; }; system = { nipr.enable = true; ssh.enable = true; terminal.enable = true; - wireguard-client.enable = false; - }; - }; - - home-manager.users.${user} = { - modules = { - desktop = { - kitty.enable = true; - }; }; }; } diff --git a/provision/hosts/bulwark/default.nix b/provision/hosts/bulwark/default.nix index e94cc543..7531c154 100644 --- a/provision/hosts/bulwark/default.nix +++ b/provision/hosts/bulwark/default.nix @@ -1,11 +1,11 @@ { lib, system, user, inputs, agenix, home-manager, jovian-nixos, ... }: { inherit system; - specialArgs = { inherit user inputs; }; + specialArgs = { inherit user inputs home-manger; }; modules = [ - ../default # shared by all configs + ../default # shared by all configs ../default/physical/configuration.nix # shared by physical machines - ./configuration.nix # bulwark specific + ./configuration.nix # bulwark specific ./hardware.nix ../../modules agenix.nixosModules.default @@ -13,11 +13,6 @@ home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.extraSpecialArgs = { inherit user; }; - home-manager.users.${user} = { - imports = [ - ../../home-modules - ]; - }; } ]; } diff --git a/provision/hosts/kestrel/configuration.nix b/provision/hosts/kestrel/configuration.nix index 5efac30d..59cea334 100644 --- a/provision/hosts/kestrel/configuration.nix +++ b/provision/hosts/kestrel/configuration.nix @@ -52,8 +52,10 @@ emulation.enable = true; misc.enable = true; }; + programs = { + kitty.enable = true; + }; services = { - jellyfin.enable = false; peripherals.enable = true; samba-client.enable = true; virt-manager.enable = true; @@ -71,12 +73,4 @@ }; }; }; - - home-manager.users.${user} = { - modules = { - desktop = { - kitty.enable = true; - }; - }; - }; } diff --git a/provision/hosts/kestrel/default.nix b/provision/hosts/kestrel/default.nix index 5e1505e4..c4d30e18 100644 --- a/provision/hosts/kestrel/default.nix +++ b/provision/hosts/kestrel/default.nix @@ -1,11 +1,11 @@ { lib, system, user, inputs, agenix, home-manager, ... }: { inherit system; - specialArgs = { inherit user inputs; }; + specialArgs = { inherit user inputs home-manager; }; modules = [ - ../default # shared by all configs + ../default # shared by all configs ../default/physical/configuration.nix # shared by physical machines - ./configuration.nix # kestrel specific + ./configuration.nix # kestrel specific ./hardware.nix ../../modules agenix.nixosModules.default @@ -13,11 +13,6 @@ home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.extraSpecialArgs = { inherit user; }; - home-manager.users.${user} = { - imports = [ - ../../home-modules - ]; - }; } ]; } diff --git a/provision/hosts/shivan/configuration.nix b/provision/hosts/shivan/configuration.nix index 94090f70..90fc5194 100644 --- a/provision/hosts/shivan/configuration.nix +++ b/provision/hosts/shivan/configuration.nix @@ -35,13 +35,10 @@ python.enable = true; tooling.enable = true; }; - gaming = { - steam.enable = false; - emulation.enable = false; - misc.enable = false; + programs = { + kitty.enable = true; }; services = { - jellyfin.enable = false; peripherals.enable = true; samba-client.enable = true; virt-manager.enable = false; @@ -50,15 +47,6 @@ nipr = true; ssh.enable = true; terminal.enable = true; - wireguard-client.enable = false; - }; - }; - - home-manager.users.${user} = { - modules = { - desktop = { - kitty.enable = true; - }; }; }; } diff --git a/provision/hosts/shivan/default.nix b/provision/hosts/shivan/default.nix index adad5bb3..f4fcc139 100644 --- a/provision/hosts/shivan/default.nix +++ b/provision/hosts/shivan/default.nix @@ -1,11 +1,11 @@ { lib, system, user, inputs, agenix, home-manager, ... }: { inherit system; - specialArgs = { inherit user inputs; }; + specialArgs = { inherit user inputs home-manager; }; modules = [ - ../default # shared by all configs + ../default # shared by all configs ../default/physical/configuration.nix # shared by physical machines - ./configuration.nix # shivan specific + ./configuration.nix # shivan specific ./hardware.nix ../../modules agenix.nixosModules.default @@ -13,11 +13,6 @@ home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.extraSpecialArgs = { inherit user; }; - home-manager.users.${user} = { - imports = [ - ../../home-modules - ]; - }; } ]; } diff --git a/provision/hosts/torus/configuration.nix b/provision/hosts/torus/configuration.nix index 6d02a219..2c0d9c3e 100644 --- a/provision/hosts/torus/configuration.nix +++ b/provision/hosts/torus/configuration.nix @@ -104,12 +104,4 @@ ssh.enable = true; }; }; - - home-manager.users.${user} = { - modules = { - desktop = { - kitty.enable = false; - }; - }; - }; } diff --git a/provision/hosts/torus/default.nix b/provision/hosts/torus/default.nix index 95474614..237ab50e 100644 --- a/provision/hosts/torus/default.nix +++ b/provision/hosts/torus/default.nix @@ -1,11 +1,11 @@ { lib, system, user, inputs, agenix, home-manager, ... }: { inherit system; - specialArgs = { inherit user inputs; }; + specialArgs = { inherit user inputs home-manager; }; modules = [ - ../default # shared by all configs + ../default # shared by all configs ../default/physical/configuration.nix # shared by physical machines - ./configuration.nix # torus specific + ./configuration.nix # torus specific ./hardware.nix ../../modules agenix.nixosModules.default @@ -13,11 +13,6 @@ home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.extraSpecialArgs = { inherit user; }; - home-manager.users.${user} = { - imports = [ - ../../home-modules - ]; - }; } ]; } diff --git a/provision/hosts/wsl/default.nix b/provision/hosts/wsl/default.nix index 474d520a..deff9fdf 100644 --- a/provision/hosts/wsl/default.nix +++ b/provision/hosts/wsl/default.nix @@ -1,9 +1,9 @@ { lib, system, user, inputs, agenix, home-manager, nixos-wsl, ... }: { inherit system; - specialArgs = { inherit user inputs nixos-wsl; }; + specialArgs = { inherit user inputs nixos-wsl home-manger; }; modules = [ - ../default # shared by all configs + ../default # shared by all configs ./configuration.nix # wsl specific ../../modules agenix.nixosModules.default @@ -11,11 +11,6 @@ home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.extraSpecialArgs = { inherit user; }; - home-manager.users.${user} = { - imports = [ - ../../home-modules - ]; - }; } ]; } diff --git a/provision/modules/default.nix b/provision/modules/default.nix index c46492bc..8fa5036a 100644 --- a/provision/modules/default.nix +++ b/provision/modules/default.nix @@ -1,4 +1,4 @@ { ... }: { - imports = [ ./desktop ./devel ./gaming ./system ./services ]; + imports = [ ./desktop ./devel ./gaming ./programs ./system ./services ]; } diff --git a/provision/home-modules/desktop/default.nix b/provision/modules/programs/default.nix similarity index 100% rename from provision/home-modules/desktop/default.nix rename to provision/modules/programs/default.nix diff --git a/provision/modules/programs/kitty.nix b/provision/modules/programs/kitty.nix new file mode 100644 index 00000000..4a8071a9 --- /dev/null +++ b/provision/modules/programs/kitty.nix @@ -0,0 +1,25 @@ +{ config, lib, pkgs, user, inputs, home-manager, ... }: + +let cfg = config.modules.programs.kitty; +in { + options.modules.programs.kitty.enable = lib.mkEnableOption "kitty"; + config = lib.mkIf cfg.enable { + home-manager.users.${user} = { + home.packages = with pkgs; [ + nerdfonts + ]; + + programs.kitty = { + enable = true; + theme = "Gruvbox Dark"; + font.name = "JetBrainsMono Nerd Font"; + shellIntegration.mode = "no-cursor"; + settings = { + disable_ligatures = "never"; + cursor_shape = "block"; + linux_display_server = "x11"; + }; + }; + }; + }; +}