diff --git a/flake.lock b/flake.lock index 1724d15..1429838 100644 --- a/flake.lock +++ b/flake.lock @@ -698,11 +698,11 @@ }, "nixpkgs_6": { "locked": { - "lastModified": 1750506804, - "narHash": "sha256-VLFNc4egNjovYVxDGyBYTrvVCgDYgENp5bVi9fPTDYc=", + "lastModified": 1750776420, + "narHash": "sha256-/CG+w0o0oJ5itVklOoLbdn2dGB0wbZVOoDm4np6w09A=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "4206c4cb56751df534751b058295ea61357bbbaa", + "rev": "30a61f056ac492e3b7cdcb69c1e6abdcf00e39cf", "type": "github" }, "original": { @@ -819,11 +819,11 @@ "nixpkgs": [] }, "locked": { - "lastModified": 1749636823, - "narHash": "sha256-WUaIlOlPLyPgz9be7fqWJA5iG6rHcGRtLERSCfUDne4=", + "lastModified": 1750779888, + "narHash": "sha256-wibppH3g/E2lxU43ZQHC5yA/7kIKLGxVEnsnVK1BtRg=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "623c56286de5a3193aa38891a6991b28f9bab056", + "rev": "16ec914f6fb6f599ce988427d9d94efddf25fe6d", "type": "github" }, "original": { diff --git a/nixos/machines/cthulhu/configuration.nix b/nixos/machines/cthulhu/configuration.nix new file mode 100644 index 0000000..bcb21aa --- /dev/null +++ b/nixos/machines/cthulhu/configuration.nix @@ -0,0 +1,25 @@ +{ + imports = [ + ./hardware-configuration.nix + ../../roles + ../../roles/vm.nix + ../../modules/vmNetwork.nix + ]; + + # System configuration here + + networking.hostName = "cthulhu"; + vmNetwork.ipv4 = "192.168.0.16"; + system.stateVersion = "25.05"; + + sops.secrets = { + backupKey = { + sopsFile = ./backupKey.secrets.yaml; + owner = "root"; + group = "root"; + mode = "0400"; + }; + }; + # TODO for the network rework, make a central record of hostnames to ip adresses where every + # machine can read out their ip address and also this machine +} diff --git a/nixos/machines/cthulhu/hardware-configuration.nix b/nixos/machines/cthulhu/hardware-configuration.nix new file mode 100644 index 0000000..aa0a0fb --- /dev/null +++ b/nixos/machines/cthulhu/hardware-configuration.nix @@ -0,0 +1,39 @@ +{ + lib, + pkgs, + ... +}: { + imports = []; + + fileSystems."/" = { + device = "root"; + fsType = "tmpfs"; + options = ["size=1G" "mode=755"]; + }; + fileSystems."/persist" = { + device = "/dev/disk/by-label/nixos"; + fsType = "btrfs"; + options = ["subvol=persist"]; + neededForBoot = true; + }; + fileSystems."/boot" = { + device = "/dev/disk/by-label/boot"; + fsType = "ext4"; + }; + fileSystems."/nix" = { + device = "/dev/disk/by-label/nixos"; + fsType = "btrfs"; + options = ["subvol=nix"]; + }; + fileSystems."/var/www" = { + device = "/dev/disk/by-label/cthulhu-website-"; # The trailing - is part of the name, i suspect it was meant to be longer + fsType = "ext4"; + }; + # nix puts the caching folder under /var/cache/nginx + fileSystems."/var/cache/nginx" = { + device = "/dev/disk/by-label/cthulhu"; + fsType = "ext4"; + }; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; +}