mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-06-16 01:55:13 -05:00
feat: added phobos
This commit is contained in:
parent
ca0b96d147
commit
8549ffce2e
13 changed files with 290 additions and 1 deletions
43
systems/phobos/config/boot.nix
Executable file
43
systems/phobos/config/boot.nix
Executable file
|
@ -0,0 +1,43 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
boot = {
|
||||
extraModulePackages = [
|
||||
config.boot.kernelPackages.v4l2loopback.out
|
||||
];
|
||||
supportedFilesystems = [
|
||||
"ntfs"
|
||||
];
|
||||
initrd = {
|
||||
availableKernelModules = [
|
||||
"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 = true;
|
||||
};
|
||||
};
|
||||
}
|
38
systems/phobos/config/filesystem.nix
Executable file
38
systems/phobos/config/filesystem.nix
Executable file
|
@ -0,0 +1,38 @@
|
|||
{
|
||||
flake,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (flake.config.people)
|
||||
user0
|
||||
user1
|
||||
;
|
||||
inherit (flake.config.machines.devices)
|
||||
phobos
|
||||
;
|
||||
in
|
||||
{
|
||||
fileSystems = {
|
||||
"/" = {
|
||||
device = "/dev/disk/by-uuid/c9a82c93-1da4-4cd1-a1fa-26483271a2bb";
|
||||
fsType = "ext4";
|
||||
};
|
||||
"/boot" = {
|
||||
device = "/dev/disk/by-uuid/71CA-765A";
|
||||
fsType = "vfat";
|
||||
options = phobos.boot.options;
|
||||
};
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{ device = "/dev/disk/by-uuid/74007bf1-6e2f-425e-99fa-d35990f4ea37"; }
|
||||
];
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"Z ${config.home-manager.users.${user0}.home.homeDirectory} 0755 ${user0} users -"
|
||||
"Z ${config.home-manager.users.${user1}.home.homeDirectory} 0755 ${user1} users -"
|
||||
];
|
||||
|
||||
services.udisks2.enable = true;
|
||||
}
|
24
systems/phobos/config/graphics.nix
Executable file
24
systems/phobos/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"
|
||||
];
|
||||
}
|
15
systems/phobos/config/hardware.nix
Executable file
15
systems/phobos/config/hardware.nix
Executable file
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
hardware = {
|
||||
firmware = [
|
||||
pkgs.rtl8761b-firmware
|
||||
];
|
||||
enableAllFirmware = true;
|
||||
cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
};
|
||||
}
|
37
systems/phobos/config/networking.nix
Executable file
37
systems/phobos/config/networking.nix
Executable file
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
lib,
|
||||
flake,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (flake.config.machines.devices)
|
||||
phobos
|
||||
;
|
||||
in
|
||||
{
|
||||
networking = {
|
||||
hostName = phobos.name;
|
||||
networkmanager.enable = true;
|
||||
nftables.enable = true;
|
||||
useDHCP = lib.mkDefault true;
|
||||
firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [
|
||||
22 # SSH
|
||||
55771
|
||||
];
|
||||
};
|
||||
};
|
||||
services = {
|
||||
avahi = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
nssmdns4 = true;
|
||||
};
|
||||
sshd.enable = true;
|
||||
openssh = {
|
||||
enable = true;
|
||||
settings.PasswordAuthentication = false;
|
||||
};
|
||||
};
|
||||
}
|
16
systems/phobos/config/sops.nix
Executable file
16
systems/phobos/config/sops.nix
Executable file
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
sops = {
|
||||
secrets = {
|
||||
"network/synology" = {
|
||||
path = "/var/lib/secrets/synology";
|
||||
owner = "root";
|
||||
mode = "600";
|
||||
};
|
||||
"network/server" = {
|
||||
path = "/var/lib/secrets/server";
|
||||
owner = "root";
|
||||
mode = "600";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
17
systems/phobos/default.nix
Executable file
17
systems/phobos/default.nix
Executable file
|
@ -0,0 +1,17 @@
|
|||
{ lib, ... }:
|
||||
let
|
||||
configPath = ./config;
|
||||
|
||||
deimosImports =
|
||||
let
|
||||
files = builtins.attrNames (builtins.readDir configPath);
|
||||
in
|
||||
map (name: configPath + "/${name}") (
|
||||
builtins.filter (name: builtins.match ".*\\.nix$" name != null) files
|
||||
);
|
||||
in
|
||||
{
|
||||
imports = deimosImports;
|
||||
nixpkgs.hostPlatform = lib.mkForce "x86_64-linux";
|
||||
system.stateVersion = lib.mkForce "24.05";
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue