hosts: move to new structure

Signed-off-by: unexplrd <unexplrd@linerds.us>
This commit is contained in:
2025-05-03 21:52:55 +03:00
parent 5fe09a598a
commit 7e2458b322
55 changed files with 538 additions and 405 deletions

View File

@ -8,14 +8,12 @@
self.nixosModules.system
./boot
./disko
./facter
./hardware.nix
./networking.nix
./hardware
./networking
./nix
./power-saving.nix
../dunamis/programs.nix
./services.nix
./sops.nix
../dunamis/services.nix
../dunamis/sops.nix
./users.nix
];

View File

@ -1,55 +0,0 @@
{
lib,
inputs,
modulesPath,
...
}: {
# imports = with inputs.nixos-hardware.nixosModules; [
# (modulesPath + "/installer/scan/not-detected.nix")
# common-cpu-intel
# common-gpu-intel-kaby-lake
# common-hidpi
# common-pc-laptop-ssd
# ];
# nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
# hardware.enableRedistributableFirmware = true;
services = {
logind = {
lidSwitch = "ignore";
powerKey = "suspend";
};
udev.extraHwdb = ''
evdev:input:b0011v0001p0001eAB83*
KEYBOARD_KEY_d5=sysrq
KEYBOARD_KEY_d4=leftmeta
KEYBOARD_KEY_95=brightnessdown
KEYBOARD_KEY_91=brightnessup
'';
keyd = {
enable = true;
keyboards = {
default = {
ids = ["0001:0001"];
settings = {
main = {
camera = "brightnessdown";
prog1 = "brightnessup";
# home row mods
a = "lettermod(alt, a, 200, 150)";
s = "lettermod(meta, s, 200, 150)";
d = "lettermod(control, d, 200, 150)";
f = "lettermod(shift, f, 200, 150)";
j = "lettermod(shift, j, 200, 150)";
k = "lettermod(control, k, 200, 150)";
l = "lettermod(meta, l, 200, 150)";
";" = "lettermod(alt, ;, 200, 150)";
};
};
};
};
};
};
}

View File

@ -0,0 +1,13 @@
{
imports = [
./facter.nix
./laptop
./vaapi/intel-media-driver.nix
];
services = {
logind = {
lidSwitch = "ignore";
powerKey = "suspend";
};
};
}

View File

@ -0,0 +1,7 @@
{
imports = [
./home-row-mods.nix
./keyboard-fix.nix
./power-saving.nix
];
}

View File

@ -0,0 +1,20 @@
{
services.keyd = {
enable = true;
keyboards = {
default = {
ids = ["0001:0001"];
settings.main = {
a = "lettermod(alt, a, 200, 150)";
s = "lettermod(meta, s, 200, 150)";
d = "lettermod(control, d, 200, 150)";
f = "lettermod(shift, f, 200, 150)";
j = "lettermod(shift, j, 200, 150)";
k = "lettermod(control, k, 200, 150)";
l = "lettermod(meta, l, 200, 150)";
";" = "lettermod(alt, ;, 200, 150)";
};
};
};
};
}

View File

@ -0,0 +1,21 @@
{
services = {
udev.extraHwdb = ''
evdev:input:b0011v0001p0001eAB83*
KEYBOARD_KEY_d5=sysrq
KEYBOARD_KEY_d4=leftmeta
KEYBOARD_KEY_95=brightnessdown
KEYBOARD_KEY_91=brightnessup
'';
keyd = {
enable = true;
keyboards.default = {
ids = ["0001:0001"];
settings.main = {
camera = "brightnessdown";
prog1 = "brightnessup";
};
};
};
};
}

View File

@ -0,0 +1,7 @@
{pkgs, ...}: {
hardware.graphics.extraPackages = with pkgs; [
intel-compute-runtime
intel-media-driver
vpl-gpu-rt
];
}

View File

@ -1,10 +0,0 @@
{
networking = {
networkmanager.enable = true;
hostId = "31150fae";
hostName = "sarien";
hosts = {
"192.168.1.42" = ["dunamis"];
};
};
}

View File

@ -0,0 +1,9 @@
{
imports = [
./network-manager.nix
./host-name-id.nix
];
networking = {
hosts = import ./hosts.nix;
};
}

View File

@ -0,0 +1,6 @@
{
networking = {
hostId = "31150fae";
hostName = "sarien";
};
}

View File

@ -0,0 +1,3 @@
{
"192.168.1.42" = ["dunamis"];
}

View File

@ -0,0 +1,20 @@
{
networking = {
networkmanager = {
enable = true;
ethernet.macAddress = "stable";
networkmanager.wifi = {
backend = "iwd";
macAddress = "random";
scanRandMacAddress = true;
};
};
wireless.iwd = {
enable = true;
settings = {
General.AddressRandomization = "network";
Settings.AlwaysRandomizeAddress = true;
};
};
};
}