add cloud
This commit is contained in:
parent
93b7c6ee25
commit
b970f6f550
@ -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
|
||||||
|
@ -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"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
61
systems/x86_64-linux/lin-cloud-kube1/default.nix
Executable file
61
systems/x86_64-linux/lin-cloud-kube1/default.nix
Executable 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"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user