From 087a6fe757b6ae3d171df613207ef5ace41f8e80 Mon Sep 17 00:00:00 2001 From: Gene Liverman Date: Wed, 4 Dec 2024 06:54:47 -0500 Subject: [PATCH 01/18] Stop redefining nixpkgs on NixOS --- flake.nix | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/flake.nix b/flake.nix index 4c85f9a..41f105a 100644 --- a/flake.nix +++ b/flake.nix @@ -119,17 +119,20 @@ # creates a nixos system config nixosHostConfig = { system, hostname, username, additionalModules, additionalSpecialArgs }: nixpkgs.lib.nixosSystem { - specialArgs = { inherit inputs compose2nix hostname username; - pkgs = import nixpkgs { - inherit system; - config = { - allowUnfree = true; - permittedInsecurePackages = [ "olm-3.2.16" "electron-27.3.11" ]; - }; - overlays = [ nixpkgs-terraform.overlays.default ]; - }; - } // additionalSpecialArgs; + inherit system; + specialArgs = { inherit inputs compose2nix hostname username; } // additionalSpecialArgs; modules = [ + # move this to a common file later + ({ + nixpkgs = { + config = { + allowUnfree = true; + permittedInsecurePackages = [ "olm-3.2.16" "electron-27.3.11" ]; + }; + overlays = [ nixpkgs-terraform.overlays.default ]; + }; + }) + disko.nixosModules.disko home-manager.nixosModules.home-manager { From 16f492663d363c57e32d8ddf11cd3e5aba6e52ab Mon Sep 17 00:00:00 2001 From: Gene Liverman Date: Wed, 4 Dec 2024 06:56:03 -0500 Subject: [PATCH 02/18] Reenable COSMIC The fixing of nixpkgs unbroke COSMIC for me. I found the issue a while back thanks to an error message it provided. --- flake.nix | 2 +- modules/hosts/nixos/rainbow-planet/default.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index 41f105a..48fde39 100644 --- a/flake.nix +++ b/flake.nix @@ -255,7 +255,7 @@ hostname = "rainbow-planet"; username = "gene"; additionalModules = [ - #nixos-cosmic.nixosModules.default + nixos-cosmic.nixosModules.default nixos-hardware.nixosModules.dell-xps-13-9360 ]; additionalSpecialArgs = {}; diff --git a/modules/hosts/nixos/rainbow-planet/default.nix b/modules/hosts/nixos/rainbow-planet/default.nix index bcf7986..751d4d4 100644 --- a/modules/hosts/nixos/rainbow-planet/default.nix +++ b/modules/hosts/nixos/rainbow-planet/default.nix @@ -89,7 +89,7 @@ services = { boinc.enable = true; dbus.implementation = "broker"; - #desktopManager.cosmic.enable = true; + desktopManager.cosmic.enable = true; desktopManager.plasma6.enable = true; displayManager.sddm = { enable = true; From 537dbf0b8299948a804065f0ac19b5223a5a5cb8 Mon Sep 17 00:00:00 2001 From: Gene Liverman Date: Wed, 4 Dec 2024 06:58:43 -0500 Subject: [PATCH 03/18] Some playground bits for trying restructuring --- 2024-12-rework/.gitignore | 2 + 2024-12-rework/configuration.nix | 25 +++ 2024-12-rework/flake.lock | 183 ++++++++++++++++++++++ 2024-12-rework/flake.nix | 30 ++++ 2024-12-rework/hardware-configuration.nix | 44 ++++++ 2024-12-rework/nixpkgs-settings.nix | 9 ++ 6 files changed, 293 insertions(+) create mode 100644 2024-12-rework/.gitignore create mode 100644 2024-12-rework/configuration.nix create mode 100644 2024-12-rework/flake.lock create mode 100644 2024-12-rework/flake.nix create mode 100644 2024-12-rework/hardware-configuration.nix create mode 100644 2024-12-rework/nixpkgs-settings.nix diff --git a/2024-12-rework/.gitignore b/2024-12-rework/.gitignore new file mode 100644 index 0000000..e370078 --- /dev/null +++ b/2024-12-rework/.gitignore @@ -0,0 +1,2 @@ +result/ +result diff --git a/2024-12-rework/configuration.nix b/2024-12-rework/configuration.nix new file mode 100644 index 0000000..5d52004 --- /dev/null +++ b/2024-12-rework/configuration.nix @@ -0,0 +1,25 @@ +{ inputs, pkgs, ... }: { + imports = [ + ./hardware-configuration.nix + ]; + + system.stateVersion = "23.05"; + + boot = { + initrd.systemd = { + enable = true; + network.wait-online.enable = false; # Handled by NetworkManager + }; + loader = { + efi.canTouchEfiVariables = true; + systemd-boot= { + enable = true; + consoleMode = "1"; + }; + }; + }; + + environment.systemPackages = with pkgs; [ + olm + ]; +} \ No newline at end of file diff --git a/2024-12-rework/flake.lock b/2024-12-rework/flake.lock new file mode 100644 index 0000000..49ad4fd --- /dev/null +++ b/2024-12-rework/flake.lock @@ -0,0 +1,183 @@ +{ + "nodes": { + "config": { + "locked": { + "dir": "templates/config", + "lastModified": 1719931926, + "narHash": "sha256-B8j9lHX0LqWlZkm8JxZRN6919RQjJEu/1J1SR8pU/ww=", + "owner": "stackbuilders", + "repo": "nixpkgs-terraform", + "rev": "034287ee462c87dadc14a94d4b53a48ed66c7b3d", + "type": "github" + }, + "original": { + "dir": "templates/config", + "owner": "stackbuilders", + "repo": "nixpkgs-terraform", + "type": "github" + } + }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1722555600, + "narHash": "sha256-XOQkdLafnb/p9ij77byFQjDf5m5QYl9b2REiVClC+x4=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "8471fe90ad337a8074e957b69ca4d0089218391d", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1733050161, + "narHash": "sha256-lYnT+EYE47f5yY3KS/Kd4pJ6CO9fhCqumkYYkQ3TK20=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "62d536255879be574ebfe9b87c4ac194febf47c5", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "release-24.11", + "repo": "home-manager", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1733120037, + "narHash": "sha256-En+gSoVJ3iQKPDU1FHrR6zIxSLXKjzKY+pnh9tt+Yts=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "f9f0d5c5380be0a599b1fb54641fa99af8281539", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-24.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-1_0": { + "locked": { + "lastModified": 1699291058, + "narHash": "sha256-5ggduoaAMPHUy4riL+OrlAZE14Kh7JWX4oLEs22ZqfU=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "41de143fda10e33be0f47eab2bfe08a50f234267", + "type": "github" + }, + "original": { + "owner": "nixos", + "repo": "nixpkgs", + "rev": "41de143fda10e33be0f47eab2bfe08a50f234267", + "type": "github" + } + }, + "nixpkgs-1_6": { + "locked": { + "lastModified": 1712757991, + "narHash": "sha256-kR7C7Fqt3JP40h0mzmSZeWI5pk1iwqj4CSeGjnUbVHc=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "d6b3ddd253c578a7ab98f8011e59990f21dc3932", + "type": "github" + }, + "original": { + "owner": "nixos", + "repo": "nixpkgs", + "rev": "d6b3ddd253c578a7ab98f8011e59990f21dc3932", + "type": "github" + } + }, + "nixpkgs-1_9": { + "locked": { + "lastModified": 1732617236, + "narHash": "sha256-PYkz6U0bSEaEB1al7O1XsqVNeSNS+s3NVclJw7YC43w=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "af51545ec9a44eadf3fe3547610a5cdd882bc34e", + "type": "github" + }, + "original": { + "owner": "nixos", + "repo": "nixpkgs", + "rev": "af51545ec9a44eadf3fe3547610a5cdd882bc34e", + "type": "github" + } + }, + "nixpkgs-lib": { + "locked": { + "lastModified": 1722555339, + "narHash": "sha256-uFf2QeW7eAHlYXuDktm9c25OxOyCoUOQmh5SZ9amE5Q=", + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/a5d394176e64ab29c852d03346c1fc9b0b7d33eb.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/a5d394176e64ab29c852d03346c1fc9b0b7d33eb.tar.gz" + } + }, + "nixpkgs-terraform": { + "inputs": { + "config": "config", + "flake-parts": "flake-parts", + "nixpkgs-1_0": "nixpkgs-1_0", + "nixpkgs-1_6": "nixpkgs-1_6", + "nixpkgs-1_9": "nixpkgs-1_9", + "systems": "systems" + }, + "locked": { + "lastModified": 1732844581, + "narHash": "sha256-BwHD1d6Bl5LL/HciTf+mQmBN3I3S6nYqcB+5BXVozNk=", + "owner": "stackbuilders", + "repo": "nixpkgs-terraform", + "rev": "b4db1b59d8f62cd37b6f9540e368d0e2627c4a2d", + "type": "github" + }, + "original": { + "owner": "stackbuilders", + "repo": "nixpkgs-terraform", + "type": "github" + } + }, + "root": { + "inputs": { + "home-manager": "home-manager", + "nixpkgs": "nixpkgs", + "nixpkgs-terraform": "nixpkgs-terraform" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/2024-12-rework/flake.nix b/2024-12-rework/flake.nix new file mode 100644 index 0000000..394abbb --- /dev/null +++ b/2024-12-rework/flake.nix @@ -0,0 +1,30 @@ +{ + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11"; + + home-manager = { + url = "github:nix-community/home-manager/release-24.11"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + nixpkgs-terraform = { + url = "github:stackbuilders/nixpkgs-terraform"; + # inputs.nixpkgs-1_6.follows = "nixpkgs"; + # inputs.nixpkgs-1_9.follows = "nixpkgs-unstable"; + }; + }; + + outputs = inputs: { + nixosConfigurations = { + rainbow-planet = inputs.nixpkgs.lib.nixosSystem { + specialArgs = { inherit inputs; }; + system = "x86_64-linux"; + modules = [ + ./configuration.nix + ./nixpkgs-settings.nix + inputs.home-manager.nixosModules.home-manager + ]; + }; + }; + }; +} diff --git a/2024-12-rework/hardware-configuration.nix b/2024-12-rework/hardware-configuration.nix new file mode 100644 index 0000000..d3c51fe --- /dev/null +++ b/2024-12-rework/hardware-configuration.nix @@ -0,0 +1,44 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.kernelParams = [ + "i915.enable_fbc=1" + "i915.enable_psr=2" + ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/eb9a2c7e-ae61-4d06-9464-49b98d576f7c"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/924D-E7A4"; + fsType = "vfat"; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/166d24ca-401c-492e-845d-bb1d0d6d7d86"; } + ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp58s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/2024-12-rework/nixpkgs-settings.nix b/2024-12-rework/nixpkgs-settings.nix new file mode 100644 index 0000000..ec86e08 --- /dev/null +++ b/2024-12-rework/nixpkgs-settings.nix @@ -0,0 +1,9 @@ +{ inputs, ... }: { + nixpkgs = { + config = { + allowUnfree = true; + permittedInsecurePackages = [ "olm-3.2.16" "electron-27.3.11" ]; + }; + overlays = [ inputs.nixpkgs-terraform.overlays.default ]; + }; +} \ No newline at end of file From e1d4cddda0c72c38d76346d125149f525201f323 Mon Sep 17 00:00:00 2001 From: Gene Liverman Date: Wed, 4 Dec 2024 08:44:52 -0500 Subject: [PATCH 04/18] Move nixosHostConfig out of flake.nix --- flake.nix | 70 ++++++----------------------------------- lib/default.nix | 12 +++++++ lib/nixosHostConfig.nix | 40 +++++++++++++++++++++++ 3 files changed, 62 insertions(+), 60 deletions(-) create mode 100644 lib/default.nix create mode 100644 lib/nixosHostConfig.nix diff --git a/flake.nix b/flake.nix index 48fde39..bfb9d9c 100644 --- a/flake.nix +++ b/flake.nix @@ -79,6 +79,10 @@ home-manager, nix-darwin, nix-flatpak, nix-homebrew, nixos-cosmic, nixos-hardware, nixpkgs-terraform, simple-nixos-mailserver, sops-nix, ... }: let + # Functions that setup systems + mylib = import ./lib { inherit inputs nixpkgs nixpkgs-unstable compose2nix disko flox genebean-omp-themes + home-manager nix-darwin nix-flatpak nix-homebrew nixos-cosmic + nixos-hardware nixpkgs-terraform simple-nixos-mailserver sops-nix; }; # creates a macOS system config darwinHostConfig = { system, hostname, username, additionalModules, additionalSpecialArgs }: nix-darwin.lib.darwinSystem { @@ -117,43 +121,6 @@ ] ++ additionalModules; # end modules }; # end darwinSystem - # creates a nixos system config - nixosHostConfig = { system, hostname, username, additionalModules, additionalSpecialArgs }: nixpkgs.lib.nixosSystem { - inherit system; - specialArgs = { inherit inputs compose2nix hostname username; } // additionalSpecialArgs; - modules = [ - # move this to a common file later - ({ - nixpkgs = { - config = { - allowUnfree = true; - permittedInsecurePackages = [ "olm-3.2.16" "electron-27.3.11" ]; - }; - overlays = [ nixpkgs-terraform.overlays.default ]; - }; - }) - - disko.nixosModules.disko - - home-manager.nixosModules.home-manager { - home-manager = { - extraSpecialArgs = { inherit genebean-omp-themes hostname username; }; - useGlobalPkgs = true; - useUserPackages = true; - users.${username}.imports = [ - ./modules/home-manager/hosts/${hostname}/${username}.nix - ]; - }; - } - - nix-flatpak.nixosModules.nix-flatpak - - sops-nix.nixosModules.sops # system wide secrets management - ./modules/system/common/all-nixos.nix # system-wide stuff - ./modules/hosts/nixos/${hostname} # host specific stuff - ] ++ additionalModules; - }; # end nixosSystem - linuxHomeConfig = { system, hostname, username, additionalModules, additionalSpecialArgs }: home-manager.lib.homeManagerConfiguration { extraSpecialArgs = { inherit genebean-omp-themes hostname username; pkgs = import nixpkgs { @@ -205,60 +172,43 @@ # NixOS hosts nixosConfigurations = { - bigboy = nixosHostConfig { - system = "x86_64-linux"; + bigboy = mylib.nixosHostConfig { hostname = "bigboy"; - username = "gene"; additionalModules = [ nixos-hardware.nixosModules.lenovo-thinkpad-p52 ]; - additionalSpecialArgs = {}; }; - hetznix01 = nixosHostConfig { - system = "x86_64-linux"; + hetznix01 = mylib.nixosHostConfig { hostname = "hetznix01"; - username = "gene"; additionalModules = [ simple-nixos-mailserver.nixosModule ]; - additionalSpecialArgs = {}; }; - hetznix02 = nixosHostConfig { + hetznix02 = mylib.nixosHostConfig { system = "aarch64-linux"; hostname = "hetznix02"; - username = "gene"; additionalModules = [ # simple-nixos-mailserver.nixosModule ]; - additionalSpecialArgs = {}; }; - nixnas1 = nixosHostConfig { - system = "x86_64-linux"; + nixnas1 = mylib.nixosHostConfig { hostname = "nixnas1"; - username = "gene"; additionalModules = [ simple-nixos-mailserver.nixosModule ]; - additionalSpecialArgs = {}; }; - nixnuc = nixosHostConfig { - system = "x86_64-linux"; + nixnuc = mylib.nixosHostConfig { hostname = "nixnuc"; - username = "gene"; additionalModules = [ simple-nixos-mailserver.nixosModule ]; - additionalSpecialArgs = {}; }; - rainbow-planet = nixosHostConfig { - system = "x86_64-linux"; + rainbow-planet = mylib.nixosHostConfig { hostname = "rainbow-planet"; - username = "gene"; additionalModules = [ nixos-cosmic.nixosModules.default nixos-hardware.nixosModules.dell-xps-13-9360 ]; - additionalSpecialArgs = {}; }; }; # end nixosConfigurations diff --git a/lib/default.nix b/lib/default.nix new file mode 100644 index 0000000..788639b --- /dev/null +++ b/lib/default.nix @@ -0,0 +1,12 @@ +{ inputs, nixpkgs, nixpkgs-unstable, compose2nix, disko, flox, genebean-omp-themes, + home-manager, nix-darwin, nix-flatpak, nix-homebrew, nixos-cosmic, + nixos-hardware, nixpkgs-terraform, simple-nixos-mailserver, sops-nix, ... +}: let + nixosHostConfig = import ./nixosHostConfig.nix { inherit inputs nixpkgs nixpkgs-unstable compose2nix disko flox genebean-omp-themes + home-manager nix-darwin nix-flatpak nix-homebrew nixos-cosmic + nixos-hardware nixpkgs-terraform simple-nixos-mailserver sops-nix; }; +in { + inherit (nixosHostConfig) + nixosHostConfig + ; +} \ No newline at end of file diff --git a/lib/nixosHostConfig.nix b/lib/nixosHostConfig.nix new file mode 100644 index 0000000..ebafe5e --- /dev/null +++ b/lib/nixosHostConfig.nix @@ -0,0 +1,40 @@ +{ inputs, nixpkgs, nixpkgs-unstable, compose2nix, disko, flox, genebean-omp-themes, + home-manager, nix-darwin, nix-flatpak, nix-homebrew, nixos-cosmic, + nixos-hardware, nixpkgs-terraform, simple-nixos-mailserver, sops-nix, ... +}: { + nixosHostConfig = { system ? "x86_64-linux", hostname, username ? "gene", additionalModules ? [], additionalSpecialArgs ? {} }: nixpkgs.lib.nixosSystem { + inherit system; + specialArgs = { inherit inputs compose2nix hostname username; } // additionalSpecialArgs; + modules = [ + # move this to a common file later + ({ + nixpkgs = { + config = { + allowUnfree = true; + permittedInsecurePackages = [ "olm-3.2.16" "electron-27.3.11" ]; + }; + overlays = [ nixpkgs-terraform.overlays.default ]; + }; + }) + + disko.nixosModules.disko + + home-manager.nixosModules.home-manager { + home-manager = { + extraSpecialArgs = { inherit genebean-omp-themes hostname username; }; + useGlobalPkgs = true; + useUserPackages = true; + users.${username}.imports = [ + ../modules/home-manager/hosts/${hostname}/${username}.nix + ]; + }; + } + + nix-flatpak.nixosModules.nix-flatpak + + sops-nix.nixosModules.sops # system wide secrets management + ../modules/system/common/all-nixos.nix # system-wide stuff + ../modules/hosts/nixos/${hostname} # host specific stuff + ] ++ additionalModules; + }; +} \ No newline at end of file From eead479245819740da92713a1a41224f9777133a Mon Sep 17 00:00:00 2001 From: Gene Liverman Date: Wed, 4 Dec 2024 21:39:03 -0500 Subject: [PATCH 05/18] Pass inputs around instead of each individual input --- flake.nix | 4 +--- modules/home-manager/common/all-cli.nix | 4 ++-- modules/home-manager/common/all-gui.nix | 2 +- modules/home-manager/common/linux-apps/xfce4-terminal.nix | 2 +- modules/home-manager/hosts/AirPuppet/gene.nix | 2 +- modules/home-manager/hosts/Blue-Rock/gene.liverman.nix | 2 +- modules/home-manager/hosts/bigboy/gene.nix | 2 +- modules/home-manager/hosts/hetznix01/gene.nix | 2 +- modules/home-manager/hosts/hetznix02/gene.nix | 2 +- modules/home-manager/hosts/mightymac/gene.liverman.nix | 2 +- modules/home-manager/hosts/mini-watcher/gene.nix | 2 +- modules/home-manager/hosts/nixnuc/gene.nix | 2 +- modules/home-manager/hosts/rainbow-planet/gene.nix | 2 +- modules/hosts/darwin/AirPuppet/default.nix | 2 +- modules/hosts/nixos/bigboy/hardware-configuration.nix | 2 +- modules/hosts/nixos/hetznix01/hardware-configuration.nix | 2 +- modules/hosts/nixos/hetznix02/hardware-configuration.nix | 2 +- modules/hosts/nixos/nixnas1/disk-config.nix | 2 +- modules/hosts/nixos/nixnas1/hardware-configuration.nix | 2 +- modules/hosts/nixos/nixnuc/default.nix | 4 ++-- modules/hosts/nixos/nixnuc/hardware-configuration.nix | 2 +- modules/hosts/nixos/rainbow-planet/default.nix | 2 +- modules/hosts/nixos/rainbow-planet/hardware-configuration.nix | 2 +- modules/system/common/all-nixos.nix | 2 +- modules/system/common/linux/internationalisation.nix | 2 +- 25 files changed, 27 insertions(+), 29 deletions(-) diff --git a/flake.nix b/flake.nix index bfb9d9c..082e777 100644 --- a/flake.nix +++ b/flake.nix @@ -80,9 +80,7 @@ nixos-hardware, nixpkgs-terraform, simple-nixos-mailserver, sops-nix, ... }: let # Functions that setup systems - mylib = import ./lib { inherit inputs nixpkgs nixpkgs-unstable compose2nix disko flox genebean-omp-themes - home-manager nix-darwin nix-flatpak nix-homebrew nixos-cosmic - nixos-hardware nixpkgs-terraform simple-nixos-mailserver sops-nix; }; + mylib = import ./lib { inherit inputs; }; # creates a macOS system config darwinHostConfig = { system, hostname, username, additionalModules, additionalSpecialArgs }: nix-darwin.lib.darwinSystem { diff --git a/modules/home-manager/common/all-cli.nix b/modules/home-manager/common/all-cli.nix index 5d98099..4ec847b 100644 --- a/modules/home-manager/common/all-cli.nix +++ b/modules/home-manager/common/all-cli.nix @@ -1,4 +1,4 @@ -{ pkgs, genebean-omp-themes, ... }: let +{ inputs, pkgs, ... }: let sqlite_lib = if builtins.elem pkgs.system [ "aarch64-darwin" "x86_64-darwin" @@ -159,7 +159,7 @@ in { oh-my-posh = { enable = true; enableZshIntegration = true; - settings = builtins.fromJSON (builtins.unsafeDiscardStringContext (builtins.readFile (genebean-omp-themes + "/beanbag.omp.json"))); + settings = builtins.fromJSON (builtins.unsafeDiscardStringContext (builtins.readFile (inputs.genebean-omp-themes + "/beanbag.omp.json"))); }; ripgrep.enable = true; tmux = { diff --git a/modules/home-manager/common/all-gui.nix b/modules/home-manager/common/all-gui.nix index 20f29ca..6ad9478 100644 --- a/modules/home-manager/common/all-gui.nix +++ b/modules/home-manager/common/all-gui.nix @@ -1,4 +1,4 @@ -{ pkgs, genebean-omp-themes, ... }: { +{ pkgs, ... }: { home.packages = with pkgs; [ # nothing here right now ]; diff --git a/modules/home-manager/common/linux-apps/xfce4-terminal.nix b/modules/home-manager/common/linux-apps/xfce4-terminal.nix index e1b596c..6b49e4d 100644 --- a/modules/home-manager/common/linux-apps/xfce4-terminal.nix +++ b/modules/home-manager/common/linux-apps/xfce4-terminal.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: { +{ ... }: { home.file = { ".config/xfce4/terminal/accels.scm".source = ../../files/xfce4/terminal/accels.scm; }; diff --git a/modules/home-manager/hosts/AirPuppet/gene.nix b/modules/home-manager/hosts/AirPuppet/gene.nix index 897b11b..52c837c 100644 --- a/modules/home-manager/hosts/AirPuppet/gene.nix +++ b/modules/home-manager/hosts/AirPuppet/gene.nix @@ -1,4 +1,4 @@ -{ pkgs, genebean-omp-themes, sops-nix, username, ... }: { +{ username, ... }: { home.stateVersion = "23.11"; imports = [ ../../common/all-cli.nix diff --git a/modules/home-manager/hosts/Blue-Rock/gene.liverman.nix b/modules/home-manager/hosts/Blue-Rock/gene.liverman.nix index 7160605..8362e01 100644 --- a/modules/home-manager/hosts/Blue-Rock/gene.liverman.nix +++ b/modules/home-manager/hosts/Blue-Rock/gene.liverman.nix @@ -1,4 +1,4 @@ -{ pkgs, genebean-omp-themes, sops-nix, username, ... }: { +{ username, ... }: { home.stateVersion = "23.11"; imports = [ ../../common/all-cli.nix diff --git a/modules/home-manager/hosts/bigboy/gene.nix b/modules/home-manager/hosts/bigboy/gene.nix index f680c05..691a398 100644 --- a/modules/home-manager/hosts/bigboy/gene.nix +++ b/modules/home-manager/hosts/bigboy/gene.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: { +{ ... }: { home.stateVersion = "24.05"; imports = [ ../../common/all-cli.nix diff --git a/modules/home-manager/hosts/hetznix01/gene.nix b/modules/home-manager/hosts/hetznix01/gene.nix index 1090c90..2645578 100644 --- a/modules/home-manager/hosts/hetznix01/gene.nix +++ b/modules/home-manager/hosts/hetznix01/gene.nix @@ -1,4 +1,4 @@ -{ pkgs, genebean-omp-themes, ... }: { +{ ... }: { home.stateVersion = "24.05"; imports = [ ../../common/all-cli.nix diff --git a/modules/home-manager/hosts/hetznix02/gene.nix b/modules/home-manager/hosts/hetznix02/gene.nix index 1090c90..2645578 100644 --- a/modules/home-manager/hosts/hetznix02/gene.nix +++ b/modules/home-manager/hosts/hetznix02/gene.nix @@ -1,4 +1,4 @@ -{ pkgs, genebean-omp-themes, ... }: { +{ ... }: { home.stateVersion = "24.05"; imports = [ ../../common/all-cli.nix diff --git a/modules/home-manager/hosts/mightymac/gene.liverman.nix b/modules/home-manager/hosts/mightymac/gene.liverman.nix index a6ee69d..346236d 100644 --- a/modules/home-manager/hosts/mightymac/gene.liverman.nix +++ b/modules/home-manager/hosts/mightymac/gene.liverman.nix @@ -1,4 +1,4 @@ -{ pkgs, genebean-omp-themes, sops-nix, username, ... }: { +{ username, ... }: { home.stateVersion = "23.11"; imports = [ ../../common/all-cli.nix diff --git a/modules/home-manager/hosts/mini-watcher/gene.nix b/modules/home-manager/hosts/mini-watcher/gene.nix index 7cb68f2..0148f21 100644 --- a/modules/home-manager/hosts/mini-watcher/gene.nix +++ b/modules/home-manager/hosts/mini-watcher/gene.nix @@ -1,4 +1,4 @@ -{ pkgs, genebean-omp-themes, ... }: { +{ ... }: { home.stateVersion = "23.11"; imports = [ ../../common/all-cli.nix diff --git a/modules/home-manager/hosts/nixnuc/gene.nix b/modules/home-manager/hosts/nixnuc/gene.nix index 30158a5..f90b6f7 100644 --- a/modules/home-manager/hosts/nixnuc/gene.nix +++ b/modules/home-manager/hosts/nixnuc/gene.nix @@ -1,4 +1,4 @@ -{ pkgs, genebean-omp-themes, ... }: { +{ ... }: { home.stateVersion = "23.11"; imports = [ ../../common/all-cli.nix diff --git a/modules/home-manager/hosts/rainbow-planet/gene.nix b/modules/home-manager/hosts/rainbow-planet/gene.nix index fc2c0e1..10cde83 100644 --- a/modules/home-manager/hosts/rainbow-planet/gene.nix +++ b/modules/home-manager/hosts/rainbow-planet/gene.nix @@ -1,4 +1,4 @@ -{ pkgs, genebean-omp-themes, ... }: { +{ pkgs, ... }: { home.stateVersion = "23.11"; imports = [ ../../common/all-cli.nix diff --git a/modules/hosts/darwin/AirPuppet/default.nix b/modules/hosts/darwin/AirPuppet/default.nix index 17b71e5..84afcb1 100644 --- a/modules/hosts/darwin/AirPuppet/default.nix +++ b/modules/hosts/darwin/AirPuppet/default.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: { +{ ... }: { system.stateVersion = 4; homebrew = { diff --git a/modules/hosts/nixos/bigboy/hardware-configuration.nix b/modules/hosts/nixos/bigboy/hardware-configuration.nix index 57c4551..8a6fb88 100644 --- a/modules/hosts/nixos/bigboy/hardware-configuration.nix +++ b/modules/hosts/nixos/bigboy/hardware-configuration.nix @@ -1,7 +1,7 @@ # Do not modify this file! It was generated by ‘nixos-generate-config’ # and may be overwritten by future invocations. Please make changes # to /etc/nixos/configuration.nix instead. -{ config, lib, pkgs, modulesPath, ... }: +{ config, lib, modulesPath, ... }: { imports = diff --git a/modules/hosts/nixos/hetznix01/hardware-configuration.nix b/modules/hosts/nixos/hetznix01/hardware-configuration.nix index f3eff9f..c2cbb3b 100644 --- a/modules/hosts/nixos/hetznix01/hardware-configuration.nix +++ b/modules/hosts/nixos/hetznix01/hardware-configuration.nix @@ -1,7 +1,7 @@ # Do not modify this file! It was generated by ‘nixos-generate-config’ # and may be overwritten by future invocations. Please make changes # to /etc/nixos/configuration.nix instead. -{ config, lib, pkgs, modulesPath, ... }: +{ lib, modulesPath, ... }: { imports = diff --git a/modules/hosts/nixos/hetznix02/hardware-configuration.nix b/modules/hosts/nixos/hetznix02/hardware-configuration.nix index c6de7d0..0d6440a 100644 --- a/modules/hosts/nixos/hetznix02/hardware-configuration.nix +++ b/modules/hosts/nixos/hetznix02/hardware-configuration.nix @@ -1,7 +1,7 @@ # Do not modify this file! It was generated by ‘nixos-generate-config’ # and may be overwritten by future invocations. Please make changes # to /etc/nixos/configuration.nix instead. -{ config, lib, pkgs, modulesPath, ... }: +{ lib, modulesPath, ... }: { imports = diff --git a/modules/hosts/nixos/nixnas1/disk-config.nix b/modules/hosts/nixos/nixnas1/disk-config.nix index b8bf80c..dcb9555 100644 --- a/modules/hosts/nixos/nixnas1/disk-config.nix +++ b/modules/hosts/nixos/nixnas1/disk-config.nix @@ -1,4 +1,4 @@ -{ lib, ... }: +{ ... }: { disko.devices = { disk = { diff --git a/modules/hosts/nixos/nixnas1/hardware-configuration.nix b/modules/hosts/nixos/nixnas1/hardware-configuration.nix index 2b2d86a..8cce237 100644 --- a/modules/hosts/nixos/nixnas1/hardware-configuration.nix +++ b/modules/hosts/nixos/nixnas1/hardware-configuration.nix @@ -1,7 +1,7 @@ # Do not modify this file! It was generated by ‘nixos-generate-config’ # and may be overwritten by future invocations. Please make changes # to /etc/nixos/configuration.nix instead. -{ config, lib, pkgs, modulesPath, ... }: +{ config, lib, modulesPath, ... }: { imports = diff --git a/modules/hosts/nixos/nixnuc/default.nix b/modules/hosts/nixos/nixnuc/default.nix index fbfd5d6..12fb394 100644 --- a/modules/hosts/nixos/nixnuc/default.nix +++ b/modules/hosts/nixos/nixnuc/default.nix @@ -1,4 +1,4 @@ -{ compose2nix, config, pkgs, username, ... }: let +{ inputs, config, pkgs, username, ... }: let http_port = 80; https_port = 443; home_domain = "home.technicalissues.us"; @@ -29,7 +29,7 @@ in { }; environment.systemPackages = with pkgs; [ - compose2nix.packages.${pkgs.system}.default + inputs.compose2nix.packages.${pkgs.system}.default docker-compose intel-gpu-tools jellyfin diff --git a/modules/hosts/nixos/nixnuc/hardware-configuration.nix b/modules/hosts/nixos/nixnuc/hardware-configuration.nix index 21ca6a5..17b0c38 100644 --- a/modules/hosts/nixos/nixnuc/hardware-configuration.nix +++ b/modules/hosts/nixos/nixnuc/hardware-configuration.nix @@ -1,7 +1,7 @@ # Do not modify this file! It was generated by ‘nixos-generate-config’ # and may be overwritten by future invocations. Please make changes # to /etc/nixos/configuration.nix instead. -{ config, lib, pkgs, modulesPath, ... }: +{ config, lib, modulesPath, ... }: { imports = diff --git a/modules/hosts/nixos/rainbow-planet/default.nix b/modules/hosts/nixos/rainbow-planet/default.nix index 751d4d4..85c3fb1 100644 --- a/modules/hosts/nixos/rainbow-planet/default.nix +++ b/modules/hosts/nixos/rainbow-planet/default.nix @@ -1,4 +1,4 @@ -{ config, inputs, pkgs, username, ... }: { +{ inputs, config, pkgs, username, ... }: { imports = [ ./hardware-configuration.nix ../../../system/common/linux/flatpaks.nix diff --git a/modules/hosts/nixos/rainbow-planet/hardware-configuration.nix b/modules/hosts/nixos/rainbow-planet/hardware-configuration.nix index e72494d..d3c51fe 100644 --- a/modules/hosts/nixos/rainbow-planet/hardware-configuration.nix +++ b/modules/hosts/nixos/rainbow-planet/hardware-configuration.nix @@ -1,7 +1,7 @@ # Do not modify this file! It was generated by ‘nixos-generate-config’ # and may be overwritten by future invocations. Please make changes # to /etc/nixos/configuration.nix instead. -{ config, lib, pkgs, modulesPath, ... }: +{ config, lib, modulesPath, ... }: { imports = diff --git a/modules/system/common/all-nixos.nix b/modules/system/common/all-nixos.nix index 6e3ed11..2eb708a 100644 --- a/modules/system/common/all-nixos.nix +++ b/modules/system/common/all-nixos.nix @@ -1,4 +1,4 @@ -{ config, hostname, pkgs, sops-nix, username, ... }: { +{ hostname, pkgs, username, ... }: { imports = [ ./linux/internationalisation.nix ]; diff --git a/modules/system/common/linux/internationalisation.nix b/modules/system/common/linux/internationalisation.nix index 9463637..5d71c99 100644 --- a/modules/system/common/linux/internationalisation.nix +++ b/modules/system/common/linux/internationalisation.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: { +{ ... }: { # Select internationalisation properties. i18n = { defaultLocale = "en_US.UTF-8"; From 6318b773dfec59237fe6d4fdd9676b26cbfba152 Mon Sep 17 00:00:00 2001 From: Gene Liverman Date: Wed, 4 Dec 2024 21:39:16 -0500 Subject: [PATCH 06/18] Pass around less stuff --- lib/default.nix | 9 ++------- lib/nixosHostConfig.nix | 27 +++++++++++++++------------ 2 files changed, 17 insertions(+), 19 deletions(-) diff --git a/lib/default.nix b/lib/default.nix index 788639b..dcf0c2b 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -1,10 +1,5 @@ -{ inputs, nixpkgs, nixpkgs-unstable, compose2nix, disko, flox, genebean-omp-themes, - home-manager, nix-darwin, nix-flatpak, nix-homebrew, nixos-cosmic, - nixos-hardware, nixpkgs-terraform, simple-nixos-mailserver, sops-nix, ... -}: let - nixosHostConfig = import ./nixosHostConfig.nix { inherit inputs nixpkgs nixpkgs-unstable compose2nix disko flox genebean-omp-themes - home-manager nix-darwin nix-flatpak nix-homebrew nixos-cosmic - nixos-hardware nixpkgs-terraform simple-nixos-mailserver sops-nix; }; +{ inputs, ... }: let + nixosHostConfig = import ./nixosHostConfig.nix { inherit inputs; }; in { inherit (nixosHostConfig) nixosHostConfig diff --git a/lib/nixosHostConfig.nix b/lib/nixosHostConfig.nix index ebafe5e..ff69f17 100644 --- a/lib/nixosHostConfig.nix +++ b/lib/nixosHostConfig.nix @@ -1,10 +1,13 @@ -{ inputs, nixpkgs, nixpkgs-unstable, compose2nix, disko, flox, genebean-omp-themes, - home-manager, nix-darwin, nix-flatpak, nix-homebrew, nixos-cosmic, - nixos-hardware, nixpkgs-terraform, simple-nixos-mailserver, sops-nix, ... -}: { - nixosHostConfig = { system ? "x86_64-linux", hostname, username ? "gene", additionalModules ? [], additionalSpecialArgs ? {} }: nixpkgs.lib.nixosSystem { +{ inputs, ... }: { + nixosHostConfig = { + system ? "x86_64-linux", + hostname, + username ? "gene", + additionalModules ? [], + additionalSpecialArgs ? {} + }: inputs.nixpkgs.lib.nixosSystem { inherit system; - specialArgs = { inherit inputs compose2nix hostname username; } // additionalSpecialArgs; + specialArgs = { inherit inputs hostname username; } // additionalSpecialArgs; modules = [ # move this to a common file later ({ @@ -13,15 +16,15 @@ allowUnfree = true; permittedInsecurePackages = [ "olm-3.2.16" "electron-27.3.11" ]; }; - overlays = [ nixpkgs-terraform.overlays.default ]; + overlays = [ inputs.nixpkgs-terraform.overlays.default ]; }; }) - disko.nixosModules.disko + inputs.disko.nixosModules.disko - home-manager.nixosModules.home-manager { + inputs.home-manager.nixosModules.home-manager { home-manager = { - extraSpecialArgs = { inherit genebean-omp-themes hostname username; }; + extraSpecialArgs = { inherit inputs hostname username; }; useGlobalPkgs = true; useUserPackages = true; users.${username}.imports = [ @@ -30,9 +33,9 @@ }; } - nix-flatpak.nixosModules.nix-flatpak + inputs.nix-flatpak.nixosModules.nix-flatpak - sops-nix.nixosModules.sops # system wide secrets management + inputs.sops-nix.nixosModules.sops # system wide secrets management ../modules/system/common/all-nixos.nix # system-wide stuff ../modules/hosts/nixos/${hostname} # host specific stuff ] ++ additionalModules; From 9715c97ac65114d7352676b92a730511c1763792 Mon Sep 17 00:00:00 2001 From: Gene Liverman Date: Wed, 4 Dec 2024 21:43:26 -0500 Subject: [PATCH 07/18] Move common nixpkgs settings to a module --- lib/nixosHostConfig.nix | 11 +---------- lib/nixpkgs-settings.nix | 9 +++++++++ 2 files changed, 10 insertions(+), 10 deletions(-) create mode 100644 lib/nixpkgs-settings.nix diff --git a/lib/nixosHostConfig.nix b/lib/nixosHostConfig.nix index ff69f17..d681f1e 100644 --- a/lib/nixosHostConfig.nix +++ b/lib/nixosHostConfig.nix @@ -9,16 +9,7 @@ inherit system; specialArgs = { inherit inputs hostname username; } // additionalSpecialArgs; modules = [ - # move this to a common file later - ({ - nixpkgs = { - config = { - allowUnfree = true; - permittedInsecurePackages = [ "olm-3.2.16" "electron-27.3.11" ]; - }; - overlays = [ inputs.nixpkgs-terraform.overlays.default ]; - }; - }) + ./nixpkgs-settings.nix inputs.disko.nixosModules.disko diff --git a/lib/nixpkgs-settings.nix b/lib/nixpkgs-settings.nix new file mode 100644 index 0000000..a81ed4b --- /dev/null +++ b/lib/nixpkgs-settings.nix @@ -0,0 +1,9 @@ +{ inputs, ... }: { + nixpkgs = { + config = { + allowUnfree = true; + permittedInsecurePackages = [ "olm-3.2.16" "electron-27.3.11" ]; + }; + overlays = [ inputs.nixpkgs-terraform.overlays.default ]; + }; +} From ce4262d2e2d912bac629ee57927971ab2415766e Mon Sep 17 00:00:00 2001 From: Gene Liverman Date: Wed, 4 Dec 2024 21:49:04 -0500 Subject: [PATCH 08/18] Rename nixosHostConfig to mkNixosHost --- README.md | 4 ++-- examples/flake-structure.nix | 4 ++-- flake.nix | 12 ++++++------ lib/default.nix | 6 +++--- lib/{nixosHostConfig.nix => mkNixosHost.nix} | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-) rename lib/{nixosHostConfig.nix => mkNixosHost.nix} (97%) diff --git a/README.md b/README.md index 46cd425..2a78e4d 100644 --- a/README.md +++ b/README.md @@ -26,14 +26,14 @@ The Nix bits are driven by `flake.nix` which pulls in things under `modules/`. B - all the outputs from the inputs - a `let` ... `in` block that contains: - `darwinHostConfig` which takes a set of paramters as an attribute set and pulls in all the things needed to use Nix on a macOS host - - `nixosHostConfig` which takes a set of parameters as an attribute set and pulls in all the things needed to configure a NixOS host + - `mkNixosHost` which takes a set of parameters as an attribute set and pulls in all the things needed to configure a NixOS host - `linuxHomeConfig` which takes a set of paramters as an attribute set and pulls in the things I manage on non-NixOS Linux hosts - the body of outputs that contains: - `darwinConfigurations` contains is an attribute set that contains keys named for each macOS host set to the results of a call to `darwinHostConfig` with values for each of the required parameters - `nixosConfigurations` contains is an attribute set that contains keys named for each NixOS host set to the results of a call to `darwinHostConfig` with values for each of the required parameters - `homeConfigurations` contains an entry for each username set to the results of a call to `linuxHomeConfig` with values for each of the required parameters -The parameters on `darwinHostConfig` & `nixosHostConfig` are: +The parameters on `darwinHostConfig` & `mkNixosHost` are: - `system:` the system definition to use for nixpkgs - `hostname:` the hostname of the machine being configured diff --git a/examples/flake-structure.nix b/examples/flake-structure.nix index a24ec94..b47d1a5 100644 --- a/examples/flake-structure.nix +++ b/examples/flake-structure.nix @@ -4,7 +4,7 @@ darwinHostConfig = { system, hostname, username, additionalModules, additionalSpecialArgs }: nix-darwin.lib.darwinSystem { }; - nixosHostConfig = { system, hostname, username, additionalModules, additionalSpecialArgs }: + mkNixosHost = { system, hostname, username, additionalModules, additionalSpecialArgs }: nixpkgs.lib.nixosSystem { }; linuxHomeConfig = { system, hostname, username, additionalModules, additionalSpecialArgs }: @@ -24,7 +24,7 @@ # NixOS hosts nixosConfigurations = { - rainbow-planet = nixosHostConfig { + rainbow-planet = mkNixosHost { system = "x86_64-linux"; hostname = "rainbow-planet"; username = "gene"; diff --git a/flake.nix b/flake.nix index 082e777..47a2d76 100644 --- a/flake.nix +++ b/flake.nix @@ -170,38 +170,38 @@ # NixOS hosts nixosConfigurations = { - bigboy = mylib.nixosHostConfig { + bigboy = mylib.mkNixosHost { hostname = "bigboy"; additionalModules = [ nixos-hardware.nixosModules.lenovo-thinkpad-p52 ]; }; - hetznix01 = mylib.nixosHostConfig { + hetznix01 = mylib.mkNixosHost { hostname = "hetznix01"; additionalModules = [ simple-nixos-mailserver.nixosModule ]; }; - hetznix02 = mylib.nixosHostConfig { + hetznix02 = mylib.mkNixosHost { system = "aarch64-linux"; hostname = "hetznix02"; additionalModules = [ # simple-nixos-mailserver.nixosModule ]; }; - nixnas1 = mylib.nixosHostConfig { + nixnas1 = mylib.mkNixosHost { hostname = "nixnas1"; additionalModules = [ simple-nixos-mailserver.nixosModule ]; }; - nixnuc = mylib.nixosHostConfig { + nixnuc = mylib.mkNixosHost { hostname = "nixnuc"; additionalModules = [ simple-nixos-mailserver.nixosModule ]; }; - rainbow-planet = mylib.nixosHostConfig { + rainbow-planet = mylib.mkNixosHost { hostname = "rainbow-planet"; additionalModules = [ nixos-cosmic.nixosModules.default diff --git a/lib/default.nix b/lib/default.nix index dcf0c2b..ad532ba 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -1,7 +1,7 @@ { inputs, ... }: let - nixosHostConfig = import ./nixosHostConfig.nix { inherit inputs; }; + mkNixosHost = import ./mkNixosHost.nix { inherit inputs; }; in { - inherit (nixosHostConfig) - nixosHostConfig + inherit (mkNixosHost) + mkNixosHost ; } \ No newline at end of file diff --git a/lib/nixosHostConfig.nix b/lib/mkNixosHost.nix similarity index 97% rename from lib/nixosHostConfig.nix rename to lib/mkNixosHost.nix index d681f1e..4cde129 100644 --- a/lib/nixosHostConfig.nix +++ b/lib/mkNixosHost.nix @@ -1,5 +1,5 @@ { inputs, ... }: { - nixosHostConfig = { + mkNixosHost = { system ? "x86_64-linux", hostname, username ? "gene", From dd44a1f37eab6929498ac8d166166847008ee4a4 Mon Sep 17 00:00:00 2001 From: Gene Liverman Date: Wed, 4 Dec 2024 21:51:20 -0500 Subject: [PATCH 09/18] mylib --> localLib... naming is hard --- flake.nix | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/flake.nix b/flake.nix index 47a2d76..0b8378d 100644 --- a/flake.nix +++ b/flake.nix @@ -80,7 +80,7 @@ nixos-hardware, nixpkgs-terraform, simple-nixos-mailserver, sops-nix, ... }: let # Functions that setup systems - mylib = import ./lib { inherit inputs; }; + localLib = import ./lib { inherit inputs; }; # creates a macOS system config darwinHostConfig = { system, hostname, username, additionalModules, additionalSpecialArgs }: nix-darwin.lib.darwinSystem { @@ -170,38 +170,38 @@ # NixOS hosts nixosConfigurations = { - bigboy = mylib.mkNixosHost { + bigboy = localLib.mkNixosHost { hostname = "bigboy"; additionalModules = [ nixos-hardware.nixosModules.lenovo-thinkpad-p52 ]; }; - hetznix01 = mylib.mkNixosHost { + hetznix01 = localLib.mkNixosHost { hostname = "hetznix01"; additionalModules = [ simple-nixos-mailserver.nixosModule ]; }; - hetznix02 = mylib.mkNixosHost { + hetznix02 = localLib.mkNixosHost { system = "aarch64-linux"; hostname = "hetznix02"; additionalModules = [ # simple-nixos-mailserver.nixosModule ]; }; - nixnas1 = mylib.mkNixosHost { + nixnas1 = localLib.mkNixosHost { hostname = "nixnas1"; additionalModules = [ simple-nixos-mailserver.nixosModule ]; }; - nixnuc = mylib.mkNixosHost { + nixnuc = localLib.mkNixosHost { hostname = "nixnuc"; additionalModules = [ simple-nixos-mailserver.nixosModule ]; }; - rainbow-planet = mylib.mkNixosHost { + rainbow-planet = localLib.mkNixosHost { hostname = "rainbow-planet"; additionalModules = [ nixos-cosmic.nixosModules.default From 5ebae303c81b24eea312c66762f0ea08872fcbde Mon Sep 17 00:00:00 2001 From: Gene Liverman Date: Wed, 4 Dec 2024 22:21:00 -0500 Subject: [PATCH 10/18] Add helpers for nix upkeep --- modules/home-manager/common/all-darwin.nix | 1 + modules/home-manager/common/all-linux.nix | 2 ++ 2 files changed, 3 insertions(+) diff --git a/modules/home-manager/common/all-darwin.nix b/modules/home-manager/common/all-darwin.nix index 45067d7..e68d33a 100644 --- a/modules/home-manager/common/all-darwin.nix +++ b/modules/home-manager/common/all-darwin.nix @@ -17,6 +17,7 @@ oh-my-zsh.plugins = [ "macos" ]; shellAliases = { currentwifi = "networksetup -getairportnetwork en0 |cut -d ':' -f2- | cut -d ' ' -f2-"; + nixdiff = "cd ~/repos/dots && darwin-rebuild build --flake . && nvd diff /run/current-system result"; nixup = "darwin-rebuild switch --flake ~/repos/dots"; uwgconnect = "networksetup -setairportnetwork en0 SecureWest"; uwgforget = "networksetup -removepreferredwirelessnetwork en0 SecureWest"; diff --git a/modules/home-manager/common/all-linux.nix b/modules/home-manager/common/all-linux.nix index eeeb32c..04428b9 100644 --- a/modules/home-manager/common/all-linux.nix +++ b/modules/home-manager/common/all-linux.nix @@ -6,6 +6,8 @@ programs = { # Linux-specific aliases zsh.shellAliases = { + nixboot = "sudo nixos-rebuild boot --flake ~/repos/dots && echo 'Time to reboot!'"; + nixdiff = "cd ~/repos/dots && nixos-rebuild build --flake . && nvd diff /run/current-system result"; nixup = "sudo nixos-rebuild switch --flake ~/repos/dots"; uwgconnect = "nmcli dev wifi connect SecureWest password"; uwgforget = "nmcli connection delete SecureWest"; From fcfc7be520b6eab0a32248ce82c93ce7fff35fb8 Mon Sep 17 00:00:00 2001 From: Gene Liverman Date: Wed, 4 Dec 2024 22:21:39 -0500 Subject: [PATCH 11/18] More work to just pass around inputs --- flake.nix | 44 ++++++++++++++++++++------------------------ 1 file changed, 20 insertions(+), 24 deletions(-) diff --git a/flake.nix b/flake.nix index 0b8378d..3255c6e 100644 --- a/flake.nix +++ b/flake.nix @@ -74,27 +74,23 @@ }; }; # end inputs - outputs = inputs@{ - self, nixpkgs, nixpkgs-unstable, compose2nix, disko, flox, genebean-omp-themes, - home-manager, nix-darwin, nix-flatpak, nix-homebrew, nixos-cosmic, - nixos-hardware, nixpkgs-terraform, simple-nixos-mailserver, sops-nix, ... - }: let + outputs = inputs@{ self, ... }: let # Functions that setup systems localLib = import ./lib { inherit inputs; }; # creates a macOS system config - darwinHostConfig = { system, hostname, username, additionalModules, additionalSpecialArgs }: nix-darwin.lib.darwinSystem { - pkgs = import nixpkgs { + darwinHostConfig = { system, hostname, username, additionalModules, additionalSpecialArgs }: inputs.nix-darwin.lib.darwinSystem { + pkgs = import inputs.nixpkgs { inherit system; config = { allowUnfree = true; permittedInsecurePackages = [ "olm-3.2.16" "python-2.7.18.7" ]; }; - overlays = [ nixpkgs-terraform.overlays.default ]; + overlays = [ inputs.nixpkgs-terraform.overlays.default ]; }; specialArgs = { inherit inputs hostname username; } // additionalSpecialArgs; modules = [ - nix-homebrew.darwinModules.nix-homebrew { + inputs.nix-homebrew.darwinModules.nix-homebrew { nix-homebrew = { enable = true; # Install Homebrew under the default prefix user = "${username}"; # User owning the Homebrew prefix @@ -102,13 +98,13 @@ }; } - home-manager.darwinModules.home-manager { + inputs.home-manager.darwinModules.home-manager { home-manager = { - extraSpecialArgs = { inherit genebean-omp-themes username; }; + extraSpecialArgs = { inherit inputs username; }; useGlobalPkgs = true; useUserPackages = true; users.${username}.imports = [ - sops-nix.homeManagerModule # user-level secrets management + inputs.sops-nix.homeManagerModule # user-level secrets management ./modules/home-manager/hosts/${hostname}/${username}.nix ]; }; @@ -119,15 +115,15 @@ ] ++ additionalModules; # end modules }; # end darwinSystem - linuxHomeConfig = { system, hostname, username, additionalModules, additionalSpecialArgs }: home-manager.lib.homeManagerConfiguration { - extraSpecialArgs = { inherit genebean-omp-themes hostname username; - pkgs = import nixpkgs { + linuxHomeConfig = { system, hostname, username, additionalModules, additionalSpecialArgs }: inputs.home-manager.lib.homeManagerConfiguration { + extraSpecialArgs = { inherit inputs hostname username; + pkgs = import inputs.nixpkgs { inherit system; config = { allowUnfree = true; permittedInsecurePackages = [ "olm-3.2.16" "electron-21.4.4" ]; }; - overlays = [ nixpkgs-terraform.overlays.default ]; + overlays = [ inputs.nixpkgs-terraform.overlays.default ]; }; } // additionalSpecialArgs; modules = [ @@ -138,7 +134,7 @@ homeDirectory = "/home/${username}"; }; } - sops-nix.homeManagerModules.sops + inputs.sops-nix.homeManagerModules.sops ] ++ additionalModules; }; # end homeManagerConfiguration @@ -173,39 +169,39 @@ bigboy = localLib.mkNixosHost { hostname = "bigboy"; additionalModules = [ - nixos-hardware.nixosModules.lenovo-thinkpad-p52 + inputs.nixos-hardware.nixosModules.lenovo-thinkpad-p52 ]; }; hetznix01 = localLib.mkNixosHost { hostname = "hetznix01"; additionalModules = [ - simple-nixos-mailserver.nixosModule + inputs.simple-nixos-mailserver.nixosModule ]; }; hetznix02 = localLib.mkNixosHost { system = "aarch64-linux"; hostname = "hetznix02"; additionalModules = [ - # simple-nixos-mailserver.nixosModule + # inputs.simple-nixos-mailserver.nixosModule ]; }; nixnas1 = localLib.mkNixosHost { hostname = "nixnas1"; additionalModules = [ - simple-nixos-mailserver.nixosModule + inputs.simple-nixos-mailserver.nixosModule ]; }; nixnuc = localLib.mkNixosHost { hostname = "nixnuc"; additionalModules = [ - simple-nixos-mailserver.nixosModule + inputs.simple-nixos-mailserver.nixosModule ]; }; rainbow-planet = localLib.mkNixosHost { hostname = "rainbow-planet"; additionalModules = [ - nixos-cosmic.nixosModules.default - nixos-hardware.nixosModules.dell-xps-13-9360 + inputs.nixos-cosmic.nixosModules.default + inputs.nixos-hardware.nixosModules.dell-xps-13-9360 ]; }; }; # end nixosConfigurations From dc7552396f7a0e35b3e2cd4934976bf106a39843 Mon Sep 17 00:00:00 2001 From: Gene Liverman Date: Sat, 7 Dec 2024 18:26:33 -0500 Subject: [PATCH 12/18] Update flake while moving macOS to nix 24.11 --- flake.lock | 54 +++++++++++++++++++++++++++--------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/flake.lock b/flake.lock index d5e0400..8884bfa 100644 --- a/flake.lock +++ b/flake.lock @@ -99,11 +99,11 @@ ] }, "locked": { - "lastModified": 1732988076, - "narHash": "sha256-2uMaVAZn7fiyTUGhKgleuLYe5+EAAYB/diKxrM7g3as=", + "lastModified": 1733168902, + "narHash": "sha256-8dupm9GfK+BowGdQd7EHK5V61nneLfr9xR6sc5vtDi0=", "owner": "nix-community", "repo": "disko", - "rev": "2814a5224a47ca19e858e027f7e8bff74a8ea9f1", + "rev": "785c1e02c7e465375df971949b8dcbde9ec362e5", "type": "github" }, "original": { @@ -321,11 +321,11 @@ ] }, "locked": { - "lastModified": 1733050161, - "narHash": "sha256-lYnT+EYE47f5yY3KS/Kd4pJ6CO9fhCqumkYYkQ3TK20=", + "lastModified": 1733572789, + "narHash": "sha256-zjO6m5BqxXIyjrnUziAzk4+T4VleqjstNudSqWcpsHI=", "owner": "nix-community", "repo": "home-manager", - "rev": "62d536255879be574ebfe9b87c4ac194febf47c5", + "rev": "c7ffc9727d115e433fd884a62dc164b587ff651d", "type": "github" }, "original": { @@ -342,11 +342,11 @@ ] }, "locked": { - "lastModified": 1733105089, - "narHash": "sha256-Qs3YmoLYUJ8g4RkFj2rMrzrP91e4ShAioC9s+vG6ENM=", + "lastModified": 1733570843, + "narHash": "sha256-sQJAxY1TYWD1UyibN/FnN97paTFuwBw3Vp3DNCyKsMk=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "c6b65d946097baf3915dd51373251de98199280d", + "rev": "a35b08d09efda83625bef267eb24347b446c80b8", "type": "github" }, "original": { @@ -375,11 +375,11 @@ }, "nix-flatpak": { "locked": { - "lastModified": 1732867134, - "narHash": "sha256-YGtFJ/4SE37evvHX+OkS2klRdHlO7HvovaaxR/yWuWg=", + "lastModified": 1733345341, + "narHash": "sha256-8S58zrdpzGhax6tmn1i+R3AA0N9DJMu5FQI8JkA0NNU=", "owner": "gmodena", "repo": "nix-flatpak", - "rev": "01ca2cbd9fb5c29d73fac327f5a9a2a1a222e218", + "rev": "ebb0be49fc381112ff37726c6dd6df4df2ef5a1b", "type": "github" }, "original": { @@ -444,11 +444,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1733095793, - "narHash": "sha256-woqkmcGxOleK1RyoZpXU3NaC4+epr2qYau2mVhVQFjY=", + "lastModified": 1733558619, + "narHash": "sha256-+hpXjj67bWfr8Z4JP32CPqvoqO5hkTNyRZLA5SB6Zmc=", "owner": "lilyinstarlight", "repo": "nixos-cosmic", - "rev": "e468c8b79dd55f1ce8803887d3593fb0016f1f81", + "rev": "313f9b0d8cb2ec8bec0f4d5170c3fda41d49f58c", "type": "github" }, "original": { @@ -459,11 +459,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1733139194, - "narHash": "sha256-PVQW9ovo0CJbhuhCsrhFJGGdD1euwUornspKpBIgdok=", + "lastModified": 1733481457, + "narHash": "sha256-IS3bxa4N1VMSh3/P6vhEAHQZecQ3oAlKCDvzCQSO5Is=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "c6c90887f84c02ce9ebf33b95ca79ef45007bf88", + "rev": "e563803af3526852b6b1d77107a81908c66a9fcf", "type": "github" }, "original": { @@ -594,11 +594,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1733064805, - "narHash": "sha256-7NbtSLfZO0q7MXPl5hzA0sbVJt6pWxxtGWbaVUDDmjs=", + "lastModified": 1733376361, + "narHash": "sha256-aLJxoTDDSqB+/3orsulE6/qdlX6MzDLIITLZqdgMpqo=", "owner": "nixos", "repo": "nixpkgs", - "rev": "31d66ae40417bb13765b0ad75dd200400e98de84", + "rev": "929116e316068c7318c54eb4d827f7d9756d5e9c", "type": "github" }, "original": { @@ -639,11 +639,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1732981179, - "narHash": "sha256-F7thesZPvAMSwjRu0K8uFshTk3ZZSNAsXTIFvXBT+34=", + "lastModified": 1733412085, + "narHash": "sha256-FillH0qdWDt/nlO6ED7h4cmN+G9uXwGjwmCnHs0QVYM=", "owner": "nixos", "repo": "nixpkgs", - "rev": "62c435d93bf046a5396f3016472e8f7c8e2aed65", + "rev": "4dc2fc4e62dbf62b84132fe526356fbac7b03541", "type": "github" }, "original": { @@ -744,11 +744,11 @@ ] }, "locked": { - "lastModified": 1732933841, - "narHash": "sha256-dge02pUSe2QeC/B3PriA0R8eAX+EU3aDoXj9FcS3XDw=", + "lastModified": 1733452419, + "narHash": "sha256-eh2i2GtqdWVOP7yjiWtB8FMUWktCZ4vjo81n6g5mSiE=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "c65e91d4a33abc3bc4a892d3c5b5b378bad64ea1", + "rev": "020701e6057992329a7cfafc6e3c5d5658bbcf79", "type": "github" }, "original": { From ce3a1b5e20f7b0a21a0e0bf490debb9a26aa488c Mon Sep 17 00:00:00 2001 From: Gene Liverman Date: Sat, 7 Dec 2024 18:28:03 -0500 Subject: [PATCH 13/18] Move Darwin code to library --- flake.nix | 53 ++++---------------------------------------- lib/default.nix | 4 ++++ lib/mkDarwinHost.nix | 38 +++++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+), 49 deletions(-) create mode 100644 lib/mkDarwinHost.nix diff --git a/flake.nix b/flake.nix index 3255c6e..a43a6aa 100644 --- a/flake.nix +++ b/flake.nix @@ -76,44 +76,7 @@ }; # end inputs outputs = inputs@{ self, ... }: let # Functions that setup systems - localLib = import ./lib { inherit inputs; }; - - # creates a macOS system config - darwinHostConfig = { system, hostname, username, additionalModules, additionalSpecialArgs }: inputs.nix-darwin.lib.darwinSystem { - pkgs = import inputs.nixpkgs { - inherit system; - config = { - allowUnfree = true; - permittedInsecurePackages = [ "olm-3.2.16" "python-2.7.18.7" ]; - }; - overlays = [ inputs.nixpkgs-terraform.overlays.default ]; - }; - specialArgs = { inherit inputs hostname username; } // additionalSpecialArgs; - modules = [ - inputs.nix-homebrew.darwinModules.nix-homebrew { - nix-homebrew = { - enable = true; # Install Homebrew under the default prefix - user = "${username}"; # User owning the Homebrew prefix - autoMigrate = true; # Automatically migrate existing Homebrew installations - }; - } - - inputs.home-manager.darwinModules.home-manager { - home-manager = { - extraSpecialArgs = { inherit inputs username; }; - useGlobalPkgs = true; - useUserPackages = true; - users.${username}.imports = [ - inputs.sops-nix.homeManagerModule # user-level secrets management - ./modules/home-manager/hosts/${hostname}/${username}.nix - ]; - }; - } - - ./modules/system/common/all-darwin.nix # system-wide stuff - ./modules/hosts/darwin/${hostname} # host specific stuff - ] ++ additionalModules; # end modules - }; # end darwinSystem + localLib = import ./lib { inherit inputs; }; linuxHomeConfig = { system, hostname, username, additionalModules, additionalSpecialArgs }: inputs.home-manager.lib.homeManagerConfiguration { extraSpecialArgs = { inherit inputs hostname username; @@ -141,26 +104,18 @@ in { # Darwin (macOS) hosts darwinConfigurations = { - AirPuppet = darwinHostConfig { + AirPuppet = localLib.mkDarwinHost { system = "x86_64-darwin"; hostname = "AirPuppet"; - username = "gene"; - additionalModules = []; - additionalSpecialArgs = {}; }; - Blue-Rock = darwinHostConfig { + Blue-Rock = localLib.mkDarwinHost { system = "x86_64-darwin"; hostname = "Blue-Rock"; username = "gene.liverman"; - additionalModules = []; - additionalSpecialArgs = {}; }; - mightymac = darwinHostConfig { - system = "aarch64-darwin"; + mightymac = localLib.mkDarwinHost { hostname = "mightymac"; username = "gene.liverman"; - additionalModules = []; - additionalSpecialArgs = {}; }; }; # end darwinConfigurations diff --git a/lib/default.nix b/lib/default.nix index ad532ba..8d48919 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -1,6 +1,10 @@ { inputs, ... }: let + mkDarwinHost = import ./mkDarwinHost.nix { inherit inputs; }; mkNixosHost = import ./mkNixosHost.nix { inherit inputs; }; in { + inherit (mkDarwinHost) + mkDarwinHost + ; inherit (mkNixosHost) mkNixosHost ; diff --git a/lib/mkDarwinHost.nix b/lib/mkDarwinHost.nix new file mode 100644 index 0000000..6321b16 --- /dev/null +++ b/lib/mkDarwinHost.nix @@ -0,0 +1,38 @@ +{ inputs, ... }: { + mkDarwinHost = { + system ? "aarch64-darwin", + hostname, + username ? "gene", + additionalModules ? [], + additionalSpecialArgs ? {} + }: inputs.nix-darwin.lib.darwinSystem { + inherit system; + specialArgs = { inherit inputs hostname username; } // additionalSpecialArgs; + modules = [ + ./nixpkgs-settings.nix + + inputs.nix-homebrew.darwinModules.nix-homebrew { + nix-homebrew = { + enable = true; # Install Homebrew under the default prefix + user = "${username}"; # User owning the Homebrew prefix + autoMigrate = true; # Automatically migrate existing Homebrew installations + }; + } + + inputs.home-manager.darwinModules.home-manager { + home-manager = { + extraSpecialArgs = { inherit inputs username; }; + useGlobalPkgs = true; + useUserPackages = true; + users.${username}.imports = [ + inputs.sops-nix.homeManagerModule # user-level secrets management + ../modules/home-manager/hosts/${hostname}/${username}.nix + ]; + }; + } + + ../modules/system/common/all-darwin.nix # system-wide stuff + ../modules/hosts/darwin/${hostname} # host specific stuff + ] ++ additionalModules; # end modules + }; # end darwinSystem +} \ No newline at end of file From f95cc09e13fbd842e03a9e6809a81e481a53c827 Mon Sep 17 00:00:00 2001 From: Gene Liverman Date: Sat, 7 Dec 2024 23:12:52 -0500 Subject: [PATCH 14/18] Restructure Darwin configuration So far, this is just based on mightymac. The other devices will be updated soon. --- .sops.yaml | 2 +- lib/default.nix | 10 +++------- lib/mkDarwinHost.nix | 6 +++--- lib/mkNixosHost.nix | 2 +- modules/{home-manager => hosts}/common/all-gui.nix | 0 .../common/all-cli.nix => hosts/common/default.nix} | 8 ++++---- .../common}/files/Microsoft.PowerShell_profile.ps1 | 0 .../common}/files/nvim/lua/config/vim-options.lua | 0 .../common}/files/nvim/lua/disabled/barbar.lua | 0 .../common}/files/nvim/lua/disabled/cheatsheet.lua | 0 .../common}/files/nvim/lua/disabled/nvim-tree.lua | 0 .../common}/files/nvim/lua/disabled/themes/dracula.lua | 0 .../common}/files/nvim/lua/disabled/themes/gruvbox.lua | 0 .../files/nvim/lua/disabled/themes/kanagawa.lua | 0 .../files/nvim/lua/disabled/themes/oxocarbon.lua | 0 .../files/nvim/lua/disabled/themes/tokyonight.lua | 0 .../common}/files/nvim/lua/plugins/alpha.lua | 0 .../common}/files/nvim/lua/plugins/bufferline.lua | 0 .../common}/files/nvim/lua/plugins/catppuccin.lua | 0 .../common}/files/nvim/lua/plugins/completions.lua | 0 .../common}/files/nvim/lua/plugins/edgy.lua | 0 .../common}/files/nvim/lua/plugins/git-stuff.lua | 0 .../common}/files/nvim/lua/plugins/lsp-config.lua | 0 .../common}/files/nvim/lua/plugins/lualine.lua | 0 .../common}/files/nvim/lua/plugins/neo-tree.lua | 0 .../common}/files/nvim/lua/plugins/noice.lua | 0 .../common}/files/nvim/lua/plugins/none-ls.lua | 0 .../files/nvim/lua/plugins/nvim-web-devicons.lua | 0 .../common}/files/nvim/lua/plugins/telescope.lua | 0 .../common}/files/nvim/lua/plugins/todo-comments.lua | 0 .../common}/files/nvim/lua/plugins/toggleterm.lua | 0 .../common}/files/nvim/lua/plugins/treesitter.lua | 0 .../common}/files/nvim/lua/plugins/trouble.lua | 0 .../files/nvim/lua/plugins/vim-tmux-navigator.lua | 0 .../common}/files/nvim/lua/plugins/which-key.lua | 0 .../common}/files/tilix/Beanbag-Mathias.json | 0 .../{home-manager => hosts/common}/files/waybar/config | 0 .../common}/files/waybar/style.css | 0 .../common}/files/xfce4/terminal/accels.scm | 0 .../common}/files/xfce4/terminal/terminalrc | 0 modules/{system => hosts}/common/secrets.yaml | 0 .../common/all-darwin.nix => hosts/darwin/default.nix} | 0 .../common/all-darwin.nix => hosts/darwin/home.nix} | 0 .../hosts => hosts/darwin}/mightymac/gene.liverman.nix | 4 ++-- .../hosts => hosts/darwin}/mightymac/secrets.yaml | 0 45 files changed, 14 insertions(+), 18 deletions(-) rename modules/{home-manager => hosts}/common/all-gui.nix (100%) rename modules/{home-manager/common/all-cli.nix => hosts/common/default.nix} (98%) rename modules/{home-manager => hosts/common}/files/Microsoft.PowerShell_profile.ps1 (100%) rename modules/{home-manager => hosts/common}/files/nvim/lua/config/vim-options.lua (100%) rename modules/{home-manager => hosts/common}/files/nvim/lua/disabled/barbar.lua (100%) rename modules/{home-manager => hosts/common}/files/nvim/lua/disabled/cheatsheet.lua (100%) rename modules/{home-manager => hosts/common}/files/nvim/lua/disabled/nvim-tree.lua (100%) rename modules/{home-manager => hosts/common}/files/nvim/lua/disabled/themes/dracula.lua (100%) rename modules/{home-manager => hosts/common}/files/nvim/lua/disabled/themes/gruvbox.lua (100%) rename modules/{home-manager => hosts/common}/files/nvim/lua/disabled/themes/kanagawa.lua (100%) rename modules/{home-manager => hosts/common}/files/nvim/lua/disabled/themes/oxocarbon.lua (100%) rename modules/{home-manager => hosts/common}/files/nvim/lua/disabled/themes/tokyonight.lua (100%) rename modules/{home-manager => hosts/common}/files/nvim/lua/plugins/alpha.lua (100%) rename modules/{home-manager => hosts/common}/files/nvim/lua/plugins/bufferline.lua (100%) rename modules/{home-manager => hosts/common}/files/nvim/lua/plugins/catppuccin.lua (100%) rename modules/{home-manager => hosts/common}/files/nvim/lua/plugins/completions.lua (100%) rename modules/{home-manager => hosts/common}/files/nvim/lua/plugins/edgy.lua (100%) rename modules/{home-manager => hosts/common}/files/nvim/lua/plugins/git-stuff.lua (100%) rename modules/{home-manager => hosts/common}/files/nvim/lua/plugins/lsp-config.lua (100%) rename modules/{home-manager => hosts/common}/files/nvim/lua/plugins/lualine.lua (100%) rename modules/{home-manager => hosts/common}/files/nvim/lua/plugins/neo-tree.lua (100%) rename modules/{home-manager => hosts/common}/files/nvim/lua/plugins/noice.lua (100%) rename modules/{home-manager => hosts/common}/files/nvim/lua/plugins/none-ls.lua (100%) rename modules/{home-manager => hosts/common}/files/nvim/lua/plugins/nvim-web-devicons.lua (100%) rename modules/{home-manager => hosts/common}/files/nvim/lua/plugins/telescope.lua (100%) rename modules/{home-manager => hosts/common}/files/nvim/lua/plugins/todo-comments.lua (100%) rename modules/{home-manager => hosts/common}/files/nvim/lua/plugins/toggleterm.lua (100%) rename modules/{home-manager => hosts/common}/files/nvim/lua/plugins/treesitter.lua (100%) rename modules/{home-manager => hosts/common}/files/nvim/lua/plugins/trouble.lua (100%) rename modules/{home-manager => hosts/common}/files/nvim/lua/plugins/vim-tmux-navigator.lua (100%) rename modules/{home-manager => hosts/common}/files/nvim/lua/plugins/which-key.lua (100%) rename modules/{home-manager => hosts/common}/files/tilix/Beanbag-Mathias.json (100%) rename modules/{home-manager => hosts/common}/files/waybar/config (100%) rename modules/{home-manager => hosts/common}/files/waybar/style.css (100%) rename modules/{home-manager => hosts/common}/files/xfce4/terminal/accels.scm (100%) rename modules/{home-manager => hosts/common}/files/xfce4/terminal/terminalrc (100%) rename modules/{system => hosts}/common/secrets.yaml (100%) rename modules/{system/common/all-darwin.nix => hosts/darwin/default.nix} (100%) rename modules/{home-manager/common/all-darwin.nix => hosts/darwin/home.nix} (100%) rename modules/{home-manager/hosts => hosts/darwin}/mightymac/gene.liverman.nix (90%) rename modules/{home-manager/hosts => hosts/darwin}/mightymac/secrets.yaml (100%) diff --git a/.sops.yaml b/.sops.yaml index fc077f4..048e0db 100644 --- a/.sops.yaml +++ b/.sops.yaml @@ -46,7 +46,7 @@ creation_rules: key_groups: - age: - *user_mini_watcher - - path_regex: modules/system/common/secrets.yaml$ + - path_regex: modules/hosts/common/secrets.yaml$ key_groups: - age: - *system_hetznix01 diff --git a/lib/default.nix b/lib/default.nix index 8d48919..3776697 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -2,10 +2,6 @@ mkDarwinHost = import ./mkDarwinHost.nix { inherit inputs; }; mkNixosHost = import ./mkNixosHost.nix { inherit inputs; }; in { - inherit (mkDarwinHost) - mkDarwinHost - ; - inherit (mkNixosHost) - mkNixosHost - ; -} \ No newline at end of file + inherit (mkDarwinHost) mkDarwinHost; + inherit (mkNixosHost) mkNixosHost; +} diff --git a/lib/mkDarwinHost.nix b/lib/mkDarwinHost.nix index 6321b16..86ce42f 100644 --- a/lib/mkDarwinHost.nix +++ b/lib/mkDarwinHost.nix @@ -26,13 +26,13 @@ useUserPackages = true; users.${username}.imports = [ inputs.sops-nix.homeManagerModule # user-level secrets management - ../modules/home-manager/hosts/${hostname}/${username}.nix + ../modules/hosts/darwin/${hostname}/${username}.nix ]; }; } - ../modules/system/common/all-darwin.nix # system-wide stuff + ../modules/hosts/darwin # system-wide stuff ../modules/hosts/darwin/${hostname} # host specific stuff ] ++ additionalModules; # end modules }; # end darwinSystem -} \ No newline at end of file +} diff --git a/lib/mkNixosHost.nix b/lib/mkNixosHost.nix index 4cde129..5926afc 100644 --- a/lib/mkNixosHost.nix +++ b/lib/mkNixosHost.nix @@ -31,4 +31,4 @@ ../modules/hosts/nixos/${hostname} # host specific stuff ] ++ additionalModules; }; -} \ No newline at end of file +} diff --git a/modules/home-manager/common/all-gui.nix b/modules/hosts/common/all-gui.nix similarity index 100% rename from modules/home-manager/common/all-gui.nix rename to modules/hosts/common/all-gui.nix diff --git a/modules/home-manager/common/all-cli.nix b/modules/hosts/common/default.nix similarity index 98% rename from modules/home-manager/common/all-cli.nix rename to modules/hosts/common/default.nix index 4ec847b..0aefada 100644 --- a/modules/home-manager/common/all-cli.nix +++ b/modules/hosts/common/default.nix @@ -335,14 +335,14 @@ in { home.file = { ".config/nvim/lua/config" = { - source = ../files/nvim/lua/config; + source = ./files/nvim/lua/config; recursive = true; }; ".config/nvim/lua/plugins" = { - source = ../files/nvim/lua/plugins; + source = ./files/nvim/lua/plugins; recursive = true; }; - ".config/powershell/Microsoft.PowerShell_profile.ps1".source = ../files/Microsoft.PowerShell_profile.ps1; - ".config/powershell/Microsoft.VSCode_profile.ps1".source = ../files/Microsoft.PowerShell_profile.ps1; + ".config/powershell/Microsoft.PowerShell_profile.ps1".source = ./files/Microsoft.PowerShell_profile.ps1; + ".config/powershell/Microsoft.VSCode_profile.ps1".source = ./files/Microsoft.PowerShell_profile.ps1; }; } diff --git a/modules/home-manager/files/Microsoft.PowerShell_profile.ps1 b/modules/hosts/common/files/Microsoft.PowerShell_profile.ps1 similarity index 100% rename from modules/home-manager/files/Microsoft.PowerShell_profile.ps1 rename to modules/hosts/common/files/Microsoft.PowerShell_profile.ps1 diff --git a/modules/home-manager/files/nvim/lua/config/vim-options.lua b/modules/hosts/common/files/nvim/lua/config/vim-options.lua similarity index 100% rename from modules/home-manager/files/nvim/lua/config/vim-options.lua rename to modules/hosts/common/files/nvim/lua/config/vim-options.lua diff --git a/modules/home-manager/files/nvim/lua/disabled/barbar.lua b/modules/hosts/common/files/nvim/lua/disabled/barbar.lua similarity index 100% rename from modules/home-manager/files/nvim/lua/disabled/barbar.lua rename to modules/hosts/common/files/nvim/lua/disabled/barbar.lua diff --git a/modules/home-manager/files/nvim/lua/disabled/cheatsheet.lua b/modules/hosts/common/files/nvim/lua/disabled/cheatsheet.lua similarity index 100% rename from modules/home-manager/files/nvim/lua/disabled/cheatsheet.lua rename to modules/hosts/common/files/nvim/lua/disabled/cheatsheet.lua diff --git a/modules/home-manager/files/nvim/lua/disabled/nvim-tree.lua b/modules/hosts/common/files/nvim/lua/disabled/nvim-tree.lua similarity index 100% rename from modules/home-manager/files/nvim/lua/disabled/nvim-tree.lua rename to modules/hosts/common/files/nvim/lua/disabled/nvim-tree.lua diff --git a/modules/home-manager/files/nvim/lua/disabled/themes/dracula.lua b/modules/hosts/common/files/nvim/lua/disabled/themes/dracula.lua similarity index 100% rename from modules/home-manager/files/nvim/lua/disabled/themes/dracula.lua rename to modules/hosts/common/files/nvim/lua/disabled/themes/dracula.lua diff --git a/modules/home-manager/files/nvim/lua/disabled/themes/gruvbox.lua b/modules/hosts/common/files/nvim/lua/disabled/themes/gruvbox.lua similarity index 100% rename from modules/home-manager/files/nvim/lua/disabled/themes/gruvbox.lua rename to modules/hosts/common/files/nvim/lua/disabled/themes/gruvbox.lua diff --git a/modules/home-manager/files/nvim/lua/disabled/themes/kanagawa.lua b/modules/hosts/common/files/nvim/lua/disabled/themes/kanagawa.lua similarity index 100% rename from modules/home-manager/files/nvim/lua/disabled/themes/kanagawa.lua rename to modules/hosts/common/files/nvim/lua/disabled/themes/kanagawa.lua diff --git a/modules/home-manager/files/nvim/lua/disabled/themes/oxocarbon.lua b/modules/hosts/common/files/nvim/lua/disabled/themes/oxocarbon.lua similarity index 100% rename from modules/home-manager/files/nvim/lua/disabled/themes/oxocarbon.lua rename to modules/hosts/common/files/nvim/lua/disabled/themes/oxocarbon.lua diff --git a/modules/home-manager/files/nvim/lua/disabled/themes/tokyonight.lua b/modules/hosts/common/files/nvim/lua/disabled/themes/tokyonight.lua similarity index 100% rename from modules/home-manager/files/nvim/lua/disabled/themes/tokyonight.lua rename to modules/hosts/common/files/nvim/lua/disabled/themes/tokyonight.lua diff --git a/modules/home-manager/files/nvim/lua/plugins/alpha.lua b/modules/hosts/common/files/nvim/lua/plugins/alpha.lua similarity index 100% rename from modules/home-manager/files/nvim/lua/plugins/alpha.lua rename to modules/hosts/common/files/nvim/lua/plugins/alpha.lua diff --git a/modules/home-manager/files/nvim/lua/plugins/bufferline.lua b/modules/hosts/common/files/nvim/lua/plugins/bufferline.lua similarity index 100% rename from modules/home-manager/files/nvim/lua/plugins/bufferline.lua rename to modules/hosts/common/files/nvim/lua/plugins/bufferline.lua diff --git a/modules/home-manager/files/nvim/lua/plugins/catppuccin.lua b/modules/hosts/common/files/nvim/lua/plugins/catppuccin.lua similarity index 100% rename from modules/home-manager/files/nvim/lua/plugins/catppuccin.lua rename to modules/hosts/common/files/nvim/lua/plugins/catppuccin.lua diff --git a/modules/home-manager/files/nvim/lua/plugins/completions.lua b/modules/hosts/common/files/nvim/lua/plugins/completions.lua similarity index 100% rename from modules/home-manager/files/nvim/lua/plugins/completions.lua rename to modules/hosts/common/files/nvim/lua/plugins/completions.lua diff --git a/modules/home-manager/files/nvim/lua/plugins/edgy.lua b/modules/hosts/common/files/nvim/lua/plugins/edgy.lua similarity index 100% rename from modules/home-manager/files/nvim/lua/plugins/edgy.lua rename to modules/hosts/common/files/nvim/lua/plugins/edgy.lua diff --git a/modules/home-manager/files/nvim/lua/plugins/git-stuff.lua b/modules/hosts/common/files/nvim/lua/plugins/git-stuff.lua similarity index 100% rename from modules/home-manager/files/nvim/lua/plugins/git-stuff.lua rename to modules/hosts/common/files/nvim/lua/plugins/git-stuff.lua diff --git a/modules/home-manager/files/nvim/lua/plugins/lsp-config.lua b/modules/hosts/common/files/nvim/lua/plugins/lsp-config.lua similarity index 100% rename from modules/home-manager/files/nvim/lua/plugins/lsp-config.lua rename to modules/hosts/common/files/nvim/lua/plugins/lsp-config.lua diff --git a/modules/home-manager/files/nvim/lua/plugins/lualine.lua b/modules/hosts/common/files/nvim/lua/plugins/lualine.lua similarity index 100% rename from modules/home-manager/files/nvim/lua/plugins/lualine.lua rename to modules/hosts/common/files/nvim/lua/plugins/lualine.lua diff --git a/modules/home-manager/files/nvim/lua/plugins/neo-tree.lua b/modules/hosts/common/files/nvim/lua/plugins/neo-tree.lua similarity index 100% rename from modules/home-manager/files/nvim/lua/plugins/neo-tree.lua rename to modules/hosts/common/files/nvim/lua/plugins/neo-tree.lua diff --git a/modules/home-manager/files/nvim/lua/plugins/noice.lua b/modules/hosts/common/files/nvim/lua/plugins/noice.lua similarity index 100% rename from modules/home-manager/files/nvim/lua/plugins/noice.lua rename to modules/hosts/common/files/nvim/lua/plugins/noice.lua diff --git a/modules/home-manager/files/nvim/lua/plugins/none-ls.lua b/modules/hosts/common/files/nvim/lua/plugins/none-ls.lua similarity index 100% rename from modules/home-manager/files/nvim/lua/plugins/none-ls.lua rename to modules/hosts/common/files/nvim/lua/plugins/none-ls.lua diff --git a/modules/home-manager/files/nvim/lua/plugins/nvim-web-devicons.lua b/modules/hosts/common/files/nvim/lua/plugins/nvim-web-devicons.lua similarity index 100% rename from modules/home-manager/files/nvim/lua/plugins/nvim-web-devicons.lua rename to modules/hosts/common/files/nvim/lua/plugins/nvim-web-devicons.lua diff --git a/modules/home-manager/files/nvim/lua/plugins/telescope.lua b/modules/hosts/common/files/nvim/lua/plugins/telescope.lua similarity index 100% rename from modules/home-manager/files/nvim/lua/plugins/telescope.lua rename to modules/hosts/common/files/nvim/lua/plugins/telescope.lua diff --git a/modules/home-manager/files/nvim/lua/plugins/todo-comments.lua b/modules/hosts/common/files/nvim/lua/plugins/todo-comments.lua similarity index 100% rename from modules/home-manager/files/nvim/lua/plugins/todo-comments.lua rename to modules/hosts/common/files/nvim/lua/plugins/todo-comments.lua diff --git a/modules/home-manager/files/nvim/lua/plugins/toggleterm.lua b/modules/hosts/common/files/nvim/lua/plugins/toggleterm.lua similarity index 100% rename from modules/home-manager/files/nvim/lua/plugins/toggleterm.lua rename to modules/hosts/common/files/nvim/lua/plugins/toggleterm.lua diff --git a/modules/home-manager/files/nvim/lua/plugins/treesitter.lua b/modules/hosts/common/files/nvim/lua/plugins/treesitter.lua similarity index 100% rename from modules/home-manager/files/nvim/lua/plugins/treesitter.lua rename to modules/hosts/common/files/nvim/lua/plugins/treesitter.lua diff --git a/modules/home-manager/files/nvim/lua/plugins/trouble.lua b/modules/hosts/common/files/nvim/lua/plugins/trouble.lua similarity index 100% rename from modules/home-manager/files/nvim/lua/plugins/trouble.lua rename to modules/hosts/common/files/nvim/lua/plugins/trouble.lua diff --git a/modules/home-manager/files/nvim/lua/plugins/vim-tmux-navigator.lua b/modules/hosts/common/files/nvim/lua/plugins/vim-tmux-navigator.lua similarity index 100% rename from modules/home-manager/files/nvim/lua/plugins/vim-tmux-navigator.lua rename to modules/hosts/common/files/nvim/lua/plugins/vim-tmux-navigator.lua diff --git a/modules/home-manager/files/nvim/lua/plugins/which-key.lua b/modules/hosts/common/files/nvim/lua/plugins/which-key.lua similarity index 100% rename from modules/home-manager/files/nvim/lua/plugins/which-key.lua rename to modules/hosts/common/files/nvim/lua/plugins/which-key.lua diff --git a/modules/home-manager/files/tilix/Beanbag-Mathias.json b/modules/hosts/common/files/tilix/Beanbag-Mathias.json similarity index 100% rename from modules/home-manager/files/tilix/Beanbag-Mathias.json rename to modules/hosts/common/files/tilix/Beanbag-Mathias.json diff --git a/modules/home-manager/files/waybar/config b/modules/hosts/common/files/waybar/config similarity index 100% rename from modules/home-manager/files/waybar/config rename to modules/hosts/common/files/waybar/config diff --git a/modules/home-manager/files/waybar/style.css b/modules/hosts/common/files/waybar/style.css similarity index 100% rename from modules/home-manager/files/waybar/style.css rename to modules/hosts/common/files/waybar/style.css diff --git a/modules/home-manager/files/xfce4/terminal/accels.scm b/modules/hosts/common/files/xfce4/terminal/accels.scm similarity index 100% rename from modules/home-manager/files/xfce4/terminal/accels.scm rename to modules/hosts/common/files/xfce4/terminal/accels.scm diff --git a/modules/home-manager/files/xfce4/terminal/terminalrc b/modules/hosts/common/files/xfce4/terminal/terminalrc similarity index 100% rename from modules/home-manager/files/xfce4/terminal/terminalrc rename to modules/hosts/common/files/xfce4/terminal/terminalrc diff --git a/modules/system/common/secrets.yaml b/modules/hosts/common/secrets.yaml similarity index 100% rename from modules/system/common/secrets.yaml rename to modules/hosts/common/secrets.yaml diff --git a/modules/system/common/all-darwin.nix b/modules/hosts/darwin/default.nix similarity index 100% rename from modules/system/common/all-darwin.nix rename to modules/hosts/darwin/default.nix diff --git a/modules/home-manager/common/all-darwin.nix b/modules/hosts/darwin/home.nix similarity index 100% rename from modules/home-manager/common/all-darwin.nix rename to modules/hosts/darwin/home.nix diff --git a/modules/home-manager/hosts/mightymac/gene.liverman.nix b/modules/hosts/darwin/mightymac/gene.liverman.nix similarity index 90% rename from modules/home-manager/hosts/mightymac/gene.liverman.nix rename to modules/hosts/darwin/mightymac/gene.liverman.nix index 346236d..3643f6e 100644 --- a/modules/home-manager/hosts/mightymac/gene.liverman.nix +++ b/modules/hosts/darwin/mightymac/gene.liverman.nix @@ -1,9 +1,9 @@ { username, ... }: { home.stateVersion = "23.11"; imports = [ - ../../common/all-cli.nix + ../home.nix + ../../common ../../common/all-gui.nix - ../../common/all-darwin.nix ]; programs = { diff --git a/modules/home-manager/hosts/mightymac/secrets.yaml b/modules/hosts/darwin/mightymac/secrets.yaml similarity index 100% rename from modules/home-manager/hosts/mightymac/secrets.yaml rename to modules/hosts/darwin/mightymac/secrets.yaml From d72f1264b22fbcd0892fe142e2ee5bf9e278190d Mon Sep 17 00:00:00 2001 From: Gene Liverman Date: Sun, 8 Dec 2024 00:36:28 -0500 Subject: [PATCH 15/18] NixOS restructuring, move common imports to lib --- lib/mkDarwinHost.nix | 3 +++ lib/mkNixosHost.nix | 6 +++-- modules/home-manager/hosts/hetznix01/gene.nix | 7 ------ modules/home-manager/hosts/hetznix02/gene.nix | 7 ------ .../home-manager/hosts/mini-watcher/gene.nix | 8 ------- .../hosts/mini-watcher/secrets.yaml | 22 ------------------- modules/home-manager/hosts/nixnas1/gene.nix | 7 ------ modules/home-manager/hosts/nixnuc/gene.nix | 7 ------ .../common/hm-sops.nix | 0 .../common/linux/apps}/hexchat.nix | 0 .../common/linux/apps}/pidgin.nix | 0 .../common/linux/apps}/tilix.nix | 0 .../common/linux/apps}/waybar.nix | 0 .../common/linux/apps}/xfce4-terminal.nix | 0 .../common/linux/flatpaks.nix | 0 .../common/linux/home.nix} | 0 .../common/linux/internationalisation.nix | 0 .../common/linux/lets-encrypt.nix | 0 .../{system => hosts}/common/linux/restic.nix | 0 .../hosts => hosts/darwin}/AirPuppet/gene.nix | 5 ----- .../darwin}/AirPuppet/secrets.yaml | 0 .../darwin}/Blue-Rock/gene.liverman.nix | 5 ----- .../darwin}/Blue-Rock/secrets.yaml | 0 .../hosts/darwin/mightymac/gene.liverman.nix | 5 ----- .../hosts => hosts/nixos}/bigboy/gene.nix | 6 ++--- .../all-nixos.nix => hosts/nixos/default.nix} | 2 +- modules/hosts/nixos/hetznix01/gene.nix | 3 +++ .../nixos/hetznix01/post-install/default.nix | 4 ++-- modules/hosts/nixos/hetznix02/gene.nix | 3 +++ modules/hosts/nixos/nixnas1/default.nix | 1 + modules/hosts/nixos/nixnas1/gene.nix | 3 +++ modules/hosts/nixos/nixnuc/default.nix | 4 ++-- modules/hosts/nixos/nixnuc/gene.nix | 3 +++ .../hosts/nixos/rainbow-planet/default.nix | 2 +- .../nixos}/rainbow-planet/gene.nix | 12 +++++----- 35 files changed, 33 insertions(+), 92 deletions(-) delete mode 100644 modules/home-manager/hosts/hetznix01/gene.nix delete mode 100644 modules/home-manager/hosts/hetznix02/gene.nix delete mode 100644 modules/home-manager/hosts/mini-watcher/gene.nix delete mode 100644 modules/home-manager/hosts/mini-watcher/secrets.yaml delete mode 100644 modules/home-manager/hosts/nixnas1/gene.nix delete mode 100644 modules/home-manager/hosts/nixnuc/gene.nix rename modules/{home-manager => hosts}/common/hm-sops.nix (100%) rename modules/{home-manager/common/linux-apps => hosts/common/linux/apps}/hexchat.nix (100%) rename modules/{home-manager/common/linux-apps => hosts/common/linux/apps}/pidgin.nix (100%) rename modules/{home-manager/common/linux-apps => hosts/common/linux/apps}/tilix.nix (100%) rename modules/{home-manager/common/linux-apps => hosts/common/linux/apps}/waybar.nix (100%) rename modules/{home-manager/common/linux-apps => hosts/common/linux/apps}/xfce4-terminal.nix (100%) rename modules/{system => hosts}/common/linux/flatpaks.nix (100%) rename modules/{home-manager/common/all-linux.nix => hosts/common/linux/home.nix} (100%) rename modules/{system => hosts}/common/linux/internationalisation.nix (100%) rename modules/{system => hosts}/common/linux/lets-encrypt.nix (100%) rename modules/{system => hosts}/common/linux/restic.nix (100%) rename modules/{home-manager/hosts => hosts/darwin}/AirPuppet/gene.nix (71%) rename modules/{home-manager/hosts => hosts/darwin}/AirPuppet/secrets.yaml (100%) rename modules/{home-manager/hosts => hosts/darwin}/Blue-Rock/gene.liverman.nix (77%) rename modules/{home-manager/hosts => hosts/darwin}/Blue-Rock/secrets.yaml (100%) rename modules/{home-manager/hosts => hosts/nixos}/bigboy/gene.nix (79%) rename modules/{system/common/all-nixos.nix => hosts/nixos/default.nix} (97%) create mode 100644 modules/hosts/nixos/hetznix01/gene.nix create mode 100644 modules/hosts/nixos/hetznix02/gene.nix create mode 100644 modules/hosts/nixos/nixnas1/gene.nix create mode 100644 modules/hosts/nixos/nixnuc/gene.nix rename modules/{home-manager/hosts => hosts/nixos}/rainbow-planet/gene.nix (96%) diff --git a/lib/mkDarwinHost.nix b/lib/mkDarwinHost.nix index 86ce42f..ab42cc1 100644 --- a/lib/mkDarwinHost.nix +++ b/lib/mkDarwinHost.nix @@ -26,6 +26,9 @@ useUserPackages = true; users.${username}.imports = [ inputs.sops-nix.homeManagerModule # user-level secrets management + ../modules/hosts/common + ../modules/hosts/common/all-gui.nix + ../modules/hosts/darwin/home.nix ../modules/hosts/darwin/${hostname}/${username}.nix ]; }; diff --git a/lib/mkNixosHost.nix b/lib/mkNixosHost.nix index 5926afc..1736949 100644 --- a/lib/mkNixosHost.nix +++ b/lib/mkNixosHost.nix @@ -19,7 +19,9 @@ useGlobalPkgs = true; useUserPackages = true; users.${username}.imports = [ - ../modules/home-manager/hosts/${hostname}/${username}.nix + ../modules/hosts/common + ../modules/hosts/common/linux/home.nix + ../modules/hosts/nixos/${hostname}/${username}.nix ]; }; } @@ -27,7 +29,7 @@ inputs.nix-flatpak.nixosModules.nix-flatpak inputs.sops-nix.nixosModules.sops # system wide secrets management - ../modules/system/common/all-nixos.nix # system-wide stuff + ../modules/hosts/nixos # system-wide stuff ../modules/hosts/nixos/${hostname} # host specific stuff ] ++ additionalModules; }; diff --git a/modules/home-manager/hosts/hetznix01/gene.nix b/modules/home-manager/hosts/hetznix01/gene.nix deleted file mode 100644 index 2645578..0000000 --- a/modules/home-manager/hosts/hetznix01/gene.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ ... }: { - home.stateVersion = "24.05"; - imports = [ - ../../common/all-cli.nix - ../../common/all-linux.nix - ]; -} diff --git a/modules/home-manager/hosts/hetznix02/gene.nix b/modules/home-manager/hosts/hetznix02/gene.nix deleted file mode 100644 index 2645578..0000000 --- a/modules/home-manager/hosts/hetznix02/gene.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ ... }: { - home.stateVersion = "24.05"; - imports = [ - ../../common/all-cli.nix - ../../common/all-linux.nix - ]; -} diff --git a/modules/home-manager/hosts/mini-watcher/gene.nix b/modules/home-manager/hosts/mini-watcher/gene.nix deleted file mode 100644 index 0148f21..0000000 --- a/modules/home-manager/hosts/mini-watcher/gene.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ ... }: { - home.stateVersion = "23.11"; - imports = [ - ../../common/all-cli.nix - ../../common/all-linux.nix - ../../common/hm-sops.nix - ]; -} diff --git a/modules/home-manager/hosts/mini-watcher/secrets.yaml b/modules/home-manager/hosts/mini-watcher/secrets.yaml deleted file mode 100644 index 50f2656..0000000 --- a/modules/home-manager/hosts/mini-watcher/secrets.yaml +++ /dev/null @@ -1,22 +0,0 @@ -local_git_config: ENC[AES256_GCM,data:ECcO9NiS6Xo1AevHx/4tIGmhVHTG+WHIJI/RgYLe4DbptPJQFxFMBEk=,iv:xPvAfNywX7Ww3iwZDwQGTa88ZoJZqnIjdNDv4R0iAf0=,tag:bQ7rNxPniyP7SNW8Nz+1rw==,type:str] -local_private_env: ENC[AES256_GCM,data:Eg1IYFMJFysMavh1ssddpO3fzoyrKpA2dfSNSUUUsb/548IxqOktXIArR5bqbWVL//bUmnYI3N37jYRFiQSO,iv:50WBKSSy/Ea6l6kdggeoVCXhRG6lc4QxQBm1CoK2RTc=,tag:USADBcnceslCg3ueSikf+w==,type:str] -sops: - kms: [] - gcp_kms: [] - azure_kv: [] - hc_vault: [] - age: - - recipient: age1rpy8edlpgxuf6w75cvlqexuq2xe4c49h9t2ge6jhc3fzczp8vfasnjelwq - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBveXpUSFNmVXJFTy9ieWRv - a1Fpb2xic1lnYW5mZ2VaY1dyOXVUbkNGWnlNCkxKcUZVbm0rRUNydERUeC9ueloy - N3d0NGxyaTFCd1lMUmh2VklqbTZJalkKLS0tIC8xb1VnZU0xbmdObnZIUjRvU01k - bmtPb3hjTkxMaDJwSGQ0amF5ci85UXcK16fgU78H4SK8LKDyYCUgMdRE2ZTygzyE - spYcQ8w+PvQSxLUFJKW6DZdkSXLkNR0HkmVkuSmBKW0lVNWCfXbfvA== - -----END AGE ENCRYPTED FILE----- - lastmodified: "2024-01-28T00:59:32Z" - mac: ENC[AES256_GCM,data:Dcs3LkQtReunJGQl1aBy/fo022r0fwAdjDKRlgGsDtnWWEWZww6+n30yCkMjDrQCZm4NekDCYrEd0Dhq90nLON+vxykojxd/UTBEX86NIxUrGtO3faotP0/buVi59JgqQQqBDB14GpJttZGVr59LVlxieG1PhpmE9lFePpT8eR4=,iv:7KmeBD4Pk+guEW0nb9/W7olsF36bwfZtFkehO5u40po=,tag:PJmbdqiud4FHxbVcZv2png==,type:str] - pgp: [] - unencrypted_suffix: _unencrypted - version: 3.8.1 diff --git a/modules/home-manager/hosts/nixnas1/gene.nix b/modules/home-manager/hosts/nixnas1/gene.nix deleted file mode 100644 index 2645578..0000000 --- a/modules/home-manager/hosts/nixnas1/gene.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ ... }: { - home.stateVersion = "24.05"; - imports = [ - ../../common/all-cli.nix - ../../common/all-linux.nix - ]; -} diff --git a/modules/home-manager/hosts/nixnuc/gene.nix b/modules/home-manager/hosts/nixnuc/gene.nix deleted file mode 100644 index f90b6f7..0000000 --- a/modules/home-manager/hosts/nixnuc/gene.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ ... }: { - home.stateVersion = "23.11"; - imports = [ - ../../common/all-cli.nix - ../../common/all-linux.nix - ]; -} diff --git a/modules/home-manager/common/hm-sops.nix b/modules/hosts/common/hm-sops.nix similarity index 100% rename from modules/home-manager/common/hm-sops.nix rename to modules/hosts/common/hm-sops.nix diff --git a/modules/home-manager/common/linux-apps/hexchat.nix b/modules/hosts/common/linux/apps/hexchat.nix similarity index 100% rename from modules/home-manager/common/linux-apps/hexchat.nix rename to modules/hosts/common/linux/apps/hexchat.nix diff --git a/modules/home-manager/common/linux-apps/pidgin.nix b/modules/hosts/common/linux/apps/pidgin.nix similarity index 100% rename from modules/home-manager/common/linux-apps/pidgin.nix rename to modules/hosts/common/linux/apps/pidgin.nix diff --git a/modules/home-manager/common/linux-apps/tilix.nix b/modules/hosts/common/linux/apps/tilix.nix similarity index 100% rename from modules/home-manager/common/linux-apps/tilix.nix rename to modules/hosts/common/linux/apps/tilix.nix diff --git a/modules/home-manager/common/linux-apps/waybar.nix b/modules/hosts/common/linux/apps/waybar.nix similarity index 100% rename from modules/home-manager/common/linux-apps/waybar.nix rename to modules/hosts/common/linux/apps/waybar.nix diff --git a/modules/home-manager/common/linux-apps/xfce4-terminal.nix b/modules/hosts/common/linux/apps/xfce4-terminal.nix similarity index 100% rename from modules/home-manager/common/linux-apps/xfce4-terminal.nix rename to modules/hosts/common/linux/apps/xfce4-terminal.nix diff --git a/modules/system/common/linux/flatpaks.nix b/modules/hosts/common/linux/flatpaks.nix similarity index 100% rename from modules/system/common/linux/flatpaks.nix rename to modules/hosts/common/linux/flatpaks.nix diff --git a/modules/home-manager/common/all-linux.nix b/modules/hosts/common/linux/home.nix similarity index 100% rename from modules/home-manager/common/all-linux.nix rename to modules/hosts/common/linux/home.nix diff --git a/modules/system/common/linux/internationalisation.nix b/modules/hosts/common/linux/internationalisation.nix similarity index 100% rename from modules/system/common/linux/internationalisation.nix rename to modules/hosts/common/linux/internationalisation.nix diff --git a/modules/system/common/linux/lets-encrypt.nix b/modules/hosts/common/linux/lets-encrypt.nix similarity index 100% rename from modules/system/common/linux/lets-encrypt.nix rename to modules/hosts/common/linux/lets-encrypt.nix diff --git a/modules/system/common/linux/restic.nix b/modules/hosts/common/linux/restic.nix similarity index 100% rename from modules/system/common/linux/restic.nix rename to modules/hosts/common/linux/restic.nix diff --git a/modules/home-manager/hosts/AirPuppet/gene.nix b/modules/hosts/darwin/AirPuppet/gene.nix similarity index 71% rename from modules/home-manager/hosts/AirPuppet/gene.nix rename to modules/hosts/darwin/AirPuppet/gene.nix index 52c837c..644bc76 100644 --- a/modules/home-manager/hosts/AirPuppet/gene.nix +++ b/modules/hosts/darwin/AirPuppet/gene.nix @@ -1,10 +1,5 @@ { username, ... }: { home.stateVersion = "23.11"; - imports = [ - ../../common/all-cli.nix - ../../common/all-gui.nix - ../../common/all-darwin.nix - ]; sops = { defaultSopsFile = ./secrets.yaml; diff --git a/modules/home-manager/hosts/AirPuppet/secrets.yaml b/modules/hosts/darwin/AirPuppet/secrets.yaml similarity index 100% rename from modules/home-manager/hosts/AirPuppet/secrets.yaml rename to modules/hosts/darwin/AirPuppet/secrets.yaml diff --git a/modules/home-manager/hosts/Blue-Rock/gene.liverman.nix b/modules/hosts/darwin/Blue-Rock/gene.liverman.nix similarity index 77% rename from modules/home-manager/hosts/Blue-Rock/gene.liverman.nix rename to modules/hosts/darwin/Blue-Rock/gene.liverman.nix index 8362e01..7f1fa1a 100644 --- a/modules/home-manager/hosts/Blue-Rock/gene.liverman.nix +++ b/modules/hosts/darwin/Blue-Rock/gene.liverman.nix @@ -1,10 +1,5 @@ { username, ... }: { home.stateVersion = "23.11"; - imports = [ - ../../common/all-cli.nix - ../../common/all-gui.nix - ../../common/all-darwin.nix - ]; programs = { go = { diff --git a/modules/home-manager/hosts/Blue-Rock/secrets.yaml b/modules/hosts/darwin/Blue-Rock/secrets.yaml similarity index 100% rename from modules/home-manager/hosts/Blue-Rock/secrets.yaml rename to modules/hosts/darwin/Blue-Rock/secrets.yaml diff --git a/modules/hosts/darwin/mightymac/gene.liverman.nix b/modules/hosts/darwin/mightymac/gene.liverman.nix index 3643f6e..90b7af7 100644 --- a/modules/hosts/darwin/mightymac/gene.liverman.nix +++ b/modules/hosts/darwin/mightymac/gene.liverman.nix @@ -1,10 +1,5 @@ { username, ... }: { home.stateVersion = "23.11"; - imports = [ - ../home.nix - ../../common - ../../common/all-gui.nix - ]; programs = { go = { diff --git a/modules/home-manager/hosts/bigboy/gene.nix b/modules/hosts/nixos/bigboy/gene.nix similarity index 79% rename from modules/home-manager/hosts/bigboy/gene.nix rename to modules/hosts/nixos/bigboy/gene.nix index 691a398..962d99e 100644 --- a/modules/home-manager/hosts/bigboy/gene.nix +++ b/modules/hosts/nixos/bigboy/gene.nix @@ -1,11 +1,9 @@ { ... }: { home.stateVersion = "24.05"; imports = [ - ../../common/all-cli.nix ../../common/all-gui.nix - ../../common/all-linux.nix - ../../common/linux-apps/tilix.nix - ../../common/linux-apps/xfce4-terminal.nix + ../../common/linux/apps/tilix.nix + ../../common/linux/apps/xfce4-terminal.nix ]; programs = { diff --git a/modules/system/common/all-nixos.nix b/modules/hosts/nixos/default.nix similarity index 97% rename from modules/system/common/all-nixos.nix rename to modules/hosts/nixos/default.nix index 2eb708a..71b449e 100644 --- a/modules/system/common/all-nixos.nix +++ b/modules/hosts/nixos/default.nix @@ -1,6 +1,6 @@ { hostname, pkgs, username, ... }: { imports = [ - ./linux/internationalisation.nix + ../common/linux/internationalisation.nix ]; environment = { diff --git a/modules/hosts/nixos/hetznix01/gene.nix b/modules/hosts/nixos/hetznix01/gene.nix new file mode 100644 index 0000000..ec20c58 --- /dev/null +++ b/modules/hosts/nixos/hetznix01/gene.nix @@ -0,0 +1,3 @@ +{ ... }: { + home.stateVersion = "24.05"; +} diff --git a/modules/hosts/nixos/hetznix01/post-install/default.nix b/modules/hosts/nixos/hetznix01/post-install/default.nix index fbd4ffc..57430f2 100644 --- a/modules/hosts/nixos/hetznix01/post-install/default.nix +++ b/modules/hosts/nixos/hetznix01/post-install/default.nix @@ -2,8 +2,8 @@ domain = "technicalissues.us"; in { imports = [ - ../../../../system/common/linux/lets-encrypt.nix - ../../../../system/common/linux/restic.nix + ../../../common/linux/lets-encrypt.nix + ../../../common/linux/restic.nix ./matrix-synapse.nix ./nginx.nix ]; diff --git a/modules/hosts/nixos/hetznix02/gene.nix b/modules/hosts/nixos/hetznix02/gene.nix new file mode 100644 index 0000000..945badd --- /dev/null +++ b/modules/hosts/nixos/hetznix02/gene.nix @@ -0,0 +1,3 @@ +{ ... }: { + home.stateVersion = "24.05"; +} diff --git a/modules/hosts/nixos/nixnas1/default.nix b/modules/hosts/nixos/nixnas1/default.nix index da6853f..7146c5c 100644 --- a/modules/hosts/nixos/nixnas1/default.nix +++ b/modules/hosts/nixos/nixnas1/default.nix @@ -118,6 +118,7 @@ description = "Gene Liverman"; extraGroups = [ "wheel" ]; openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFvLaPTfG3r+bcbI6DV4l69UgJjnwmZNCQk79HXyf1Pt gene@rainbow-planet" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIp42X5DZ713+bgbOO+GXROufUFdxWo7NjJbGQ285x3N gene.liverman@ltnglobal.com" ]; }; diff --git a/modules/hosts/nixos/nixnas1/gene.nix b/modules/hosts/nixos/nixnas1/gene.nix new file mode 100644 index 0000000..b6eed65 --- /dev/null +++ b/modules/hosts/nixos/nixnas1/gene.nix @@ -0,0 +1,3 @@ +{ ... }: { + home.stateVersion = "24.05"; +} diff --git a/modules/hosts/nixos/nixnuc/default.nix b/modules/hosts/nixos/nixnuc/default.nix index 12fb394..f511596 100644 --- a/modules/hosts/nixos/nixnuc/default.nix +++ b/modules/hosts/nixos/nixnuc/default.nix @@ -9,8 +9,8 @@ in { ./hardware-configuration.nix ./containers/audiobookshelf.nix ./containers/psitransfer.nix - ../../../system/common/linux/lets-encrypt.nix - ../../../system/common/linux/restic.nix + ../../common/linux/lets-encrypt.nix + ../../common/linux/restic.nix ]; system.stateVersion = "23.11"; diff --git a/modules/hosts/nixos/nixnuc/gene.nix b/modules/hosts/nixos/nixnuc/gene.nix new file mode 100644 index 0000000..21ec006 --- /dev/null +++ b/modules/hosts/nixos/nixnuc/gene.nix @@ -0,0 +1,3 @@ +{ ... }: { + home.stateVersion = "23.11"; +} diff --git a/modules/hosts/nixos/rainbow-planet/default.nix b/modules/hosts/nixos/rainbow-planet/default.nix index 85c3fb1..75d5e67 100644 --- a/modules/hosts/nixos/rainbow-planet/default.nix +++ b/modules/hosts/nixos/rainbow-planet/default.nix @@ -1,7 +1,7 @@ { inputs, config, pkgs, username, ... }: { imports = [ ./hardware-configuration.nix - ../../../system/common/linux/flatpaks.nix + ../../common/linux/flatpaks.nix ]; system.stateVersion = "23.05"; diff --git a/modules/home-manager/hosts/rainbow-planet/gene.nix b/modules/hosts/nixos/rainbow-planet/gene.nix similarity index 96% rename from modules/home-manager/hosts/rainbow-planet/gene.nix rename to modules/hosts/nixos/rainbow-planet/gene.nix index 10cde83..daa8345 100644 --- a/modules/home-manager/hosts/rainbow-planet/gene.nix +++ b/modules/hosts/nixos/rainbow-planet/gene.nix @@ -1,14 +1,12 @@ { pkgs, ... }: { home.stateVersion = "23.11"; imports = [ - ../../common/all-cli.nix ../../common/all-gui.nix - ../../common/all-linux.nix - ../../common/linux-apps/hexchat.nix - ../../common/linux-apps/pidgin.nix - ../../common/linux-apps/tilix.nix - ../../common/linux-apps/waybar.nix - ../../common/linux-apps/xfce4-terminal.nix + ../../common/linux/apps/hexchat.nix + ../../common/linux/apps/pidgin.nix + ../../common/linux/apps/tilix.nix + ../../common/linux/apps/waybar.nix + ../../common/linux/apps/xfce4-terminal.nix ]; home.file = { From 46a93a4814e3d59e35e9c31cd2cd3c50e194cff6 Mon Sep 17 00:00:00 2001 From: Gene Liverman Date: Sun, 8 Dec 2024 00:51:22 -0500 Subject: [PATCH 16/18] Add missing keys --- modules/hosts/nixos/nixnuc/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/hosts/nixos/nixnuc/default.nix b/modules/hosts/nixos/nixnuc/default.nix index f511596..631cdea 100644 --- a/modules/hosts/nixos/nixnuc/default.nix +++ b/modules/hosts/nixos/nixnuc/default.nix @@ -481,6 +481,10 @@ in { isNormalUser = true; description = "Gene Liverman"; extraGroups = [ "docker" "podman" "networkmanager" "wheel" ]; + openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFvLaPTfG3r+bcbI6DV4l69UgJjnwmZNCQk79HXyf1Pt gene@rainbow-planet" + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIp42X5DZ713+bgbOO+GXROufUFdxWo7NjJbGQ285x3N gene.liverman@ltnglobal.com" + ]; }; # Enable common container config files in /etc/containers From 23de2ed5a2fba5e51dc3821129631ced87cc583c Mon Sep 17 00:00:00 2001 From: Gene Liverman Date: Sun, 8 Dec 2024 08:52:33 -0500 Subject: [PATCH 17/18] Rename home manager user settings files --- lib/mkDarwinHost.nix | 2 +- lib/mkNixosHost.nix | 2 +- modules/hosts/darwin/AirPuppet/{gene.nix => home-gene.nix} | 0 .../Blue-Rock/{gene.liverman.nix => home-gene.liverman.nix} | 0 .../mightymac/{gene.liverman.nix => home-gene.liverman.nix} | 0 modules/hosts/nixos/bigboy/{gene.nix => home-gene.nix} | 0 modules/hosts/nixos/hetznix01/{gene.nix => home-gene.nix} | 0 modules/hosts/nixos/hetznix02/{gene.nix => home-gene.nix} | 0 modules/hosts/nixos/nixnas1/{gene.nix => home-gene.nix} | 0 modules/hosts/nixos/nixnuc/{gene.nix => home-gene.nix} | 0 modules/hosts/nixos/rainbow-planet/{gene.nix => home-gene.nix} | 0 11 files changed, 2 insertions(+), 2 deletions(-) rename modules/hosts/darwin/AirPuppet/{gene.nix => home-gene.nix} (100%) rename modules/hosts/darwin/Blue-Rock/{gene.liverman.nix => home-gene.liverman.nix} (100%) rename modules/hosts/darwin/mightymac/{gene.liverman.nix => home-gene.liverman.nix} (100%) rename modules/hosts/nixos/bigboy/{gene.nix => home-gene.nix} (100%) rename modules/hosts/nixos/hetznix01/{gene.nix => home-gene.nix} (100%) rename modules/hosts/nixos/hetznix02/{gene.nix => home-gene.nix} (100%) rename modules/hosts/nixos/nixnas1/{gene.nix => home-gene.nix} (100%) rename modules/hosts/nixos/nixnuc/{gene.nix => home-gene.nix} (100%) rename modules/hosts/nixos/rainbow-planet/{gene.nix => home-gene.nix} (100%) diff --git a/lib/mkDarwinHost.nix b/lib/mkDarwinHost.nix index ab42cc1..bdcd92a 100644 --- a/lib/mkDarwinHost.nix +++ b/lib/mkDarwinHost.nix @@ -29,7 +29,7 @@ ../modules/hosts/common ../modules/hosts/common/all-gui.nix ../modules/hosts/darwin/home.nix - ../modules/hosts/darwin/${hostname}/${username}.nix + ../modules/hosts/darwin/${hostname}/home-${username}.nix ]; }; } diff --git a/lib/mkNixosHost.nix b/lib/mkNixosHost.nix index 1736949..128a6c5 100644 --- a/lib/mkNixosHost.nix +++ b/lib/mkNixosHost.nix @@ -21,7 +21,7 @@ users.${username}.imports = [ ../modules/hosts/common ../modules/hosts/common/linux/home.nix - ../modules/hosts/nixos/${hostname}/${username}.nix + ../modules/hosts/nixos/${hostname}/home-${username}.nix ]; }; } diff --git a/modules/hosts/darwin/AirPuppet/gene.nix b/modules/hosts/darwin/AirPuppet/home-gene.nix similarity index 100% rename from modules/hosts/darwin/AirPuppet/gene.nix rename to modules/hosts/darwin/AirPuppet/home-gene.nix diff --git a/modules/hosts/darwin/Blue-Rock/gene.liverman.nix b/modules/hosts/darwin/Blue-Rock/home-gene.liverman.nix similarity index 100% rename from modules/hosts/darwin/Blue-Rock/gene.liverman.nix rename to modules/hosts/darwin/Blue-Rock/home-gene.liverman.nix diff --git a/modules/hosts/darwin/mightymac/gene.liverman.nix b/modules/hosts/darwin/mightymac/home-gene.liverman.nix similarity index 100% rename from modules/hosts/darwin/mightymac/gene.liverman.nix rename to modules/hosts/darwin/mightymac/home-gene.liverman.nix diff --git a/modules/hosts/nixos/bigboy/gene.nix b/modules/hosts/nixos/bigboy/home-gene.nix similarity index 100% rename from modules/hosts/nixos/bigboy/gene.nix rename to modules/hosts/nixos/bigboy/home-gene.nix diff --git a/modules/hosts/nixos/hetznix01/gene.nix b/modules/hosts/nixos/hetznix01/home-gene.nix similarity index 100% rename from modules/hosts/nixos/hetznix01/gene.nix rename to modules/hosts/nixos/hetznix01/home-gene.nix diff --git a/modules/hosts/nixos/hetznix02/gene.nix b/modules/hosts/nixos/hetznix02/home-gene.nix similarity index 100% rename from modules/hosts/nixos/hetznix02/gene.nix rename to modules/hosts/nixos/hetznix02/home-gene.nix diff --git a/modules/hosts/nixos/nixnas1/gene.nix b/modules/hosts/nixos/nixnas1/home-gene.nix similarity index 100% rename from modules/hosts/nixos/nixnas1/gene.nix rename to modules/hosts/nixos/nixnas1/home-gene.nix diff --git a/modules/hosts/nixos/nixnuc/gene.nix b/modules/hosts/nixos/nixnuc/home-gene.nix similarity index 100% rename from modules/hosts/nixos/nixnuc/gene.nix rename to modules/hosts/nixos/nixnuc/home-gene.nix diff --git a/modules/hosts/nixos/rainbow-planet/gene.nix b/modules/hosts/nixos/rainbow-planet/home-gene.nix similarity index 100% rename from modules/hosts/nixos/rainbow-planet/gene.nix rename to modules/hosts/nixos/rainbow-planet/home-gene.nix From 97c8f1bd741ef6da4048d4882477f7bd586e3c95 Mon Sep 17 00:00:00 2001 From: Gene Liverman Date: Sun, 8 Dec 2024 19:03:17 -0500 Subject: [PATCH 18/18] README update --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 2a78e4d..1c2948f 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,8 @@ This repo is a Nix flake that manages most of my setup on macOS and fully manage ## Flake structure +> **RESTRUCTURING IN PROGRESS**: please note, I am restructuring this to remove a lot of complexity. This first pass is done and moves home manager bits into modules that have home in the name. Things that apply to everything under a part of the tree are in a corresponding `default.nix` + The Nix bits are driven by `flake.nix` which pulls in things under `modules/`. Both Intel and Apple Silicon macOS are suppoted, as is NixOS. The flake is structured like so: - description: a human readable description of this flake