add cloud

This commit is contained in:
Evan Reichard 2025-09-01 20:09:23 -04:00
parent 93b7c6ee25
commit b970f6f550
3 changed files with 96 additions and 5 deletions

View File

@ -14,6 +14,12 @@ sudo nixos-rebuild switch --flake .#lin-va-mbp-personal
nix build .#qcowConfigurations.lin-va-rke2 nix build .#qcowConfigurations.lin-va-rke2
``` ```
### NixOS Anywhere
```bash
nix run github:nix-community/nixos-anywhere -- --flake .#lin-cloud-kube1 --target-host <USER>@<IP>
```
### Home Manager ### Home Manager
```bash ```bash

View File

@ -21,21 +21,26 @@ in
type = "gpt"; type = "gpt";
partitions = { partitions = {
boot = { boot = {
size = "512M"; name = "boot";
size = "1M";
type = "EF02";
};
esp = {
name = "ESP";
size = "500M";
type = "EF00"; type = "EF00";
content = { content = {
type = "filesystem"; type = "filesystem";
format = "vfat"; format = "vfat";
mountpoint = "/boot"; mountpoint = "/boot";
mountOptions = [ "umask=0077" ];
}; };
}; };
root = { root = {
name = "root";
size = "100%"; size = "100%";
content = { content = {
type = "filesystem"; type = "lvm_pv";
format = "ext4"; vg = "pool";
mountpoint = "/";
}; };
}; };
swap = { swap = {
@ -50,6 +55,25 @@ in
}; };
}; };
}; };
lvm_vg = {
pool = {
type = "lvm_vg";
lvs = {
root = {
size = "100%FREE";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
mountOptions = [
"defaults"
];
};
};
};
};
};
}; };
}; };
} }

View File

@ -0,0 +1,61 @@
{ namespace, config, lib, modulesPath, ... }:
let
inherit (lib.${namespace}) enabled;
cfg = config.${namespace}.user;
in
{
imports = [
(modulesPath + "/profiles/qemu-guest.nix")
];
system.stateVersion = "25.05";
time.timeZone = "UTC";
boot.loader.grub = {
efiSupport = true;
efiInstallAsRemovable = true;
};
reichard = {
nix = enabled;
system = {
disk = {
enable = true;
diskPath = "/dev/sda";
};
networking = {
enable = true;
useStatic = {
interface = "enp3s0";
address = "23.29.118.42";
defaultGateway = "23.29.118.1";
nameservers = [ "1.1.1.1" ];
};
};
};
services = {
openssh = enabled;
rke2 = {
enable = true;
openFirewall = false;
disable = [ "rke2-ingress-nginx" ];
};
};
};
users.users.${cfg.name} = {
openssh = {
authorizedKeys.keys = [
# evanreichard@lin-va-mbp-personal
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILJJoyXQOv9cAjGUHrUcvsW7vY9W0PmuPMQSI9AMZvNY"
# evanreichard@mac-va-mbp-personal
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMWj6rd6uDtHj/gGozgIEgxho/vBKebgN5Kce/N6vQWV"
# evanreichard@lin-va-thinkpad
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAq5JQr/6WJMIHhR434nK95FrDmf2ApW2Ahd2+cBKwDz"
];
};
};
}