various cloudnix modifications

This commit is contained in:
Sam 2025-01-25 18:57:48 +00:00
parent 8ec54b44b9
commit ac3c056e03
3 changed files with 35 additions and 24 deletions

View File

@ -539,11 +539,11 @@
}, },
"nix-secrets": { "nix-secrets": {
"locked": { "locked": {
"lastModified": 1737813653, "lastModified": 1737831370,
"narHash": "sha256-2ZZAuL6fZiwh2Nh1vx4EgFuNueJ3LCBKomsgByOV1k4=", "narHash": "sha256-SknkmBjTklrzrXaVALsIIOtu1r8TP35NEfhST6zJyH4=",
"ref": "refs/heads/master", "ref": "refs/heads/master",
"rev": "8d063046441c3c408197a7226e43b4e7ccdf68f1", "rev": "148154f0b8bdaf085ea16562822f55c810b55bac",
"revCount": 254, "revCount": 255,
"type": "git", "type": "git",
"url": "ssh://git@git.bitlab21.com/sam/nix-secrets.git" "url": "ssh://git@git.bitlab21.com/sam/nix-secrets.git"
}, },

View File

@ -7,6 +7,7 @@
}: let }: let
user = "admin"; user = "admin";
merlinIp = configVars.networking.addresses.merlin.ip; merlinIp = configVars.networking.addresses.merlin.ip;
cloudnixIp = configVars.networking.addresses.cloudnix.ip;
btrfsMountDevice = "/dev/sda2"; btrfsMountDevice = "/dev/sda2";
in { in {
imports = [ imports = [
@ -35,9 +36,10 @@ in {
boot = { boot = {
loader = { loader = {
efi.canTouchEfiVariables = false;
grub = { grub = {
enable = true; enable = true;
devices = ["/dev/sda1"]; devices = ["/dev/sda"];
}; };
}; };
}; };
@ -57,7 +59,7 @@ in {
pushUpdates = false; pushUpdates = false;
configDir = "/etc/nixos"; configDir = "/etc/nixos";
onCalendar = "*-*-* 06:00:00"; onCalendar = "*-*-* 06:00:00";
user = "sam"; user = "admin";
}; };
networking = { networking = {
@ -66,5 +68,16 @@ in {
firewall.enable = true; firewall.enable = true;
}; };
systemd.network.networks."10-wan" = {
networkConfig.DHCP = "no";
address = [
"${cloudnixIp}/32"
];
routes = [
{ routeConfig = { Destination = "172.31.1.1"; }; }
{ routeConfig = { Gateway = "172.31.1.1"; GatewayOnLink = true; }; }
];
};
services.libinput.enable = true; services.libinput.enable = true;
} }

View File

@ -2,30 +2,28 @@
disko.devices = { disko.devices = {
disk = { disk = {
main = { main = {
device = "/dev/sda";
type = "disk"; type = "disk";
device = "/dev/sda";
content = { content = {
type = "table"; type = "gpt";
format = "gpt"; partitions = {
partitions = [ BOOT = {
{ size = "1M";
name = "ESP"; type = "EF02";
start = "1M"; priority = 1;
end = "512M"; };
bootable = true; ESP = {
size = "512M";
type = "EF00";
content = { content = {
type = "filesystem"; type = "filesystem";
format = "vfat"; format = "vfat";
mountpoint = "/boot"; mountpoint = "/boot";
mountOptions = ["umask=0077"]; mountOptions = ["umask=0077"];
}; };
} };
{ root = {
name = "root"; size = "100%";
start = "513M";
end = "100%";
part-type = "primary";
bootable = true;
content = { content = {
type = "btrfs"; type = "btrfs";
extraArgs = ["-f"]; extraArgs = ["-f"];
@ -50,8 +48,8 @@
}; };
}; };
}; };
} };
]; };
}; };
}; };
}; };