mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 04:19:19 -08:00
refactor(systems): config -> default, nixos
This commit is contained in:
parent
be0028c3d9
commit
acbc8b852c
20 changed files with 550 additions and 541 deletions
|
|
@ -1,86 +0,0 @@
|
|||
_: {
|
||||
arch = "x86_64";
|
||||
type = "NixOS";
|
||||
modules = [
|
||||
({
|
||||
meta,
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = with meta; [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
nixos.sops
|
||||
nixos.tailscale
|
||||
];
|
||||
|
||||
services.kanidm.serverSettings.db_fs_type = "zfs";
|
||||
services.tailscale.advertiseExitNode = true;
|
||||
services.postgresql.package = pkgs.postgresql_14;
|
||||
|
||||
sops.defaultSopsFile = ./secrets.yaml;
|
||||
|
||||
networking = {
|
||||
useNetworkd = true;
|
||||
useDHCP = false;
|
||||
};
|
||||
services.resolved.enable = true;
|
||||
|
||||
boot = {
|
||||
loader = {
|
||||
systemd-boot = {
|
||||
enable = true;
|
||||
};
|
||||
efi = {
|
||||
canTouchEfiVariables = true;
|
||||
};
|
||||
};
|
||||
initrd = {
|
||||
availableKernelModules = ["xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod"];
|
||||
};
|
||||
kernelModules = ["kvm-intel"];
|
||||
};
|
||||
|
||||
fileSystems = {
|
||||
"/" = {
|
||||
device = "/dev/disk/by-uuid/6c5d82b1-5d11-4c72-96c6-5f90e6ce57f5";
|
||||
fsType = "ext4";
|
||||
};
|
||||
"/boot" = {
|
||||
device = "/dev/disk/by-uuid/85DC-72FA";
|
||||
fsType = "vfat";
|
||||
};
|
||||
};
|
||||
systemd = {
|
||||
network = {
|
||||
networks.eno1 = {
|
||||
inherit (config.systemd.network.links.eno1) matchConfig;
|
||||
networkConfig = {
|
||||
DHCP = "yes";
|
||||
DNSDefaultRoute = true;
|
||||
MulticastDNS = true;
|
||||
};
|
||||
linkConfig.Multicast = true;
|
||||
};
|
||||
links.eno1 = {
|
||||
matchConfig = {
|
||||
Type = "ether";
|
||||
Driver = "e1000e";
|
||||
};
|
||||
linkConfig = {
|
||||
WakeOnLan = "magic";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
swapDevices = lib.singleton {
|
||||
device = "/dev/disk/by-uuid/137605d3-5e3f-47c8-8070-6783ce651932";
|
||||
};
|
||||
|
||||
system.stateVersion = "21.05";
|
||||
})
|
||||
];
|
||||
}
|
||||
7
systems/tewi/default.nix
Normal file
7
systems/tewi/default.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
_: {
|
||||
arch = "x86_64";
|
||||
type = "NixOS";
|
||||
modules = [
|
||||
./nixos.nix
|
||||
];
|
||||
}
|
||||
80
systems/tewi/nixos.nix
Normal file
80
systems/tewi/nixos.nix
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
{
|
||||
meta,
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = with meta; [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
nixos.sops
|
||||
nixos.tailscale
|
||||
];
|
||||
|
||||
services.kanidm.serverSettings.db_fs_type = "zfs";
|
||||
services.tailscale.advertiseExitNode = true;
|
||||
services.postgresql.package = pkgs.postgresql_14;
|
||||
|
||||
sops.defaultSopsFile = ./secrets.yaml;
|
||||
|
||||
networking = {
|
||||
useNetworkd = true;
|
||||
useDHCP = false;
|
||||
};
|
||||
services.resolved.enable = true;
|
||||
|
||||
boot = {
|
||||
loader = {
|
||||
systemd-boot = {
|
||||
enable = true;
|
||||
};
|
||||
efi = {
|
||||
canTouchEfiVariables = true;
|
||||
};
|
||||
};
|
||||
initrd = {
|
||||
availableKernelModules = ["xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod"];
|
||||
};
|
||||
kernelModules = ["kvm-intel"];
|
||||
};
|
||||
|
||||
fileSystems = {
|
||||
"/" = {
|
||||
device = "/dev/disk/by-uuid/6c5d82b1-5d11-4c72-96c6-5f90e6ce57f5";
|
||||
fsType = "ext4";
|
||||
};
|
||||
"/boot" = {
|
||||
device = "/dev/disk/by-uuid/85DC-72FA";
|
||||
fsType = "vfat";
|
||||
};
|
||||
};
|
||||
systemd = {
|
||||
network = {
|
||||
networks.eno1 = {
|
||||
inherit (config.systemd.network.links.eno1) matchConfig;
|
||||
networkConfig = {
|
||||
DHCP = "yes";
|
||||
DNSDefaultRoute = true;
|
||||
MulticastDNS = true;
|
||||
};
|
||||
linkConfig.Multicast = true;
|
||||
};
|
||||
links.eno1 = {
|
||||
matchConfig = {
|
||||
Type = "ether";
|
||||
Driver = "e1000e";
|
||||
};
|
||||
linkConfig = {
|
||||
WakeOnLan = "magic";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
swapDevices = lib.singleton {
|
||||
device = "/dev/disk/by-uuid/137605d3-5e3f-47c8-8070-6783ce651932";
|
||||
};
|
||||
|
||||
system.stateVersion = "21.05";
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue