mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-06-17 02:25:12 -05:00
feat: cleaned up some stuff
This commit is contained in:
parent
a5996792ce
commit
b8c25f618e
11 changed files with 51 additions and 49 deletions
47
systems/saturn/config/boot.nix
Executable file
47
systems/saturn/config/boot.nix
Executable file
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
boot = {
|
||||
extraModulePackages = [
|
||||
config.boot.kernelPackages.v4l2loopback.out
|
||||
];
|
||||
supportedFilesystems = [ "ntfs" ];
|
||||
initrd = {
|
||||
availableKernelModules = [
|
||||
"amdgpu"
|
||||
"nvme"
|
||||
"ahci"
|
||||
"xhci_pci"
|
||||
"usb_storage"
|
||||
"usbhid"
|
||||
"sd_mod"
|
||||
];
|
||||
kernelModules = [ ];
|
||||
};
|
||||
|
||||
kernelModules = [
|
||||
"kvm-amd"
|
||||
"vfio-pci"
|
||||
"v4l2loopback"
|
||||
];
|
||||
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
loader = {
|
||||
efi = {
|
||||
canTouchEfiVariables = true;
|
||||
efiSysMountPoint = "/boot";
|
||||
};
|
||||
systemd-boot.enable = false;
|
||||
grub = {
|
||||
enable = true;
|
||||
device = "nodev";
|
||||
useOSProber = true;
|
||||
efiSupport = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
53
systems/saturn/config/filesystem.nix
Executable file
53
systems/saturn/config/filesystem.nix
Executable file
|
@ -0,0 +1,53 @@
|
|||
{
|
||||
config,
|
||||
flake,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (flake.config.people) user2;
|
||||
inherit (flake.config.machines.devices) saturn;
|
||||
in
|
||||
{
|
||||
imports = [ ];
|
||||
|
||||
fileSystems =
|
||||
let
|
||||
storageDrives = [
|
||||
"storage0"
|
||||
"storage1"
|
||||
];
|
||||
|
||||
storageMounts = storage: {
|
||||
name = "${saturn.${storage}.mount}";
|
||||
value = {
|
||||
device = saturn.${storage}.device;
|
||||
fsType = "ext4";
|
||||
options = saturn.${storage}.options;
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
"/" = {
|
||||
device = "/dev/disk/by-uuid/d02cb367-26e0-4708-8840-75dcc4362ff4";
|
||||
fsType = "ext4";
|
||||
};
|
||||
"/boot" = {
|
||||
device = "/dev/disk/by-uuid/22BD-5A25";
|
||||
fsType = "vfat";
|
||||
options = saturn.boot.options;
|
||||
};
|
||||
}
|
||||
// (builtins.listToAttrs (map storageMounts storageDrives));
|
||||
|
||||
swapDevices = [
|
||||
{ device = "/dev/disk/by-uuid/cc7ab213-26c9-4567-91ca-9dba6e98c9d1"; }
|
||||
];
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"Z ${config.home-manager.users.${user2}.home.homeDirectory} 0755 ${user2} users -"
|
||||
"Z ${saturn.storage0.mount} 0755 ${user2} users -"
|
||||
"Z ${saturn.storage1.mount} 0755 ${user2} users -"
|
||||
];
|
||||
|
||||
services.udisks2.enable = true;
|
||||
}
|
24
systems/saturn/config/graphics.nix
Executable file
24
systems/saturn/config/graphics.nix
Executable file
|
@ -0,0 +1,24 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
hardware = {
|
||||
graphics = {
|
||||
enable = true;
|
||||
extraPackages = builtins.attrValues {
|
||||
inherit (pkgs)
|
||||
amdvlk
|
||||
;
|
||||
inherit (pkgs.rocmPackages.clr)
|
||||
icd
|
||||
;
|
||||
};
|
||||
extraPackages32 = builtins.attrValues {
|
||||
inherit (pkgs.driversi686Linux)
|
||||
amdvlk
|
||||
;
|
||||
};
|
||||
};
|
||||
};
|
||||
boot.initrd.kernelModules = [
|
||||
"amdgpu"
|
||||
];
|
||||
}
|
13
systems/saturn/config/hardware.nix
Executable file
13
systems/saturn/config/hardware.nix
Executable file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
hardware = {
|
||||
firmware = [ pkgs.rtl8761b-firmware ];
|
||||
enableAllFirmware = true;
|
||||
cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
};
|
||||
}
|
31
systems/saturn/config/networking.nix
Executable file
31
systems/saturn/config/networking.nix
Executable file
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
lib,
|
||||
flake,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (flake.config.machines.devices) saturn;
|
||||
in
|
||||
{
|
||||
networking = {
|
||||
hostName = saturn.name;
|
||||
networkmanager.enable = true;
|
||||
useDHCP = lib.mkDefault true;
|
||||
firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [ ];
|
||||
};
|
||||
};
|
||||
services = {
|
||||
avahi = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
nssmdns4 = true;
|
||||
};
|
||||
sshd.enable = true;
|
||||
openssh = {
|
||||
enable = true;
|
||||
settings.PasswordAuthentication = false;
|
||||
};
|
||||
};
|
||||
}
|
20
systems/saturn/default.nix
Executable file
20
systems/saturn/default.nix
Executable file
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
configPath = ./config;
|
||||
|
||||
saturnImports =
|
||||
let
|
||||
files = builtins.attrNames (builtins.readDir configPath);
|
||||
in
|
||||
map (name: configPath + "/${name}") (
|
||||
builtins.filter (name: builtins.match ".*\\.nix$" name != null) files
|
||||
);
|
||||
in
|
||||
{
|
||||
imports = saturnImports;
|
||||
nixpkgs.hostPlatform = lib.mkForce "x86_64-linux";
|
||||
system.stateVersion = lib.mkForce "24.05";
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue