initial config commit

This commit is contained in:
wi11-holdsworth 2025-07-11 16:57:21 +10:00
parent f8980b6805
commit f3dc1d15ff
79 changed files with 2725 additions and 0 deletions

View file

@ -0,0 +1,42 @@
{
pkgs,
hostName,
inputs,
userName,
...
}:
{
imports = [
../../modules/nixos/default.nix
./hardware-configuration.nix
];
# reusable modules
amd-gpu.enable = true;
desktop.enable = true;
external-speakers.enable = true;
gaming.enable = true;
link2c.enable = true;
# config
boot.initrd.luks.devices."luks-b164af31-c1c3-4b4e-83c8-eb39802c2027".device =
"/dev/disk/by-uuid/b164af31-c1c3-4b4e-83c8-eb39802c2027";
services.btrfs.autoScrub.enable = true;
system.stateVersion = "24.11";
i18n.extraLocaleSettings.LC_ALL = "en_AU.UTF-8";
users.users.${userName} = {
extraGroups = [
"networkmanager"
"wheel"
"scanner"
"lp"
];
isNormalUser = true;
};
}

View file

@ -0,0 +1,66 @@
{
config,
lib,
modulesPath,
...
}:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [
"nvme"
"xhci_pci"
"ahci"
"usbhid"
"sd_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" = {
device = "/dev/disk/by-uuid/8ac17d03-8db2-455f-b73a-06d73022a079";
fsType = "ext4";
};
boot.initrd.luks.devices."luks-bf3ff3bf-7210-4c50-a6bc-feb5bdb6fa0d".device =
"/dev/disk/by-uuid/bf3ff3bf-7210-4c50-a6bc-feb5bdb6fa0d";
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/3854-4FAE";
fsType = "vfat";
options = [
"fmask=0077"
"dmask=0077"
];
};
fileSystems."/media/games" = {
device = "/dev/disk/by-uuid/ea672712-282d-4421-bf34-c9a249a9b275";
fsType = "btrfs";
options = [
"compress=zstd"
"subvol=games"
];
};
fileSystems."/media/hoard" = {
device = "/dev/disk/by-uuid/ea672712-282d-4421-bf34-c9a249a9b275";
fsType = "btrfs";
options = [
"compress=zstd"
"subvol=hoard"
];
};
swapDevices = [
{ device = "/dev/disk/by-uuid/000dc4be-b250-4870-9284-b761486e8cea"; }
];
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

19
hosts/desktop/home.nix Normal file
View file

@ -0,0 +1,19 @@
{
userName,
...
}:
{
imports = [ ../../modules/home-manager/default.nix ];
# reusable modules
desktop.enable = true;
# config
home = {
username = "${userName}";
homeDirectory = "/home/will";
stateVersion = "24.11";
};
}

View file

@ -0,0 +1,38 @@
{
pkgs,
hostName,
inputs,
userName,
...
}:
{
imports = [
../../modules/nixos/default.nix
./hardware-configuration.nix
];
# reusable modules
amd-gpu.enable = true;
desktop.enable = true;
networkmanager.enable = true;
# config
boot.initrd.luks.devices."luks-433a5889-6f18-4c9a-8d99-db02af39bdee".device =
"/dev/disk/by-uuid/433a5889-6f18-4c9a-8d99-db02af39bdee";
system.stateVersion = "24.11";
i18n.extraLocaleSettings.LC_ALL = "en_AU.UTF-8";
users.users.${userName} = {
extraGroups = [
"networkmanager"
"wheel"
"scanner"
"lp"
];
isNormalUser = true;
};
}

View file

@ -0,0 +1,42 @@
# 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 + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/cdb8d2dd-a466-4c53-8c42-f00af5e85d81";
fsType = "ext4";
};
boot.initrd.luks.devices."luks-67930062-ceb2-4d9a-83d9-dfad48287a00".device = "/dev/disk/by-uuid/67930062-ceb2-4d9a-83d9-dfad48287a00";
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/CFBE-B36B";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices =
[ { device = "/dev/disk/by-uuid/7d677650-2504-4df0-8631-d7a7ff325e35"; }
];
# 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.wlp1s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

19
hosts/laptop/home.nix Normal file
View file

@ -0,0 +1,19 @@
{
userName,
...
}:
{
imports = [ ../../modules/home-manager/default.nix ];
# reusable modules
desktop.enable = true;
# config
home = {
username = "${userName}";
homeDirectory = "/home/will";
stateVersion = "24.11";
};
}

View file

@ -0,0 +1,42 @@
{
pkgs,
hostName,
inputs,
userName,
...
}:
{
imports = [
../../modules/nixos/default.nix
./hardware-configuration.nix
];
# reusable modules
borgbackup-srv.enable = true;
intel-gpu.enable = true;
server.enable = true;
# config
networking.hostName = "${hostName}";
services.openssh.enable = true;
system.stateVersion = "24.11";
users = {
groups.${userName} = { };
users.${userName} = {
extraGroups = [
"wheel"
"docker"
];
home = "/home/srv";
isNormalUser = true;
shell = pkgs.bash;
};
};
virtualisation.docker.enable = true;
}

View file

@ -0,0 +1,58 @@
# 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 + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"usb_storage"
"usbhid"
"sd_mod"
"sdhci_pci"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
fileSystems."/" = {
device = "/dev/disk/by-uuid/f202dcb2-1af3-4841-b0a7-303b18e68421";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/E591-819C";
fsType = "vfat";
options = [
"fmask=0767"
"dmask=0767"
];
};
swapDevices = [
{ device = "/dev/disk/by-uuid/8e471996-8a5d-4782-b87f-83f2b3839f53"; }
];
# 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;
# networking.interfaces.enp2s0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlo1.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

13
hosts/server/home.nix Normal file
View file

@ -0,0 +1,13 @@
{
userName,
...
}:
{
imports = [ ../../modules/home-manager/default.nix ];
home = {
username = "${userName}";
homeDirectory = "/home/srv";
stateVersion = "24.11";
};
}