migrates dnsc-server
This commit is contained in:
parent
ac4074245c
commit
996dc27419
15 changed files with 318 additions and 9 deletions
52
modules/hosts/dnsc-server/_hardware-configuration.nix
Normal file
52
modules/hosts/dnsc-server/_hardware-configuration.nix
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [
|
||||
"vmd"
|
||||
"xhci_pci"
|
||||
"ahci"
|
||||
"usb_storage"
|
||||
"usbhid"
|
||||
"sd_mod"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/89318ceb-c0c6-47f2-9cad-99612498bd75";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/EE6C-978E";
|
||||
fsType = "vfat";
|
||||
options = [
|
||||
"fmask=0077"
|
||||
"dmask=0077"
|
||||
];
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{ device = "/dev/disk/by-uuid/9c843b67-418a-4d11-8700-6a0eb866c02c"; }
|
||||
];
|
||||
|
||||
# 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.enp2s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
41
modules/hosts/dnsc-server/default.nix
Normal file
41
modules/hosts/dnsc-server/default.nix
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{ inputs, config, ... }:
|
||||
let
|
||||
hostname = "dnsc-server";
|
||||
in
|
||||
{
|
||||
flake.nixosConfigurations.${hostname} = inputs.nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = with config.flake.modules.nixos; [
|
||||
agenix.nixosModules.default
|
||||
home-manager
|
||||
base
|
||||
git
|
||||
ssh
|
||||
zfs
|
||||
ups
|
||||
cli-tools
|
||||
nix
|
||||
jellyfin
|
||||
restic
|
||||
samba-share
|
||||
|
||||
{
|
||||
imports = [ ./_hardware-configuration.nix ];
|
||||
samba-share.path = "/main/share";
|
||||
samba-share.allowedHosts = "192.168.178. 127.0.0.1 localhost";
|
||||
networking.hostName = hostname;
|
||||
system.stateVersion = "24.11";
|
||||
|
||||
# Secrets for this machine
|
||||
age = {
|
||||
identityPaths = [
|
||||
"${config.users.users.dennis.home}/.ssh/id_ed25519"
|
||||
];
|
||||
secrets."restic/password" = {
|
||||
file = ../../secrets/restic/password.age;
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue