diff options
| author | seth <[email protected]> | 2024-10-18 03:10:35 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-10-18 07:10:35 +0000 |
| commit | e6f79b30e620cf7bd5b06e2579e979ff090e925a (patch) | |
| tree | 1dd2b20126602ef448f77fbb9cdd44ba7f02a58c | |
| parent | fdaf8680ef5bbcadb7cece43911beff18f90cdb2 (diff) | |
more refactors & outsource some things (#477)
* tree-wide: drop flake-parts
* drop nixinate
* justfile: cleanup
* drop treefmt-nix
* doc: update READMEs
* flake: cleanup
* seth: don't use `./.`
* modules/nixos,darwin: bundle all modules
They all depend on each other anyways so
* systems: manually import internal modules
* seth: use riff module from nix-exprs
* flake: back to flake-parts
* Revert "flake: back to flake-parts"
This reverts commit 35334882f7c0c23991a4efd65ea08b216006b2b0.
Saving the last commit so I can go back if I want
* flake: use lib.const
this looks better...right?
* flake: declare systems like a normal person
| -rw-r--r-- | .envrc | 1 | ||||
| -rw-r--r-- | README.md | 21 | ||||
| -rw-r--r-- | dev/README.md | 15 | ||||
| -rw-r--r-- | dev/default.nix | 7 | ||||
| -rw-r--r-- | dev/dev-shells.nix | 43 | ||||
| -rw-r--r-- | dev/hydra-jobs.nix | 50 | ||||
| -rw-r--r-- | dev/treefmt.nix | 19 | ||||
| -rw-r--r-- | ext/README.md | 11 | ||||
| -rw-r--r-- | ext/default.nix | 6 | ||||
| -rw-r--r-- | ext/openwrt.nix | 57 | ||||
| -rw-r--r-- | ext/terranix/default.nix | 43 | ||||
| -rw-r--r-- | flake.lock | 71 | ||||
| -rw-r--r-- | flake.nix | 252 | ||||
| -rw-r--r-- | justfile | 22 | ||||
| -rw-r--r-- | lib/README.md | 5 | ||||
| -rw-r--r-- | lib/builders.nix | 66 | ||||
| -rw-r--r-- | lib/default.nix | 10 | ||||
| -rw-r--r-- | lib/nginx.nix | 3 | ||||
| -rw-r--r-- | modules/darwin/base/default.nix | 1 | ||||
| -rw-r--r-- | modules/darwin/default.nix | 13 | ||||
| -rw-r--r-- | modules/default.nix | 8 | ||||
| -rw-r--r-- | modules/flake/default.nix | 12 | ||||
| -rw-r--r-- | modules/flake/map-configs.nix | 191 | ||||
| -rw-r--r-- | modules/home/default.nix | 5 | ||||
| -rw-r--r-- | modules/home/riff.nix | 49 | ||||
| -rw-r--r-- | modules/nixos/archetypes/personal.nix | 7 | ||||
| -rw-r--r-- | modules/nixos/archetypes/server.nix | 7 | ||||
| -rw-r--r-- | modules/nixos/base/default.nix | 1 | ||||
| -rw-r--r-- | modules/nixos/default.nix | 15 | ||||
| -rw-r--r-- | modules/nixos/traits/locale.nix | 4 | ||||
| -rw-r--r-- | modules/shared/traits/locale.nix | 4 | ||||
| -rw-r--r-- | openwrt/README.md | 5 | ||||
| -rw-r--r-- | openwrt/turret.nix | 32 | ||||
| -rw-r--r-- | systems/README.md | 12 | ||||
| -rw-r--r-- | systems/atlas/default.nix | 12 | ||||
| -rw-r--r-- | systems/caroline/default.nix | 6 | ||||
| -rw-r--r-- | systems/darwin.nix | 7 | ||||
| -rw-r--r-- | systems/default.nix | 7 | ||||
| -rw-r--r-- | systems/glados-wsl/default.nix | 5 | ||||
| -rw-r--r-- | systems/glados/default.nix | 4 | ||||
| -rw-r--r-- | systems/nixinate.nix | 12 | ||||
| -rw-r--r-- | systems/nixos.nix | 17 | ||||
| -rw-r--r-- | terranix/README.md | 21 | ||||
| -rw-r--r-- | terranix/cloud.nix (renamed from ext/terranix/cloud.nix) | 0 | ||||
| -rw-r--r-- | terranix/cloudflare/default.nix (renamed from ext/terranix/cloudflare/default.nix) | 0 | ||||
| -rw-r--r-- | terranix/cloudflare/dns.nix (renamed from ext/terranix/cloudflare/dns.nix) | 0 | ||||
| -rw-r--r-- | terranix/cloudflare/pages_domains.nix (renamed from ext/terranix/cloudflare/pages_domains.nix) | 0 | ||||
| -rw-r--r-- | terranix/cloudflare/pages_projects.nix (renamed from ext/terranix/cloudflare/pages_projects.nix) | 0 | ||||
| -rw-r--r-- | terranix/cloudflare/ruleset.nix (renamed from ext/terranix/cloudflare/ruleset.nix) | 0 | ||||
| -rw-r--r-- | terranix/cloudflare/tls.nix (renamed from ext/terranix/cloudflare/tls.nix) | 0 | ||||
| -rw-r--r-- | terranix/cloudflare/tunnels.nix (renamed from ext/terranix/cloudflare/tunnels.nix) | 0 | ||||
| -rw-r--r-- | terranix/default.nix | 9 | ||||
| -rw-r--r-- | terranix/tailscale/acl.nix (renamed from ext/terranix/tailscale/acl.nix) | 0 | ||||
| -rw-r--r-- | terranix/tailscale/default.nix (renamed from ext/terranix/tailscale/default.nix) | 0 | ||||
| -rw-r--r-- | terranix/tailscale/devices.nix (renamed from ext/terranix/tailscale/devices.nix) | 0 | ||||
| -rw-r--r-- | terranix/tailscale/dns.nix (renamed from ext/terranix/tailscale/dns.nix) | 0 | ||||
| -rw-r--r-- | terranix/tailscale/tags.nix (renamed from ext/terranix/tailscale/tags.nix) | 0 | ||||
| -rw-r--r-- | terranix/vars.nix (renamed from ext/terranix/vars.nix) | 0 | ||||
| -rw-r--r-- | terranix/versions.nix (renamed from ext/terranix/versions.nix) | 0 | ||||
| -rw-r--r-- | users/default.nix | 7 | ||||
| -rw-r--r-- | users/seth/home.nix | 2 | ||||
| -rw-r--r-- | users/seth/programs/git.nix | 2 |
62 files changed, 467 insertions, 712 deletions
@@ -1,5 +1,4 @@ if has nix_direnv_version; then - watch_file dev/dev-shells.nix use flake fi @@ -14,10 +14,6 @@ greasy taco i love </div> -## dev/ - -Tools that help me make and maintain everything - ## lib/ Small functions I like to use around here @@ -27,20 +23,29 @@ Small functions I like to use around here Sets of modules meant for NixOS and [nix-darwin](https://github.com/LnL7/nix-darwin) +## openwrt/ + +Configurations for +[nix-openwrt-imagebuilder](https://github.com/astro/nix-openwrt-imagebuilder) + ## secrets/ Configuration secrets managed by the wonderful [agenix](https://github.com/ryantm/agenix) +## systems/ + +My NixOS and nix-darwin system configurations + +## terranix/ + +Personal infrastructure defined with [terranix](https://terranix.org/) + ## users/ Home of my [home-manager](https://nix-community.github.io/home-manager/) user configurations -## ext/ - -External, not so nix-y things - ## .envrc My [nix-direnv](https://github.com/nix-community/nix-direnv) configuration diff --git a/dev/README.md b/dev/README.md deleted file mode 100644 index 58d8360..0000000 --- a/dev/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# ./dev/ - -## dev-shells.nix - -A misnomer - this only contains one shell - -## hydra-jobs.nix - -Jobs I want to run in CI. Currently built by -[`nix-fast-build`](https://github.com/Mic92/nix-fast-build) - -## treefmt.nix - -[treefmt](https://github.com/numtide/treefmt) configuration via -[treefmt-nix](https://github.com/numtide/treefmt-nix) diff --git a/dev/default.nix b/dev/default.nix deleted file mode 100644 index e74789e..0000000 --- a/dev/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ - imports = [ - ./dev-shells.nix - ./hydra-jobs.nix - ./treefmt.nix - ]; -} diff --git a/dev/dev-shells.nix b/dev/dev-shells.nix deleted file mode 100644 index 9461970..0000000 --- a/dev/dev-shells.nix +++ /dev/null @@ -1,43 +0,0 @@ -{ - perSystem = - { - lib, - pkgs, - inputs', - self', - ... - }: - let - nixos-rebuild = pkgs.nixos-rebuild.override { nix = pkgs.lix; }; - darwin-rebuild = inputs'.nix-darwin.packages.darwin-rebuild.override { nix = pkgs.lix; }; - in - { - devShells.default = pkgs.mkShellNoCC { - packages = - [ - # we want to make sure we have the same - # nix behavior across machines - pkgs.lix - - # format + lint - pkgs.actionlint - self'.formatter - pkgs.nixfmt-rfc-style - pkgs.nil - pkgs.statix - - # utils - pkgs.fzf # for just - pkgs.just - - # terranix - self'.packages.opentofu - ] - ++ lib.optional pkgs.stdenv.isDarwin darwin-rebuild # see above comment about {l,n}ix - ++ lib.optionals pkgs.stdenv.isLinux [ - nixos-rebuild # ditto - inputs'.agenix.packages.agenix - ]; - }; - }; -} diff --git a/dev/hydra-jobs.nix b/dev/hydra-jobs.nix deleted file mode 100644 index 7b55f57..0000000 --- a/dev/hydra-jobs.nix +++ /dev/null @@ -1,50 +0,0 @@ -{ - lib, - self, - withSystem, - ... -}: -let - # architecture of "main" CI machine - ciSystem = "x86_64-linux"; - - /** - Map a NixOS, nix-darwin, or home-manager configuration to a final derivation - - # Type - - ``` - derivFromCfg :: AttrSet -> Attrset - ``` - */ - derivFromCfg = deriv: deriv.config.system.build.toplevel or deriv.activationPackage; - - /** - Map an attribute set of NixOS, nix-darwin, or home-manager configurations to their final derivation - - # Type - - ``` - mapCfgsToDerivs :: AttrSet -> Attrset - ``` - */ - mapCfgsToDerivs = lib.mapAttrs (lib.const derivFromCfg); -in -{ - flake.hydraJobs = withSystem ciSystem ( - { pkgs, self', ... }: - { - # i don't care to run these for each system, as they should be the same - # and don't need to be cached - inherit (self') checks; - inherit (self') devShells; - - darwinConfigurations = mapCfgsToDerivs self.darwinConfigurations; - homeConfigurations = mapCfgsToDerivs self.homeConfigurations; - nixosConfigurations = mapCfgsToDerivs self.nixosConfigurations // { - # please add aarch64 runners github...please... - atlas = lib.deepSeq (derivFromCfg self.nixosConfigurations.atlas).drvPath pkgs.emptyFile; - }; - } - ); -} diff --git a/dev/treefmt.nix b/dev/treefmt.nix deleted file mode 100644 index f18b391..0000000 --- a/dev/treefmt.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ inputs, ... }: -{ - imports = [ inputs.treefmt-nix.flakeModule ]; - - perSystem = { - treefmt = { - projectRootFile = ".git/config"; - - # TODO: add actionlint - # https://github.com/numtide/treefmt-nix/pull/146 - programs = { - deadnix.enable = true; - just.enable = true; - nixfmt.enable = true; - statix.enable = true; - }; - }; - }; -} diff --git a/ext/README.md b/ext/README.md deleted file mode 100644 index 58cd24e..0000000 --- a/ext/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# ./ext/ - -## openwrt.nix - -[OpenWrt](https://openwrt.org/) images generated via -[nix-openwrt-imagebuilder](https://github.com/astro/nix-openwrt-imagebuilder) - -## terranix/ - -[Terranix](https://terranix.org/index.html) configuration deployed via -[OpenTofu](https://opentofu.org/) diff --git a/ext/default.nix b/ext/default.nix deleted file mode 100644 index cbb1ecf..0000000 --- a/ext/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ - imports = [ - ./openwrt.nix - ./terranix - ]; -} diff --git a/ext/openwrt.nix b/ext/openwrt.nix deleted file mode 100644 index 8b39358..0000000 --- a/ext/openwrt.nix +++ /dev/null @@ -1,57 +0,0 @@ -{ - lib, - inputs, - withSystem, - ... -}: -let - pkgs = withSystem "x86_64-linux" ({ pkgs, ... }: pkgs); - - profileFromRelease = - release: (inputs.openwrt-imagebuilder.lib.profiles { inherit pkgs release; }).identifyProfile; - - mkImage = - { profile, ... }@args: - inputs.openwrt-imagebuilder.lib.build ( - profileFromRelease args.release profile - // builtins.removeAttrs args [ - "profile" - "release" - ] - ); - - mapImages = lib.mapAttrs (lib.const mkImage); -in -{ - flake.legacyPackages.x86_64-linux = { - openWrtImages = mapImages { - turret = { - release = "23.05.0"; - profile = "netgear_wac104"; - - files = pkgs.runCommand "image-files" { } '' - mkdir -p $out/etc/uci-defaults - - cat > $out/etc/uci-defaults/99-custom << EOF - uci -q batch << EOI - set system.@system[0].hostname="turret" - del_list network.@device[0].ports="lan4" - set network.wan="interface" - set network.wan.device="lan4" - set network.wan.proto="dhcp" - set wireless.default_radio0.ssid="Box-2.4G" - set wireless.default_radio0.encryption="psk2" - set wireless.default_radio0.key="CorrectHorseBatteryStaple" - set wireless.default_radio1.ssid="Box-5G" - set wireless.default_radio1.encryption="psk2" - set wireless.default_radio1.key="CorrectHorseBatteryStaple" - add_list dhcp.@dnsmasq[0].server="1.1.1.1" - add_list dhcp.@dnsmasq[0].server="1.0.0.1" - commit - EOI - EOF - ''; - }; - }; - }; -} diff --git a/ext/terranix/default.nix b/ext/terranix/default.nix deleted file mode 100644 index 72f75ad..0000000 --- a/ext/terranix/default.nix +++ /dev/null @@ -1,43 +0,0 @@ -{ inputs, ... }: -{ - perSystem = - { - lib, - pkgs, - self', - system, - ... - }: - let - inherit (self'.packages) opentofu; - - terranix = inputs.terranix.lib.terranixConfiguration { - inherit system; - modules = [ - ./cloudflare - ./tailscale - ./cloud.nix - ./vars.nix - ./versions.nix - ]; - }; - in - { - apps = { - tf = { - type = "app"; - program = lib.getExe ( - pkgs.writeShellScriptBin "tf" '' - ln -sf ${terranix} config.tf.json - exec ${lib.getExe opentofu} "$@" - '' - ); - }; - }; - - packages.opentofu = pkgs.opentofu.withPlugins (plugins: [ - plugins.cloudflare - plugins.tailscale - ]); - }; -} @@ -118,6 +118,7 @@ "flake-parts": { "inputs": { "nixpkgs-lib": [ + "lanzaboote", "nixpkgs" ] }, @@ -218,9 +219,7 @@ "inputs": { "crane": "crane", "flake-compat": [], - "flake-parts": [ - "flake-parts" - ], + "flake-parts": "flake-parts", "nixpkgs": [ "nixpkgs" ], @@ -261,6 +260,26 @@ "type": "github" } }, + "nix-exprs": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1729190201, + "narHash": "sha256-1uergzyLXTHrOLfRbsAx6eE8IlBt0bVO6vNS2TSzrS4=", + "owner": "getchoo", + "repo": "nix-exprs", + "rev": "ad6b2e0573c60f9fd8248bc5856b227f11eb86c7", + "type": "github" + }, + "original": { + "owner": "getchoo", + "repo": "nix-exprs", + "type": "github" + } + }, "nix-filter": { "locked": { "lastModified": 1710156097, @@ -296,26 +315,6 @@ "type": "github" } }, - "nixinate": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1708891350, - "narHash": "sha256-VOQrKK7Df/IVuNki+NshVuGkTa/Tw0GigPjWcZff6kk=", - "owner": "MatthewCroughan", - "repo": "nixinate", - "rev": "452f33c60df5b72ad0858f5f2cf224bdf1f17746", - "type": "github" - }, - "original": { - "owner": "MatthewCroughan", - "repo": "nixinate", - "type": "github" - } - }, "nixos-wsl": { "inputs": { "flake-compat": [], @@ -418,22 +417,20 @@ "arkenfox": "arkenfox", "catppuccin": "catppuccin", "firefox-addons": "firefox-addons", - "flake-parts": "flake-parts", "getchvim": "getchvim", "home-manager": "home-manager", "krunner-nix": "krunner-nix", "lanzaboote": "lanzaboote", "nix-darwin": "nix-darwin", + "nix-exprs": "nix-exprs", "nix-index-database": "nix-index-database", - "nixinate": "nixinate", "nixos-wsl": "nixos-wsl", "nixpkgs": "nixpkgs", "nixpkgs-stable": "nixpkgs-stable", "nixpkgs-tracker-bot": "nixpkgs-tracker-bot", "openwrt-imagebuilder": "openwrt-imagebuilder", "teawiebot": "teawiebot", - "terranix": "terranix", - "treefmt-nix": "treefmt-nix" + "terranix": "terranix" } }, "rust-overlay": { @@ -520,26 +517,6 @@ "type": "github" } }, - "treefmt-nix": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1727984844, - "narHash": "sha256-xpRqITAoD8rHlXQafYZOLvUXCF6cnZkPfoq67ThN0Hc=", - "owner": "numtide", - "repo": "treefmt-nix", - "rev": "4446c7a6fc0775df028c5a3f6727945ba8400e64", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "treefmt-nix", - "type": "github" - } - }, "vim-tera": { "flake": false, "locked": { @@ -1,5 +1,5 @@ { - description = "getchoo's flake for system configurations"; + description = "Getchoo's Flake for system configurations"; nixConfig = { extra-substituters = [ "https://getchoo.cachix.org" ]; @@ -7,8 +7,16 @@ }; outputs = - inputs: - inputs.flake-parts.lib.mkFlake { inherit inputs; } { + { self, nixpkgs, ... }@inputs: + let + inherit (nixpkgs) lib; + inherit (self.lib.builders) + darwinSystem + homeManagerConfiguration + nixosSystem + mkModule + ; + systems = [ "x86_64-linux" "aarch64-linux" @@ -16,30 +24,232 @@ "aarch64-darwin" ]; - imports = [ - ./dev - ./lib - ./modules - ./systems - ./users + forAllSystems = lib.genAttrs systems; + nixpkgsFor = nixpkgs.legacyPackages; + in + { + apps = forAllSystems ( + system: + let + pkgs = nixpkgsFor.${system}; - ./ext - ]; + opentofu = pkgs.opentofu.withPlugins (plugins: [ + plugins.cloudflare + plugins.tailscale + ]); + + terranix = inputs.terranix.lib.terranixConfiguration { + inherit system; + modules = [ ./terranix ]; + }; + in + { + tf = { + type = "app"; + program = lib.getExe ( + pkgs.writeShellScriptBin "tf" '' + ln -sf ${terranix} config.tf.json + exec ${lib.getExe opentofu} "$@" + '' + ); + }; + } + ); + + checks = forAllSystems ( + system: + let + pkgs = nixpkgsFor.${system}; + + mkCheck = + { + name, + deps ? [ ], + script, + }: + pkgs.runCommand name { nativeBuildInputs = deps; } '' + ${script} + touch $out + ''; + in + { + actionlint = mkCheck { + name = "check-actionlint"; + deps = [ pkgs.actionlint ]; + script = "actionlint ${self}/.github/workflows/**"; + }; + + deadnix = mkCheck { + name = "check-deadnix"; + deps = [ pkgs.deadnix ]; + script = "deadnix --fail ${self}"; + }; + + just = mkCheck { + name = "check-just"; + deps = [ pkgs.just ]; + script = '' + cd ${self} + just --check --fmt --unstable + just --summary + ''; + }; + + nixfmt = mkCheck { + name = "check-nixfmt"; + deps = [ pkgs.nixfmt-rfc-style ]; + script = "nixfmt --check ${self}"; + }; + + statix = mkCheck { + name = "check-statix"; + deps = [ pkgs.statix ]; + script = "statix check ${self}"; + }; + } + ); + + devShells = forAllSystems ( + system: + let + pkgs = nixpkgsFor.${system}; + nixos-rebuild = pkgs.nixos-rebuild.override { nix = pkgs.lix; }; + inherit (inputs.nix-darwin.packages.${system}) darwin-rebuild; + in + { + default = pkgs.mkShellNoCC { + packages = + [ + # For CI + pkgs.actionlint + + # Nix tools + pkgs.nil + pkgs.statix + self.formatter.${system} + + pkgs.just + ] + ++ lib.optional pkgs.stdenv.isDarwin darwin-rebuild # See next comment + ++ lib.optionals pkgs.stdenv.isLinux [ + # We want to make sure we have the same + # Nix behavior across machines + pkgs.lix + + # Ditto + nixos-rebuild + + inputs.agenix.packages.${system}.agenix + ]; + }; + } + ); + + lib = import ./lib { inherit lib inputs self; }; + + formatter = forAllSystems (system: nixpkgsFor.${system}.nixfmt-rfc-style); + + darwinModules = { + default = mkModule { + name = "default"; + type = "darwin"; + imports = [ ./modules/darwin ]; + }; + }; + + nixosModules = { + default = mkModule { + name = "default"; + type = "nixos"; + imports = [ ./modules/nixos ]; + }; + }; + + darwinConfigurations = lib.mapAttrs (lib.const darwinSystem) { + caroline = { + modules = [ ./systems/caroline ]; + }; + }; + + homeConfigurations = lib.mapAttrs (lib.const homeManagerConfiguration) { + seth = { + modules = [ ./users/seth/home.nix ]; + pkgs = nixpkgsFor.x86_64-linux; + }; + }; + + nixosConfigurations = lib.mapAttrs (lib.const nixosSystem) { + glados = { + modules = [ ./systems/glados ]; + }; + + glados-wsl = { + modules = [ ./systems/glados-wsl ]; + }; + + atlas = { + nixpkgs = inputs.nixpkgs-stable; + modules = [ ./systems/atlas ]; + }; + }; + + legacyPackages.x86_64-linux = + let + pkgs = nixpkgsFor.x86_64-linux; + + openwrtTools = lib.makeScope pkgs.newScope (final: { + profileFromRelease = + release: (inputs.openwrt-imagebuilder.lib.profiles { inherit pkgs release; }).identifyProfile; + + buildOpenWrtImage = + { profile, ... }@args: + inputs.openwrt-imagebuilder.lib.build ( + final.profileFromRelease args.release profile + // builtins.removeAttrs args [ + "profile" + "release" + ] + ); + }); + in + { + turret = openwrtTools.callPackage ./openwrt/turret.nix { }; + }; + + hydraJobs = + let + # Architecture of "main" CI machine + ciSystem = "x86_64-linux"; + + derivFromCfg = deriv: deriv.config.system.build.toplevel or deriv.activationPackage; + mapCfgsToDerivs = lib.mapAttrs (lib.const derivFromCfg); + + pkgs = nixpkgsFor.${ciSystem}; + in + { + # I don't care to run these for each system, as they should be the same + # and don't need to be cached + checks = self.checks.${ciSystem}; + devShells = self.devShells.${ciSystem}; + + darwinConfigurations = mapCfgsToDerivs self.darwinConfigurations; + homeConfigurations = mapCfgsToDerivs self.homeConfigurations; + nixosConfigurations = mapCfgsToDerivs self.nixosConfigurations // { + # please add aarch64 runners github...please... + atlas = lib.deepSeq (derivFromCfg self.nixosConfigurations.atlas).drvPath pkgs.emptyFile; + }; + }; }; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable-small"; nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-24.05"; + nix-darwin = { url = "github:LnL7/nix-darwin"; inputs.nixpkgs.follows = "nixpkgs"; }; - flake-parts = { - url = "github:hercules-ci/flake-parts"; - inputs.nixpkgs-lib.follows = "nixpkgs"; - }; - agenix = { url = "github:ryantm/agenix"; inputs = { @@ -90,13 +300,12 @@ inputs = { nixpkgs.follows = "nixpkgs"; flake-compat.follows = ""; - flake-parts.follows = "flake-parts"; pre-commit-hooks-nix.follows = ""; }; }; - nixinate = { - url = "github:MatthewCroughan/nixinate"; + nix-exprs = { + url = "github:getchoo/nix-exprs"; inputs.nixpkgs.follows = "nixpkgs"; }; @@ -144,10 +353,5 @@ bats-assert.follows = ""; }; }; - - treefmt-nix = { - url = "github:numtide/treefmt-nix"; - inputs.nixpkgs.follows = "nixpkgs"; - }; }; } @@ -1,12 +1,10 @@ alias b := build alias c := check -alias dr := dry-run alias sw := switch alias t := test alias u := update alias ui := update-input -rebuildArgs := "--verbose" rebuild := if os() == "macos" { "darwin-rebuild" } else { "nixos-rebuild" } default: @@ -14,14 +12,26 @@ default: [private] rebuild subcmd *extraArgs="": - {{ rebuild }} {{ subcmd }} {{ rebuildArgs }} --flake . {{ extraArgs }} + {{ rebuild }} \ + {{ subcmd }} \ + {{ extraArgs }} \ + --print-build-logs \ + --flake . + +remote-rebuild system subcmd *extraArgs="": + {{ rebuild }} \ + {{ subcmd }} \ + --build-host {{ system }} \ + --target-host {{ system }} \ + --use-remote-sudo \ + {{ extraArgs }} \ + --print-build-logs \ + --flake '.#{{ system }}' boot *extraArgs="": (rebuild "boot" extraArgs) build *extraArgs="": (rebuild "build" extraArgs) -dry-run *extraArgs="": (rebuild "dry-run" extraArgs) - switch *extraArgs="": (rebuild "switch" extraArgs) test *extraArgs="": (rebuild "test" extraArgs) @@ -51,4 +61,4 @@ update-input input: --commit-lockfile-summary "flake: update {{ input }}" deploy system: - nix run '.#{{ system }}' + @just remote-rebuild {{ system }} "switch" diff --git a/lib/README.md b/lib/README.md index 97814c5..ad2d3ae 100644 --- a/lib/README.md +++ b/lib/README.md @@ -1,5 +1,10 @@ # ./lib/ +## builders.nix + +Light wrappers around functions like `nixosSystem` and +`homeManagerConfiguration` + ## nginx.nix Small helpers to avoid boilerplate in the `services.nginx` module diff --git a/lib/builders.nix b/lib/builders.nix new file mode 100644 index 0000000..3cedb59 --- /dev/null +++ b/lib/builders.nix @@ -0,0 +1,66 @@ +{ + lib, + inputs, + self, + ... +}: +{ + nixosSystem = + { + nixpkgs ? inputs.nixpkgs, + specialArgs ? { }, + ... + }@args: + nixpkgs.lib.nixosSystem ( + lib.removeAttrs args [ "nixpkgs" ] + // { + specialArgs = specialArgs // { + inherit inputs; + }; + } + ); + + darwinSystem = + { + nix-darwin ? inputs.nix-darwin or inputs.darwin, + specialArgs ? { }, + ... + }@args: + nix-darwin.lib.darwinSystem ( + lib.removeAttrs args [ "nix-darwin" ] + // { + specialArgs = specialArgs // { + inherit inputs; + }; + } + ); + + homeManagerConfiguration = + { + extraSpecialArgs ? { }, + ... + }@args: + inputs.home-manager.lib.homeManagerConfiguration ( + args + // { + extraSpecialArgs = extraSpecialArgs // { + inherit inputs; + }; + } + ); + + mkModule = + { + name, + type, + imports, + }@args: + { + _file = "${self.outPath}/flake.nix#${type}Modules.${name}"; + inherit imports; + } + // lib.removeAttrs args [ + "name" + "type" + ]; +} diff --git a/lib/default.nix b/lib/default.nix index df8d9fb..96d0a9f 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -1,9 +1,11 @@ { lib, + inputs, + self, ... }: -{ - flake.lib = { - nginx = import ./nginx.nix lib; - }; + +lib.mapAttrs (_: file: import file { inherit lib inputs self; }) { + builders = ./builders.nix; + nginx = ./nginx.nix; } diff --git a/lib/nginx.nix b/lib/nginx.nix index c2c99fb..80eb6ad 100644 --- a/lib/nginx.nix +++ b/lib/nginx.nix @@ -1,4 +1,5 @@ -lib: { +{ lib, ... }: +{ /** Create an NGINX virtualHost submodule proxying a local port diff --git a/modules/darwin/base/default.nix b/modules/darwin/base/default.nix index e9ab743..7e6f3bd 100644 --- a/modules/darwin/base/default.nix +++ b/modules/darwin/base/default.nix @@ -4,7 +4,6 @@ let in { imports = [ - ../../shared ./programs.nix ]; diff --git a/modules/darwin/default.nix b/modules/darwin/default.nix index 97f25d5..e19f29a 100644 --- a/modules/darwin/default.nix +++ b/modules/darwin/default.nix @@ -1,8 +1,9 @@ { - flake.darwinModules = { - archetypes = ./archetypes; - base = ./base; - desktop = ./desktop; - traits = ./traits; - }; + imports = [ + ../shared + ./archetypes + ./base + ./desktop + ./traits + ]; } diff --git a/modules/default.nix b/modules/default.nix deleted file mode 100644 index a91a36b..0000000 --- a/modules/default.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ - imports = [ - ./darwin - ./home - ./nixos - ./flake - ]; -} diff --git a/modules/flake/default.nix b/modules/flake/default.nix deleted file mode 100644 index d06026d..0000000 --- a/modules/flake/default.nix +++ /dev/null @@ -1,12 +0,0 @@ -let - flakeModules = { - map-configs = ./map-configs.nix; - }; -in -{ - imports = [ flakeModules.map-configs ]; - - flake = { - inherit flakeModules; - }; -} diff --git a/modules/flake/map-configs.nix b/modules/flake/map-configs.nix deleted file mode 100644 index e7733f3..0000000 --- a/modules/flake/map-configs.nix +++ /dev/null @@ -1,191 +0,0 @@ -{ - config, - lib, - withSystem, - inputs, - self, - ... -}: -let - nixosSystem = - { - nixpkgs, - modules, - specialArgs, - ... - }@args: - nixpkgs.lib.nixosSystem ( - lib.removeAttrs args [ "nixpkgs" ] - // { - modules = modules ++ builtins.attrValues (self.nixosModules or [ ]); - specialArgs = specialArgs // { - inherit inputs; - }; - } - ); - - darwinSystem = - { - nix-darwin, - modules, - specialArgs, - ... - }@args: - nix-darwin.lib.darwinSystem ( - lib.removeAttrs args [ "nix-darwin" ] - // { - modules = modules ++ builtins.attrValues (self.darwinModules or { }); - specialArgs = specialArgs // { - inherit inputs; - }; - } - ); - - homeManagerConfiguration = - { - modules, - extraSpecialArgs, - ... - }@args: - inputs.home-manager.lib.homeManagerConfiguration ( - args - // { - modules = modules ++ builtins.attrValues (self.homeModules or self.homeManagerModules or { }); - extraSpecialArgs = extraSpecialArgs // { - inherit inputs; - }; - } - ); - - modulesOption = lib.mkOption { - type = lib.types.listOf lib.types.unspecified; - default = [ ]; - description = '' - List of modules to use in the configuration - ''; - }; - - specialArgsOption = lib.mkOption { - type = lib.types.lazyAttrsOf lib.types.raw; - default = { }; - description = '' - Extra arguments to pass to the configuration - ''; - }; - - freeformType = lib.types.attrsOf lib.types.raw; - - nixosConfigurationSubmodule = { - inherit freeformType; - - options = { - nixpkgs = lib.mkOption { - type = lib.types.lazyAttrsOf lib.types.raw; - default = inputs.nixpkgs or (throw "Could not find flake input `nixpkgs`"); - description = '' - Instance of nixpkgs to use `lib.nixosSystem` from - ''; - example = lib.literalExpression '' - inputs.nixpkgs-stable - ''; - }; - - modules = modulesOption; - specialArgs = specialArgsOption; - }; - }; - - homeConfigurationSubmodule = { - inherit freeformType; - - options = { - pkgs = lib.mkOption { - type = lib.types.lazyAttrsOf lib.types.raw; - default = withSystem "x86_64-linux" ({ pkgs, ... }: pkgs); - description = '' - Instance of nixpkgs to use with the configuration - ''; - example = lib.literalExpression '' - inputs.nixpkgs.legacyPackages.aarch64-darwin - ''; - }; - - modules = modulesOption; - extraSpecialArgs = specialArgsOption; - }; - }; - - darwinConfigurationSubmodule = { - inherit freeformType; - - options = { - nix-darwin = lib.mkOption { - type = lib.types.lazyAttrsOf lib.types.raw; - default = - inputs.nix-darwin or inputs.darwin - or (throw "Could not find flake input `nixpkgs` or `nix-darwin`"); - description = '' - Instance of nix-darwin to use `lib.nix-darwin` from - ''; - }; - - modules = modulesOption; - specialArgs = specialArgsOption; - }; - }; -in - -{ - options = { - nixosConfigurations = lib.mkOption { - type = lib.types.lazyAttrsOf (lib.types.submodule nixosConfigurationSubmodule); - default = { }; - apply = lib.mapAttrs (lib.const nixosSystem); - description = '' - Map of configuration names and arguments to `nixosSystem` - ''; - example = lib.literalExpression '' - { - my-machine = { modules = [ ./configuration.nix ]; }; - } - ''; - }; - - homeConfigurations = lib.mkOption { - type = lib.types.lazyAttrsOf (lib.types.submodule homeConfigurationSubmodule); - default = { }; - apply = lib.mapAttrs (lib.const homeManagerConfiguration); - description = '' - Map of configuration names and arguments to `homeManagerConfiguration` - ''; - example = lib.literalExpression '' - { - me = { pkgs = nixpkgs.legacyPackages.x86_64-linux; }; - } - ''; - }; - - darwinConfigurations = lib.mkOption { - type = lib.types.lazyAttrsOf (lib.types.submodule darwinConfigurationSubmodule); - default = { }; - apply = lib.mapAttrs (lib.const darwinSystem); - description = '' - Map of configuration names and arguments to `darwinSystem` - ''; - example = lib.literalExpression '' - { - my-mac = { modules = [ ./darwin-configuration.nix ]; }; - } - ''; - }; - }; - - config.flake = { - inherit (config) nixosConfigurations homeConfigurations darwinConfigurations; - /* - nixosConfigurations = lib.mapAttrs (lib.const nixosSystem) config.nixosConfigurations; - homeConfigurations = lib.mapAttrs (lib.const homeManagerConfiguration) config.homeConfigurations; - darwinConfigurations = lib.mapAttrs (lib.const darwinSystem) config.darwinConfigurations; - */ - }; -} diff --git a/modules/home/default.nix b/modules/home/default.nix deleted file mode 100644 index 408e172..0000000 --- a/modules/home/default.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - flake.homeModules = { - riff = ./riff.nix; - }; -} diff --git a/modules/home/riff.nix b/modules/home/riff.nix deleted file mode 100644 index 3a3e748..0000000 --- a/modules/home/riff.nix +++ /dev/null @@ -1,49 +0,0 @@ -# TODO: Upstream this -{ - config, - lib, - pkgs, - ... -}: -let - cfg = config.programs.git.riff; - cfg' = config.programs.git; - - exe = baseNameOf (lib.getExe cfg.package); -in -{ - options.programs.git.riff = { - enable = lib.mkEnableOption "diff filtering through riff"; - package = lib.mkPackageOption pkgs "riffdiff" { }; - }; - - config = lib.mkIf cfg.enable { - assertions = [ - { - assertion = - let - enabled = [ - cfg'.delta.enable - cfg'.diff-so-fancy.enable - cfg'.difftastic.enable - cfg.enable - ]; - in - lib.count lib.id enabled <= 1; - message = "Only one of 'programs.git.delta.enable' or 'programs.git.difftastic.enable' or 'programs.git.diff-so-fancy.enable' or `programs.git.riff.enable` can be set to true at the same time."; - } - ]; - - home.packages = [ cfg.package ]; - - programs.git.iniContent = { - pager = { - diff = exe; - log = exe; - show = exe; - }; - - interactive.diffFilter = exe + " --color=on"; - }; - }; -} diff --git a/modules/nixos/archetypes/personal.nix b/modules/nixos/archetypes/personal.nix index 1fa2f98..4200269 100644 --- a/modules/nixos/archetypes/personal.nix +++ b/modules/nixos/archetypes/personal.nix @@ -4,7 +4,7 @@ let in { options.archetypes = { - personal.enable = lib.mkEnableOption "the \"Personal\" archetype"; + personal.enable = lib.mkEnableOption "the Personal archetype"; }; config = lib.mkIf cfg.enable { @@ -13,11 +13,6 @@ in traits = { home-manager.enable = true; - locale = { - en_US.enable = true; - US-east.enable = true; - }; - secrets.enable = true; tailscale.enable = true; diff --git a/modules/nixos/archetypes/server.nix b/modules/nixos/archetypes/server.nix index 3a057d1..4dfbf9e 100644 --- a/modules/nixos/archetypes/server.nix +++ b/modules/nixos/archetypes/server.nix @@ -4,7 +4,7 @@ let in { options.archetypes = { - server.enable = lib.mkEnableOption "the \"Server\" archetype"; + server.enable = lib.mkEnableOption "the Server archetype"; }; config = lib.mkIf cfg.enable { @@ -25,11 +25,6 @@ in traits = { autoUpgrade.enable = true; - locale = { - en_US.enable = true; - US-east.enable = true; - }; - secrets.enable = true; tailscale = { diff --git a/modules/nixos/base/default.nix b/modules/nixos/base/default.nix index 30e75d9..3a6412e 100644 --- a/modules/nixos/base/default.nix +++ b/modules/nixos/base/default.nix @@ -9,7 +9,6 @@ let in { imports = [ - ../../shared ./networking.nix ./nix.nix ./programs.nix diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix index b0e3664..acc9d59 100644 --- a/modules/nixos/default.nix +++ b/modules/nixos/default.nix @@ -1,9 +1,10 @@ { - flake.nixosModules = { - archetypes = ./archetypes; - base = ./base; - desktop = ./desktop; - server = ./server; - traits = ./traits; - }; + imports = [ + ../shared + ./archetypes + ./base + ./desktop + ./server + ./traits + ]; } diff --git a/modules/nixos/traits/locale.nix b/modules/nixos/traits/locale.nix index bd30819..aa103e2 100644 --- a/modules/nixos/traits/locale.nix +++ b/modules/nixos/traits/locale.nix @@ -5,7 +5,9 @@ in { options.traits.locale = { en_US = { - enable = lib.mkEnableOption "en_US locale"; + enable = lib.mkEnableOption "en_US locale" // { + default = true; + }; }; }; diff --git a/modules/shared/traits/locale.nix b/modules/shared/traits/locale.nix index a260988..3d0973c 100644 --- a/modules/shared/traits/locale.nix +++ b/modules/shared/traits/locale.nix @@ -5,7 +5,9 @@ in { options.traits.locale = { US-east = { - enable = lib.mkEnableOption "eastern United States locale"; + enable = lib.mkEnableOption "eastern United States locale" // { + default = true; + }; }; }; diff --git a/openwrt/README.md b/openwrt/README.md new file mode 100644 index 0000000..5638da9 --- /dev/null +++ b/openwrt/README.md @@ -0,0 +1,5 @@ +# ./openwrt/ + +## turret.nix + +My home router diff --git a/openwrt/turret.nix b/openwrt/turret.nix new file mode 100644 index 0000000..74587bf --- /dev/null +++ b/openwrt/turret.nix @@ -0,0 +1,32 @@ +{ + buildOpenWrtImage, + runCommand, +}: + +buildOpenWrtImage { + release = "23.05.0"; + profile = "netgear_wac104"; + + files = runCommand "image-files" { } '' + mkdir -p $out/etc/uci-defaults + + cat > $out/etc/uci-defaults/99-custom << EOF + uci -q batch << EOI + set system.@system[0].hostname="turret" + del_list network.@device[0].ports="lan4" + set network.wan="interface" + set network.wan.device="lan4" + set network.wan.proto="dhcp" + set wireless.default_radio0.ssid="Box-2.4G" + set wireless.default_radio0.encryption="psk2" + set wireless.default_radio0.key="CorrectHorseBatteryStaple" + set wireless.default_radio1.ssid="Box-5G" + set wireless.default_radio1.encryption="psk2" + set wireless.default_radio1.key="CorrectHorseBatteryStaple" + add_list dhcp.@dnsmasq[0].server="1.1.1.1" + add_list dhcp.@dnsmasq[0].server="1.0.0.1" + commit + EOI + EOF + ''; +} diff --git a/systems/README.md b/systems/README.md index 8a399f8..8a3720d 100644 --- a/systems/README.md +++ b/systems/README.md @@ -19,15 +19,3 @@ Main desktop, but the windows install :p Ampere ARM server from Oracle, services my [Miniflux](https://miniflux.app/) instance and some other things. - -## darwin.nix - -Declarations of nix-darwin systems - -## nixos.nix - -Declarations of NixOS systems - -## nixinate.nix - -Apps to deploy the above systems through [nixinate](https://github.com/MatthewCroughan/nixinate) diff --git a/systems/atlas/default.nix b/systems/atlas/default.nix index c48eca0..70f7c86 100644 --- a/systems/atlas/default.nix +++ b/systems/atlas/default.nix @@ -1,4 +1,4 @@ -{ config, modulesPath, ... }: +{ modulesPath, inputs, ... }: { imports = [ (modulesPath + "/profiles/minimal.nix") @@ -7,15 +7,9 @@ ./nginx.nix ./nixpkgs-tracker-bot.nix ./teawiebot.nix - ]; - _module.args.nixinate = { - host = config.networking.hostName; - sshUser = "root"; - buildOn = "remote"; - substituteOnTarget = true; - hermetic = false; - }; + inputs.self.nixosModules.default + ]; archetypes.server.enable = true; base.networking.enable = false; diff --git a/systems/caroline/default.nix b/systems/caroline/default.nix index 0788cc7..263d3dd 100644 --- a/systems/caroline/default.nix +++ b/systems/caroline/default.nix @@ -1,5 +1,9 @@ -{ config, ... }: +{ config, inputs, ... }: { + imports = [ + inputs.self.darwinModules.default + ]; + archetypes.personal.enable = true; homebrew.casks = [ diff --git a/systems/darwin.nix b/systems/darwin.nix deleted file mode 100644 index 120e088..0000000 --- a/systems/darwin.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ - darwinConfigurations = { - caroline = { - modules = [ ./caroline ]; - }; - }; -} diff --git a/systems/default.nix b/systems/default.nix deleted file mode 100644 index 7bf8c5e..0000000 --- a/systems/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ - imports = [ - ./darwin.nix - ./nixos.nix - ./nixinate.nix - ]; -} diff --git a/systems/glados-wsl/default.nix b/systems/glados-wsl/default.nix index efc53ef..5c93ccb 100644 --- a/systems/glados-wsl/default.nix +++ b/systems/glados-wsl/default.nix @@ -1,6 +1,9 @@ { pkgs, inputs, ... }: { - imports = [ inputs.nixos-wsl.nixosModules.wsl ]; + imports = [ + inputs.nixos-wsl.nixosModules.wsl + inputs.self.nixosModules.default + ]; archetypes.personal.enable = true; diff --git a/systems/glados/default.nix b/systems/glados/default.nix index 35f926f..b28c8dc 100644 --- a/systems/glados/default.nix +++ b/systems/glados/default.nix @@ -1,8 +1,10 @@ -{ pkgs, ... }: +{ pkgs, inputs, ... }: { imports = [ ./boot.nix ./hardware-configuration.nix + + inputs.self.nixosModules.default ]; archetypes.personal.enable = true; diff --git a/systems/nixinate.nix b/systems/nixinate.nix deleted file mode 100644 index b67cea3..0000000 --- a/systems/nixinate.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ inputs, self, ... }: -{ - perSystem = - { system, ... }: - { - # as opposed to having system specific outputs like `apps.nixinate.mySystem` - # we can instantiate this for each system and grab it's final attribute, `nixinate` - # - # this lets deployments be as easy as `nix run .#mySystem` - apps = (inputs.nixinate.nixinate.${system} self).nixinate; - }; -} diff --git a/systems/nixos.nix b/systems/nixos.nix deleted file mode 100644 index f610ea4..0000000 --- a/systems/nixos.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ inputs, ... }: -{ - nixosConfigurations = { - glados = { - modules = [ ./glados ]; - }; - - glados-wsl = { - modules = [ ./glados-wsl ]; - }; - - atlas = { - nixpkgs = inputs.nixpkgs-stable; - modules = [ ./atlas ]; - }; - }; -} diff --git a/terranix/README.md b/terranix/README.md new file mode 100644 index 0000000..dd2edd0 --- /dev/null +++ b/terranix/README.md @@ -0,0 +1,21 @@ +# ./terranix/ + +## cloudflare/ + +DNS, Workers/Pages, Tunnels, etc through [Cloudflare](https://cloudflare.com/) + +## tailscale/ + +Secure, remote access via [tailscale](https://tailscale.com/) + +## cloud.nix + +[Cloud backend for OpenTofu state](https://opentofu.org/docs/language/settings/tf-cloud/) + +## vars.nix + +Shared variable definitions + +## versions.nix + +[Provider configuration](https://opentofu.org/docs/language/providers/configuration/) diff --git a/ext/terranix/cloud.nix b/terranix/cloud.nix index 5ee0113..5ee0113 100644 --- a/ext/terranix/cloud.nix +++ b/terranix/cloud.nix diff --git a/ext/terranix/cloudflare/default.nix b/terranix/cloudflare/default.nix index a8f6d43..a8f6d43 100644 --- a/ext/terranix/cloudflare/default.nix +++ b/terranix/cloudflare/default.nix diff --git a/ext/terranix/cloudflare/dns.nix b/terranix/cloudflare/dns.nix index 335562d..335562d 100644 --- a/ext/terranix/cloudflare/dns.nix +++ b/terranix/cloudflare/dns.nix diff --git a/ext/terranix/cloudflare/pages_domains.nix b/terranix/cloudflare/pages_domains.nix index 531b2de..531b2de 100644 --- a/ext/terranix/cloudflare/pages_domains.nix +++ b/terranix/cloudflare/pages_domains.nix diff --git a/ext/terranix/cloudflare/pages_projects.nix b/terranix/cloudflare/pages_projects.nix index 4c0b076..4c0b076 100644 --- a/ext/terranix/cloudflare/pages_projects.nix +++ b/terranix/cloudflare/pages_projects.nix diff --git a/ext/terranix/cloudflare/ruleset.nix b/terranix/cloudflare/ruleset.nix index 98364d9..98364d9 100644 --- a/ext/terranix/cloudflare/ruleset.nix +++ b/terranix/cloudflare/ruleset.nix diff --git a/ext/terranix/cloudflare/tls.nix b/terranix/cloudflare/tls.nix index 77450ad..77450ad 100644 --- a/ext/terranix/cloudflare/tls.nix +++ b/terranix/cloudflare/tls.nix diff --git a/ext/terranix/cloudflare/tunnels.nix b/terranix/cloudflare/tunnels.nix index 717a887..717a887 100644 --- a/ext/terranix/cloudflare/tunnels.nix +++ b/terranix/cloudflare/tunnels.nix diff --git a/terranix/default.nix b/terranix/default.nix new file mode 100644 index 0000000..d7c7778 --- /dev/null +++ b/terranix/default.nix @@ -0,0 +1,9 @@ +{ + imports = [ + ./cloudflare + ./tailscale + ./cloud.nix + ./vars.nix + ./versions.nix + ]; +} diff --git a/ext/terranix/tailscale/acl.nix b/terranix/tailscale/acl.nix index 80e3537..80e3537 100644 --- a/ext/terranix/tailscale/acl.nix +++ b/terranix/tailscale/acl.nix diff --git a/ext/terranix/tailscale/default.nix b/terranix/tailscale/default.nix index b370b34..b370b34 100644 --- a/ext/terranix/tailscale/default.nix +++ b/terranix/tailscale/default.nix diff --git a/ext/terranix/tailscale/devices.nix b/terranix/tailscale/devices.nix index 625c56e..625c56e 100644 --- a/ext/terranix/tailscale/devices.nix +++ b/terranix/tailscale/devices.nix diff --git a/ext/terranix/tailscale/dns.nix b/terranix/tailscale/dns.nix index 320a24b..320a24b 100644 --- a/ext/terranix/tailscale/dns.nix +++ b/terranix/tailscale/dns.nix diff --git a/ext/terranix/tailscale/tags.nix b/terranix/tailscale/tags.nix index 3e82dbb..3e82dbb 100644 --- a/ext/terranix/tailscale/tags.nix +++ b/terranix/tailscale/tags.nix diff --git a/ext/terranix/vars.nix b/terranix/vars.nix index afee9de..afee9de 100644 --- a/ext/terranix/vars.nix +++ b/terranix/vars.nix diff --git a/ext/terranix/versions.nix b/terranix/versions.nix index 6ac0b3e..6ac0b3e 100644 --- a/ext/terranix/versions.nix +++ b/terranix/versions.nix diff --git a/users/default.nix b/users/default.nix deleted file mode 100644 index bb0f198..0000000 --- a/users/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ - homeConfigurations = { - seth = { - modules = [ ./seth/home.nix ]; - }; - }; -} diff --git a/users/seth/home.nix b/users/seth/home.nix index 646c75c..47a67cc 100644 --- a/users/seth/home.nix +++ b/users/seth/home.nix @@ -1,5 +1,5 @@ { - imports = [ ./. ]; + imports = [ ./default.nix ]; seth = { enable = true; diff --git a/users/seth/programs/git.nix b/users/seth/programs/git.nix index 9b8ec53..f0e6f40 100644 --- a/users/seth/programs/git.nix +++ b/users/seth/programs/git.nix @@ -8,7 +8,7 @@ let cfg = config.seth.programs.git; in { - imports = [ inputs.self.homeModules.riff ]; + imports = [ inputs.nix-exprs.homeModules.riff ]; options.seth.programs.git = { enable = lib.mkEnableOption "Git configuration settings" // { |
