From 3e8c828601f4165bb01e059d5bc93c11434a6277 Mon Sep 17 00:00:00 2001 From: Greg Hellings Date: Thu, 22 May 2025 08:40:18 -0500 Subject: [PATCH 01/16] Updates across the board to support nix-darwin again --- darwin/default.nix | 12 ++-- darwin/hosts/ivr/default.nix | 16 ++++- flake.lock | 72 ++++++++------------ flake.nix | 5 +- home/home.nix | 7 +- home/hosts/ivr/default.nix | 28 ++------ home/modules/baseline/vim/config.nix | 12 ---- home/modules/baseline/xonsh.nix | 1 - home/modules/baseline/xonsh_footer.xsh | 2 +- home/modules/development.nix | 2 - home/modules/gui.nix | 18 ++--- hosts/default.nix | 2 +- modules/baseline.nix | 73 -------------------- modules/darwin/default.nix | 21 +++--- modules/nixos/default.nix | 94 +++++++++++++++++++++++--- 15 files changed, 170 insertions(+), 195 deletions(-) diff --git a/darwin/default.nix b/darwin/default.nix index eff30a0..2e8d6e5 100644 --- a/darwin/default.nix +++ b/darwin/default.nix @@ -14,14 +14,17 @@ let top.darwin.lib.darwinSystem { inherit system; specialArgs = { + inherit (top) self; inherit nixpkgs; }; modules = [ { nixpkgs.overlays = overlays; - home-manager.extraSpecialArgs = { - inherit top; - host = name; + home-manager = { + extraSpecialArgs = { + inherit top; + host = name; + }; }; } hm.darwinModules.home-manager @@ -30,6 +33,5 @@ let }; in rec { - la23002 = mac { name = "ivr"; }; - LA23002 = la23002; + "MacBook-Pro" = mac { name = "ivr"; }; } diff --git a/darwin/hosts/ivr/default.nix b/darwin/hosts/ivr/default.nix index a0d05cd..64bbb18 100644 --- a/darwin/hosts/ivr/default.nix +++ b/darwin/hosts/ivr/default.nix @@ -1,9 +1,12 @@ { ... }: +let + username = "gregory.hellings"; +in { - #environment.loginShell = lib.getExe pkgs.xonsh; - homebrews = { + homebrew = { enable = true; brews = [ + "bitwarden-cli" "direnv" { name = "libvirt"; @@ -14,6 +17,7 @@ ]; casks = [ "alt-tab" + "bitwarden" "bruno" "chromium" "firefox" @@ -24,5 +28,13 @@ "visual-studio-code" "zed" ]; + user = username; + }; + + system.primaryUser = username; + + users.users."${username}" = { + name = username; + home = "/Users/${username}"; }; } diff --git a/flake.lock b/flake.lock index 04d5890..e31b76b 100644 --- a/flake.lock +++ b/flake.lock @@ -47,7 +47,7 @@ }, "crane": { "inputs": { - "nixpkgs": "nixpkgs_5" + "nixpkgs": "nixpkgs_4" }, "locked": { "lastModified": 1717383740, @@ -93,11 +93,11 @@ ] }, "locked": { - "lastModified": 1747521943, - "narHash": "sha256-GMAJcB8oB9cC+TbYTE7QDfw9fwHZyloxUWnUpHnQRko=", + "lastModified": 1747820204, + "narHash": "sha256-oY/mH8K1LOd+YbO58sw9ORtOdTxy3rR9lvTzOJKVUtA=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "b9b927dd1f24094b271e8ec5277a672dc4fc860d", + "rev": "e2676937faf868111dcea6a4a9cf4b6549907c9d", "type": "github" }, "original": { @@ -356,11 +356,11 @@ ] }, "locked": { - "lastModified": 1747688838, - "narHash": "sha256-FZq4/3OtGV/cti9Vccsy2tGSUrxTO4hkDF9oeGRTen4=", + "lastModified": 1747834438, + "narHash": "sha256-AHJt79W8wADzur2htCx1U8FtEk4XjvrHb9/3iDfNedI=", "owner": "nix-community", "repo": "home-manager", - "rev": "45c2985644b60ab64de2a2d93a4d132ecb87cf66", + "rev": "6c2eb1e24cd0e76d88bdd633ef4c50d6286586e0", "type": "github" }, "original": { @@ -441,11 +441,11 @@ }, "nix-hardware": { "locked": { - "lastModified": 1747684167, - "narHash": "sha256-l6jbonaboCBlB8lCjBkrqgh2zEnvt6F3f4dOU/8CLd4=", + "lastModified": 1747723695, + "narHash": "sha256-lSXzv33yv1O9r9Ai1MtYFDX3OKhWsZMn/5FFb4Rni/k=", "owner": "nixos", "repo": "nixos-hardware", - "rev": "e8f38b2c19c0647e39021c3d47172ff5469af8a9", + "rev": "6ac6ec6fcb410e15a60ef5ec94b8a2b35b5dd282", "type": "github" }, "original": { @@ -600,27 +600,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1747467164, - "narHash": "sha256-JBXbjJ0t6T6BbVc9iPVquQI9XSXCGQJD8c8SgnUquus=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "3fcbdcfc707e0aa42c541b7743e05820472bdaec", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_4": { - "locked": { - "lastModified": 1747542820, - "narHash": "sha256-GaOZntlJ6gPPbbkTLjbd8BMWaDYafhuuYRNrxCGnPJw=", + "lastModified": 1747744144, + "narHash": "sha256-W7lqHp0qZiENCDwUZ5EX/lNhxjMdNapFnbErcbnP11Q=", "owner": "nixos", "repo": "nixpkgs", - "rev": "292fa7d4f6519c074f0a50394dbbe69859bb6043", + "rev": "2795c506fe8fb7b03c36ccb51f75b6df0ab2553f", "type": "github" }, "original": { @@ -630,7 +614,7 @@ "type": "github" } }, - "nixpkgs_5": { + "nixpkgs_4": { "locked": { "lastModified": 1714656196, "narHash": "sha256-kjQkA98lMcsom6Gbhw8SYzmwrSo+2nruiTcTZp5jK7o=", @@ -646,7 +630,7 @@ "type": "github" } }, - "nixpkgs_6": { + "nixpkgs_5": { "locked": { "lastModified": 1713805509, "narHash": "sha256-YgSEan4CcrjivCNO5ZNzhg7/8ViLkZ4CB/GrGBVSudo=", @@ -664,11 +648,11 @@ }, "nixunstable": { "locked": { - "lastModified": 1747542820, - "narHash": "sha256-GaOZntlJ6gPPbbkTLjbd8BMWaDYafhuuYRNrxCGnPJw=", + "lastModified": 1747744144, + "narHash": "sha256-W7lqHp0qZiENCDwUZ5EX/lNhxjMdNapFnbErcbnP11Q=", "owner": "nixos", "repo": "nixpkgs", - "rev": "292fa7d4f6519c074f0a50394dbbe69859bb6043", + "rev": "2795c506fe8fb7b03c36ccb51f75b6df0ab2553f", "type": "github" }, "original": { @@ -681,16 +665,18 @@ "nixvimunstable": { "inputs": { "flake-parts": "flake-parts_2", - "nixpkgs": "nixpkgs_3", + "nixpkgs": [ + "nixunstable" + ], "nuschtosSearch": "nuschtosSearch", "systems": "systems_4" }, "locked": { - "lastModified": 1747683610, - "narHash": "sha256-Jis9/4lnr3pn1AIRgCnoeiReKs2MGy6COWc6JtAEESo=", + "lastModified": 1747845951, + "narHash": "sha256-wTmZS30RIM6ELx9JFH5XSI5bjI4GzjtpodjHTSZBY3g=", "owner": "nix-community", "repo": "nixvim", - "rev": "14c7f5f8968940d1730b5e935dd1d9f3e461a2d3", + "rev": "7e3a0f4e97c0906a276a860975888db96106b75e", "type": "github" }, "original": { @@ -703,15 +689,15 @@ "nurpkgs": { "inputs": { "flake-parts": "flake-parts_3", - "nixpkgs": "nixpkgs_4", + "nixpkgs": "nixpkgs_3", "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1747683907, - "narHash": "sha256-dgEK4d1QPNFhv0s5s9lpvEWOVBlRZENp7TVh8V8qYDU=", + "lastModified": 1747844583, + "narHash": "sha256-zbwqs9a2mh0Q7i3ZPjEGipbYHoTOHh31IRlYm97B1Ec=", "owner": "nix-community", "repo": "NUR", - "rev": "64046fedb710701f87e5e86390b4dbe77f1d733b", + "rev": "b9b668b91302e0ee12aaa0114c4a8ae8096871f3", "type": "github" }, "original": { @@ -933,7 +919,7 @@ "inputs": { "flake-compat": "flake-compat_3", "flake-utils": "flake-utils_3", - "nixpkgs": "nixpkgs_6" + "nixpkgs": "nixpkgs_5" }, "locked": { "lastModified": 1739984805, diff --git a/flake.nix b/flake.nix index 77224d7..797e9ab 100644 --- a/flake.nix +++ b/flake.nix @@ -39,7 +39,10 @@ url = "github:nix-community/nixos-generators"; inputs.nixpkgs.follows = "nixunstable"; }; - nixvimunstable.url = "github:nix-community/nixvim/main"; + nixvimunstable = { + url = "github:nix-community/nixvim/main"; + inputs.nixpkgs.follows = "nixunstable"; + }; nixunstable.url = "github:nixos/nixpkgs/nixos-unstable"; nurpkgs.url = "github:nix-community/NUR"; vsext.url = "github:greg-hellings/nix-vscode-extensions/fix-json"; diff --git a/home/home.nix b/home/home.nix index 86e5830..7973e56 100644 --- a/home/home.nix +++ b/home/home.nix @@ -2,13 +2,13 @@ pkgs, lib, host ? "most", - nixvim, + top, ... }: { imports = [ - nixvim.homeManagerModules.default + top.nixvimunstable.homeManagerModules.nixvim ./modules ] ++ lib.optionals (builtins.pathExists ./hosts/${host}) [ ./hosts/${host} ]; @@ -20,9 +20,8 @@ extraConfig = (lib.strings.concatStringsSep "\n" [ "bind P paste-buffer" ]); }; - home.stateVersion = "23.05"; + home.stateVersion = "25.05"; home.packages = with pkgs; [ - bitwarden-cli copier diffutils findutils diff --git a/home/hosts/ivr/default.nix b/home/hosts/ivr/default.nix index f2c23c5..4005d17 100644 --- a/home/hosts/ivr/default.nix +++ b/home/hosts/ivr/default.nix @@ -4,13 +4,7 @@ ... }: let - py = pkgs.python311.withPackages ( - p: with p; [ - pyyaml - ruamel-yaml - tox - ] - ); + username = "gregory.hellings"; x = pkgs.xonsh.override { extraPackages = ( ps: [ @@ -23,10 +17,12 @@ let }; in { + # Disables hitting local cache + _module.args.cache = lib.mkForce false; greg = { development = true; gui = true; - pypackage = py; + pypackage = pkgs.python311; vscodium = true; }; @@ -34,14 +30,12 @@ in packages = with pkgs; [ aacs ansible - bitwarden-cli direnv home-manager k9s kubectl minikube mise - mysql-workbench nixStable pipenv-ivr (poetry.withPlugins ( @@ -52,7 +46,6 @@ in ] )) pre-commit - robo3t skaffold x ]; @@ -66,17 +59,8 @@ in " https://pypidev.ivrtechnology.com/simple/" ] ); - username = "gregory.hellings"; - homeDirectory = lib.mkForce "/home/gregory.hellings"; + username = username; + homeDirectory = "/Users/${username}"; }; programs.tmux.shell = (lib.getExe x); - services.podman = { - enable = true; - settings = { - registries.search = [ - "docker.io" - "quay.io" - ]; - }; - }; } diff --git a/home/modules/baseline/vim/config.nix b/home/modules/baseline/vim/config.nix index 4fd9e0e..6512b74 100644 --- a/home/modules/baseline/vim/config.nix +++ b/home/modules/baseline/vim/config.nix @@ -1,15 +1,4 @@ { pkgs, ... }: -let - vim-xonsh = pkgs.vimUtils.buildVimPlugin { - name = "vim-xonsh"; - src = pkgs.fetchFromGitHub { - owner = "meatballs"; - repo = "vim-xonsh"; - rev = "929f35e"; - hash = "sha256-ugHLu2Z9bTtQsIp4FQPKxgjVe9oZNjfQYrP+aHu+/uU="; - }; - }; -in { colorschemes.gruvbox.enable = true; globals = { @@ -162,7 +151,6 @@ in context-vim vim-indent-guides - vim-xonsh ]; viAlias = true; vimAlias = true; diff --git a/home/modules/baseline/xonsh.nix b/home/modules/baseline/xonsh.nix index e207579..57166dd 100644 --- a/home/modules/baseline/xonsh.nix +++ b/home/modules/baseline/xonsh.nix @@ -3,7 +3,6 @@ { # Programs that are used in the settings file home.packages = with pkgs; [ - bitwarden-cli copier git gnused diff --git a/home/modules/baseline/xonsh_footer.xsh b/home/modules/baseline/xonsh_footer.xsh index 6663435..bc36737 100644 --- a/home/modules/baseline/xonsh_footer.xsh +++ b/home/modules/baseline/xonsh_footer.xsh @@ -56,7 +56,7 @@ def _rebuild(args): system = uname() hostname = system.nodename if system.sysname == 'Darwin': - darwin-rebuild --flake ~/.config/darwin switch + sudo darwin-rebuild switch else: with TemporaryDirectory() as td: pushd @(td) diff --git a/home/modules/development.nix b/home/modules/development.nix index 0fac525..2294062 100644 --- a/home/modules/development.nix +++ b/home/modules/development.nix @@ -11,8 +11,6 @@ let cargo gh-copilot gnumake - libcap.dev - libmysqlclient.dev nix-eval-jobs nix-fast-build nix-output-monitor diff --git a/home/modules/gui.nix b/home/modules/gui.nix index 6b0d6ed..f2cfa14 100644 --- a/home/modules/gui.nix +++ b/home/modules/gui.nix @@ -31,6 +31,7 @@ in cdrtools element-desktop freetube + onlyoffice-bin qpwgraph vlc x265 @@ -51,25 +52,24 @@ in jellyfin-media-player nextcloud-client slack + (pkgs.zoom-us.overrideAttrs { + version = "6.2.11.5069"; + src = pkgs.fetchurl { + url = "https://zoom.us/client/6.2.11.5069/zoom_x86_64.pkg.tar.xz"; + hash = "sha256-k8T/lmfgAFxW1nwEyh61lagrlHP5geT2tA7e5j61+qw="; + }; + }) ] ) ++ # Items that are not supported on ARM/Linux (excludes [ "aarch64-linux" ] [ - onlyoffice-bin synology-drive-client - (pkgs.zoom-us.overrideAttrs { - version = "6.2.11.5069"; - src = pkgs.fetchurl { - url = "https://zoom.us/client/6.2.11.5069/zoom_x86_64.pkg.tar.xz"; - hash = "sha256-k8T/lmfgAFxW1nwEyh61lagrlHP5geT2tA7e5j61+qw="; - }; - }) ]); programs.firefox = { - enable = (!pkgs.stdenv.hostPlatform.isDarwin); + enable = true; #(!pkgs.stdenv.hostPlatform.isDarwin); package = pkgs.firefox-bin; policies = { DisableAppUpdate = true; diff --git a/hosts/default.nix b/hosts/default.nix index a9d645d..830c83d 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -39,7 +39,7 @@ let useUserPackages = true; users.greg = import ../home/home.nix; extraSpecialArgs = { - inherit top overlays nixvim; + inherit top overlays; home = "/home/greg"; host = name; }; diff --git a/modules/baseline.nix b/modules/baseline.nix index be9f48f..981bcb4 100644 --- a/modules/baseline.nix +++ b/modules/baseline.nix @@ -22,79 +22,6 @@ in ]; programs.ssh = { - knownHosts = { - chronicles = { - extraHostNames = [ - "chronicles.thehellings.lan" - "chronicles.home" - "nas" - "nas.thehellings.lan" - "nas.home" - ]; - publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEBecZUva9OnZuXLaBun6/1ITo5f9p0YMLPD+q0egLRS"; - }; - dns = { - extraHostNames = [ - "dns" - "dns.me.ts" - "dns.home" - ]; - publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKRCXdhXWHEvw84V9JC5bAGovvj12DLVphcEnsTHDjxW"; - }; - "genesis" = { - extraHostNames = [ - "genesis.shire-zebra.ts.net" - "genesis.home" - ]; - publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEI9jbTPmEWQ0F2bLYmnIOLmBnag1fkKxHRjz3X8lB/k"; - }; - "git" = { - extraHostNames = [ - "git.home" - "git.thehellings.lan" - ]; - publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC7hesFWwlmSbWPJWUiF8fIppy5a83yXw84O0Ytz+Zyq"; - }; - hosea = { - extraHostNames = [ - "hosea.home" - "hosea.thehellings.lan" - ]; - publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKLIwkTTXA56sUlUjEulXXZRvZy5H4a5ZwgKWLlpkQDz"; - }; - isaiah = { - extraHostNames = [ - "isaiah.home" - "isaiah.thehellings.lan" - "isaiah-builder" - ]; - publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHleYKtfV4W1Z63Ysu9w5Rbglqlz4F92YcZoMkucoTNf"; - }; - jeremiah = { - extraHostNames = [ - "jeremiah.home" - "jeremiah.thehellings.lan" - "jeremiah-builder" - ]; - publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOjQjXq9WYU2Ki27BR9WwJ4ZruS/lJXbjC1b0Q42Adi0"; - }; - jude = { - extraHostNames = [ - "jude.home" - "jude.thehellings.lan" - "jude-builder" - ]; - publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOos0zQePsa+T6Z2dsKbPOvEdrBQ8a6mx3s7pN6ysCI0"; - }; - linode = { - extraHostNames = [ - "linode.home" - "linode.thehellings.lan" - "thehellings.com" - ]; - publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMv9Zud3kZOl86gtmkn+uj3D4kiXWDPtyUL02VVLNR4Q"; - }; - }; extraConfig = builtins.concatStringsSep "\n" ( lib.map (x: '' Host ${x}-builder diff --git a/modules/darwin/default.nix b/modules/darwin/default.nix index 8d1a1b9..09d1ef5 100644 --- a/modules/darwin/default.nix +++ b/modules/darwin/default.nix @@ -4,22 +4,22 @@ home-manager = { useGlobalPkgs = true; - users."gregory.hellings" = import ../../home/home.nix; + users."${config.system.primaryUser}" = import ../../home/home.nix; extraSpecialArgs = { + inherit (config.users.users."${config.system.primaryUser}") home; gnome = false; gui = false; - home = "/Users/gregory.hellings"; }; }; fonts.packages = with pkgs; [ dejavu_fonts - hack-font - nerdfonts + nerd-fonts.hack ]; nix = { - gc.interval.Hour = 24; + enable = true; + gc.interval.Hour = 3; settings.auto-optimise-store = false; # Darwin bugs? }; @@ -34,10 +34,13 @@ bash.enable = true; }; - services.nix-daemon.enable = true; - system = { defaults = { + CustomSystemPreferences = { + ".GlobalPreferences" = { + "com.apple.swipescrolldirection" = 0; + }; + }; finder = { AppleShowAllExtensions = true; AppleShowAllFiles = true; @@ -50,7 +53,7 @@ LaunchServices.LSQuarantine = false; menuExtraClock = { Show24Hour = true; - ShowDate = true; + ShowDate = 2; }; screencapture = { include-date = true; @@ -66,6 +69,4 @@ }; time.timeZone = "America/Chicago"; - - users.users."gregory.hellings".home = "/Users/gregory.hellings"; } diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix index 5a26223..f407419 100644 --- a/modules/nixos/default.nix +++ b/modules/nixos/default.nix @@ -32,6 +32,7 @@ environment.systemPackages = with pkgs; [ btrfs-progs + bitwarden-cli coreutils-full efibootmgr psmisc @@ -56,15 +57,90 @@ networkmanager.enable = false; }; - programs.xonsh = { - enable = true; - extraPackages = ( - ps: with ps; [ - xonsh-apipenv - pkgs.nur.repos.xonsh-xontribs.xonsh-direnv - pkgs.nur.repos.xonsh-xontribs.xontrib-vox - ] - ); + programs = { + xonsh = { + enable = true; + extraPackages = ( + ps: with ps; [ + xonsh-apipenv + pkgs.nur.repos.xonsh-xontribs.xonsh-direnv + pkgs.nur.repos.xonsh-xontribs.xontrib-vox + ] + ); + }; + ssh.knownHosts = { + chronicles = { + extraHostNames = [ + "chronicles.thehellings.lan" + "chronicles.home" + "nas" + "nas.thehellings.lan" + "nas.home" + ]; + publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEBecZUva9OnZuXLaBun6/1ITo5f9p0YMLPD+q0egLRS"; + }; + dns = { + extraHostNames = [ + "dns" + "dns.me.ts" + "dns.home" + ]; + publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKRCXdhXWHEvw84V9JC5bAGovvj12DLVphcEnsTHDjxW"; + }; + "genesis" = { + extraHostNames = [ + "genesis.shire-zebra.ts.net" + "genesis.home" + ]; + publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEI9jbTPmEWQ0F2bLYmnIOLmBnag1fkKxHRjz3X8lB/k"; + }; + "git" = { + extraHostNames = [ + "git.home" + "git.thehellings.lan" + ]; + publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC7hesFWwlmSbWPJWUiF8fIppy5a83yXw84O0Ytz+Zyq"; + }; + hosea = { + extraHostNames = [ + "hosea.home" + "hosea.thehellings.lan" + ]; + publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKLIwkTTXA56sUlUjEulXXZRvZy5H4a5ZwgKWLlpkQDz"; + }; + isaiah = { + extraHostNames = [ + "isaiah.home" + "isaiah.thehellings.lan" + "isaiah-builder" + ]; + publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHleYKtfV4W1Z63Ysu9w5Rbglqlz4F92YcZoMkucoTNf"; + }; + jeremiah = { + extraHostNames = [ + "jeremiah.home" + "jeremiah.thehellings.lan" + "jeremiah-builder" + ]; + publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOjQjXq9WYU2Ki27BR9WwJ4ZruS/lJXbjC1b0Q42Adi0"; + }; + jude = { + extraHostNames = [ + "jude.home" + "jude.thehellings.lan" + "jude-builder" + ]; + publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOos0zQePsa+T6Z2dsKbPOvEdrBQ8a6mx3s7pN6ysCI0"; + }; + linode = { + extraHostNames = [ + "linode.home" + "linode.thehellings.lan" + "thehellings.com" + ]; + publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMv9Zud3kZOl86gtmkn+uj3D4kiXWDPtyUL02VVLNR4Q"; + }; + }; }; # Enable the OpenSSH daemon for remote control From ff9ac93287d4b03f1613664e0af52bdba231e8dd Mon Sep 17 00:00:00 2001 From: Greg Hellings Date: Wed, 28 May 2025 11:20:54 -0500 Subject: [PATCH 02/16] Add packages to IVR --- darwin/hosts/ivr/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/darwin/hosts/ivr/default.nix b/darwin/hosts/ivr/default.nix index 64bbb18..2e08773 100644 --- a/darwin/hosts/ivr/default.nix +++ b/darwin/hosts/ivr/default.nix @@ -21,9 +21,13 @@ in "bruno" "chromium" "firefox" + "microsoft-teams" + "mysql" "onlyoffice" "pgadmin4" + "poetry" "tabby" + "twine" "vagrant" "visual-studio-code" "zed" From 04723ae03eaf3efa82ae84aaf387e1875e7d1599 Mon Sep 17 00:00:00 2001 From: Greg Hellings Date: Wed, 28 May 2025 11:21:12 -0500 Subject: [PATCH 03/16] Update python settings in home-manager --- home/hosts/ivr/default.nix | 9 +-------- home/modules/python.nix | 22 +++++++++++++++++----- modules/baseline.nix | 1 - 3 files changed, 18 insertions(+), 14 deletions(-) diff --git a/home/hosts/ivr/default.nix b/home/hosts/ivr/default.nix index 4005d17..aa3a768 100644 --- a/home/hosts/ivr/default.nix +++ b/home/hosts/ivr/default.nix @@ -22,7 +22,7 @@ in greg = { development = true; gui = true; - pypackage = pkgs.python311; + pypackage.enable = false; vscodium = true; }; @@ -38,13 +38,6 @@ in mise nixStable pipenv-ivr - (poetry.withPlugins ( - ps: with ps; [ - poetry-audit-plugin - poetry-plugin-export - poetry-plugin-shell - ] - )) pre-commit skaffold x diff --git a/home/modules/python.nix b/home/modules/python.nix index fdbd210..9c67d2f 100644 --- a/home/modules/python.nix +++ b/home/modules/python.nix @@ -4,12 +4,24 @@ lib, ... }: +let + cfg = config.greg.pypackage; +in { - options.greg.pypackage = lib.mkOption { - description = "Enable Gnome support and settings"; - type = lib.types.package; - default = pkgs.gregpy; + options.greg.pypackage = { + enable = lib.mkOption { + description = "Enable installing my Python package here"; + type = lib.types.bool; + default = true; + }; + package = lib.mkOption { + description = "Enable Gnome support and settings"; + type = lib.types.package; + default = pkgs.gregpy; + }; }; - config.home.packages = [ config.greg.pypackage ]; + config = lib.mkIf cfg.enable { + home.packages = [ cfg.package ]; + }; } diff --git a/modules/baseline.nix b/modules/baseline.nix index 981bcb4..b825ee3 100644 --- a/modules/baseline.nix +++ b/modules/baseline.nix @@ -38,7 +38,6 @@ in diffutils git gnupatch - gregpy findutils file hms # My own home manager switcher From 24d1247a79d920e4461b3183ae7dd90a89363f4a Mon Sep 17 00:00:00 2001 From: Greg Hellings Date: Thu, 29 May 2025 10:48:46 -0500 Subject: [PATCH 04/16] Make local cache configurable --- darwin/hosts/ivr/default.nix | 9 ++- modules/baseline.nix | 3 - modules/nix-conf.nix | 108 +++++++++++++++++++---------------- 3 files changed, 67 insertions(+), 53 deletions(-) diff --git a/darwin/hosts/ivr/default.nix b/darwin/hosts/ivr/default.nix index 2e08773..73a12a8 100644 --- a/darwin/hosts/ivr/default.nix +++ b/darwin/hosts/ivr/default.nix @@ -3,6 +3,10 @@ let username = "gregory.hellings"; in { + greg = { + nix.cache = false; + }; + homebrew = { enable = true; brews = [ @@ -12,7 +16,9 @@ in name = "libvirt"; restart_service = true; } + "mysql" "nushell" + "poetry" "qemu" ]; casks = [ @@ -22,15 +28,14 @@ in "chromium" "firefox" "microsoft-teams" - "mysql" "onlyoffice" "pgadmin4" - "poetry" "tabby" "twine" "vagrant" "visual-studio-code" "zed" + "zoho-workdrive" ]; user = username; }; diff --git a/modules/baseline.nix b/modules/baseline.nix index b825ee3..b7c649c 100644 --- a/modules/baseline.nix +++ b/modules/baseline.nix @@ -14,9 +14,6 @@ let [ ]; in { - # This is a dumb hack to pass the value into the import below, but it's how we have to do it, - # since that's how the module system works - _module.args.cache = true; imports = [ ./nix-conf.nix ]; diff --git a/modules/nix-conf.nix b/modules/nix-conf.nix index c94c061..55e3fcc 100644 --- a/modules/nix-conf.nix +++ b/modules/nix-conf.nix @@ -1,60 +1,72 @@ { pkgs, lib, - cache, + config, ... }: +let + cfg = config.greg.nix; +in { - nix = { - gc = { - automatic = true; - # Scheduling of them is different in nixos vs nix-darwin, so check for - # the extra details there - options = "--delete-older-than 30d"; - }; - - package = pkgs.nixStable; - - settings = { - cores = 0; # Use all cores for builds - download-buffer-size = 500 * 1024 * 1024; - experimental-features = "nix-command flakes"; - keep-outputs = true; - keep-derivations = true; - min-free = (toString (1024 * 1024 * 1024)); - max-free = (toString (5 * 1024 * 1024 * 1024)); - trusted-users = [ - "greg" - "gregory.hellings" - ]; # For home and for work machines - substituters = - (lib.optionals cache [ - "http://nas.thehellings.lan:9000/binary-cache/" - "http://nas.home:9000/binary-cache/" - ]) - ++ [ - "https://ai.cachix.org" - "https://nixpkgs-python.cachix.org" - "https://greg-hellings.cachix.org" - "https://nix-community.cachix.org" - "https://cache.nixos.org" - ]; - trusted-public-keys = [ - "nix.thehellings.lan:0qWYHn3gGllXChhAaaxKlNZtRy6yG/XJs1RFSqV3nW8=" - "nix.home:0qWYHn3gGllXChhAaaxKlNZtRy6yG/XJs1RFSqV3nW8=" - "ai.cachix.org-1:N9dzRK+alWwoKXQlnn0H6aUx0lU/mspIoz8hMvGvbbc=" - "nixpkgs-python.cachix.org-1:hxjI7pFxTyuTHn2NkvWCrAUcNZLNS3ZAvfYNuYifcEU=" - "greg-hellings.cachix.org-1:y01Jl/L5evlhxdnUW6n56AiI1k8g1wxWhTxJCe7XSco=" - "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" - "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" - ]; + options.greg.nix = { + cache = lib.mkOption { + type = lib.types.bool; + default = true; }; }; - nixpkgs.config = { - allowUnfree = true; - allowUnfreePredicate = _: true; - permittedInsecurePackages = [ "ventoy-1.1.05" ]; + config = { + nix = { + gc = { + automatic = true; + # Scheduling of them is different in nixos vs nix-darwin, so check for + # the extra details there + options = "--delete-older-than 30d"; + }; + + package = pkgs.nixStable; + + settings = { + cores = 0; # Use all cores for builds + download-buffer-size = 500 * 1024 * 1024; + experimental-features = "nix-command flakes"; + keep-outputs = true; + keep-derivations = true; + min-free = (toString (1024 * 1024 * 1024)); + max-free = (toString (5 * 1024 * 1024 * 1024)); + trusted-users = [ + "greg" + "gregory.hellings" + ]; # For home and for work machines + substituters = + (lib.optionals cfg.cache [ + "http://nas.thehellings.lan:9000/binary-cache/" + "http://nas.home:9000/binary-cache/" + ]) + ++ [ + "https://ai.cachix.org" + "https://nixpkgs-python.cachix.org" + "https://greg-hellings.cachix.org" + "https://nix-community.cachix.org" + "https://cache.nixos.org" + ]; + trusted-public-keys = [ + "nix.thehellings.lan:0qWYHn3gGllXChhAaaxKlNZtRy6yG/XJs1RFSqV3nW8=" + "nix.home:0qWYHn3gGllXChhAaaxKlNZtRy6yG/XJs1RFSqV3nW8=" + "ai.cachix.org-1:N9dzRK+alWwoKXQlnn0H6aUx0lU/mspIoz8hMvGvbbc=" + "nixpkgs-python.cachix.org-1:hxjI7pFxTyuTHn2NkvWCrAUcNZLNS3ZAvfYNuYifcEU=" + "greg-hellings.cachix.org-1:y01Jl/L5evlhxdnUW6n56AiI1k8g1wxWhTxJCe7XSco=" + "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" + ]; + }; + }; + + nixpkgs.config = { + allowUnfree = true; + allowUnfreePredicate = _: true; + permittedInsecurePackages = [ "ventoy-1.1.05" ]; + }; }; } From 4e137b97ec80c8c202dd957a669974aafc83be66 Mon Sep 17 00:00:00 2001 From: Greg Hellings Date: Fri, 30 May 2025 00:24:25 -0500 Subject: [PATCH 05/16] Add greg to podman group --- hosts/exodus/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hosts/exodus/default.nix b/hosts/exodus/default.nix index 7de274a..b1730ad 100644 --- a/hosts/exodus/default.nix +++ b/hosts/exodus/default.nix @@ -55,4 +55,6 @@ virtualisation = { oci-containers.backend = "podman"; }; + + users.users.greg.extraGroups = [ "podman" ]; } From c71436d926326a5f0df93e838dedea501b09e70a Mon Sep 17 00:00:00 2001 From: Greg Hellings Date: Fri, 30 May 2025 00:25:34 -0500 Subject: [PATCH 06/16] Try to fix podman exec --- .gitlab-ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3d9e09b..56aa807 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -29,8 +29,8 @@ default: - IMG: - img-bitwarden script: - - podman login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY" + - nix run "nixpkgs#podman" login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY" - nix build ".#${IMG}" - - podman load -i result - - podman tag "localhost/${IMG}:latest" "$CI_REGISTRY/greg/ci-images/${IMG}:latest" - - podman push "$CI_REGISTRY/greg/ci-images/${IMG}:latest" + - nix run "nixpkgs#podman" load -i result + - nix run "nixpkgs#podman" tag "localhost/${IMG}:latest" "$CI_REGISTRY/greg/ci-images/${IMG}:latest" + - nix run "nixpkgs#podman" push "$CI_REGISTRY/greg/ci-images/${IMG}:latest" From ec06d665cd9b171cb5b20d39303cccec807d6201 Mon Sep 17 00:00:00 2001 From: Greg Hellings Date: Fri, 30 May 2025 00:26:07 -0500 Subject: [PATCH 07/16] Update zed --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index 3ebcb74..9efd40d 100644 --- a/flake.lock +++ b/flake.lock @@ -962,11 +962,11 @@ "patched-nixpkgs": "patched-nixpkgs" }, "locked": { - "lastModified": 1747467107, - "narHash": "sha256-IIewGkpjoV6zSJNgxsL7p+wij/Q7RpDAlf0OVggK/ME=", + "lastModified": 1747989907, + "narHash": "sha256-91ddFyGUJNgyiJw1GYD04sbENGp9IuqtuUWHwbL/RVU=", "owner": "HPsaucii", "repo": "zed-editor-flake", - "rev": "50b08c64d1abed4318b8289ec3f62b64b4f34231", + "rev": "aa6440225e5aa225f242bb38235fba185665a616", "type": "github" }, "original": { From 54ee42897df284345541711fbd1a60406962472a Mon Sep 17 00:00:00 2001 From: Greg Hellings Date: Thu, 5 Jun 2025 13:25:50 -0500 Subject: [PATCH 08/16] Add some programs to IVR --- home/hosts/ivr/default.nix | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/home/hosts/ivr/default.nix b/home/hosts/ivr/default.nix index aa3a768..2465105 100644 --- a/home/hosts/ivr/default.nix +++ b/home/hosts/ivr/default.nix @@ -55,5 +55,19 @@ in username = username; homeDirectory = "/Users/${username}"; }; - programs.tmux.shell = (lib.getExe x); + + programs = { + direnv = { + enable = true; + enableNushellIntegration = true; + }; + nushell = { + enable = true; + }; + starship = { + enable = true; + enableNushellIntegration = true; + }; + tmux.shell = (lib.getExe x); + }; } From 314f42d76223d422a70ad748eb67ea26d3c64b4f Mon Sep 17 00:00:00 2001 From: Greg Hellings Date: Thu, 5 Jun 2025 14:01:57 -0500 Subject: [PATCH 09/16] Update nurpkgs --- flake.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/flake.lock b/flake.lock index 6fd8da6..4572f95 100644 --- a/flake.lock +++ b/flake.lock @@ -584,11 +584,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1747744144, - "narHash": "sha256-W7lqHp0qZiENCDwUZ5EX/lNhxjMdNapFnbErcbnP11Q=", + "lastModified": 1748929857, + "narHash": "sha256-lcZQ8RhsmhsK8u7LIFsJhsLh/pzR9yZ8yqpTzyGdj+Q=", "owner": "nixos", "repo": "nixpkgs", - "rev": "2795c506fe8fb7b03c36ccb51f75b6df0ab2553f", + "rev": "c2a03962b8e24e669fb37b7df10e7c79531ff1a4", "type": "github" }, "original": { @@ -677,11 +677,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1747973449, - "narHash": "sha256-e+DaBDI6xzd7KW+1u3jHhEzdF2Ajx5hP0bF2CFiS/F8=", + "lastModified": 1749092205, + "narHash": "sha256-2QTM4E7QljCYsGNnCiibgFjx/K5hvQ7VkCHDY05rU4Y=", "owner": "nix-community", "repo": "NUR", - "rev": "e4fcae418dde38789f3f59ea07ad289a4b9bcffe", + "rev": "bf9746362fc9a50cdf053883f0c06a4d9b93e3ca", "type": "github" }, "original": { From 63e5f17ae448ea388776a1b19a514da4ed8fc8ba Mon Sep 17 00:00:00 2001 From: Greg Hellings Date: Fri, 6 Jun 2025 01:05:47 -0500 Subject: [PATCH 10/16] Update gitlab syncthing id --- modules/nixos/syncthing.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/nixos/syncthing.nix b/modules/nixos/syncthing.nix index 25f390d..acd1acd 100644 --- a/modules/nixos/syncthing.nix +++ b/modules/nixos/syncthing.nix @@ -18,7 +18,7 @@ with lib; devices = { chronicles.id = "7FI6Y3M-C7YQEDI-IB345L6-RKLXMB6-AEIV57Y-3J2RCXQ-MK6QRNK-EINPXAE"; genesis.id = "YDTH4SD-GUAC5AA-SSYWYPZ-YMJW5LK-LE7PZKJ-GV2UJFZ-CU7LZAD-GTYWCQK"; - gitlab.id = "VAG5GHP-L7TNY7O-CHR3CKU-GXXVCIL-OT3WHHU-E4VAIZC-JI4BKOM-PYZQOQS"; + gitlab.id = "GKNOZWI-CNC2Q2F-R5GGGDX-RYFGHK4-CCC37LC-GVOEMJI-46QPC6G-AWFEOQE"; linode.id = "IJMMXPR-WNALZBD-FMJH5W5-WV7XGJY-HLJTKGT-5TKHJIH-75LT56D-UUZCYQE"; matrix.id = "K5IHM3I-TJFFEW5-GAYJMPS-CYSHW5C-XHMC462-MFRMOHJ-EJLKIKC-CZHGJQ2"; }; From 1e388831aa398cdc7c65c143dc6f009fbe1e5e7e Mon Sep 17 00:00:00 2001 From: Greg Hellings Date: Fri, 6 Jun 2025 01:18:27 -0500 Subject: [PATCH 11/16] No longer a matrix VM running --- modules/nixos/syncthing.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/nixos/syncthing.nix b/modules/nixos/syncthing.nix index acd1acd..be78739 100644 --- a/modules/nixos/syncthing.nix +++ b/modules/nixos/syncthing.nix @@ -20,7 +20,6 @@ with lib; genesis.id = "YDTH4SD-GUAC5AA-SSYWYPZ-YMJW5LK-LE7PZKJ-GV2UJFZ-CU7LZAD-GTYWCQK"; gitlab.id = "GKNOZWI-CNC2Q2F-R5GGGDX-RYFGHK4-CCC37LC-GVOEMJI-46QPC6G-AWFEOQE"; linode.id = "IJMMXPR-WNALZBD-FMJH5W5-WV7XGJY-HLJTKGT-5TKHJIH-75LT56D-UUZCYQE"; - matrix.id = "K5IHM3I-TJFFEW5-GAYJMPS-CYSHW5C-XHMC462-MFRMOHJ-EJLKIKC-CZHGJQ2"; }; options = { urAccepted = -1; From e42b1282b61579d378a824b228c493d51560dfff Mon Sep 17 00:00:00 2001 From: Greg Hellings Date: Mon, 9 Jun 2025 21:55:50 -0500 Subject: [PATCH 12/16] Add default gnome settings --- home/modules/gnome.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/home/modules/gnome.nix b/home/modules/gnome.nix index a55eb59..3425691 100644 --- a/home/modules/gnome.nix +++ b/home/modules/gnome.nix @@ -57,6 +57,10 @@ in sort-method = "name"; sort-type = "ascending"; }; + "org/gnome/mutter" = { + # Enables quarter-point scaling options + experimental-features = [ "scale-monitor-framebuffer" ]; + }; "org/gnome/nautilus/preferences" = { default-folder-viewer = "icon-view"; search-filter-time-type = "last_modified"; From 389a55d8bc818c75d70e1f316dceacb969cc798e Mon Sep 17 00:00:00 2001 From: Greg Hellings Date: Tue, 10 Jun 2025 12:47:20 -0500 Subject: [PATCH 13/16] Update packages pin --- flake.lock | 180 +++++++++++++++++++++-------------------------------- 1 file changed, 72 insertions(+), 108 deletions(-) diff --git a/flake.lock b/flake.lock index 4572f95..58b8dae 100644 --- a/flake.lock +++ b/flake.lock @@ -31,11 +31,11 @@ "nixpkgs-unstable": "nixpkgs-unstable" }, "locked": { - "lastModified": 1747465275, - "narHash": "sha256-Vpgp7uWpXUmEAirJjj6+et+JC9BZP9GjvS1usv5Wl3A=", + "lastModified": 1748187031, + "narHash": "sha256-F4zdOfeg0xjEnvFjlHvoMmdmh/FxK1qIsZyscnGDgA0=", "owner": "fort-nix", "repo": "nix-bitcoin", - "rev": "1586a34e902706b6834b059c9bd6d80caffce84a", + "rev": "a06d1d8118865af14a9187e7d1a7a141dd89af74", "type": "github" }, "original": { @@ -45,25 +45,6 @@ "type": "github" } }, - "crane": { - "inputs": { - "nixpkgs": "nixpkgs_4" - }, - "locked": { - "lastModified": 1717383740, - "narHash": "sha256-559HbY4uhNeoYvK3H6AMZAtVfmR3y8plXZ1x6ON/cWU=", - "owner": "ipetkov", - "repo": "crane", - "rev": "b65673fce97d277934488a451724be94cc62499a", - "type": "github" - }, - "original": { - "owner": "ipetkov", - "ref": "v0.17.3", - "repo": "crane", - "type": "github" - } - }, "darwin": { "inputs": { "nixpkgs": [ @@ -93,11 +74,11 @@ ] }, "locked": { - "lastModified": 1747964474, - "narHash": "sha256-i73u8NLiqewGy0iIriH4XizatLnAojXxzrBqHJEz49E=", + "lastModified": 1749194393, + "narHash": "sha256-vt6hM9DNywnXXuW1qPDLzECmbDcmxhh58wpb0EEQjAo=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "93562b65cf68612a544779c9f77536f9dff01096", + "rev": "19346808c445f23b08652971be198b9df6c33edc", "type": "github" }, "original": { @@ -167,11 +148,11 @@ "flake-compat_3": { "flake": false, "locked": { - "lastModified": 1733328505, - "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", + "lastModified": 1747046372, + "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=", "owner": "edolstra", "repo": "flake-compat", - "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec", + "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885", "type": "github" }, "original": { @@ -185,11 +166,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1743550720, - "narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=", + "lastModified": 1749398372, + "narHash": "sha256-tYBdgS56eXYaWVW3fsnPQ/nFlgWi/Z2Ymhyu21zVM98=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "c621e8422220273271f52058f618c94e405bb0f5", + "rev": "9305fe4e5c2a6fcf5ba6a3ff155720fbe4076569", "type": "github" }, "original": { @@ -245,11 +226,11 @@ "nixpkgs-lib": "nixpkgs-lib_2" }, "locked": { - "lastModified": 1743550720, - "narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=", + "lastModified": 1748821116, + "narHash": "sha256-F82+gS044J1APL0n4hH50GYdPRv/5JWm34oCJYmVKdE=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "c621e8422220273271f52058f618c94e405bb0f5", + "rev": "49f0870db23e8c1ca0b5259734a02cd9e1e371a1", "type": "github" }, "original": { @@ -340,11 +321,11 @@ ] }, "locked": { - "lastModified": 1747955385, - "narHash": "sha256-AKoBFaEGN02tGvBlkwVIDOGXouHvrTTfOUcvBDGxkxQ=", + "lastModified": 1749526396, + "narHash": "sha256-UL9F76abAk87llXOrcQRjhd5OaOclUd6MIltsqcUZmo=", "owner": "nix-community", "repo": "home-manager", - "rev": "a868570581f0dbdef7e33c8c9bb34b735dfcbacf", + "rev": "427c96044f11a5da50faf6adaf38c9fa47e6d044", "type": "github" }, "original": { @@ -409,27 +390,27 @@ ] }, "locked": { - "lastModified": 1737371634, - "narHash": "sha256-fTVAWzT1UMm1lT+YxHuVPtH+DATrhYfea3B0MxG/cGw=", + "lastModified": 1748294338, + "narHash": "sha256-FVO01jdmUNArzBS7NmaktLdGA5qA3lUMJ4B7a05Iynw=", "owner": "NuschtOS", "repo": "ixx", - "rev": "a1176e2a10ce745ff8f63e4af124ece8fe0b1648", + "rev": "cc5f390f7caf265461d4aab37e98d2292ebbdb85", "type": "github" }, "original": { "owner": "NuschtOS", - "ref": "v0.0.7", + "ref": "v0.0.8", "repo": "ixx", "type": "github" } }, "nix-hardware": { "locked": { - "lastModified": 1747900541, - "narHash": "sha256-dn64Pg9xLETjblwZs9Euu/SsjW80pd6lr5qSiyLY1pg=", + "lastModified": 1749195551, + "narHash": "sha256-W5GKQHgunda/OP9sbKENBZhMBDNu2QahoIPwnsF6CeM=", "owner": "nixos", "repo": "nixos-hardware", - "rev": "11f2d9ea49c3e964315215d6baa73a8d42672f06", + "rev": "4602f7e1d3f197b3cb540d5accf5669121629628", "type": "github" }, "original": { @@ -476,11 +457,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1746422338, - "narHash": "sha256-NTtKOTLQv6dPfRe00OGSywg37A1FYqldS6xiNmqBUYc=", + "lastModified": 1748037224, + "narHash": "sha256-92vihpZr6dwEMV6g98M5kHZIttrWahb9iRPBm1atcPk=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "5b35d248e9206c1f3baf8de6a7683fee126364aa", + "rev": "f09dede81861f3a83f7f06641ead34f02f37597f", "type": "github" }, "original": { @@ -492,11 +473,11 @@ }, "nixpkgs-lib": { "locked": { - "lastModified": 1743296961, - "narHash": "sha256-b1EdN3cULCqtorQ4QeWgLMrd5ZGOjLSLemfa00heasc=", + "lastModified": 1748740939, + "narHash": "sha256-rQaysilft1aVMwF14xIdGS3sj1yHlI6oKQNBRTF40cc=", "owner": "nix-community", "repo": "nixpkgs.lib", - "rev": "e4822aea2a6d1cdd36653c134cacfd64c97ff4fa", + "rev": "656a64127e9d791a334452c6b6606d17539476e2", "type": "github" }, "original": { @@ -507,11 +488,11 @@ }, "nixpkgs-lib_2": { "locked": { - "lastModified": 1743296961, - "narHash": "sha256-b1EdN3cULCqtorQ4QeWgLMrd5ZGOjLSLemfa00heasc=", + "lastModified": 1748740939, + "narHash": "sha256-rQaysilft1aVMwF14xIdGS3sj1yHlI6oKQNBRTF40cc=", "owner": "nix-community", "repo": "nixpkgs.lib", - "rev": "e4822aea2a6d1cdd36653c134cacfd64c97ff4fa", + "rev": "656a64127e9d791a334452c6b6606d17539476e2", "type": "github" }, "original": { @@ -522,26 +503,26 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1732981179, - "narHash": "sha256-F7thesZPvAMSwjRu0K8uFshTk3ZZSNAsXTIFvXBT+34=", + "lastModified": 1748437600, + "narHash": "sha256-hYKMs3ilp09anGO7xzfGs3JqEgUqFMnZ8GMAqI6/k04=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "62c435d93bf046a5396f3016472e8f7c8e2aed65", + "rev": "7282cb574e0607e65224d33be8241eae7cfe0979", "type": "github" }, "original": { "id": "nixpkgs", - "ref": "nixos-24.11", + "ref": "nixos-25.05", "type": "indirect" } }, "nixpkgs-unstable": { "locked": { - "lastModified": 1746332716, - "narHash": "sha256-VBmKSkmw9PYBCEGhBKzORjx+nwNZkPZyHcUHE21A/ws=", + "lastModified": 1747958103, + "narHash": "sha256-qmmFCrfBwSHoWw7cVK4Aj+fns+c54EBP8cGqp/yK410=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "6b1c028bce9c89e9824cde040d6986d428296055", + "rev": "fe51d34885f7b5e3e7b59572796e1bcb427eccb1", "type": "github" }, "original": { @@ -584,11 +565,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1748929857, - "narHash": "sha256-lcZQ8RhsmhsK8u7LIFsJhsLh/pzR9yZ8yqpTzyGdj+Q=", + "lastModified": 1749285348, + "narHash": "sha256-frdhQvPbmDYaScPFiCnfdh3B/Vh81Uuoo0w5TkWmmjU=", "owner": "nixos", "repo": "nixpkgs", - "rev": "c2a03962b8e24e669fb37b7df10e7c79531ff1a4", + "rev": "3e3afe5174c561dee0df6f2c2b2236990146329f", "type": "github" }, "original": { @@ -599,22 +580,6 @@ } }, "nixpkgs_4": { - "locked": { - "lastModified": 1714656196, - "narHash": "sha256-kjQkA98lMcsom6Gbhw8SYzmwrSo+2nruiTcTZp5jK7o=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "94035b482d181af0a0f8f77823a790b256b7c3cc", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_5": { "locked": { "lastModified": 1744868846, "narHash": "sha256-5RJTdUHDmj12Qsv7XOhuospjAjATNiTMElplWnJE9Hs=", @@ -632,11 +597,11 @@ }, "nixunstable": { "locked": { - "lastModified": 1747744144, - "narHash": "sha256-W7lqHp0qZiENCDwUZ5EX/lNhxjMdNapFnbErcbnP11Q=", + "lastModified": 1749285348, + "narHash": "sha256-frdhQvPbmDYaScPFiCnfdh3B/Vh81Uuoo0w5TkWmmjU=", "owner": "nixos", "repo": "nixpkgs", - "rev": "2795c506fe8fb7b03c36ccb51f75b6df0ab2553f", + "rev": "3e3afe5174c561dee0df6f2c2b2236990146329f", "type": "github" }, "original": { @@ -656,11 +621,11 @@ "systems": "systems_4" }, "locked": { - "lastModified": 1747945641, - "narHash": "sha256-Ts16c+kptbC3YDwPcB/NqXFVMHPNYKeFD7LkiawbWCU=", + "lastModified": 1749496904, + "narHash": "sha256-eNDMzrcDBOprdJs7DpMOJfCEcxribxDJP2OjozSC3Wo=", "owner": "nix-community", "repo": "nixvim", - "rev": "46fd0b184cbc5f1bdc5a8325cb973fc54e49ab68", + "rev": "e0b3d8bc3a0ab5a7cc0792c7705e92f9c5c598f3", "type": "github" }, "original": { @@ -677,11 +642,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1749092205, - "narHash": "sha256-2QTM4E7QljCYsGNnCiibgFjx/K5hvQ7VkCHDY05rU4Y=", + "lastModified": 1749566933, + "narHash": "sha256-rolwj4dzqfzFMG3VGEN7zKwGTBd0XAKcvOTTEOre3XY=", "owner": "nix-community", "repo": "NUR", - "rev": "bf9746362fc9a50cdf053883f0c06a4d9b93e3ca", + "rev": "28532113cfab3f76c3a80f04ef38dca164d7b819", "type": "github" }, "original": { @@ -700,11 +665,11 @@ ] }, "locked": { - "lastModified": 1745046075, - "narHash": "sha256-8v4y6k16Ra/fiecb4DxhsoOGtzLKgKlS+9/XJ9z0T2I=", + "lastModified": 1748298102, + "narHash": "sha256-PP11GVwUt7F4ZZi5A5+99isuq39C59CKc5u5yVisU/U=", "owner": "NuschtOS", "repo": "search", - "rev": "066afe8643274470f4a294442aadd988356a478f", + "rev": "f8a1c221afb8b4c642ed11ac5ee6746b0fe1d32f", "type": "github" }, "original": { @@ -715,11 +680,11 @@ }, "patched-nixpkgs": { "locked": { - "lastModified": 1746961062, - "narHash": "sha256-7krN5Ii+jFQTIQL/KDQgjU7qRpbs9Ndgd0POccM+nb0=", + "lastModified": 1748133736, + "narHash": "sha256-8DCZF+SHXa7P9O9op2ET7qJtPomzQ49jy2vjzrHocg4=", "owner": "TomaSajt", "repo": "nixpkgs", - "rev": "40f15db812bdec49cd4e64ba46fc355b7e2af358", + "rev": "76121e3e5db9bfcc4b604b4093abea7b1aa3109e", "type": "github" }, "original": { @@ -731,18 +696,17 @@ }, "proxmox": { "inputs": { - "crane": "crane", "flake-compat": "flake-compat_2", "nixpkgs-stable": "nixpkgs-stable", "nixpkgs-unstable": "nixpkgs-unstable_2", "utils": "utils" }, "locked": { - "lastModified": 1746882493, - "narHash": "sha256-KbkIGJ6fe5F6AZRCzrNH3vNAnbbt+gf/PWrfMZ/B0As=", + "lastModified": 1749385025, + "narHash": "sha256-2w6+xAMdT9LgMxDHaIyddMTacBbF7RjaZFyGjjTDBhg=", "owner": "SaumonNet", "repo": "proxmox-nixos", - "rev": "bda8df28b6656843e459f166b04bc291bc495a29", + "rev": "48f39fbe2e8f90f9ac160dd4b6929f3ac06d8223", "type": "github" }, "original": { @@ -902,14 +866,14 @@ "vsext": { "inputs": { "flake-utils": "flake-utils_3", - "nixpkgs": "nixpkgs_5" + "nixpkgs": "nixpkgs_4" }, "locked": { - "lastModified": 1747965670, - "narHash": "sha256-O91kjsTL7xccgTQr2KITmGhhLTpX9zh+oRvvV8ScOrg=", + "lastModified": 1749521131, + "narHash": "sha256-ezZ15tLA2L+rmtn39dKLFW/UM2xlksC61V12blulpjE=", "owner": "nix-community", "repo": "nix-vscode-extensions", - "rev": "d3099346fa5e9e33d0989a4e6afc3e8dedd25311", + "rev": "299b2aa650d32310153746135b6a84a6c4de9c21", "type": "github" }, "original": { @@ -926,11 +890,11 @@ ] }, "locked": { - "lastModified": 1746453552, - "narHash": "sha256-r66UGha+7KVHkI7ksrcMjnw/mm9Sg4l5bQlylxHwdGU=", + "lastModified": 1749574455, + "narHash": "sha256-fm2/8KPOYvvIAnNVtjDlTt/My00lIbZQ+LMrfQIWVzs=", "owner": "nix-community", "repo": "NixOS-WSL", - "rev": "be618645aa0adf461f778500172b6896d5ab2d01", + "rev": "917af390377c573932d84b5e31dd9f2c1b5c0f09", "type": "github" }, "original": { @@ -948,11 +912,11 @@ "patched-nixpkgs": "patched-nixpkgs" }, "locked": { - "lastModified": 1747989907, - "narHash": "sha256-91ddFyGUJNgyiJw1GYD04sbENGp9IuqtuUWHwbL/RVU=", + "lastModified": 1749228292, + "narHash": "sha256-cavxEaS1a1jQqkQsGVUiu3Hlex3wqUfFB1LE2TXT0vA=", "owner": "HPsaucii", "repo": "zed-editor-flake", - "rev": "aa6440225e5aa225f242bb38235fba185665a616", + "rev": "db6c84831c7bedcf63dcecf1e0b59cddea302c62", "type": "github" }, "original": { From eecd6e6d5d14e866af1a1c8faa209f7116060741 Mon Sep 17 00:00:00 2001 From: Greg Hellings Date: Tue, 10 Jun 2025 14:28:46 -0500 Subject: [PATCH 14/16] Separate system from home-manager again --- .gitlab-ci.yml | 8 +- .../darwin/default.nix => darwin/baseline.nix | 20 +- darwin/default.nix | 6 +- home/{modules => }/baseline/ansible.nix | 0 home/{modules => }/baseline/bash.nix | 0 home/{modules => }/baseline/default.nix | 2 +- home/{modules => }/baseline/direnv.nix | 0 home/{modules => }/baseline/git.nix | 0 home/{modules => }/baseline/ssh.nix | 0 home/{modules => }/baseline/vim/config.nix | 0 .../vim.nix => baseline/vim/default.nix} | 2 +- home/{modules => }/baseline/vim/extra.lua | 0 home/{modules => }/baseline/vim/extra.vimrc | 0 home/{modules => }/baseline/vim/init.lua | 0 home/{modules => }/baseline/vim/vimrc | 0 home/{modules => }/baseline/xonsh.nix | 0 home/{modules => }/baseline/xonsh_footer.xsh | 0 home/{modules => }/baseline/xonsh_header.xsh | 0 home/default.nix | 44 ++-- home/home.nix | 20 +- home/hosts/ivr/default.nix | 1 + hosts/baseline.nix | 218 ++++++++++++++++++ hosts/default.nix | 22 +- modules/baseline.nix | 50 ---- modules/default.nix | 4 +- {home/modules => modules/hm}/default.nix | 1 - {home/modules => modules/hm}/development.nix | 0 {home/modules => modules/hm}/gnome.nix | 0 {home/modules => modules/hm}/gui.nix | 0 .../modules => modules/hm}/gui/bookmarks.nix | 0 {home/modules => modules/hm}/python.nix | 0 {home/modules => modules/hm}/sway.nix | 0 {home/modules => modules/hm}/vscodium.nix | 1 - {home/modules => modules/hm}/xonsh.nix | 0 {home/modules => modules/hm}/zed.nix | 0 modules/nix-conf.nix | 4 +- modules/nixos/default.nix | 158 ------------- 37 files changed, 277 insertions(+), 284 deletions(-) rename modules/darwin/default.nix => darwin/baseline.nix (74%) rename home/{modules => }/baseline/ansible.nix (100%) rename home/{modules => }/baseline/bash.nix (100%) rename home/{modules => }/baseline/default.nix (90%) rename home/{modules => }/baseline/direnv.nix (100%) rename home/{modules => }/baseline/git.nix (100%) rename home/{modules => }/baseline/ssh.nix (100%) rename home/{modules => }/baseline/vim/config.nix (100%) rename home/{modules/baseline/vim.nix => baseline/vim/default.nix} (71%) rename home/{modules => }/baseline/vim/extra.lua (100%) rename home/{modules => }/baseline/vim/extra.vimrc (100%) rename home/{modules => }/baseline/vim/init.lua (100%) rename home/{modules => }/baseline/vim/vimrc (100%) rename home/{modules => }/baseline/xonsh.nix (100%) rename home/{modules => }/baseline/xonsh_footer.xsh (100%) rename home/{modules => }/baseline/xonsh_header.xsh (100%) create mode 100644 hosts/baseline.nix delete mode 100644 modules/baseline.nix rename {home/modules => modules/hm}/default.nix (91%) rename {home/modules => modules/hm}/development.nix (100%) rename {home/modules => modules/hm}/gnome.nix (100%) rename {home/modules => modules/hm}/gui.nix (100%) rename {home/modules => modules/hm}/gui/bookmarks.nix (100%) rename {home/modules => modules/hm}/python.nix (100%) rename {home/modules => modules/hm}/sway.nix (100%) rename {home/modules => modules/hm}/vscodium.nix (98%) rename {home/modules => modules/hm}/xonsh.nix (100%) rename {home/modules => modules/hm}/zed.nix (100%) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 56aa807..4d98d16 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -29,8 +29,8 @@ default: - IMG: - img-bitwarden script: - - nix run "nixpkgs#podman" login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY" + - nix run "nixpkgs#podman" -- login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY" - nix build ".#${IMG}" - - nix run "nixpkgs#podman" load -i result - - nix run "nixpkgs#podman" tag "localhost/${IMG}:latest" "$CI_REGISTRY/greg/ci-images/${IMG}:latest" - - nix run "nixpkgs#podman" push "$CI_REGISTRY/greg/ci-images/${IMG}:latest" + - nix run "nixpkgs#podman" -- load -i result + - nix run "nixpkgs#podman" -- tag "localhost/${IMG}:latest" "$CI_REGISTRY/greg/ci-images/${IMG}:latest" + - nix run "nixpkgs#podman" -- push "$CI_REGISTRY/greg/ci-images/${IMG}:latest" diff --git a/modules/darwin/default.nix b/darwin/baseline.nix similarity index 74% rename from modules/darwin/default.nix rename to darwin/baseline.nix index 09d1ef5..330d4be 100644 --- a/modules/darwin/default.nix +++ b/darwin/baseline.nix @@ -1,17 +1,9 @@ -{ config, pkgs, ... }: { - imports = [ ../baseline.nix ]; - - home-manager = { - useGlobalPkgs = true; - users."${config.system.primaryUser}" = import ../../home/home.nix; - extraSpecialArgs = { - inherit (config.users.users."${config.system.primaryUser}") home; - gnome = false; - gui = false; - }; - }; - + config, + pkgs, + ... +}: +{ fonts.packages = with pkgs; [ dejavu_fonts nerd-fonts.hack @@ -57,7 +49,7 @@ }; screencapture = { include-date = true; - location = "${config.home-manager.extraSpecialArgs.home}/Photos/Screeneries"; + location = "~/Photos/Screeneries"; }; trackpad = { Dragging = false; diff --git a/darwin/default.nix b/darwin/default.nix index 2e8d6e5..5b5451b 100644 --- a/darwin/default.nix +++ b/darwin/default.nix @@ -14,8 +14,8 @@ let top.darwin.lib.darwinSystem { inherit system; specialArgs = { + inherit nixpkgs overlays top; inherit (top) self; - inherit nixpkgs; }; modules = [ { @@ -28,7 +28,9 @@ let }; } hm.darwinModules.home-manager - top.self.modules.darwinModule + # Local changes + ../modules/nix-conf.nix + ./baseline.nix ] ++ lib.optionals (builtins.pathExists ./hosts/${name}) [ ./hosts/${name} ]; }; in diff --git a/home/modules/baseline/ansible.nix b/home/baseline/ansible.nix similarity index 100% rename from home/modules/baseline/ansible.nix rename to home/baseline/ansible.nix diff --git a/home/modules/baseline/bash.nix b/home/baseline/bash.nix similarity index 100% rename from home/modules/baseline/bash.nix rename to home/baseline/bash.nix diff --git a/home/modules/baseline/default.nix b/home/baseline/default.nix similarity index 90% rename from home/modules/baseline/default.nix rename to home/baseline/default.nix index 749fd47..86524e2 100644 --- a/home/modules/baseline/default.nix +++ b/home/baseline/default.nix @@ -7,7 +7,7 @@ ./direnv.nix ./git.nix ./ssh.nix - ./vim.nix + ./vim ./xonsh.nix ]; } diff --git a/home/modules/baseline/direnv.nix b/home/baseline/direnv.nix similarity index 100% rename from home/modules/baseline/direnv.nix rename to home/baseline/direnv.nix diff --git a/home/modules/baseline/git.nix b/home/baseline/git.nix similarity index 100% rename from home/modules/baseline/git.nix rename to home/baseline/git.nix diff --git a/home/modules/baseline/ssh.nix b/home/baseline/ssh.nix similarity index 100% rename from home/modules/baseline/ssh.nix rename to home/baseline/ssh.nix diff --git a/home/modules/baseline/vim/config.nix b/home/baseline/vim/config.nix similarity index 100% rename from home/modules/baseline/vim/config.nix rename to home/baseline/vim/config.nix diff --git a/home/modules/baseline/vim.nix b/home/baseline/vim/default.nix similarity index 71% rename from home/modules/baseline/vim.nix rename to home/baseline/vim/default.nix index f1e28c0..8a2f332 100644 --- a/home/modules/baseline/vim.nix +++ b/home/baseline/vim/default.nix @@ -10,7 +10,7 @@ fonts.fontconfig.enable = true; home.packages = with pkgs.nerd-fonts; [ hack ]; - programs.nixvim = (import ./vim/config.nix { inherit config pkgs lib; }) // { + programs.nixvim = (import ./config.nix { inherit config pkgs lib; }) // { enable = true; }; } diff --git a/home/modules/baseline/vim/extra.lua b/home/baseline/vim/extra.lua similarity index 100% rename from home/modules/baseline/vim/extra.lua rename to home/baseline/vim/extra.lua diff --git a/home/modules/baseline/vim/extra.vimrc b/home/baseline/vim/extra.vimrc similarity index 100% rename from home/modules/baseline/vim/extra.vimrc rename to home/baseline/vim/extra.vimrc diff --git a/home/modules/baseline/vim/init.lua b/home/baseline/vim/init.lua similarity index 100% rename from home/modules/baseline/vim/init.lua rename to home/baseline/vim/init.lua diff --git a/home/modules/baseline/vim/vimrc b/home/baseline/vim/vimrc similarity index 100% rename from home/modules/baseline/vim/vimrc rename to home/baseline/vim/vimrc diff --git a/home/modules/baseline/xonsh.nix b/home/baseline/xonsh.nix similarity index 100% rename from home/modules/baseline/xonsh.nix rename to home/baseline/xonsh.nix diff --git a/home/modules/baseline/xonsh_footer.xsh b/home/baseline/xonsh_footer.xsh similarity index 100% rename from home/modules/baseline/xonsh_footer.xsh rename to home/baseline/xonsh_footer.xsh diff --git a/home/modules/baseline/xonsh_header.xsh b/home/baseline/xonsh_header.xsh similarity index 100% rename from home/modules/baseline/xonsh_header.xsh rename to home/baseline/xonsh_header.xsh diff --git a/home/default.nix b/home/default.nix index 03f0865..6595fdf 100644 --- a/home/default.nix +++ b/home/default.nix @@ -1,27 +1,26 @@ -{ top, overlays, ... }: - -rec { - greghellings = +{ + overlays, + top, + ... +}: +let + pkgs = + system: + (import top.nixunstable { + inherit system overlays; + config = { + allowUnfree = true; + allowUnfreePredicate = _: true; + }; + }); + ivr = let - system = "x86_64-linux"; - pkgs = ( - import top.nixunstable { - inherit system overlays; - config = { - allowUnfree = true; - allowUnfreePredicate = _: true; - }; - } - ); + system = "aarch64-darwin"; in top.hmunstable.lib.homeManagerConfiguration { - inherit pkgs; + pkgs = pkgs system; modules = [ - (import ../modules/nix-conf.nix { - inherit pkgs; - inherit (pkgs) lib; - cache = false; - }) + ../modules/nix-conf.nix ./home.nix ]; extraSpecialArgs = { @@ -33,6 +32,7 @@ rec { username = "gregory.hellings"; }; }; - - "gregory.hellings" = greghellings; +in +{ + inherit ivr; } diff --git a/home/home.nix b/home/home.nix index 7973e56..114514c 100644 --- a/home/home.nix +++ b/home/home.nix @@ -9,18 +9,12 @@ { imports = [ top.nixvimunstable.homeManagerModules.nixvim - ./modules + top.self.modules.homeManagerModule + ./baseline ] ++ lib.optionals (builtins.pathExists ./hosts/${host}) [ ./hosts/${host} ]; - programs.tmux = { - enable = true; - keyMode = "vi"; - terminal = "xterm-256color"; - customPaneNavigationAndResize = true; - extraConfig = (lib.strings.concatStringsSep "\n" [ "bind P paste-buffer" ]); - }; - home.stateVersion = "25.05"; + home.packages = with pkgs; [ copier diffutils @@ -43,4 +37,12 @@ wget zip ]; + + programs.tmux = { + enable = true; + keyMode = "vi"; + terminal = "xterm-256color"; + customPaneNavigationAndResize = true; + extraConfig = (lib.strings.concatStringsSep "\n" [ "bind P paste-buffer" ]); + }; } diff --git a/home/hosts/ivr/default.nix b/home/hosts/ivr/default.nix index 2465105..cb6e825 100644 --- a/home/hosts/ivr/default.nix +++ b/home/hosts/ivr/default.nix @@ -22,6 +22,7 @@ in greg = { development = true; gui = true; + nix.cache = false; pypackage.enable = false; vscodium = true; }; diff --git a/hosts/baseline.nix b/hosts/baseline.nix new file mode 100644 index 0000000..116134e --- /dev/null +++ b/hosts/baseline.nix @@ -0,0 +1,218 @@ +{ + config, + lib, + overlays, + pkgs, + self, + top, + ... +}: +let + builderHosts = + if self != null then + (lib.attrNames ( + lib.filterAttrs (_: v: v.config.greg.remote-builder.enable) self.nixosConfigurations + )) + else + [ ]; +in +{ + imports = [ + ./nix-conf.nix + ]; + + console = { + font = "Lat2-Terminus16"; + keyMap = "us"; + }; + + environment.systemPackages = with pkgs; [ + agenix + bitwarden-cli + bmon + btop + btrfs-progs + coreutils-full + diffutils + efibootmgr + findutils + file + git + gnupatch + hms # My own home manager switcher + iperf + killall + nano + lshw + pciutils + psmisc + pwgen + unzip + usbutils + wget + xfsprogs + ]; + + home-manager = { + backupFileExtension = "bkp"; + useGlobalPkgs = true; + useUserPackages = true; + users.greg = import ../home/home.nix; + extraSpecialArgs = { + inherit top overlays; + home = "/home/greg"; + host = config.networking.hostName; + }; + }; + + i18n.defaultLocale = "en_US.UTF-8"; + + nix = { + gc.dates = "weekly"; + settings.auto-optimise-store = true; + }; + + nixpkgs.overlays = overlays; + + # Network Manager pulls in too many deps + networking = { + search = [ + "thehellings.lan" + "home" + ]; + networkmanager.enable = false; + }; + + programs = { + xonsh = { + enable = true; + extraPackages = ( + ps: with ps; [ + xonsh-apipenv + pkgs.nur.repos.xonsh-xontribs.xonsh-direnv + pkgs.nur.repos.xonsh-xontribs.xontrib-vox + ] + ); + }; + + ssh = { + extraConfig = builtins.concatStringsSep "\n" ( + lib.map (x: '' + Host ${x}-builder + Hostname ${x}.home + User remote-builder-user + '') builderHosts + ); + + knownHosts = { + chronicles = { + extraHostNames = [ + "chronicles.thehellings.lan" + "chronicles.home" + "nas" + "nas.thehellings.lan" + "nas.home" + ]; + publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEBecZUva9OnZuXLaBun6/1ITo5f9p0YMLPD+q0egLRS"; + }; + dns = { + extraHostNames = [ + "dns" + "dns.me.ts" + "dns.home" + ]; + publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKRCXdhXWHEvw84V9JC5bAGovvj12DLVphcEnsTHDjxW"; + }; + "genesis" = { + extraHostNames = [ + "genesis.shire-zebra.ts.net" + "genesis.home" + ]; + publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEI9jbTPmEWQ0F2bLYmnIOLmBnag1fkKxHRjz3X8lB/k"; + }; + "git" = { + extraHostNames = [ + "git.home" + "git.thehellings.lan" + ]; + publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC7hesFWwlmSbWPJWUiF8fIppy5a83yXw84O0Ytz+Zyq"; + }; + hosea = { + extraHostNames = [ + "hosea.home" + "hosea.thehellings.lan" + ]; + publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKLIwkTTXA56sUlUjEulXXZRvZy5H4a5ZwgKWLlpkQDz"; + }; + isaiah = { + extraHostNames = [ + "isaiah.home" + "isaiah.thehellings.lan" + "isaiah-builder" + ]; + publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHleYKtfV4W1Z63Ysu9w5Rbglqlz4F92YcZoMkucoTNf"; + }; + jeremiah = { + extraHostNames = [ + "jeremiah.home" + "jeremiah.thehellings.lan" + "jeremiah-builder" + ]; + publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOjQjXq9WYU2Ki27BR9WwJ4ZruS/lJXbjC1b0Q42Adi0"; + }; + jude = { + extraHostNames = [ + "jude.home" + "jude.thehellings.lan" + "jude-builder" + ]; + publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOos0zQePsa+T6Z2dsKbPOvEdrBQ8a6mx3s7pN6ysCI0"; + }; + linode = { + extraHostNames = [ + "linode.home" + "linode.thehellings.lan" + "thehellings.com" + ]; + publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMv9Zud3kZOl86gtmkn+uj3D4kiXWDPtyUL02VVLNR4Q"; + }; + }; + }; + }; + + # Enable the OpenSSH daemon for remote control + services = { + openssh = { + enable = true; + settings.X11Forwarding = true; + }; + }; + + security.sudo.extraRules = [ + { + users = [ "greg" ]; + commands = [ + { + command = "ALL"; + options = [ "NOPASSWD" ]; + } + ]; + } + ]; + + # Define a user account. Don't forget to set a password with ‘passwd’. + users.users.greg = { + isNormalUser = true; + createHome = true; + extraGroups = [ + "wheel" + ]; # Enable ‘sudo’ for the user. + shell = config.programs.xonsh.package; + initialPassword = "password"; + openssh.authorizedKeys.keys = lib.strings.splitString "\n" ( + builtins.readFile ../../home/ssh/authorized_keys + ); + }; + + system.stateVersion = "24.11"; +} diff --git a/hosts/default.nix b/hosts/default.nix index 830c83d..deb0462 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -19,7 +19,6 @@ let name, system ? "x86_64-linux", hm ? top.hm, - nixvim ? top.nixvimstable, }: let nixpkgs = import channel { inherit system; }; @@ -32,29 +31,18 @@ let inherit (top) self; }; modules = [ - { - nixpkgs.overlays = overlays; - home-manager = { - useGlobalPkgs = true; - useUserPackages = true; - users.greg = import ../home/home.nix; - extraSpecialArgs = { - inherit top overlays; - home = "/home/greg"; - host = name; - }; - backupFileExtension = "bkp"; - }; - } + # Imported ones top.agenix.nixosModules.default hm.nixosModules.home-manager - top.self.modules.nixosModule top.nurpkgs.modules.nixos.default + # Local ones + ./baseline.nix + top.self.modules.nixosModule ./${name} ] ++ extraMods; }; in -rec { +{ genesis = unstable { name = "genesis"; }; exodus = unstable { name = "exodus"; }; jude = unstable { name = "jude"; }; diff --git a/modules/baseline.nix b/modules/baseline.nix deleted file mode 100644 index b7c649c..0000000 --- a/modules/baseline.nix +++ /dev/null @@ -1,50 +0,0 @@ -{ - pkgs, - lib, - self, - ... -}: -let - builderHosts = - if self != null then - (lib.attrNames ( - lib.filterAttrs (_: v: v.config.greg.remote-builder.enable) self.nixosConfigurations - )) - else - [ ]; -in -{ - imports = [ - ./nix-conf.nix - ]; - - programs.ssh = { - extraConfig = builtins.concatStringsSep "\n" ( - lib.map (x: '' - Host ${x}-builder - Hostname ${x}.home - User remote-builder-user - '') builderHosts - ); - }; - - # Base packages that need to be in all my hosts - environment.systemPackages = with pkgs; [ - agenix - bmon - diffutils - git - gnupatch - findutils - file - hms # My own home manager switcher - btop - iperf - killall - nano - pciutils - pwgen - unzip - wget - ]; -} diff --git a/modules/default.nix b/modules/default.nix index b3a136c..af697bf 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -1,8 +1,8 @@ let nixos = (import ./nixos); - darwin = (import ./darwin); + hm = (import ./hm); in { + homeManagerModule = hm; nixosModule = nixos; - darwinModule = darwin; } diff --git a/home/modules/default.nix b/modules/hm/default.nix similarity index 91% rename from home/modules/default.nix rename to modules/hm/default.nix index 96463d1..c2b67e8 100644 --- a/home/modules/default.nix +++ b/modules/hm/default.nix @@ -2,7 +2,6 @@ { imports = [ - ./baseline ./development.nix ./gnome.nix ./gui.nix diff --git a/home/modules/development.nix b/modules/hm/development.nix similarity index 100% rename from home/modules/development.nix rename to modules/hm/development.nix diff --git a/home/modules/gnome.nix b/modules/hm/gnome.nix similarity index 100% rename from home/modules/gnome.nix rename to modules/hm/gnome.nix diff --git a/home/modules/gui.nix b/modules/hm/gui.nix similarity index 100% rename from home/modules/gui.nix rename to modules/hm/gui.nix diff --git a/home/modules/gui/bookmarks.nix b/modules/hm/gui/bookmarks.nix similarity index 100% rename from home/modules/gui/bookmarks.nix rename to modules/hm/gui/bookmarks.nix diff --git a/home/modules/python.nix b/modules/hm/python.nix similarity index 100% rename from home/modules/python.nix rename to modules/hm/python.nix diff --git a/home/modules/sway.nix b/modules/hm/sway.nix similarity index 100% rename from home/modules/sway.nix rename to modules/hm/sway.nix diff --git a/home/modules/vscodium.nix b/modules/hm/vscodium.nix similarity index 98% rename from home/modules/vscodium.nix rename to modules/hm/vscodium.nix index 9e6dcb0..e0392ce 100644 --- a/home/modules/vscodium.nix +++ b/modules/hm/vscodium.nix @@ -39,7 +39,6 @@ in njpwerner.autodocstring rust-lang.rust-analyzer tamasfe.even-better-toml - vadimcn.vscode-lldb vscjava.vscode-java-test vscjava.vscode-java-dependency vscjava.vscode-java-debug diff --git a/home/modules/xonsh.nix b/modules/hm/xonsh.nix similarity index 100% rename from home/modules/xonsh.nix rename to modules/hm/xonsh.nix diff --git a/home/modules/zed.nix b/modules/hm/zed.nix similarity index 100% rename from home/modules/zed.nix rename to modules/hm/zed.nix diff --git a/modules/nix-conf.nix b/modules/nix-conf.nix index 55e3fcc..4b4b27c 100644 --- a/modules/nix-conf.nix +++ b/modules/nix-conf.nix @@ -1,7 +1,7 @@ { - pkgs, - lib, config, + lib, + pkgs, ... }: diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix index f407419..805ff5b 100644 --- a/modules/nixos/default.nix +++ b/modules/nixos/default.nix @@ -1,13 +1,9 @@ { - config, - pkgs, - lib, ... }: { imports = [ - ../baseline.nix ./backup.nix ./ceph.nix ./container.nix @@ -29,158 +25,4 @@ ./tailscale.nix ./vmdev.nix ]; - - environment.systemPackages = with pkgs; [ - btrfs-progs - bitwarden-cli - coreutils-full - efibootmgr - psmisc - lshw - usbutils - xfsprogs - ]; - - system.stateVersion = "24.11"; - - nix = { - gc.dates = "weekly"; - settings.auto-optimise-store = true; - }; - - # Network Manager pulls in too many deps - networking = { - search = [ - "thehellings.lan" - "home" - ]; - networkmanager.enable = false; - }; - - programs = { - xonsh = { - enable = true; - extraPackages = ( - ps: with ps; [ - xonsh-apipenv - pkgs.nur.repos.xonsh-xontribs.xonsh-direnv - pkgs.nur.repos.xonsh-xontribs.xontrib-vox - ] - ); - }; - ssh.knownHosts = { - chronicles = { - extraHostNames = [ - "chronicles.thehellings.lan" - "chronicles.home" - "nas" - "nas.thehellings.lan" - "nas.home" - ]; - publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEBecZUva9OnZuXLaBun6/1ITo5f9p0YMLPD+q0egLRS"; - }; - dns = { - extraHostNames = [ - "dns" - "dns.me.ts" - "dns.home" - ]; - publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKRCXdhXWHEvw84V9JC5bAGovvj12DLVphcEnsTHDjxW"; - }; - "genesis" = { - extraHostNames = [ - "genesis.shire-zebra.ts.net" - "genesis.home" - ]; - publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEI9jbTPmEWQ0F2bLYmnIOLmBnag1fkKxHRjz3X8lB/k"; - }; - "git" = { - extraHostNames = [ - "git.home" - "git.thehellings.lan" - ]; - publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC7hesFWwlmSbWPJWUiF8fIppy5a83yXw84O0Ytz+Zyq"; - }; - hosea = { - extraHostNames = [ - "hosea.home" - "hosea.thehellings.lan" - ]; - publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKLIwkTTXA56sUlUjEulXXZRvZy5H4a5ZwgKWLlpkQDz"; - }; - isaiah = { - extraHostNames = [ - "isaiah.home" - "isaiah.thehellings.lan" - "isaiah-builder" - ]; - publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHleYKtfV4W1Z63Ysu9w5Rbglqlz4F92YcZoMkucoTNf"; - }; - jeremiah = { - extraHostNames = [ - "jeremiah.home" - "jeremiah.thehellings.lan" - "jeremiah-builder" - ]; - publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOjQjXq9WYU2Ki27BR9WwJ4ZruS/lJXbjC1b0Q42Adi0"; - }; - jude = { - extraHostNames = [ - "jude.home" - "jude.thehellings.lan" - "jude-builder" - ]; - publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOos0zQePsa+T6Z2dsKbPOvEdrBQ8a6mx3s7pN6ysCI0"; - }; - linode = { - extraHostNames = [ - "linode.home" - "linode.thehellings.lan" - "thehellings.com" - ]; - publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMv9Zud3kZOl86gtmkn+uj3D4kiXWDPtyUL02VVLNR4Q"; - }; - }; - }; - - # Enable the OpenSSH daemon for remote control - services = { - openssh = { - enable = true; - settings.X11Forwarding = true; - }; - }; - - # Define a user account. Don't forget to set a password with ‘passwd’. - users.users.greg = { - isNormalUser = true; - createHome = true; - extraGroups = [ - "wheel" - ]; # Enable ‘sudo’ for the user. - shell = config.programs.xonsh.package; - initialPassword = "password"; - openssh.authorizedKeys.keys = lib.strings.splitString "\n" ( - builtins.readFile ../../home/ssh/authorized_keys - ); - }; - - security.sudo.extraRules = [ - { - users = [ "greg" ]; - commands = [ - { - command = "ALL"; - options = [ "NOPASSWD" ]; - } - ]; - } - ]; - - i18n.defaultLocale = "en_US.UTF-8"; - - console = { - font = "Lat2-Terminus16"; - keyMap = "us"; - }; } From f93908c43fc0d67ac42fb37793004f694f9051ff Mon Sep 17 00:00:00 2001 From: Greg Hellings Date: Tue, 10 Jun 2025 14:56:59 -0500 Subject: [PATCH 15/16] Devolve home-manager separately --- darwin/baseline.nix | 4 ++++ home/default.nix | 2 +- hosts/genesis/networking/dhcp.nix | 2 +- pkgs/hms/hms.sh | 37 ++++++++++++++++++++++++++----- 4 files changed, 37 insertions(+), 8 deletions(-) diff --git a/darwin/baseline.nix b/darwin/baseline.nix index 330d4be..e6bb11e 100644 --- a/darwin/baseline.nix +++ b/darwin/baseline.nix @@ -4,6 +4,10 @@ ... }: { + environment.systemPackages = with pkgs; [ + hms + ]; + fonts.packages = with pkgs; [ dejavu_fonts nerd-fonts.hack diff --git a/home/default.nix b/home/default.nix index 6595fdf..cc4db7b 100644 --- a/home/default.nix +++ b/home/default.nix @@ -34,5 +34,5 @@ let }; in { - inherit ivr; + "MacBook-Pro.local" = ivr; } diff --git a/hosts/genesis/networking/dhcp.nix b/hosts/genesis/networking/dhcp.nix index 630f4ec..63bb46f 100644 --- a/hosts/genesis/networking/dhcp.nix +++ b/hosts/genesis/networking/dhcp.nix @@ -103,7 +103,7 @@ } { hw-address = "c8:4b:d6:ca:20:8f"; - ip-address = "10.42.1.10"; # Jude - but maybe through the monitor? + ip-address = "10.42.1.10"; # The monitor } { hw-address = "04:7c:16:d5:60:6f"; diff --git a/pkgs/hms/hms.sh b/pkgs/hms/hms.sh index f1787de..41086a6 100644 --- a/pkgs/hms/hms.sh +++ b/pkgs/hms/hms.sh @@ -1,13 +1,38 @@ # vim: set ft=bash: -# Build different targets with GUI or not + +set -ex -o pipefail # Build and switch -user="$(whoami)" -src="${HOME}/.config/nix" -echo "Building ${user}" +system="$(uname -s)" + +# Determine where the Flake is +if [ "$system" == "Darwin" ]; then + try_src="/etc/nix-darwin" +else + try_src="/etc/nixos" +fi +if [ -d "$try_src" ]; then + src="$try_src" + target="$(hostname)" +else + src="$HOME/.config/nix" + target="$(whoami)" +fi + +# Find the hostname +echo "Building user for ${target}" + +# Build the system dest=$(mktemp -d) +trap cleanup 1 2 3 6 15 + +function cleanup { + echo "Cleaning up" + rm -r "${dest}" + exit +} + pushd "${dest}" > /dev/null -nom build "${src}#homeConfigurations.\"${user}\".activationPackage" +nom build "${src}#homeConfigurations.\"${target}\".activationPackage" ./result/activate popd > /dev/null -rm -r "${dest}" From 1c44dfad6f51abfa746524d6d91d0a2a29403b3a Mon Sep 17 00:00:00 2001 From: Greg Hellings Date: Tue, 10 Jun 2025 15:05:09 -0500 Subject: [PATCH 16/16] Make it build correctly --- hosts/baseline.nix | 2 +- hosts/default.nix | 1 - pkgs/gen-build/gen-build.go | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/hosts/baseline.nix b/hosts/baseline.nix index 116134e..8516eee 100644 --- a/hosts/baseline.nix +++ b/hosts/baseline.nix @@ -18,7 +18,7 @@ let in { imports = [ - ./nix-conf.nix + ../modules/nix-conf.nix ]; console = { diff --git a/hosts/default.nix b/hosts/default.nix index deb0462..9975175 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -9,7 +9,6 @@ let // { channel = top.nixunstable; hm = top.hmunstable; - nixvim = top.nixvimunstable; } )); machine = diff --git a/pkgs/gen-build/gen-build.go b/pkgs/gen-build/gen-build.go index f06fcb0..e09a818 100644 --- a/pkgs/gen-build/gen-build.go +++ b/pkgs/gen-build/gen-build.go @@ -78,7 +78,7 @@ func main() { // flake output type. Therefore, it just informs you that it is // part of the output, but does not evaluate deeper to tell you // what the name of it is. I will just do this manually for now. - pipeline["Build Home config "] = NewGitlabCIJob("homeConfigurations.\"gregory.hellings\".activationPackage") + pipeline["Build Home config "] = NewGitlabCIJob("homeConfigurations.\"greg\".activationPackage") if flakeOutput.Apps != nil { for appName := range flakeOutput.Apps {