diff --git a/flake.nix b/flake.nix index becefa6b..09e86921 100644 --- a/flake.nix +++ b/flake.nix @@ -119,8 +119,9 @@ # FIXME(yukkop): some why I cannot merge nixosConfigurations from `forAllSystemsWithPkgs` with this "neuro|x86_64-linux" = import ./nixos/system/neuro { inherit flake self inputs; system = "x86_64-linux"; }; "games|x86_64-linux" = import ./nixos/system/games { inherit flake self inputs; system = "x86_64-linux"; }; - "wsl|x86_64-linux" = import ./nixos/system/wsl { inherit flake self inputs; system = "x86_64-linux"; }; - "hectic-lab|x86_64-linux" = import ./nixos/system/hectic-lab { inherit flake self inputs; system = "x86_64-linux"; }; + "wsl|x86_64-linux" = import ./nixos/system/wsl { inherit flake self inputs; system = "x86_64-linux"; }; + "tenix|x86_64-linux" = import ./nixos/system/tenix { inherit flake self inputs; system = "x86_64-linux"; }; + "hectic-lab|x86_64-linux" = import ./nixos/system/hectic-lab { inherit flake self inputs; system = "x86_64-linux"; }; }; }; } diff --git a/nixos/system/tenix/default.nix b/nixos/system/tenix/default.nix new file mode 100644 index 00000000..80f9f9e6 --- /dev/null +++ b/nixos/system/tenix/default.nix @@ -0,0 +1,20 @@ +{ + flake, + self, + inputs, + system ? "x86_64-linux", + ... +}: let + # Use folder name as name of this system + name = builtins.baseNameOf ./.; + +in self.lib.nixpkgs-lib.nixosSystem { + pkgs = import inputs.nixpkgs { + inherit system; + overlays = [ self.overlays.default ]; + }; + modules = [ + { networking.hostName = name; } + (import ./${name}.nix { inherit flake self inputs; }) + ]; +} diff --git a/nixos/system/tenix/tenix.nix b/nixos/system/tenix/tenix.nix new file mode 100644 index 00000000..434ee176 --- /dev/null +++ b/nixos/system/tenix/tenix.nix @@ -0,0 +1,35 @@ +{ + inputs, + self, + ... +}: { + pkgs, + modulesPath, + ... +}: { + imports = [ + (modulesPath + "/profiles/qemu-guest.nix") + inputs.sops-nix.nixosModules.sops + self.nixosModules.hectic + ]; + + hectic = { + archetype.dev.enable = true; + hardware.hetzner-cloud = { + enable = true; + device = "/dev/sda"; + networkMatchConfigName = "eth0"; + ipv4 = "46.225.237.218"; + ipv6 = "2a01:4f8:c2c:3b14"; + }; + }; + + users.users.root.openssh.authorizedKeys.keys = [ + ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKAaObjLBslsdTlqEcYaS1TqX4x9aVJu75y27/8MFevO'' + ]; + + environment.systemPackages = with pkgs; [ + git + rsync + ]; +}