trying nix anywhere

This commit is contained in:
ari committed 2026-09-09 14:48:56 -04:00
1 parent 76e396cd43
commit a5cf4fcd00
7 files changed
+104 -17

No files matched your search

+3
View File
@@ -8,6 +8,8 @@ One NixOS configuration file per managed machine, plus hardware configs and host
hosts/
├── <hostname>.nix # Host configuration (packages, services, options)
├── <hostname>.hardware-configuration.nix # Generated by nixos-generate-config — DO NOT EDIT
├── <hostname>.disko.nix # Optional: declarative disk layout for `skyg remote install` (nixos-anywhere).
│ # Only present for hosts installed/reinstalled this way (currently: hl-fws1)
└── scripts/
├── fwbook/ # fwbook-specific shell scripts
│ ├── functions.sh # ZSH functions sourced at shell startup
@@ -37,5 +39,6 @@ hosts/
- **Do not add `imports = [...]`** to host files — module composition happens in `flake.nix` via `modules/main.nix`
- **Do not edit `*.hardware-configuration.nix`** — these are generated and will be overwritten
- Hosts with a `<hostname>.disko.nix` own their `fileSystems` via disko; if a generated `hardware-configuration.nix` still contains its own `fileSystems` stanzas for the same host, that's a conflict the machine's owner needs to resolve by hand (regenerating or trimming it) — not something to script around
- Host-specific packages and one-off settings belong here; anything reused across hosts belongs in `modules/`
- See `docs/hosts/README.md` for full per-host service/port/package reference
+49
View File
@@ -0,0 +1,49 @@
{
disko.devices = {
disk = {
main = {
device = "/dev/nvme0n1";
type = "disk";
content = {
type = "gpt";
partitions = {
ESP = {
size = "1G";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [ "umask=0077" ];
};
};
swap = {
size = "80G";
content = {
type = "swap";
};
};
root = {
size = "100%";
content = {
type = "btrfs";
extraArgs = [ "-f" ];
subvolumes = {
"@" = {
mountpoint = "/";
};
"@home" = {
mountpoint = "/home";
};
"@nix" = {
mountpoint = "/nix";
};
};
};
};
};
};
};
};
};
}
-17
View File
@@ -13,23 +13,6 @@
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{
device = "/dev/disk/by-uuid/3fbf3ccf-655a-4040-b898-b97a1d555912";
fsType = "ext4";
};
fileSystems."/boot" =
{
device = "/dev/disk/by-uuid/3342-B2BE";
fsType = "vfat";
};
swapDevices = [{
device = "/var/lib/swapfile";
size = 64 * 1024;
}];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}