hosts: move to new structure
Signed-off-by: unexplrd <unexplrd@linerds.us>
This commit is contained in:
@ -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;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -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
|
||||
];
|
||||
}
|
||||
|
@ -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";
|
||||
}
|
6
hosts/dunamis/hardware/default.nix
Normal file
6
hosts/dunamis/hardware/default.nix
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
imports = [
|
||||
./facter.nix
|
||||
./vaapi/intel-media-driver.nix
|
||||
];
|
||||
}
|
7
hosts/dunamis/hardware/vaapi/intel-media-driver.nix
Normal file
7
hosts/dunamis/hardware/vaapi/intel-media-driver.nix
Normal file
@ -0,0 +1,7 @@
|
||||
{pkgs, ...}: {
|
||||
hardware.graphics.extraPackages = with pkgs; [
|
||||
intel-compute-runtime
|
||||
intel-media-driver
|
||||
vpl-gpu-rt
|
||||
];
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
{
|
||||
networking = {
|
||||
hostId = "c7f6c4a1";
|
||||
hostName = "dunamis";
|
||||
networkmanager = {
|
||||
enable = true;
|
||||
ethernet.macAddress = "stable";
|
||||
};
|
||||
};
|
||||
}
|
9
hosts/dunamis/networking/default.nix
Normal file
9
hosts/dunamis/networking/default.nix
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
imports = [
|
||||
./network-manager.nix
|
||||
./host-name-id.nix
|
||||
];
|
||||
networking = {
|
||||
hosts = import ./hosts.nix;
|
||||
};
|
||||
}
|
6
hosts/dunamis/networking/host-name-id.nix
Normal file
6
hosts/dunamis/networking/host-name-id.nix
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
networking = {
|
||||
hostId = "c7f6c4a1";
|
||||
hostName = "dunamis";
|
||||
};
|
||||
}
|
3
hosts/dunamis/networking/hosts.nix
Normal file
3
hosts/dunamis/networking/hosts.nix
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"192.168.1.42" = ["dunamis"];
|
||||
}
|
7
hosts/dunamis/networking/network-manager.nix
Normal file
7
hosts/dunamis/networking/network-manager.nix
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
networking.networkmanager = {
|
||||
enable = true;
|
||||
ethernet.macAddress = "stable";
|
||||
};
|
||||
};
|
||||
}
|
@ -6,6 +6,7 @@
|
||||
programs = {
|
||||
fish.enable = true;
|
||||
mosh.enable = true;
|
||||
nix-ld.enable = true;
|
||||
nh = {
|
||||
enable = true;
|
||||
flake = "/home/user/.config/nixos";
|
||||
|
@ -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";
|
||||
|
Reference in New Issue
Block a user