diff --git a/flake.nix b/flake.nix index 8ff4978..dcab732 100644 --- a/flake.nix +++ b/flake.nix @@ -1,129 +1,23 @@ { - inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11"; - nixpkgs-unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable"; - hardware.url = "github:nixos/nixos-hardware"; - - disko.url = "github:nix-community/disko/master"; - disko.inputs.nixpkgs.follows = "nixpkgs"; - - sops-nix.url = "github:Mic92/sops-nix"; - sops-nix.inputs.nixpkgs.follows = "nixpkgs-unstable"; - # sops-nix.inputs.nixpkgs-stable.follows = "nixpkgs"; - - git-hooks.url = "github:cachix/git-hooks.nix"; - git-hooks.inputs.nixpkgs.follows = "nixpkgs"; - - home-manager.url = "github:nix-community/home-manager/release-24.11"; - home-manager.inputs.nixpkgs.follows = "nixpkgs"; - - home-manager-unstable.url = "github:nix-community/home-manager"; - home-manager-unstable.inputs.nixpkgs.follows = "nixpkgs-unstable"; - - helix.url = "github:helix-editor/helix/master"; - helix.inputs.nixpkgs.follows = "nixpkgs-unstable"; - - hyprland.url = "github:hyprwm/Hyprland"; - hyprland.inputs.nixpkgs.follows = "nixpkgs-unstable"; - - hyprgrass.url = "github:horriblename/hyprgrass"; - hyprgrass.inputs.hyprland.follows = "hyprland"; - - iio-hyprland.url = "github:JeanSchoeller/iio-hyprland"; - iio-hyprland.inputs.nixpkgs.follows = "nixpkgs"; - - wezterm.url = "github:wez/wezterm?dir=nix"; - wezterm.inputs.nixpkgs.follows = "nixpkgs-unstable"; - - slippi.url = "github:lytedev/slippi-nix"; - # slippi.url = "git+file:///home/daniel/code/open-source/slippi-nix"; - slippi.inputs.nixpkgs.follows = "nixpkgs-unstable"; - slippi.inputs.home-manager.follows = "home-manager-unstable"; - - jovian.url = "github:Jovian-Experiments/Jovian-NixOS/development"; - jovian.inputs.nixpkgs.follows = "nixpkgs-unstable"; - - ghostty.url = "github:ghostty-org/ghostty"; - ghostty.inputs.nixpkgs-unstable.follows = "nixpkgs-unstable"; - ghostty.inputs.nixpkgs-stable.follows = "nixpkgs"; - - # nnf.url = "github:thelegy/nixos-nftables-firewall?rev=71fc2b79358d0dbacde83c806a0f008ece567b7b"; - - mobile-nixos = { - url = "github:lytedev/mobile-nixos"; - flake = false; - }; - }; - - nixConfig = { - extra-experimental-features = ["nix-command" "flakes"]; - - extra-substituters = [ - "https://cache.nixos.org/" - "https://helix.cachix.org" - "https://nix-community.cachix.org" - "https://nix.h.lyte.dev" - "https://hyprland.cachix.org" - "https://ghostty.cachix.org" - ]; - - extra-trusted-public-keys = [ - "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" - "helix.cachix.org-1:ejp9KQpR1FBI2onstMQ34yogDm4OgU2ru6lIwPvuCVs=" - "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" - "h.lyte.dev-2:te9xK/GcWPA/5aXav8+e5RHImKYMug8hIIbhHsKPN0M=" - "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" - "ghostty.cachix.org-1:QB389yTa6gTyneehvqG58y0WnHjQOqgnA+wBnpWWxns=" - ]; - }; - outputs = { self, - nixpkgs, nixpkgs-unstable, + home-manager-unstable, + nixpkgs, + home-manager, disko, sops-nix, git-hooks, - wezterm, - home-manager, - home-manager-unstable, helix, hardware, - jovian, - mobile-nixos, - hyprland, # nnf, # hyprland, slippi, ghostty, - ... }: let inherit (self) outputs; inherit (outputs) nixosModules homeManagerModules overlays; - # TODO: make @ inputs unnecessary by making arguments explicit in all modules? - systems = ["aarch64-linux" "aarch64-darwin" "x86_64-darwin" "x86_64-linux"]; - forSystems = nixpkgs.lib.genAttrs systems; - pkgsFor = system: (import nixpkgs {inherit system;}).extend overlays.default; - genPkgs = func: (forSystems (system: func (pkgsFor system))); - # pkg = callee: overrides: genPkgs (pkgs: pkgs.callPackage callee overrides); - - unstable = { - forSystems = nixpkgs-unstable.lib.genAttrs systems; - pkgsFor = system: (import nixpkgs-unstable {inherit system;}).extend overlays.default; - genPkgs = func: (forSystems (system: func (pkgsFor system))); - pkg = callee: overrides: genPkgs (pkgs: pkgs.callPackage callee overrides); - }; - - style = { - colors = (import ./lib/colors.nix {inherit (nixpkgs) lib;}).schemes.catppuccin-mocha-sapphire; - - font = { - name = "IosevkaLyteTerm"; - size = 12; - }; - }; - /* moduleArgs = { # inherit style; @@ -870,4 +764,73 @@ TODO: nixos ISO? */ }; + + inputs = { + # stable inputs + nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; + + home-manager.url = "github:nix-community/home-manager/release-24.11"; + home-manager.inputs.nixpkgs.follows = "nixpkgs"; + + # "unstable" inputs + nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + hardware.url = "github:NixOS/nixos-hardware"; + disko.url = "github:nix-community/disko/master"; + disko.inputs.nixpkgs.follows = "nixpkgs"; + + sops-nix.url = "github:Mic92/sops-nix"; + sops-nix.inputs.nixpkgs.follows = "nixpkgs-unstable"; + + git-hooks.url = "github:cachix/git-hooks.nix"; + git-hooks.inputs.nixpkgs.follows = "nixpkgs-unstable"; + + home-manager-unstable.url = "github:nix-community/home-manager"; + home-manager-unstable.inputs.nixpkgs.follows = "nixpkgs-unstable"; + + helix.url = "github:helix-editor/helix/master"; + helix.inputs.nixpkgs.follows = "nixpkgs-unstable"; + + slippi.url = "github:lytedev/slippi-nix"; + # slippi.url = "git+file:///home/daniel/code/open-source/slippi-nix"; # used during flake development + slippi.inputs.nixpkgs.follows = "nixpkgs-unstable"; + slippi.inputs.home-manager.follows = "home-manager-unstable"; + + # jovian.url = "github:Jovian-Experiments/Jovian-NixOS/development"; + # jovian.inputs.nixpkgs.follows = "nixpkgs-unstable"; + + ghostty.url = "github:ghostty-org/ghostty"; + ghostty.inputs.nixpkgs-unstable.follows = "nixpkgs-unstable"; + ghostty.inputs.nixpkgs-stable.follows = "nixpkgs"; + + # nnf.url = "github:thelegy/nixos-nftables-firewall?rev=71fc2b79358d0dbacde83c806a0f008ece567b7b"; + + mobile-nixos = { + url = "github:lytedev/mobile-nixos"; + flake = false; + }; + }; + + nixConfig = { + extra-experimental-features = ["nix-command" "flakes"]; + + extra-substituters = [ + "https://cache.nixos.org/" + "https://nix-community.cachix.org" + "https://nix.h.lyte.dev" + + # since we are forcing most inputs to follow our nixpkgs, we don't bother settings up caches and just use our own + # "https://helix.cachix.org" + # "https://ghostty.cachix.org" + ]; + + extra-trusted-public-keys = [ + "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" + "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + "h.lyte.dev-2:te9xK/GcWPA/5aXav8+e5RHImKYMug8hIIbhHsKPN0M=" + + # "helix.cachix.org-1:ejp9KQpR1FBI2onstMQ34yogDm4OgU2ru6lIwPvuCVs=" + # "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" + # "ghostty.cachix.org-1:QB389yTa6gTyneehvqG58y0WnHjQOqgnA+wBnpWWxns=" + ]; + }; } diff --git a/nix/boilerplate.nix b/nix/boilerplate.nix new file mode 100644 index 0000000..449b4d6 --- /dev/null +++ b/nix/boilerplate.nix @@ -0,0 +1,30 @@ +inputs @ { + nixpkgs, + nixpkgs-unstable, + self, + ... +}: let + /* + * + include a "forSelf" overlay from the flake's own outputs if one exists + + */ + forSelfOverlay = + if builtins.hasAttr "overlays" self && builtins.hasAttr "forSelf" self.overlays + then self.overlays.forSelf + else (_: p: p); + + # a wrapper function that produces the boilerplate functions so we can define + # them for both nixpkgs and nixpkgs-unstable + buildFuncs = nixpkgs: rec { + systems = ["aarch64-linux" "x86_64-linux" "x86_64-darwin" "aarch64-darwin"]; + forSystems = nixpkgs.lib.genAttrs systems; + pkgsFor = system: ((import nixpkgs {inherit system;}).extend forSelfOverlay); + genPkgs = func: (forSystems (system: func (pkgsFor system))); + call = imported: genPkgs (pkgs: imported (inputs // {inherit pkgs;})); + }; +in + (buildFuncs nixpkgs) + // { + unstable = buildFuncs nixpkgs-unstable; + } diff --git a/nix/constants.nix b/nix/constants.nix new file mode 100644 index 0000000..14e944f --- /dev/null +++ b/nix/constants.nix @@ -0,0 +1,20 @@ +{ + style = { + colors = (import ./lib/colors.nix {inherit (nixpkgs) lib;}).schemes.catppuccin-mocha-sapphire; + + font = { + name = "IosevkaLyteTerm"; + size = 12; + }; + }; + + /* + moduleArgs = { + # inherit style; + inherit helix slippi hyprland hardware disko home-manager; + inherit (outputs) nixosModules homeManagerModules diskoConfigurations overlays; + }; + */ + + pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAPLXOjupz3ScYjgrF+ehrbp9OvGAWQLI6fplX6w9Ijb daniel@lyte.dev"; +} diff --git a/disko/default.nix b/nix/disko/default.nix similarity index 100% rename from disko/default.nix rename to nix/disko/default.nix diff --git a/lib/colors.nix b/nix/lib/colors.nix similarity index 100% rename from lib/colors.nix rename to nix/lib/colors.nix diff --git a/lib/internal.md b/nix/lib/internal.md similarity index 100% rename from lib/internal.md rename to nix/lib/internal.md diff --git a/modules/home-manager/default.nix b/nix/modules/home-manager/default.nix similarity index 100% rename from modules/home-manager/default.nix rename to nix/modules/home-manager/default.nix diff --git a/modules/home-manager/eww/eww.scss b/nix/modules/home-manager/eww/eww.scss similarity index 100% rename from modules/home-manager/eww/eww.scss rename to nix/modules/home-manager/eww/eww.scss diff --git a/modules/home-manager/eww/eww.yuck b/nix/modules/home-manager/eww/eww.yuck similarity index 100% rename from modules/home-manager/eww/eww.yuck rename to nix/modules/home-manager/eww/eww.yuck diff --git a/modules/home-manager/eww/scripts/battery-time.bash b/nix/modules/home-manager/eww/scripts/battery-time.bash similarity index 100% rename from modules/home-manager/eww/scripts/battery-time.bash rename to nix/modules/home-manager/eww/scripts/battery-time.bash diff --git a/modules/home-manager/eww/scripts/hypr-workspaces.bash b/nix/modules/home-manager/eww/scripts/hypr-workspaces.bash similarity index 100% rename from modules/home-manager/eww/scripts/hypr-workspaces.bash rename to nix/modules/home-manager/eww/scripts/hypr-workspaces.bash diff --git a/modules/home-manager/eww/scripts/workspaces/.gitignore b/nix/modules/home-manager/eww/scripts/workspaces/.gitignore similarity index 100% rename from modules/home-manager/eww/scripts/workspaces/.gitignore rename to nix/modules/home-manager/eww/scripts/workspaces/.gitignore diff --git a/modules/home-manager/eww/scripts/workspaces/default.nix b/nix/modules/home-manager/eww/scripts/workspaces/default.nix similarity index 100% rename from modules/home-manager/eww/scripts/workspaces/default.nix rename to nix/modules/home-manager/eww/scripts/workspaces/default.nix diff --git a/modules/home-manager/eww/scripts/workspaces/src/.gitignore b/nix/modules/home-manager/eww/scripts/workspaces/src/.gitignore similarity index 100% rename from modules/home-manager/eww/scripts/workspaces/src/.gitignore rename to nix/modules/home-manager/eww/scripts/workspaces/src/.gitignore diff --git a/modules/home-manager/eww/scripts/workspaces/src/Cargo.lock b/nix/modules/home-manager/eww/scripts/workspaces/src/Cargo.lock similarity index 100% rename from modules/home-manager/eww/scripts/workspaces/src/Cargo.lock rename to nix/modules/home-manager/eww/scripts/workspaces/src/Cargo.lock diff --git a/modules/home-manager/eww/scripts/workspaces/src/Cargo.toml b/nix/modules/home-manager/eww/scripts/workspaces/src/Cargo.toml similarity index 100% rename from modules/home-manager/eww/scripts/workspaces/src/Cargo.toml rename to nix/modules/home-manager/eww/scripts/workspaces/src/Cargo.toml diff --git a/modules/home-manager/eww/scripts/workspaces/src/main.rs b/nix/modules/home-manager/eww/scripts/workspaces/src/main.rs similarity index 100% rename from modules/home-manager/eww/scripts/workspaces/src/main.rs rename to nix/modules/home-manager/eww/scripts/workspaces/src/main.rs diff --git a/modules/home-manager/fish/interactiveShellInit.fish b/nix/modules/home-manager/fish/interactiveShellInit.fish similarity index 100% rename from modules/home-manager/fish/interactiveShellInit.fish rename to nix/modules/home-manager/fish/interactiveShellInit.fish diff --git a/modules/home-manager/fish/shellInit.fish b/nix/modules/home-manager/fish/shellInit.fish similarity index 100% rename from modules/home-manager/fish/shellInit.fish rename to nix/modules/home-manager/fish/shellInit.fish diff --git a/modules/home-manager/ghostty/config b/nix/modules/home-manager/ghostty/config similarity index 100% rename from modules/home-manager/ghostty/config rename to nix/modules/home-manager/ghostty/config diff --git a/modules/home-manager/ghostty/themes/catppuccin-mocha-sapphire-custom b/nix/modules/home-manager/ghostty/themes/catppuccin-mocha-sapphire-custom similarity index 100% rename from modules/home-manager/ghostty/themes/catppuccin-mocha-sapphire-custom rename to nix/modules/home-manager/ghostty/themes/catppuccin-mocha-sapphire-custom diff --git a/modules/home-manager/hyprland.nix b/nix/modules/home-manager/hyprland.nix similarity index 100% rename from modules/home-manager/hyprland.nix rename to nix/modules/home-manager/hyprland.nix diff --git a/modules/home-manager/kitty.nix b/nix/modules/home-manager/kitty.nix similarity index 100% rename from modules/home-manager/kitty.nix rename to nix/modules/home-manager/kitty.nix diff --git a/modules/home-manager/niri/config.kdl b/nix/modules/home-manager/niri/config.kdl similarity index 100% rename from modules/home-manager/niri/config.kdl rename to nix/modules/home-manager/niri/config.kdl diff --git a/modules/home-manager/plasma-manager.nix b/nix/modules/home-manager/plasma-manager.nix similarity index 100% rename from modules/home-manager/plasma-manager.nix rename to nix/modules/home-manager/plasma-manager.nix diff --git a/modules/home-manager/scripts/common/bin/? b/nix/modules/home-manager/scripts/common/bin/? similarity index 100% rename from modules/home-manager/scripts/common/bin/? rename to nix/modules/home-manager/scripts/common/bin/? diff --git a/modules/home-manager/scripts/common/bin/N b/nix/modules/home-manager/scripts/common/bin/N similarity index 100% rename from modules/home-manager/scripts/common/bin/N rename to nix/modules/home-manager/scripts/common/bin/N diff --git a/modules/home-manager/scripts/common/bin/archive b/nix/modules/home-manager/scripts/common/bin/archive similarity index 100% rename from modules/home-manager/scripts/common/bin/archive rename to nix/modules/home-manager/scripts/common/bin/archive diff --git a/modules/home-manager/scripts/common/bin/at b/nix/modules/home-manager/scripts/common/bin/at similarity index 100% rename from modules/home-manager/scripts/common/bin/at rename to nix/modules/home-manager/scripts/common/bin/at diff --git a/modules/home-manager/scripts/common/bin/bp b/nix/modules/home-manager/scripts/common/bin/bp similarity index 100% rename from modules/home-manager/scripts/common/bin/bp rename to nix/modules/home-manager/scripts/common/bin/bp diff --git a/modules/home-manager/scripts/common/bin/check-domain-availability b/nix/modules/home-manager/scripts/common/bin/check-domain-availability similarity index 100% rename from modules/home-manager/scripts/common/bin/check-domain-availability rename to nix/modules/home-manager/scripts/common/bin/check-domain-availability diff --git a/modules/home-manager/scripts/common/bin/check-port b/nix/modules/home-manager/scripts/common/bin/check-port similarity index 100% rename from modules/home-manager/scripts/common/bin/check-port rename to nix/modules/home-manager/scripts/common/bin/check-port diff --git a/modules/home-manager/scripts/common/bin/clip b/nix/modules/home-manager/scripts/common/bin/clip similarity index 100% rename from modules/home-manager/scripts/common/bin/clip rename to nix/modules/home-manager/scripts/common/bin/clip diff --git a/modules/home-manager/scripts/common/bin/clipshot b/nix/modules/home-manager/scripts/common/bin/clipshot similarity index 100% rename from modules/home-manager/scripts/common/bin/clipshot rename to nix/modules/home-manager/scripts/common/bin/clipshot diff --git a/modules/home-manager/scripts/common/bin/copy-git-forge-url b/nix/modules/home-manager/scripts/common/bin/copy-git-forge-url similarity index 100% rename from modules/home-manager/scripts/common/bin/copy-git-forge-url rename to nix/modules/home-manager/scripts/common/bin/copy-git-forge-url diff --git a/modules/home-manager/scripts/common/bin/countdown b/nix/modules/home-manager/scripts/common/bin/countdown similarity index 100% rename from modules/home-manager/scripts/common/bin/countdown rename to nix/modules/home-manager/scripts/common/bin/countdown diff --git a/modules/home-manager/scripts/common/bin/dns b/nix/modules/home-manager/scripts/common/bin/dns similarity index 100% rename from modules/home-manager/scripts/common/bin/dns rename to nix/modules/home-manager/scripts/common/bin/dns diff --git a/modules/home-manager/scripts/common/bin/dns-cleaner b/nix/modules/home-manager/scripts/common/bin/dns-cleaner similarity index 100% rename from modules/home-manager/scripts/common/bin/dns-cleaner rename to nix/modules/home-manager/scripts/common/bin/dns-cleaner diff --git a/modules/home-manager/scripts/common/bin/dns-deleter b/nix/modules/home-manager/scripts/common/bin/dns-deleter similarity index 100% rename from modules/home-manager/scripts/common/bin/dns-deleter rename to nix/modules/home-manager/scripts/common/bin/dns-deleter diff --git a/modules/home-manager/scripts/common/bin/dns-deleter-matching b/nix/modules/home-manager/scripts/common/bin/dns-deleter-matching similarity index 100% rename from modules/home-manager/scripts/common/bin/dns-deleter-matching rename to nix/modules/home-manager/scripts/common/bin/dns-deleter-matching diff --git a/modules/home-manager/scripts/common/bin/docker-compose b/nix/modules/home-manager/scripts/common/bin/docker-compose similarity index 100% rename from modules/home-manager/scripts/common/bin/docker-compose rename to nix/modules/home-manager/scripts/common/bin/docker-compose diff --git a/modules/home-manager/scripts/common/bin/editscrot b/nix/modules/home-manager/scripts/common/bin/editscrot similarity index 100% rename from modules/home-manager/scripts/common/bin/editscrot rename to nix/modules/home-manager/scripts/common/bin/editscrot diff --git a/modules/home-manager/scripts/common/bin/email-via-mailgun-smtp b/nix/modules/home-manager/scripts/common/bin/email-via-mailgun-smtp similarity index 100% rename from modules/home-manager/scripts/common/bin/email-via-mailgun-smtp rename to nix/modules/home-manager/scripts/common/bin/email-via-mailgun-smtp diff --git a/modules/home-manager/scripts/common/bin/emoji b/nix/modules/home-manager/scripts/common/bin/emoji similarity index 100% rename from modules/home-manager/scripts/common/bin/emoji rename to nix/modules/home-manager/scripts/common/bin/emoji diff --git a/modules/home-manager/scripts/common/bin/ezln b/nix/modules/home-manager/scripts/common/bin/ezln similarity index 100% rename from modules/home-manager/scripts/common/bin/ezln rename to nix/modules/home-manager/scripts/common/bin/ezln diff --git a/modules/home-manager/scripts/common/bin/field b/nix/modules/home-manager/scripts/common/bin/field similarity index 100% rename from modules/home-manager/scripts/common/bin/field rename to nix/modules/home-manager/scripts/common/bin/field diff --git a/modules/home-manager/scripts/common/bin/getip b/nix/modules/home-manager/scripts/common/bin/getip similarity index 100% rename from modules/home-manager/scripts/common/bin/getip rename to nix/modules/home-manager/scripts/common/bin/getip diff --git a/modules/home-manager/scripts/common/bin/git-authors b/nix/modules/home-manager/scripts/common/bin/git-authors similarity index 100% rename from modules/home-manager/scripts/common/bin/git-authors rename to nix/modules/home-manager/scripts/common/bin/git-authors diff --git a/modules/home-manager/scripts/common/bin/gitforge-url.ts b/nix/modules/home-manager/scripts/common/bin/gitforge-url.ts similarity index 100% rename from modules/home-manager/scripts/common/bin/gitforge-url.ts rename to nix/modules/home-manager/scripts/common/bin/gitforge-url.ts diff --git a/modules/home-manager/scripts/common/bin/glancepath b/nix/modules/home-manager/scripts/common/bin/glancepath similarity index 100% rename from modules/home-manager/scripts/common/bin/glancepath rename to nix/modules/home-manager/scripts/common/bin/glancepath diff --git a/modules/home-manager/scripts/common/bin/good-morning b/nix/modules/home-manager/scripts/common/bin/good-morning similarity index 100% rename from modules/home-manager/scripts/common/bin/good-morning rename to nix/modules/home-manager/scripts/common/bin/good-morning diff --git a/modules/home-manager/scripts/common/bin/has_command b/nix/modules/home-manager/scripts/common/bin/has_command similarity index 100% rename from modules/home-manager/scripts/common/bin/has_command rename to nix/modules/home-manager/scripts/common/bin/has_command diff --git a/modules/home-manager/scripts/common/bin/is_wayland b/nix/modules/home-manager/scripts/common/bin/is_wayland similarity index 100% rename from modules/home-manager/scripts/common/bin/is_wayland rename to nix/modules/home-manager/scripts/common/bin/is_wayland diff --git a/modules/home-manager/scripts/common/bin/j b/nix/modules/home-manager/scripts/common/bin/j similarity index 100% rename from modules/home-manager/scripts/common/bin/j rename to nix/modules/home-manager/scripts/common/bin/j diff --git a/modules/home-manager/scripts/common/bin/k8s-yaml-diff b/nix/modules/home-manager/scripts/common/bin/k8s-yaml-diff similarity index 100% rename from modules/home-manager/scripts/common/bin/k8s-yaml-diff rename to nix/modules/home-manager/scripts/common/bin/k8s-yaml-diff diff --git a/modules/home-manager/scripts/common/bin/k8s-yaml-sort b/nix/modules/home-manager/scripts/common/bin/k8s-yaml-sort similarity index 100% rename from modules/home-manager/scripts/common/bin/k8s-yaml-sort rename to nix/modules/home-manager/scripts/common/bin/k8s-yaml-sort diff --git a/modules/home-manager/scripts/common/bin/keyrepeat b/nix/modules/home-manager/scripts/common/bin/keyrepeat similarity index 100% rename from modules/home-manager/scripts/common/bin/keyrepeat rename to nix/modules/home-manager/scripts/common/bin/keyrepeat diff --git a/modules/home-manager/scripts/common/bin/kubeline b/nix/modules/home-manager/scripts/common/bin/kubeline similarity index 100% rename from modules/home-manager/scripts/common/bin/kubeline rename to nix/modules/home-manager/scripts/common/bin/kubeline diff --git a/modules/home-manager/scripts/common/bin/kubfc b/nix/modules/home-manager/scripts/common/bin/kubfc similarity index 100% rename from modules/home-manager/scripts/common/bin/kubfc rename to nix/modules/home-manager/scripts/common/bin/kubfc diff --git a/modules/home-manager/scripts/common/bin/kubfn b/nix/modules/home-manager/scripts/common/bin/kubfn similarity index 100% rename from modules/home-manager/scripts/common/bin/kubfn rename to nix/modules/home-manager/scripts/common/bin/kubfn diff --git a/modules/home-manager/scripts/common/bin/launch b/nix/modules/home-manager/scripts/common/bin/launch similarity index 100% rename from modules/home-manager/scripts/common/bin/launch rename to nix/modules/home-manager/scripts/common/bin/launch diff --git a/modules/home-manager/scripts/common/bin/linewise b/nix/modules/home-manager/scripts/common/bin/linewise similarity index 100% rename from modules/home-manager/scripts/common/bin/linewise rename to nix/modules/home-manager/scripts/common/bin/linewise diff --git a/modules/home-manager/scripts/common/bin/maybe_source_env_file b/nix/modules/home-manager/scripts/common/bin/maybe_source_env_file similarity index 100% rename from modules/home-manager/scripts/common/bin/maybe_source_env_file rename to nix/modules/home-manager/scripts/common/bin/maybe_source_env_file diff --git a/modules/home-manager/scripts/common/bin/nd b/nix/modules/home-manager/scripts/common/bin/nd similarity index 100% rename from modules/home-manager/scripts/common/bin/nd rename to nix/modules/home-manager/scripts/common/bin/nd diff --git a/modules/home-manager/scripts/common/bin/nf b/nix/modules/home-manager/scripts/common/bin/nf similarity index 100% rename from modules/home-manager/scripts/common/bin/nf rename to nix/modules/home-manager/scripts/common/bin/nf diff --git a/modules/home-manager/scripts/common/bin/note b/nix/modules/home-manager/scripts/common/bin/note similarity index 100% rename from modules/home-manager/scripts/common/bin/note rename to nix/modules/home-manager/scripts/common/bin/note diff --git a/modules/home-manager/scripts/common/bin/nsync b/nix/modules/home-manager/scripts/common/bin/nsync similarity index 100% rename from modules/home-manager/scripts/common/bin/nsync rename to nix/modules/home-manager/scripts/common/bin/nsync diff --git a/modules/home-manager/scripts/common/bin/nvimdiff b/nix/modules/home-manager/scripts/common/bin/nvimdiff similarity index 100% rename from modules/home-manager/scripts/common/bin/nvimdiff rename to nix/modules/home-manager/scripts/common/bin/nvimdiff diff --git a/modules/home-manager/scripts/common/bin/open-in-git-forge b/nix/modules/home-manager/scripts/common/bin/open-in-git-forge similarity index 100% rename from modules/home-manager/scripts/common/bin/open-in-git-forge rename to nix/modules/home-manager/scripts/common/bin/open-in-git-forge diff --git a/modules/home-manager/scripts/common/bin/optimize-photo-for-web b/nix/modules/home-manager/scripts/common/bin/optimize-photo-for-web similarity index 100% rename from modules/home-manager/scripts/common/bin/optimize-photo-for-web rename to nix/modules/home-manager/scripts/common/bin/optimize-photo-for-web diff --git a/modules/home-manager/scripts/common/bin/pass-migrate-to-pass-otp b/nix/modules/home-manager/scripts/common/bin/pass-migrate-to-pass-otp similarity index 100% rename from modules/home-manager/scripts/common/bin/pass-migrate-to-pass-otp rename to nix/modules/home-manager/scripts/common/bin/pass-migrate-to-pass-otp diff --git a/modules/home-manager/scripts/common/bin/pipeline b/nix/modules/home-manager/scripts/common/bin/pipeline similarity index 100% rename from modules/home-manager/scripts/common/bin/pipeline rename to nix/modules/home-manager/scripts/common/bin/pipeline diff --git a/modules/home-manager/scripts/common/bin/poll b/nix/modules/home-manager/scripts/common/bin/poll similarity index 100% rename from modules/home-manager/scripts/common/bin/poll rename to nix/modules/home-manager/scripts/common/bin/poll diff --git a/modules/home-manager/scripts/common/bin/pr-for-commit b/nix/modules/home-manager/scripts/common/bin/pr-for-commit similarity index 100% rename from modules/home-manager/scripts/common/bin/pr-for-commit rename to nix/modules/home-manager/scripts/common/bin/pr-for-commit diff --git a/modules/home-manager/scripts/common/bin/readme.md b/nix/modules/home-manager/scripts/common/bin/readme.md similarity index 100% rename from modules/home-manager/scripts/common/bin/readme.md rename to nix/modules/home-manager/scripts/common/bin/readme.md diff --git a/modules/home-manager/scripts/common/bin/remote b/nix/modules/home-manager/scripts/common/bin/remote similarity index 100% rename from modules/home-manager/scripts/common/bin/remote rename to nix/modules/home-manager/scripts/common/bin/remote diff --git a/modules/home-manager/scripts/common/bin/resource-usage b/nix/modules/home-manager/scripts/common/bin/resource-usage similarity index 100% rename from modules/home-manager/scripts/common/bin/resource-usage rename to nix/modules/home-manager/scripts/common/bin/resource-usage diff --git a/modules/home-manager/scripts/common/bin/s b/nix/modules/home-manager/scripts/common/bin/s similarity index 100% rename from modules/home-manager/scripts/common/bin/s rename to nix/modules/home-manager/scripts/common/bin/s diff --git a/modules/home-manager/scripts/common/bin/scn b/nix/modules/home-manager/scripts/common/bin/scn similarity index 100% rename from modules/home-manager/scripts/common/bin/scn rename to nix/modules/home-manager/scripts/common/bin/scn diff --git a/modules/home-manager/scripts/common/bin/screenshot b/nix/modules/home-manager/scripts/common/bin/screenshot similarity index 100% rename from modules/home-manager/scripts/common/bin/screenshot rename to nix/modules/home-manager/scripts/common/bin/screenshot diff --git a/modules/home-manager/scripts/common/bin/scrup b/nix/modules/home-manager/scripts/common/bin/scrup similarity index 100% rename from modules/home-manager/scripts/common/bin/scrup rename to nix/modules/home-manager/scripts/common/bin/scrup diff --git a/modules/home-manager/scripts/common/bin/scwd b/nix/modules/home-manager/scripts/common/bin/scwd similarity index 100% rename from modules/home-manager/scripts/common/bin/scwd rename to nix/modules/home-manager/scripts/common/bin/scwd diff --git a/modules/home-manager/scripts/common/bin/setbg b/nix/modules/home-manager/scripts/common/bin/setbg similarity index 100% rename from modules/home-manager/scripts/common/bin/setbg rename to nix/modules/home-manager/scripts/common/bin/setbg diff --git a/modules/home-manager/scripts/common/bin/source_if_exists b/nix/modules/home-manager/scripts/common/bin/source_if_exists similarity index 100% rename from modules/home-manager/scripts/common/bin/source_if_exists rename to nix/modules/home-manager/scripts/common/bin/source_if_exists diff --git a/modules/home-manager/scripts/common/bin/spark b/nix/modules/home-manager/scripts/common/bin/spark similarity index 100% rename from modules/home-manager/scripts/common/bin/spark rename to nix/modules/home-manager/scripts/common/bin/spark diff --git a/modules/home-manager/scripts/common/bin/sw b/nix/modules/home-manager/scripts/common/bin/sw similarity index 100% rename from modules/home-manager/scripts/common/bin/sw rename to nix/modules/home-manager/scripts/common/bin/sw diff --git a/modules/home-manager/scripts/common/bin/t b/nix/modules/home-manager/scripts/common/bin/t similarity index 100% rename from modules/home-manager/scripts/common/bin/t rename to nix/modules/home-manager/scripts/common/bin/t diff --git a/modules/home-manager/scripts/common/bin/td b/nix/modules/home-manager/scripts/common/bin/td similarity index 100% rename from modules/home-manager/scripts/common/bin/td rename to nix/modules/home-manager/scripts/common/bin/td diff --git a/modules/home-manager/scripts/common/bin/tdf b/nix/modules/home-manager/scripts/common/bin/tdf similarity index 100% rename from modules/home-manager/scripts/common/bin/tdf rename to nix/modules/home-manager/scripts/common/bin/tdf diff --git a/modules/home-manager/scripts/common/bin/terminal-rendering-test b/nix/modules/home-manager/scripts/common/bin/terminal-rendering-test similarity index 100% rename from modules/home-manager/scripts/common/bin/terminal-rendering-test rename to nix/modules/home-manager/scripts/common/bin/terminal-rendering-test diff --git a/modules/home-manager/scripts/common/bin/termrec b/nix/modules/home-manager/scripts/common/bin/termrec similarity index 100% rename from modules/home-manager/scripts/common/bin/termrec rename to nix/modules/home-manager/scripts/common/bin/termrec diff --git a/modules/home-manager/scripts/common/bin/tls b/nix/modules/home-manager/scripts/common/bin/tls similarity index 100% rename from modules/home-manager/scripts/common/bin/tls rename to nix/modules/home-manager/scripts/common/bin/tls diff --git a/modules/home-manager/scripts/common/bin/tmux-edit-buffer b/nix/modules/home-manager/scripts/common/bin/tmux-edit-buffer similarity index 100% rename from modules/home-manager/scripts/common/bin/tmux-edit-buffer rename to nix/modules/home-manager/scripts/common/bin/tmux-edit-buffer diff --git a/modules/home-manager/scripts/common/bin/tmux-lyte-session b/nix/modules/home-manager/scripts/common/bin/tmux-lyte-session similarity index 100% rename from modules/home-manager/scripts/common/bin/tmux-lyte-session rename to nix/modules/home-manager/scripts/common/bin/tmux-lyte-session diff --git a/modules/home-manager/scripts/common/bin/tmux-save-buffer b/nix/modules/home-manager/scripts/common/bin/tmux-save-buffer similarity index 100% rename from modules/home-manager/scripts/common/bin/tmux-save-buffer rename to nix/modules/home-manager/scripts/common/bin/tmux-save-buffer diff --git a/modules/home-manager/scripts/common/bin/tmux-session-dir b/nix/modules/home-manager/scripts/common/bin/tmux-session-dir similarity index 100% rename from modules/home-manager/scripts/common/bin/tmux-session-dir rename to nix/modules/home-manager/scripts/common/bin/tmux-session-dir diff --git a/modules/home-manager/scripts/common/bin/tmux-session-preview b/nix/modules/home-manager/scripts/common/bin/tmux-session-preview similarity index 100% rename from modules/home-manager/scripts/common/bin/tmux-session-preview rename to nix/modules/home-manager/scripts/common/bin/tmux-session-preview diff --git a/modules/home-manager/scripts/common/bin/tmuxswitcher b/nix/modules/home-manager/scripts/common/bin/tmuxswitcher similarity index 100% rename from modules/home-manager/scripts/common/bin/tmuxswitcher rename to nix/modules/home-manager/scripts/common/bin/tmuxswitcher diff --git a/modules/home-manager/scripts/common/bin/unarchive b/nix/modules/home-manager/scripts/common/bin/unarchive similarity index 100% rename from modules/home-manager/scripts/common/bin/unarchive rename to nix/modules/home-manager/scripts/common/bin/unarchive diff --git a/modules/home-manager/scripts/common/bin/weather b/nix/modules/home-manager/scripts/common/bin/weather similarity index 100% rename from modules/home-manager/scripts/common/bin/weather rename to nix/modules/home-manager/scripts/common/bin/weather diff --git a/modules/home-manager/scripts/common/bin/yamldiff b/nix/modules/home-manager/scripts/common/bin/yamldiff similarity index 100% rename from modules/home-manager/scripts/common/bin/yamldiff rename to nix/modules/home-manager/scripts/common/bin/yamldiff diff --git a/modules/home-manager/scripts/linux/bin/restartbar b/nix/modules/home-manager/scripts/linux/bin/restartbar similarity index 100% rename from modules/home-manager/scripts/linux/bin/restartbar rename to nix/modules/home-manager/scripts/linux/bin/restartbar diff --git a/modules/home-manager/scripts/linux/bin/startbar b/nix/modules/home-manager/scripts/linux/bin/startbar similarity index 100% rename from modules/home-manager/scripts/linux/bin/startbar rename to nix/modules/home-manager/scripts/linux/bin/startbar diff --git a/modules/home-manager/sway-laptop.nix b/nix/modules/home-manager/sway-laptop.nix similarity index 100% rename from modules/home-manager/sway-laptop.nix rename to nix/modules/home-manager/sway-laptop.nix diff --git a/modules/home-manager/sway.nix b/nix/modules/home-manager/sway.nix similarity index 100% rename from modules/home-manager/sway.nix rename to nix/modules/home-manager/sway.nix diff --git a/modules/home-manager/swaylock.nix b/nix/modules/home-manager/swaylock.nix similarity index 100% rename from modules/home-manager/swaylock.nix rename to nix/modules/home-manager/swaylock.nix diff --git a/modules/home-manager/waybar.nix b/nix/modules/home-manager/waybar.nix similarity index 100% rename from modules/home-manager/waybar.nix rename to nix/modules/home-manager/waybar.nix diff --git a/modules/home-manager/wezterm/colors/catppuccin-mocha-sapphire.toml b/nix/modules/home-manager/wezterm/colors/catppuccin-mocha-sapphire.toml similarity index 100% rename from modules/home-manager/wezterm/colors/catppuccin-mocha-sapphire.toml rename to nix/modules/home-manager/wezterm/colors/catppuccin-mocha-sapphire.toml diff --git a/modules/home-manager/wezterm/wezterm.lua b/nix/modules/home-manager/wezterm/wezterm.lua similarity index 100% rename from modules/home-manager/wezterm/wezterm.lua rename to nix/modules/home-manager/wezterm/wezterm.lua diff --git a/modules/nixos/conduwuit.nix b/nix/modules/nixos/conduwuit.nix similarity index 100% rename from modules/nixos/conduwuit.nix rename to nix/modules/nixos/conduwuit.nix diff --git a/modules/nixos/default.nix b/nix/modules/nixos/default.nix similarity index 100% rename from modules/nixos/default.nix rename to nix/modules/nixos/default.nix diff --git a/modules/nixos/deno-netlify-ddns-client.nix b/nix/modules/nixos/deno-netlify-ddns-client.nix similarity index 100% rename from modules/nixos/deno-netlify-ddns-client.nix rename to nix/modules/nixos/deno-netlify-ddns-client.nix diff --git a/modules/nixos/gnome.nix b/nix/modules/nixos/gnome.nix similarity index 100% rename from modules/nixos/gnome.nix rename to nix/modules/nixos/gnome.nix diff --git a/nixos/base.nix b/nix/nixos/base.nix similarity index 100% rename from nixos/base.nix rename to nix/nixos/base.nix diff --git a/nixos/beefcake.nix b/nix/nixos/beefcake.nix similarity index 100% rename from nixos/beefcake.nix rename to nix/nixos/beefcake.nix diff --git a/nixos/bigtower.nix b/nix/nixos/bigtower.nix similarity index 100% rename from nixos/bigtower.nix rename to nix/nixos/bigtower.nix diff --git a/nixos/dragon.nix b/nix/nixos/dragon.nix similarity index 100% rename from nixos/dragon.nix rename to nix/nixos/dragon.nix diff --git a/nixos/factorio-versions.json b/nix/nixos/factorio-versions.json similarity index 100% rename from nixos/factorio-versions.json rename to nix/nixos/factorio-versions.json diff --git a/nixos/foxtrot.nix b/nix/nixos/foxtrot.nix similarity index 100% rename from nixos/foxtrot.nix rename to nix/nixos/foxtrot.nix diff --git a/nixos/htpc.nix b/nix/nixos/htpc.nix similarity index 100% rename from nixos/htpc.nix rename to nix/nixos/htpc.nix diff --git a/nixos/htpifour.nix b/nix/nixos/htpifour.nix similarity index 100% rename from nixos/htpifour.nix rename to nix/nixos/htpifour.nix diff --git a/nixos/rascal.nix b/nix/nixos/rascal.nix similarity index 100% rename from nixos/rascal.nix rename to nix/nixos/rascal.nix diff --git a/nixos/router.nix b/nix/nixos/router.nix similarity index 100% rename from nixos/router.nix rename to nix/nixos/router.nix diff --git a/nixos/thablet.nix b/nix/nixos/thablet.nix similarity index 100% rename from nixos/thablet.nix rename to nix/nixos/thablet.nix diff --git a/nixos/thinker.nix b/nix/nixos/thinker.nix similarity index 100% rename from nixos/thinker.nix rename to nix/nixos/thinker.nix diff --git a/overlays/default.nix b/nix/overlays/default.nix similarity index 100% rename from overlays/default.nix rename to nix/overlays/default.nix diff --git a/packages/bitwarden.json b/nix/packages/bitwarden.json similarity index 100% rename from packages/bitwarden.json rename to nix/packages/bitwarden.json diff --git a/packages/default.nix b/nix/packages/default.nix similarity index 100% rename from packages/default.nix rename to nix/packages/default.nix diff --git a/packages/iosevkaLyteTerm.nix b/nix/packages/iosevkaLyteTerm.nix similarity index 100% rename from packages/iosevkaLyteTerm.nix rename to nix/packages/iosevkaLyteTerm.nix diff --git a/packages/iosevkaLyteTermSubset.nix b/nix/packages/iosevkaLyteTermSubset.nix similarity index 100% rename from packages/iosevkaLyteTermSubset.nix rename to nix/packages/iosevkaLyteTermSubset.nix diff --git a/templates/.gitignore b/nix/templates/.gitignore similarity index 100% rename from templates/.gitignore rename to nix/templates/.gitignore diff --git a/templates/default.nix b/nix/templates/default.nix similarity index 100% rename from templates/default.nix rename to nix/templates/default.nix diff --git a/templates/deno/.envrc b/nix/templates/deno/.envrc similarity index 100% rename from templates/deno/.envrc rename to nix/templates/deno/.envrc diff --git a/templates/deno/.gitignore b/nix/templates/deno/.gitignore similarity index 100% rename from templates/deno/.gitignore rename to nix/templates/deno/.gitignore diff --git a/templates/deno/.helix/languages.toml b/nix/templates/deno/.helix/languages.toml similarity index 100% rename from templates/deno/.helix/languages.toml rename to nix/templates/deno/.helix/languages.toml diff --git a/templates/deno/deno.json b/nix/templates/deno/deno.json similarity index 100% rename from templates/deno/deno.json rename to nix/templates/deno/deno.json diff --git a/templates/deno/flake.nix b/nix/templates/deno/flake.nix similarity index 100% rename from templates/deno/flake.nix rename to nix/templates/deno/flake.nix diff --git a/templates/deno/mod.ts b/nix/templates/deno/mod.ts similarity index 100% rename from templates/deno/mod.ts rename to nix/templates/deno/mod.ts diff --git a/templates/elixir/.envrc b/nix/templates/elixir/.envrc similarity index 100% rename from templates/elixir/.envrc rename to nix/templates/elixir/.envrc diff --git a/templates/elixir/.gitignore b/nix/templates/elixir/.gitignore similarity index 100% rename from templates/elixir/.gitignore rename to nix/templates/elixir/.gitignore diff --git a/templates/elixir/flake.nix b/nix/templates/elixir/flake.nix similarity index 100% rename from templates/elixir/flake.nix rename to nix/templates/elixir/flake.nix diff --git a/templates/elixir/nix/boilerplate.nix b/nix/templates/elixir/nix/boilerplate.nix similarity index 100% rename from templates/elixir/nix/boilerplate.nix rename to nix/templates/elixir/nix/boilerplate.nix diff --git a/templates/elixir/nix/checks.nix b/nix/templates/elixir/nix/checks.nix similarity index 100% rename from templates/elixir/nix/checks.nix rename to nix/templates/elixir/nix/checks.nix diff --git a/templates/elixir/nix/overlays.nix b/nix/templates/elixir/nix/overlays.nix similarity index 100% rename from templates/elixir/nix/overlays.nix rename to nix/templates/elixir/nix/overlays.nix diff --git a/templates/elixir/nix/packages.nix b/nix/templates/elixir/nix/packages.nix similarity index 100% rename from templates/elixir/nix/packages.nix rename to nix/templates/elixir/nix/packages.nix diff --git a/templates/elixir/nix/shells.nix b/nix/templates/elixir/nix/shells.nix similarity index 100% rename from templates/elixir/nix/shells.nix rename to nix/templates/elixir/nix/shells.nix diff --git a/templates/gleam/.envrc b/nix/templates/gleam/.envrc similarity index 100% rename from templates/gleam/.envrc rename to nix/templates/gleam/.envrc diff --git a/templates/gleam/.gitignore.flake b/nix/templates/gleam/.gitignore.flake similarity index 100% rename from templates/gleam/.gitignore.flake rename to nix/templates/gleam/.gitignore.flake diff --git a/templates/gleam/flake.nix b/nix/templates/gleam/flake.nix similarity index 100% rename from templates/gleam/flake.nix rename to nix/templates/gleam/flake.nix diff --git a/templates/godot/.envrc b/nix/templates/godot/.envrc similarity index 100% rename from templates/godot/.envrc rename to nix/templates/godot/.envrc diff --git a/templates/godot/.gitignore b/nix/templates/godot/.gitignore similarity index 100% rename from templates/godot/.gitignore rename to nix/templates/godot/.gitignore diff --git a/templates/godot/.helix/languages.toml b/nix/templates/godot/.helix/languages.toml similarity index 100% rename from templates/godot/.helix/languages.toml rename to nix/templates/godot/.helix/languages.toml diff --git a/templates/godot/flake.nix b/nix/templates/godot/flake.nix similarity index 100% rename from templates/godot/flake.nix rename to nix/templates/godot/flake.nix diff --git a/templates/nim/.envrc b/nix/templates/nim/.envrc similarity index 100% rename from templates/nim/.envrc rename to nix/templates/nim/.envrc diff --git a/templates/nim/.gitignore b/nix/templates/nim/.gitignore similarity index 100% rename from templates/nim/.gitignore rename to nix/templates/nim/.gitignore diff --git a/templates/nim/flake.nix b/nix/templates/nim/flake.nix similarity index 100% rename from templates/nim/flake.nix rename to nix/templates/nim/flake.nix diff --git a/templates/nix-flake/.envrc b/nix/templates/nix-flake/.envrc similarity index 100% rename from templates/nix-flake/.envrc rename to nix/templates/nix-flake/.envrc diff --git a/templates/nix-flake/.gitignore b/nix/templates/nix-flake/.gitignore similarity index 100% rename from templates/nix-flake/.gitignore rename to nix/templates/nix-flake/.gitignore diff --git a/templates/nix-flake/.helix/languages.toml b/nix/templates/nix-flake/.helix/languages.toml similarity index 100% rename from templates/nix-flake/.helix/languages.toml rename to nix/templates/nix-flake/.helix/languages.toml diff --git a/templates/nix-flake/flake.nix b/nix/templates/nix-flake/flake.nix similarity index 100% rename from templates/nix-flake/flake.nix rename to nix/templates/nix-flake/flake.nix diff --git a/templates/rust/.envrc b/nix/templates/rust/.envrc similarity index 100% rename from templates/rust/.envrc rename to nix/templates/rust/.envrc diff --git a/templates/rust/.gitignore b/nix/templates/rust/.gitignore similarity index 100% rename from templates/rust/.gitignore rename to nix/templates/rust/.gitignore diff --git a/templates/rust/flake.nix b/nix/templates/rust/flake.nix similarity index 100% rename from templates/rust/flake.nix rename to nix/templates/rust/flake.nix diff --git a/templates/rust/nix/boilerplate.nix b/nix/templates/rust/nix/boilerplate.nix similarity index 100% rename from templates/rust/nix/boilerplate.nix rename to nix/templates/rust/nix/boilerplate.nix diff --git a/templates/rust/nix/checks.nix b/nix/templates/rust/nix/checks.nix similarity index 100% rename from templates/rust/nix/checks.nix rename to nix/templates/rust/nix/checks.nix diff --git a/templates/rust/nix/packages.nix b/nix/templates/rust/nix/packages.nix similarity index 100% rename from templates/rust/nix/packages.nix rename to nix/templates/rust/nix/packages.nix diff --git a/templates/rust/nix/shells.nix b/nix/templates/rust/nix/shells.nix similarity index 100% rename from templates/rust/nix/shells.nix rename to nix/templates/rust/nix/shells.nix diff --git a/safe-remote-upgrade.bash b/safe-remote-upgrade.bash deleted file mode 100755 index 530ca3d..0000000 --- a/safe-remote-upgrade.bash +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/env bash - -usage() { - echo 'usage' - echo ' safe-remote-upgrade.bash $FLAKE_REF $TARGET_HOST' -} - -error() { - echo "error: $1" - usage -} - -if [[ -z $1 ]]; then - echo "error: no flake specified" - usage - exit 1 -fi -flake="$1"; shift - -if [[ -z $1 ]]; then - echo "error: no target host specified" - usage - exit 1 -fi -target_host="$1"; shift - -set -eu - -git add -A - -ssh "root@$target_host" "bash -c ' - set -m - # sleep 15 mins - echo \"Starting background reboot job...\" - (sleep 900; reboot;) & - jobs -p - disown -'" & - -nix run nixpkgs#nixos-rebuild -- --flake "$flake" \ - --target-host "root@$target_host" test --show-trace - -echo "Upgrade ready for verification. If you still have SSH access you can bail out without waiting with the following command:" -echo " ssh 'root@$target_host' nixos-rebuild --rollback switch" -echo -echo "Waiting..." -wait -echo 'Done!' -