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

@ -1,6 +1,6 @@
{
pkgs,
inputs,
pkgs,
...
}: {
imports = with inputs;
@ -12,7 +12,6 @@
./loader.nix
];
boot = {
# kernelPackages = pkgs.linuxPackages_latest;
plymouth.enable = true;
consoleLogLevel = 0;
kernelPackages = pkgs.linuxPackages_cachyos;
@ -33,6 +32,7 @@
];
initrd = {
systemd.enable = true; # needed for auto-unlocking with TPM
systemd.tpm2.enable = true;
};
};
}

View File

@ -1,21 +1,17 @@
{
inputs,
pkgs,
...
}: {
{inputs, ...}: {
imports = with inputs; [
self.nixosModules.desktop
self.nixosModules.system
./boot
./disko
./facter
./networking.nix
./hardware
./minecraft.nix
./networking
./nix
./programs.nix
./services.nix
./sops.nix
./users.nix
./minecraft.nix
];
desktop.niri.enable = true;
@ -35,9 +31,4 @@
bluetooth.enable = true;
bluetooth.enableBlueman = false;
};
hardware.graphics.extraPackages = with pkgs; [
intel-compute-runtime
intel-media-driver
vpl-gpu-rt
];
}

View File

@ -1,17 +0,0 @@
{
lib,
inputs,
modulesPath,
...
}: {
imports = with inputs.nixos-hardware.nixosModules; [
(modulesPath + "/installer/scan/not-detected.nix")
common-cpu-amd-pstate
common-gpu-intel
common-hidpi
common-pc-ssd
];
hardware.enableRedistributableFirmware = true;
hardware.intelgpu.vaapiDriver = "intel-media-driver";
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}

View File

@ -0,0 +1,6 @@
{
imports = [
./facter.nix
./vaapi/intel-media-driver.nix
];
}

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 = {
hostId = "c7f6c4a1";
hostName = "dunamis";
networkmanager = {
enable = true;
ethernet.macAddress = "stable";
};
};
}

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 = "c7f6c4a1";
hostName = "dunamis";
};
}

View File

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

View File

@ -0,0 +1,7 @@
{
networking.networkmanager = {
enable = true;
ethernet.macAddress = "stable";
};
};
}

View File

@ -6,6 +6,7 @@
programs = {
fish.enable = true;
mosh.enable = true;
nix-ld.enable = true;
nh = {
enable = true;
flake = "/home/user/.config/nixos";

View File

@ -4,12 +4,9 @@
...
}: let
inherit (inputs) mysecrets;
hostName =
if (config.networking.hostName == "vylxae")
then "sarien"
else config.networking.hostName;
sopsFile = mysecrets + "/hosts/${hostName}.yaml";
inherit (config.networking) hostName;
dotSsh = name: "/home/user/.ssh/" + name;
sopsFile = mysecrets + "/hosts/${hostName}.yaml";
sshKey = {
mode = "0400";
owner = "user";