Compare commits
29 commits
main
...
test-new-s
Author | SHA1 | Date | |
---|---|---|---|
0b336f6058 | |||
cfc8f986b7 | |||
fadfd47e3f | |||
abf81609e4 | |||
eee7d2ddcf | |||
739b50349c | |||
3c17de5929 | |||
aa4d1f11c9 | |||
ea01c0abf3 | |||
962ee20628 | |||
6989f4be08 | |||
a8f632ed50 | |||
c4ec22b380 | |||
db8b0f1d5f | |||
2249b4cc58 | |||
31267fa34c | |||
75d4187baa | |||
18b28c2e9d | |||
544930ff2d | |||
59506dac35 | |||
21582cbf81 | |||
1038d8a248 | |||
2f19307456 | |||
7bce6df38b | |||
c790a14db1 | |||
f7c3edf779 | |||
8e15acd0c6 | |||
82bb877bfb | |||
a7a3cbbc7a |
23 changed files with 956 additions and 20 deletions
232
flake.lock
generated
232
flake.lock
generated
|
@ -1,5 +1,28 @@
|
|||
{
|
||||
"nodes": {
|
||||
"agenix": {
|
||||
"inputs": {
|
||||
"darwin": [],
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1754433428,
|
||||
"narHash": "sha256-NA/FT2hVhKDftbHSwVnoRTFhes62+7dxZbxj5Gxvghs=",
|
||||
"owner": "ryantm",
|
||||
"repo": "agenix",
|
||||
"rev": "9edb1787864c4f59ae5074ad498b6272b3ec308d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "ryantm",
|
||||
"repo": "agenix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"auto-cpufreq": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
@ -7,11 +30,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1748372346,
|
||||
"narHash": "sha256-7y7NZ6uW0GbT0h4gqfD2xvRuJj5IlPGw32oIc9Twga8=",
|
||||
"lastModified": 1758056808,
|
||||
"narHash": "sha256-7I4duKo9OdQ7sldgjoYBlpZ+xykszDj/IVz5hlJOaeg=",
|
||||
"owner": "AdnanHodzic",
|
||||
"repo": "auto-cpufreq",
|
||||
"rev": "becd5b89963fa54fef3566147f3fd2087f8a5842",
|
||||
"rev": "9f86acc38dca4299b70ea55ae6c52902da5c903c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -20,6 +43,26 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"disko": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1757508292,
|
||||
"narHash": "sha256-7lVWL5bC6xBIMWWDal41LlGAG+9u2zUorqo3QCUL4p4=",
|
||||
"owner": "nix-community",
|
||||
"repo": "disko",
|
||||
"rev": "146f45bee02b8bd88812cfce6ffc0f933788875a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "disko",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
|
@ -36,6 +79,21 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat_2": {
|
||||
"locked": {
|
||||
"lastModified": 1696426674,
|
||||
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"gitignore": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
@ -61,15 +119,36 @@
|
|||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"agenix",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1749154018,
|
||||
"narHash": "sha256-gjN3j7joRvT3a8Zgcylnd4NFsnXeDBumqiu4HmY1RIg=",
|
||||
"lastModified": 1745494811,
|
||||
"narHash": "sha256-YZCh2o9Ua1n9uCvrvi5pRxtuVNml8X2a03qIFfRKpFs=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "7aae0ee71a17b19708b93b3ed448a1a0952bf111",
|
||||
"rev": "abfad3d2958c9e6300a883bd443512c55dfeb1be",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager_2": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1757808926,
|
||||
"narHash": "sha256-K6PEI5PYY94TVMH0mX3MbZNYFme7oNRKml/85BpRRAo=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "f21d9167782c086a33ad53e2311854a8f13c281e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -87,11 +166,11 @@
|
|||
"pre-commit-hooks": "pre-commit-hooks"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1746906641,
|
||||
"narHash": "sha256-b6few4tkqN2TWdrZTwWOjsWxA11rle7y9pcc0/ynuoE=",
|
||||
"lastModified": 1752585957,
|
||||
"narHash": "sha256-ogQo/MMNSIM4U4VQMieIrpLhjkgSbev3VR24foJ/h/U=",
|
||||
"owner": "~rycee",
|
||||
"repo": "lazy-apps",
|
||||
"rev": "0b30a0bf524a661f9657c441d021aaa5724f12ff",
|
||||
"rev": "3c3ce5001e24b6c12496a5920eee28a96f8d49d6",
|
||||
"type": "sourcehut"
|
||||
},
|
||||
"original": {
|
||||
|
@ -102,11 +181,11 @@
|
|||
},
|
||||
"nixos-hardware": {
|
||||
"locked": {
|
||||
"lastModified": 1749195551,
|
||||
"narHash": "sha256-W5GKQHgunda/OP9sbKENBZhMBDNu2QahoIPwnsF6CeM=",
|
||||
"lastModified": 1757943327,
|
||||
"narHash": "sha256-w6cDExPBqbq7fTLo4dZ1ozDGeq3yV6dSN4n/sAaS6OM=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixos-hardware",
|
||||
"rev": "4602f7e1d3f197b3cb540d5accf5669121629628",
|
||||
"rev": "67a709cfe5d0643dafd798b0b613ed579de8be05",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -118,11 +197,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1749086602,
|
||||
"narHash": "sha256-DJcgJMekoxVesl9kKjfLPix2Nbr42i7cpEHJiTnBUwU=",
|
||||
"lastModified": 1758070117,
|
||||
"narHash": "sha256-uLwwHFCZnT1c3N3biVe/0hCkag2GSrf9+M56+Okf+WY=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "4792576cb003c994bd7cc1edada3129def20b27d",
|
||||
"rev": "e9b7f2ff62b35f711568b1f0866243c7c302028d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -148,6 +227,36 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-stable_2": {
|
||||
"locked": {
|
||||
"lastModified": 1748437600,
|
||||
"narHash": "sha256-hYKMs3ilp09anGO7xzfGs3JqEgUqFMnZ8GMAqI6/k04=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "7282cb574e0607e65224d33be8241eae7cfe0979",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"ref": "nixos-25.05",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"nixpkgs-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1723637854,
|
||||
"narHash": "sha256-med8+5DSWa2UnOqtdICndjDAEjxr5D7zaIiK4pn0Q7c=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "c3aa7b8938b17aebd2deecf7be0636000d62a2b9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"ref": "nixos-unstable",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"pre-commit-hooks": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat",
|
||||
|
@ -172,17 +281,88 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"proxmox-nixos": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat_2",
|
||||
"nixpkgs-stable": "nixpkgs-stable_2",
|
||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||
"utils": "utils"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1754428470,
|
||||
"narHash": "sha256-Sxf8gf+vfGeFaJMW3D+8pwH/+WwYTQOg47Lrm42+kTc=",
|
||||
"owner": "SaumonNet",
|
||||
"repo": "proxmox-nixos",
|
||||
"rev": "6faed2845ef5f0bb05c9519b75097bbe7fb39327",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "SaumonNet",
|
||||
"repo": "proxmox-nixos",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"agenix": "agenix",
|
||||
"auto-cpufreq": "auto-cpufreq",
|
||||
"home-manager": "home-manager",
|
||||
"disko": "disko",
|
||||
"home-manager": "home-manager_2",
|
||||
"lazy-apps": "lazy-apps",
|
||||
"nixos-hardware": "nixos-hardware",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"systems": "systems"
|
||||
"proxmox-nixos": "proxmox-nixos",
|
||||
"secrets": "secrets",
|
||||
"systems": "systems_3"
|
||||
}
|
||||
},
|
||||
"secrets": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1758149260,
|
||||
"narHash": "sha256-Pgw5Krmc27t+7On6fwHJWx0nuoLRu0XqwN5MHaZ5kys=",
|
||||
"ref": "refs/heads/main",
|
||||
"rev": "50fd7d5277505cbb3235aae9719d3b8b0c7fe692",
|
||||
"revCount": 5,
|
||||
"type": "git",
|
||||
"url": "ssh://git@git.jfreudenberger.de/JuliusFreudenberger/nix-private.git"
|
||||
},
|
||||
"original": {
|
||||
"type": "git",
|
||||
"url": "ssh://git@git.jfreudenberger.de/JuliusFreudenberger/nix-private.git"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_2": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_3": {
|
||||
"locked": {
|
||||
"lastModified": 1689347949,
|
||||
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
|
||||
|
@ -196,6 +376,24 @@
|
|||
"repo": "default-linux",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"utils": {
|
||||
"inputs": {
|
||||
"systems": "systems_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1710146030,
|
||||
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
|
|
93
flake.nix
93
flake.nix
|
@ -17,7 +17,22 @@
|
|||
url = "sourcehut:~rycee/lazy-apps";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
proxmox-nixos.url = "github:SaumonNet/proxmox-nixos";
|
||||
disko = {
|
||||
url = "github:nix-community/disko";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
agenix = {
|
||||
url = "github:ryantm/agenix";
|
||||
inputs = {
|
||||
nixpkgs.follows = "nixpkgs";
|
||||
darwin.follows = "";
|
||||
};
|
||||
};
|
||||
secrets = {
|
||||
url = "git+ssh://git@git.jfreudenberger.de/JuliusFreudenberger/nix-private.git";
|
||||
flake = false;
|
||||
};
|
||||
systems.url = "github:nix-systems/default-linux";
|
||||
};
|
||||
|
||||
|
@ -28,6 +43,9 @@
|
|||
nixos-hardware,
|
||||
home-manager,
|
||||
auto-cpufreq,
|
||||
proxmox-nixos,
|
||||
agenix,
|
||||
disko,
|
||||
systems,
|
||||
...
|
||||
} @ inputs: let
|
||||
|
@ -90,6 +108,79 @@
|
|||
./hosts/backup-raspberrypi
|
||||
];
|
||||
};
|
||||
|
||||
server = nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
|
||||
specialArgs = {
|
||||
inherit inputs outputs;
|
||||
};
|
||||
|
||||
modules = [
|
||||
./hosts/nixos-server-test
|
||||
proxmox-nixos.nixosModules.proxmox-ve
|
||||
|
||||
({...}: {
|
||||
nixpkgs.overlays = [
|
||||
proxmox-nixos.overlays.${system}
|
||||
];
|
||||
})
|
||||
];
|
||||
};
|
||||
|
||||
srv01-hf = nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
|
||||
specialArgs = {
|
||||
inherit inputs outputs;
|
||||
};
|
||||
|
||||
modules = [
|
||||
disko.nixosModules.disko
|
||||
agenix.nixosModules.default
|
||||
./hosts/srv01.hf
|
||||
];
|
||||
};
|
||||
|
||||
kube01 = nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
|
||||
specialArgs = {
|
||||
inherit inputs outputs;
|
||||
};
|
||||
|
||||
modules = [
|
||||
disko.nixosModules.disko
|
||||
./hosts/kube01
|
||||
];
|
||||
};
|
||||
|
||||
kube02 = nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
|
||||
specialArgs = {
|
||||
inherit inputs outputs;
|
||||
};
|
||||
|
||||
modules = [
|
||||
disko.nixosModules.disko
|
||||
./hosts/kube02
|
||||
];
|
||||
};
|
||||
|
||||
kube03 = nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
|
||||
specialArgs = {
|
||||
inherit inputs outputs;
|
||||
};
|
||||
|
||||
modules = [
|
||||
disko.nixosModules.disko
|
||||
./hosts/kube03
|
||||
];
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
41
hosts/kube01/default.nix
Normal file
41
hosts/kube01/default.nix
Normal file
|
@ -0,0 +1,41 @@
|
|||
{ inputs, outputs, config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
../../modules/disko/efi-full-btrfs.nix
|
||||
../../modules/systemd-boot.nix
|
||||
|
||||
../../users/julius/nixos-server.nix
|
||||
../../modules/nix.nix
|
||||
../../modules/network-server.nix
|
||||
../../modules/locale.nix
|
||||
../../modules/server-cli.nix
|
||||
../../modules/sshd.nix
|
||||
../../modules/k3s.nix
|
||||
../../modules/qemu-guest.nix
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
|
||||
networking.hostName = "kube01"; # Define your hostname.
|
||||
|
||||
services.k3s = {
|
||||
clusterInit = true;
|
||||
};
|
||||
|
||||
# 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 = "25.05"; # Did you read the comment?
|
||||
}
|
24
hosts/kube01/hardware-configuration.nix
Normal file
24
hosts/kube01/hardware-configuration.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp1s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
}
|
41
hosts/kube02/default.nix
Normal file
41
hosts/kube02/default.nix
Normal file
|
@ -0,0 +1,41 @@
|
|||
{ inputs, outputs, config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
../../modules/disko/efi-full-btrfs.nix
|
||||
../../modules/systemd-boot.nix
|
||||
|
||||
../../users/julius/nixos-server.nix
|
||||
../../modules/nix.nix
|
||||
../../modules/network-server.nix
|
||||
../../modules/locale.nix
|
||||
../../modules/server-cli.nix
|
||||
../../modules/sshd.nix
|
||||
../../modules/k3s.nix
|
||||
../../modules/qemu-guest.nix
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
networking.hostName = "kube02"; # Define your hostname.
|
||||
|
||||
services.k3s = {
|
||||
serverAddr = "https://kube01:6443";
|
||||
clusterInit = false;
|
||||
};
|
||||
|
||||
# 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 = "25.05"; # Did you read the comment?
|
||||
}
|
24
hosts/kube02/hardware-configuration.nix
Normal file
24
hosts/kube02/hardware-configuration.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp1s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
}
|
42
hosts/kube03/default.nix
Normal file
42
hosts/kube03/default.nix
Normal file
|
@ -0,0 +1,42 @@
|
|||
{ inputs, outputs, config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
../../modules/disko/efi-full-btrfs.nix
|
||||
../../modules/systemd-boot.nix
|
||||
|
||||
../../users/julius/nixos-server.nix
|
||||
../../modules/nix.nix
|
||||
../../modules/network-server.nix
|
||||
../../modules/locale.nix
|
||||
../../modules/server-cli.nix
|
||||
../../modules/sshd.nix
|
||||
../../modules/k3s.nix
|
||||
../../modules/qemu-guest.nix
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
|
||||
networking.hostName = "kube03"; # Define your hostname.
|
||||
|
||||
services.k3s = {
|
||||
serverAddr = "https://kube01:6443";
|
||||
clusterInit = false;
|
||||
};
|
||||
|
||||
# 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 = "25.05"; # Did you read the comment?
|
||||
}
|
24
hosts/kube03/hardware-configuration.nix
Normal file
24
hosts/kube03/hardware-configuration.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp1s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
}
|
96
hosts/nixos-server-test/default.nix
Normal file
96
hosts/nixos-server-test/default.nix
Normal file
|
@ -0,0 +1,96 @@
|
|||
{ inputs, outputs, config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
../../modules/nix.nix
|
||||
../../modules/locale.nix
|
||||
../../modules/server-cli.nix
|
||||
../../modules/sshd.nix
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
# Use the GRUB 2 boot loader.
|
||||
boot = {
|
||||
loader.grub = {
|
||||
enable = true;
|
||||
device = "/dev/vda";
|
||||
};
|
||||
tmp.useTmpfs = true;
|
||||
};
|
||||
networking.hostName = "nixos-server"; # Define your hostname.
|
||||
users = {
|
||||
users = {
|
||||
julius = {
|
||||
isNormalUser = true;
|
||||
uid = 1000;
|
||||
extraGroups = [ "wheel" "julius" ];
|
||||
};
|
||||
};
|
||||
groups = {
|
||||
julius = {
|
||||
gid = 1000;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
nix.settings = {
|
||||
substituters = [
|
||||
"https://cache.saumon.network/proxmox-nixos"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"proxmox-nixos:D9RYSWpQQC/msZUWphOY2I5RLH5Dd6yQcaHIuug7dWM="
|
||||
];
|
||||
};
|
||||
|
||||
services.proxmox-ve = {
|
||||
enable = true;
|
||||
ipAddress = "192.168.122.71";
|
||||
|
||||
# Make vmbr0 bridge visible in Proxmox web interface
|
||||
bridges = [ "vmbr0" ];
|
||||
};
|
||||
|
||||
networking.useDHCP = false;
|
||||
|
||||
systemd.network = {
|
||||
enable = true;
|
||||
|
||||
networks."10-lan" = {
|
||||
matchConfig.Name = [ "enp1s0" ];
|
||||
networkConfig = {
|
||||
Bridge = "vmbr0";
|
||||
};
|
||||
};
|
||||
|
||||
netdevs."vmbr0" = {
|
||||
netdevConfig = {
|
||||
Name = "vmbr0";
|
||||
Kind = "bridge";
|
||||
};
|
||||
};
|
||||
|
||||
networks."10-lan-bridge" = {
|
||||
matchConfig.Name = "vmbr0";
|
||||
networkConfig = {
|
||||
IPv6AcceptRA = true;
|
||||
DHCP = "ipv4";
|
||||
};
|
||||
linkConfig.RequiredForOnline = "routable";
|
||||
};
|
||||
};
|
||||
|
||||
# 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 = "25.05"; # Did you read the comment?
|
||||
}
|
31
hosts/nixos-server-test/hardware-configuration.nix
Normal file
31
hosts/nixos-server-test/hardware-configuration.nix
Normal file
|
@ -0,0 +1,31 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/e46c412a-8b6d-41b8-b53c-65d7a8fc39ed";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp1s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
}
|
71
hosts/srv01.hf/default.nix
Normal file
71
hosts/srv01.hf/default.nix
Normal file
|
@ -0,0 +1,71 @@
|
|||
{ inputs, outputs, config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
../../modules/disko/efi-full-btrfs.nix
|
||||
./secrets.nix
|
||||
|
||||
../../users/julius/nixos-server.nix
|
||||
../../users/nixremote.nix
|
||||
../../modules/nix.nix
|
||||
../../modules/network-server.nix
|
||||
../../modules/locale.nix
|
||||
../../modules/server-cli.nix
|
||||
../../modules/sshd.nix
|
||||
../../modules/qemu-guest.nix
|
||||
../../modules/docker.nix
|
||||
../../modules/teleport.nix
|
||||
../../modules/portainer_agent.nix
|
||||
../../modules/auto-upgrade.nix
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
services.openssh.openFirewall = false;
|
||||
services.teleport = {
|
||||
enable = true;
|
||||
settings.teleport = {
|
||||
ca_pin = config.age.secrets."teleport-ca_pin".path;
|
||||
auth_token = config.age.secrets."teleport-join_token".path;
|
||||
};
|
||||
};
|
||||
|
||||
virtualisation.oci-containers.containers.portainer_agent.environmentFiles = [ config.age.secrets."portainer-join_token".path ];
|
||||
|
||||
systemd.network = {
|
||||
enable = true;
|
||||
networks."10-wan" = {
|
||||
matchConfig.Name = "ens18";
|
||||
networkConfig.DHCP = "no";
|
||||
address = [
|
||||
"77.90.17.93/24"
|
||||
"2a06:de00:100:63::2/64"
|
||||
];
|
||||
routes = [
|
||||
{ Gateway = "77.90.17.1"; }
|
||||
{ Gateway = "2a06:de00:100::1"; GatewayOnLink = true; }
|
||||
];
|
||||
dns = [ "9.9.9.9" ];
|
||||
};
|
||||
};
|
||||
|
||||
# Disable classic networking configuration
|
||||
networking.useDHCP = lib.mkForce false;
|
||||
|
||||
networking.hostName = "srv01-hf"; # Define your hostname.
|
||||
|
||||
# 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 = "25.05"; # Did you read the comment?
|
||||
}
|
24
hosts/srv01.hf/hardware-configuration.nix
Normal file
24
hosts/srv01.hf/hardware-configuration.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "uhci_hcd" "ehci_pci" "ahci" "sr_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp1s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
}
|
8
hosts/srv01.hf/secrets.nix
Normal file
8
hosts/srv01.hf/secrets.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{ inputs, ... }:
|
||||
{
|
||||
age.secrets = {
|
||||
teleport-ca_pin.file = "${inputs.secrets}/secrets/teleport/ca_pin";
|
||||
teleport-join_token.file = "${inputs.secrets}/secrets/srv01-hf/teleport_auth_token";
|
||||
portainer-join_token.file = "${inputs.secrets}/secrets/srv01-hf/portainer_join_token";
|
||||
};
|
||||
}
|
37
modules/auto-upgrade.nix
Normal file
37
modules/auto-upgrade.nix
Normal file
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
system.autoUpgrade = {
|
||||
enable = true;
|
||||
flags = [
|
||||
"--recreate-lock-file" # Deprecated, but will hopefully be reintroduced
|
||||
"-L"
|
||||
];
|
||||
flake = inputs.self.outPath;
|
||||
dates = "02:00";
|
||||
randomizedDelaySec = "45min";
|
||||
allowReboot = true;
|
||||
rebootWindow = {
|
||||
lower = "01:00";
|
||||
upper = "05:00";
|
||||
};
|
||||
};
|
||||
|
||||
# Also needs access to the nix-private repo which contains the encrypted secrets
|
||||
programs.ssh = {
|
||||
extraConfig = "
|
||||
Host git.jfreudenberger.de
|
||||
Port 222
|
||||
User git
|
||||
IdentityFile /etc/ssh/ssh_host_ed25519_key
|
||||
";
|
||||
knownHostsFiles = [
|
||||
(pkgs.writeText "forgejo.keys" ''[git.jfreudenberger.de]:222 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK+uqIeb9+AoqwD0Z6xLKI2dsRoS9Qh/VwboYfGpBJd+
|
||||
[git.jfreudenberger.de]:222 ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC8GDSt4LsCzOoIZkqZRLgXyTLyHoJu62cFFP88i8GpSadyV6mJPkK5p2mgBzN/BM9I/G2VWfvqdM8Fy/7p3S8kDhmmkOk1AK7C/+qaQKsKcQauJuzNXlwMHG1Ivath80TO9PIQc9jYakP9xl8SACd5bwkvfEm3rS5awZ8T2hWgnsgO8pFHFOFmFnVbujXZk58FVTCxpgyPqjFv76JSYxpHk1VtiQ52jScsreOImEOWWg88f9IM9etWcshuxte4zudaqc2KjjAB6pYMuVj7O6cwMXKjCUxTzyomWjr2JoEruIslifbZ6bJGgswg5ENJSKURuMPgTuGM6Nrjp75V/yFD
|
||||
[git.jfreudenberger.de]:222 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBOS447cAWRZgHPs6MOoRS6/J66oY753QPiM7BI63/qNDd5qrCan153dJd5lBGwDR0vMWiV/0cmzuACfP5QS1Lv8=
|
||||
'')
|
||||
];
|
||||
};
|
||||
}
|
61
modules/disko/efi-full-btrfs.nix
Normal file
61
modules/disko/efi-full-btrfs.nix
Normal file
|
@ -0,0 +1,61 @@
|
|||
{
|
||||
disko.devices = {
|
||||
disk = {
|
||||
sda = {
|
||||
type = "disk";
|
||||
device = "/dev/sda";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
MBR = {
|
||||
type = "EF02"; # for grub MBR
|
||||
size = "1M";
|
||||
priority = 1; # Needs to be first partition
|
||||
};
|
||||
ESP = {
|
||||
priority = 1;
|
||||
name = "ESP";
|
||||
size = "500M";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [ "umask=0077" ];
|
||||
};
|
||||
};
|
||||
root = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = [ "-f" ]; # Override existing partition
|
||||
# Subvolumes must set a mountpoint in order to be mounted,
|
||||
# unless their parent is mounted
|
||||
subvolumes = {
|
||||
# Subvolume name is different from mountpoint
|
||||
"/rootfs" = {
|
||||
mountpoint = "/";
|
||||
};
|
||||
# Subvolume name is the same as the mountpoint
|
||||
"/home" = {
|
||||
mountOptions = [ "compress=zstd" ];
|
||||
mountpoint = "/home";
|
||||
};
|
||||
# Sub(sub)volume doesn't need a mountpoint as its parent is mounted
|
||||
"/home/julius" = { };
|
||||
# Parent is not mounted so the mountpoint must be set
|
||||
"/nix" = {
|
||||
mountOptions = [ "compress=zstd" "noatime" ];
|
||||
mountpoint = "/nix";
|
||||
};
|
||||
};
|
||||
|
||||
mountpoint = "/partition-root";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -4,8 +4,11 @@
|
|||
...
|
||||
}: {
|
||||
|
||||
virtualisation.docker = {
|
||||
enable = true;
|
||||
virtualisation = {
|
||||
docker = {
|
||||
enable = true;
|
||||
};
|
||||
oci-containers.backend = "docker";
|
||||
};
|
||||
|
||||
}
|
||||
|
|
28
modules/k3s.nix
Normal file
28
modules/k3s.nix
Normal file
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
|
||||
services.k3s = {
|
||||
enable = true;
|
||||
role = "server";
|
||||
token = "verysecrettoken";
|
||||
extraFlags = toString ([
|
||||
"--write-kubeconfig-mode \"0644\""
|
||||
"--disable servicelb"
|
||||
"--disable traefik"
|
||||
"--disable local-storage"
|
||||
]);
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
6443
|
||||
2379
|
||||
2380
|
||||
];
|
||||
networking.firewall.allowedUDPPorts = [
|
||||
8472
|
||||
];
|
||||
|
||||
}
|
21
modules/portainer_agent.nix
Normal file
21
modules/portainer_agent.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
...
|
||||
}: {
|
||||
virtualisation.oci-containers.containers = {
|
||||
portainer_agent = {
|
||||
image = "portainer/agent:2.33.1";
|
||||
volumes = [
|
||||
"/var/run/docker.sock:/var/run/docker.sock"
|
||||
"/var/lib/docker/volumes:/var/lib/docker/volumes"
|
||||
"/:/host"
|
||||
];
|
||||
environment = {
|
||||
EDGE = "1";
|
||||
CAP_HOST_MANAGEMENT = "1";
|
||||
};
|
||||
extraOptions = [
|
||||
''--mount=type=volume,source=portainer_agent,target=/data,volume-driver=local''
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
7
modules/qemu-guest.nix
Normal file
7
modules/qemu-guest.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
...
|
||||
}: {
|
||||
|
||||
services.qemuGuest.enable = true;
|
||||
|
||||
}
|
13
modules/sshd.nix
Normal file
13
modules/sshd.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
PasswordAuthentication = false;
|
||||
PermitRootLogin = "no";
|
||||
};
|
||||
};
|
||||
}
|
15
modules/systemd-boot.nix
Normal file
15
modules/systemd-boot.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
...
|
||||
}: {
|
||||
|
||||
boot = {
|
||||
loader = {
|
||||
systemd-boot = {
|
||||
enable = true;
|
||||
};
|
||||
efi.canTouchEfiVariables = true;
|
||||
};
|
||||
tmp.useTmpfs = true;
|
||||
};
|
||||
|
||||
}
|
23
users/julius/nixos-server.nix
Normal file
23
users/julius/nixos-server.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
...
|
||||
}: {
|
||||
|
||||
users = {
|
||||
users = {
|
||||
julius = {
|
||||
initialPassword = "password";
|
||||
isNormalUser = true;
|
||||
uid = 1000;
|
||||
group = "julius";
|
||||
extraGroups = [ "wheel" ];
|
||||
};
|
||||
};
|
||||
groups = {
|
||||
julius = {
|
||||
gid = 1000;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
nix.settings.trusted-users = [ "julius" ];
|
||||
}
|
13
users/nixremote.nix
Normal file
13
users/nixremote.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
...
|
||||
}: {
|
||||
users.users = {
|
||||
nixremote = {
|
||||
isNormalUser = true;
|
||||
uid = 1100;
|
||||
group = "users";
|
||||
};
|
||||
};
|
||||
|
||||
nix.settings.trusted-users = [ "nixremote" ];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue