Skip to content

Commit

Permalink
feat(pve-dragon-1): init empty host
Browse files Browse the repository at this point in the history
  • Loading branch information
dr460nf1r3 committed Apr 17, 2024
1 parent d2f79a7 commit 2ea6857
Show file tree
Hide file tree
Showing 6 changed files with 166 additions and 96 deletions.
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
CHANGELOG.md
configurations/docker-compose/**
flake.lock
nixos/**
secrets/global.yaml
4 changes: 2 additions & 2 deletions .sops.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
keys:
- &nico age1vc3r79rf5mtx7wla0u394lr3nqveqf6edjwe0fmf0s7umncyqaaqjl9w78
- &oracle-dragon age1npmc4l8gph7nqrkq737faqhgcmt79spuzjdryvzvdymngwxdfujsfeq3pm
- &pve-dragon-1 age1e0k9ya63r9apy5mx6amk0ph4qywq9gcylyvnhf836v8ea7c2acssal6z2h
- &rpi-dragon age19gle3kmstnprnagmasp3ul9yvcy0qa3rrdvzz57ar4l8naqfryvqs2mnka
- &slim-lair age1amrvulahe6tayc9d054pvfyk0wr4psekjj05p27fdav7m6x34fzsqd6e5l
- &tv-nixos age1g8hzfc2heln349ah2fykv8fwq6hlxwvveu6rx6vq82e5tx6l8ygsa0gnxq
creation_rules:
- path_regex: secrets/[^/]+\.yaml$
key_groups:
- age:
- *nico
- *oracle-dragon
- *pve-dragon-1
- *rpi-dragon
- *slim-lair
- *tv-nixos
11 changes: 11 additions & 0 deletions nixos/flake-module.nix
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,17 @@
inherit specialArgs;
};

# Homeserver on Proxmox
pve-dragon-1 = inputs.garuda-nix.lib.garudaSystem {
system = "x86_64-linux";
modules =
defaultModules
++ [
./pve-dragon-1/pve-dragon-1.nix
];
inherit specialArgs;
};

# My Raspberry Pi 4B
rpi-dragon = inputs.garuda-nix.lib.garudaSystem {
system = "aarch64-linux";
Expand Down
41 changes: 41 additions & 0 deletions nixos/pve-dragon-1/hardware-configuration.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
lib,
modulesPath,
...
}: {
imports = [(modulesPath + "/profiles/qemu-guest.nix")];

boot = {
extraModulePackages = [];
initrd = {
availableKernelModules = [
"ata_piix"
"sd_mod"
"sr_mod"
"uhci_hcd"
"virtio_pci"
"virtio_scsi"
];
kernelModules = [];
};
kernelModules = [];
};

fileSystems = {
"/" = {
device = "/dev/disk/by-uuid/2684489d-5e17-455d-8da4-011b80e77624";
fsType = "btrfs";
options = ["compress=zstd"];
};
"/boot" = {
device = "/dev/disk/by-uuid/F128-4571";
fsType = "vfat";
options = ["fmask=0022" "dmask=0022"];
};
};

swapDevices = [];

networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}
28 changes: 28 additions & 0 deletions nixos/pve-dragon-1/pve-dragon-1.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{lib, ...}: {
# Individual settings + low-latency Pipewire
imports = [
./hardware-configuration.nix
];

# Boot options
boot = {
loader = {
grub = {
device = "nodev";
efiInstallAsRemovable = true;
efiSupport = true;
enable = lib.mkForce true;
};
efi.efiSysMountPoint = "/boot";
};
};

# Hostname of this machine
networking.hostName = "pve-dragon-1";

# Home-manager individual settings
home-manager.users."nico" = import ../../home-manager/nico/nico.nix;

# NixOS stuff
system.stateVersion = "23.11";
}
176 changes: 82 additions & 94 deletions secrets/global.yaml

Large diffs are not rendered by default.

0 comments on commit 2ea6857

Please sign in to comment.