diff --git a/flake.nix b/flake.nix index 7aa1ce3..d544d90 100644 --- a/flake.nix +++ b/flake.nix @@ -155,71 +155,24 @@ nix-flatpak, chaotic, ... - } @ inputs: { - deploy.nodes = { - heimdall = { - hostname = "heimdall"; - profiles.system = { - sshUser = "root"; - user = "root"; - path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.heimdall; - }; - }; - - # baldur = { - # hostname = "baldur"; - # profiles.system = { - # sshUser = "root"; - # user = "root"; - # path = deploy-rs.lib.aarch64-linux.activate.nixos self.nixosConfigurations.baldur; - # }; - # }; - - bragi = { - hostname = "bragi"; - profiles.system = { - sshUser = "root"; - user = "root"; - path = deploy-rs.lib.aarch64-linux.activate.nixos self.nixosConfigurations.bragi; - }; - }; - - thor = { - hostname = "thor"; - profiles.system = { - sshUser = "root"; - user = "root"; - path = deploy-rs.lib.aarch64-linux.activate.nixos self.nixosConfigurations.thor; - }; - }; - - odin = { - hostname = "odin"; - profiles.system = { - sshUser = "root"; - user = "root"; - path = deploy-rs.lib.aarch64-linux.activate.nixos self.nixosConfigurations.odin; - }; - }; - - freyja = { - hostname = "freyja"; - profiles.system = { - sshUser = "root"; - user = "root"; - path = deploy-rs.lib.aarch64-linux.activate.nixos self.nixosConfigurations.freyja; - }; - }; - - tyr = { - hostname = "tyr"; - profiles.system = { - sshUser = "root"; - user = "root"; - path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.tyr; - }; + } @ inputs: let + mkDeployNode = hostname: arch: { + inherit hostname; + profiles.system = { + sshUser = "root"; + user = "root"; + path = deploy-rs.lib.${arch}.activate.nixos self.nixosConfigurations.${hostname}; }; }; + in { + deploy.nodes = nixpkgs.lib.mapAttrs' ( + hostname: meta: let + arch = meta.arch; + in { + name = hostname; + value = mkDeployNode hostname arch; + } + ) (import ./hosts.nix); nixOnDroidConfigurations.default = nix-on-droid.lib.nixOnDroidConfiguration { modules = [inputs.stylix.nixOnDroidModules.stylix ./hosts/andronix/configuration.nix]; diff --git a/hosts.nix b/hosts.nix new file mode 100644 index 0000000..3aa2c3e --- /dev/null +++ b/hosts.nix @@ -0,0 +1,37 @@ +{ + heimdall = { + type = "server"; + arch = "x86_64-linux"; + }; + bragi = { + type = "server"; + arch = "aarch64-linux"; + }; + thor = { + type = "server"; + arch = "aarch64-linux"; + }; + odin = { + type = "server"; + arch = "aarch64-linux"; + }; + freyja = { + type = "server"; + arch = "aarch64-linux"; + }; + tyr = { + type = "client"; + arch = "x86_64-linux"; + extraModules = [./modules/servers/tyr]; + }; + ymir = { + type = "client"; + arch = "x86_64-linux"; + extraModules = [./modules/linux/nixos]; + }; + skadi = { + type = "client"; + arch = "x86_64-linux"; + extraModules = [./modules/linux/nixos]; + }; +} diff --git a/modules/servers/tyr/dns.nix b/modules/servers/tyr/dns.nix index ca6fc8f..2c0da6f 100644 --- a/modules/servers/tyr/dns.nix +++ b/modules/servers/tyr/dns.nix @@ -1,8 +1,4 @@ {config, ...}: { - services.resolved.extraConfig = '' - DNSStubListener=no - ''; - # Setup blocky for adblocking services.blocky = { enable = true;