mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-06-16 18:15:13 -05:00
feat: changed system naming convention
This commit is contained in:
parent
33455dccd9
commit
1b36918ced
30 changed files with 51 additions and 49 deletions
43
systems/deimos/config/boot.nix
Executable file
43
systems/deimos/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;
|
||||
};
|
||||
};
|
||||
}
|
82
systems/deimos/config/filesystem.nix
Executable file
82
systems/deimos/config/filesystem.nix
Executable file
|
@ -0,0 +1,82 @@
|
|||
{
|
||||
flake,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (flake.config.people)
|
||||
user0
|
||||
user1
|
||||
;
|
||||
inherit (flake.config.machines.devices)
|
||||
deimos
|
||||
synology
|
||||
ceres
|
||||
;
|
||||
inherit (flake.config.services.instances)
|
||||
samba
|
||||
;
|
||||
|
||||
synologySecrets = config.sops.secrets."network/synology".path;
|
||||
ceresSecrets = config.sops.secrets."network/server".path;
|
||||
in
|
||||
{
|
||||
fileSystems =
|
||||
let
|
||||
synologyDrives = [
|
||||
"folder0"
|
||||
"folder1"
|
||||
"folder2"
|
||||
];
|
||||
|
||||
sambaDrives = [
|
||||
"samba0"
|
||||
];
|
||||
|
||||
synologyMounts = synologyDrive: {
|
||||
name = "${synology.${synologyDrive}.mount}";
|
||||
value = {
|
||||
device = synology.${synologyDrive}.device;
|
||||
fsType = "cifs";
|
||||
options = synology.${synologyDrive}.options ++ [
|
||||
"credentials=${synologySecrets}"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
sambaMounts = sambaDrive: {
|
||||
name = "${ceres.${sambaDrive}.mount}/${samba.paths.path1}";
|
||||
value = {
|
||||
device = "${ceres.${sambaDrive}.device}/${samba.paths.path1}";
|
||||
fsType = "cifs";
|
||||
options = ceres.${sambaDrive}.options ++ [
|
||||
"credentials=${ceresSecrets}"
|
||||
];
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
"/" = {
|
||||
device = "/dev/disk/by-uuid/aae33e00-125e-4f1c-b9aa-9fc512335b7f";
|
||||
fsType = "ext4";
|
||||
};
|
||||
"/boot" = {
|
||||
device = "/dev/disk/by-uuid/C506-9E18";
|
||||
fsType = "vfat";
|
||||
options = deimos.boot.options;
|
||||
};
|
||||
}
|
||||
// (builtins.listToAttrs (map synologyMounts synologyDrives))
|
||||
// (builtins.listToAttrs (map sambaMounts sambaDrives));
|
||||
|
||||
swapDevices = [
|
||||
{ device = "/dev/disk/by-uuid/68d6072a-e21b-4d11-88fd-22c5b9932a50"; }
|
||||
];
|
||||
|
||||
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/deimos/config/graphics.nix
Executable file
24
systems/deimos/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/deimos/config/hardware.nix
Executable file
15
systems/deimos/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/deimos/config/networking.nix
Executable file
37
systems/deimos/config/networking.nix
Executable file
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
lib,
|
||||
flake,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (flake.config.machines.devices)
|
||||
deimos
|
||||
;
|
||||
in
|
||||
{
|
||||
networking = {
|
||||
hostName = deimos.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;
|
||||
};
|
||||
};
|
||||
}
|
27
systems/deimos/config/sops.nix
Executable file
27
systems/deimos/config/sops.nix
Executable file
|
@ -0,0 +1,27 @@
|
|||
{ flake, ... }:
|
||||
let
|
||||
inherit (flake.config.people)
|
||||
user1
|
||||
;
|
||||
in
|
||||
{
|
||||
sops = {
|
||||
secrets = {
|
||||
"network/synology" = {
|
||||
path = "/var/lib/secrets/synology";
|
||||
owner = "root";
|
||||
mode = "600";
|
||||
};
|
||||
"network/server" = {
|
||||
path = "/var/lib/secrets/server";
|
||||
owner = "root";
|
||||
mode = "600";
|
||||
};
|
||||
"network/${user1}" = {
|
||||
path = "/var/lib/secrets/${user1}";
|
||||
owner = "root";
|
||||
mode = "600";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue