forked from Fachschaft/nixConfig
Compare commits
3 commits
41d7652cb4
...
a7c1e37375
Author | SHA1 | Date | |
---|---|---|---|
a7c1e37375 | |||
67383019b7 | |||
ed6f682085 |
3 changed files with 70 additions and 6 deletions
12
flake.lock
generated
12
flake.lock
generated
|
@ -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": {
|
||||
|
|
25
nixos/machines/cthulhu/configuration.nix
Normal file
25
nixos/machines/cthulhu/configuration.nix
Normal file
|
@ -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
|
||||
}
|
39
nixos/machines/cthulhu/hardware-configuration.nix
Normal file
39
nixos/machines/cthulhu/hardware-configuration.nix
Normal file
|
@ -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";
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue