add apollo
This commit is contained in:
parent
d215a57a8e
commit
28b7f5550a
6 changed files with 125 additions and 23 deletions
42
flake.lock
generated
42
flake.lock
generated
|
|
@ -45,11 +45,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1781981105,
|
"lastModified": 1789267039,
|
||||||
"narHash": "sha256-/1nNBbA7PrSQpTc9Qazkhl4kIPg+TNl0CjxS3UQJKlw=",
|
"narHash": "sha256-LWiBv9yAYFi2LPbUhDGHPGKYskJQjj2fw12OlyO1uQo=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "7bfff44b465909f69a442701293bc0badcf476dc",
|
"rev": "ec172013fa62135f58fb58dd17ae9651e8f39727",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -62,11 +62,11 @@
|
||||||
"homebrew-cask": {
|
"homebrew-cask": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1789603472,
|
"lastModified": 1789608388,
|
||||||
"narHash": "sha256-poS9/MzObZH3CNWhFtbHKzO79atZ+JAoH2XA1rAYWBI=",
|
"narHash": "sha256-Z/8SIlpvuA8Ymhwwf70Z4A2pqaOGv66PuaYcwfaOwtY=",
|
||||||
"owner": "homebrew",
|
"owner": "homebrew",
|
||||||
"repo": "homebrew-cask",
|
"repo": "homebrew-cask",
|
||||||
"rev": "cc070684a2384fa3fd6c7f5efaa5bda5145b7800",
|
"rev": "61dc7eaf34ee6fee82f3a992ac1e42f6ab03d373",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -78,11 +78,11 @@
|
||||||
"homebrew-core": {
|
"homebrew-core": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1789603615,
|
"lastModified": 1789607811,
|
||||||
"narHash": "sha256-qUvGSWsf9qNhcX8fSE7bfU+NNkzzEseMv+M/47iWxTA=",
|
"narHash": "sha256-jttcVusqAJv1SmUDyiljJgb6zcab8y5b69U3Ag0+OEM=",
|
||||||
"owner": "homebrew",
|
"owner": "homebrew",
|
||||||
"repo": "homebrew-core",
|
"repo": "homebrew-core",
|
||||||
"rev": "d1989901389a4e511230b2e6c8d1bdea6b5d9377",
|
"rev": "4f456f9aac032eac0492bfa0117320e004ac41d5",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -114,11 +114,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1781772065,
|
"lastModified": 1783744694,
|
||||||
"narHash": "sha256-xIbRSwDB1GBAUsWsQZUjudGfAGQt3BOpsWaO/ugVa4w=",
|
"narHash": "sha256-2cp6N3rrwnGYLTx9l6N+NI+kwrCWxvJUbj5WJhvB29A=",
|
||||||
"owner": "nix-darwin",
|
"owner": "nix-darwin",
|
||||||
"repo": "nix-darwin",
|
"repo": "nix-darwin",
|
||||||
"rev": "adda04f0bf4819575b1978c2f8d78401b3c2be12",
|
"rev": "c3e90c89649b07d1a96e4b9dd6cd0d6e44b91a74",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -148,11 +148,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1781808408,
|
"lastModified": 1789542786,
|
||||||
"narHash": "sha256-0sOb6OIaD/K1zHxBhpmlKvkADfe0n8+l4Jj2e1Q0r3w=",
|
"narHash": "sha256-ajQuqcxnj6RYnwCjA/9FTCnrdR2+BDzstE8UembXf60=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "e8210c649915deed7080033cdbabcc19e40bb899",
|
"rev": "4c7870105e7f1fdf9c48688c8d7efc21abf0688a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -170,11 +170,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1779047312,
|
"lastModified": 1789605991,
|
||||||
"narHash": "sha256-Q4CSXZehRX3CKnXXaHc2nCMjK9lgZR2Leu5DTwe1Vnw=",
|
"narHash": "sha256-VahiXKTWwUd1XPDEBuk2+kULZIxmyfEeH6HWXTQewrM=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "NUR",
|
"repo": "NUR",
|
||||||
"rev": "8070eab81003118a0d3cde9c316aca3b2c21533e",
|
"rev": "3101e078666754dad3943abe6b3afb933a9f4b24",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -220,11 +220,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1777944972,
|
"lastModified": 1788914643,
|
||||||
"narHash": "sha256-VfGRo1qTBKOe3s2gOv8LSoA6Fk19PvBlwQ1ECN0Evn8=",
|
"narHash": "sha256-4GuMPW90JSxXWDPUB9M+1m7fYbe3H0apOd86/zBQ2Kw=",
|
||||||
"owner": "Mic92",
|
"owner": "Mic92",
|
||||||
"repo": "sops-nix",
|
"repo": "sops-nix",
|
||||||
"rev": "c591bf665727040c6cc5cb409079acb22dcce33c",
|
"rev": "13616fff713a9f94055c66f15687ebdc17a335df",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
||||||
|
|
@ -54,9 +54,10 @@
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
Apollo = nixpkgs.lib.nixosSystem {
|
apollo = nixpkgs.lib.nixosSystem {
|
||||||
modules = [
|
modules = [
|
||||||
./hosts/base.nix
|
./hosts/base.nix
|
||||||
|
./hosts/apollo
|
||||||
];
|
];
|
||||||
specialArgs = { inherit inputs; };
|
specialArgs = { inherit inputs; };
|
||||||
};
|
};
|
||||||
|
|
|
||||||
55
hosts/apollo/boot.nix
Normal file
55
hosts/apollo/boot.nix
Normal file
|
|
@ -0,0 +1,55 @@
|
||||||
|
{ pkgs, lib, inputs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
boot.initrd = {
|
||||||
|
supportedFilesystems = [ "ext4" "zfs" ];
|
||||||
|
systemd.enable = true;
|
||||||
|
luks.fido2Support = false;
|
||||||
|
|
||||||
|
luks.devices."zfs-keys" = {
|
||||||
|
device = "/dev/disk/by-id/nvme-CT1000P2SSD8_2138E5D5DA5A-part2";
|
||||||
|
crypttabExtraOpts = [ "fido2-device=auto" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/keys" = {
|
||||||
|
device = "/dev/mapper/zfs-keys";
|
||||||
|
fsType = "ext4";
|
||||||
|
neededForBoot = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.services."zfs-import-nix-root" = {
|
||||||
|
wants = [ "keys.mount" ];
|
||||||
|
after = [ "keys.mount" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
boot.zfs.forceImportRoot = false;
|
||||||
|
fileSystems."/" = {
|
||||||
|
device = "nix-root/root";
|
||||||
|
fsType = "zfs";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/var/log" = {
|
||||||
|
device = "nix-root/syslog";
|
||||||
|
fsType = "zfs";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/nix" = {
|
||||||
|
device = "nix-root/nix";
|
||||||
|
fsType = "zfs";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/home/nyxerinys" = {
|
||||||
|
device = "nix-main/nyxerinys";
|
||||||
|
fsType = "zfs";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" = {
|
||||||
|
device = "/dev/disk/by-uuid/A5CB-B201";
|
||||||
|
fsType = "vfat";
|
||||||
|
options = [ "fmask=0022" "dmask=0022" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [ { device = "/dev/disk/by-id/nvme-CT1000P2SSD8_2138E5D5DA5A-part3"; } ];
|
||||||
|
|
||||||
|
}
|
||||||
12
hosts/apollo/default.nix
Normal file
12
hosts/apollo/default.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
{ pkgs, lib, inputs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./boot.nix
|
||||||
|
./hardware.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
networking.hostName = "apollo";
|
||||||
|
networking.hostId = "40ced703";
|
||||||
|
networking.networkmanager.insertNameservers = [ "10.5.0.1" "1.1.1.1" ];
|
||||||
|
}
|
||||||
34
hosts/apollo/hardware.nix
Normal file
34
hosts/apollo/hardware.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
{ config, lib, pkgs, modulesPath, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
|
||||||
|
# This option defines the first version of NixOS you have installed on this particular machine,
|
||||||
|
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
|
||||||
|
#
|
||||||
|
# Most users should NEVER change this value after the initial install, for any reason,
|
||||||
|
# even if you've upgraded your system to a new NixOS release.
|
||||||
|
#
|
||||||
|
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
|
||||||
|
# so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how
|
||||||
|
# to actually do that.
|
||||||
|
#
|
||||||
|
# This value being lower than the current NixOS release does NOT mean your system is
|
||||||
|
# out of date, out of support, or vulnerable.
|
||||||
|
#
|
||||||
|
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
|
||||||
|
# and migrated your data accordingly.
|
||||||
|
#
|
||||||
|
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
|
||||||
|
system.stateVersion = "26.05"; # Did you read the comment?
|
||||||
|
}
|
||||||
|
|
@ -91,6 +91,6 @@
|
||||||
# this value at the release version of the first install of this system.
|
# this value at the release version of the first install of this system.
|
||||||
# Before changing this value read the documentation for this option
|
# Before changing this value read the documentation for this option
|
||||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||||
system.stateVersion = "25.11"; # Did you read the comment?
|
system.stateVersion = lib.mkDefault "25.11"; # Did you read the comment?
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue