mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-06-16 01:55:13 -05:00
feat: init
This commit is contained in:
commit
96c6f790fc
804 changed files with 33411 additions and 0 deletions
43
systems/ceres/config/boot.nix
Executable file
43
systems/ceres/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;
|
||||
};
|
||||
};
|
||||
}
|
52
systems/ceres/config/filesystem.nix
Executable file
52
systems/ceres/config/filesystem.nix
Executable file
|
@ -0,0 +1,52 @@
|
|||
{
|
||||
flake,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (flake.config.people)
|
||||
user0
|
||||
;
|
||||
inherit (flake.config.machines.devices)
|
||||
ceres
|
||||
;
|
||||
in
|
||||
{
|
||||
fileSystems =
|
||||
let
|
||||
storageDrives = [
|
||||
"storage0"
|
||||
];
|
||||
|
||||
storageMounts = storage: {
|
||||
name = "${ceres.${storage}.mount}";
|
||||
value = {
|
||||
device = ceres.${storage}.device;
|
||||
fsType = "ext4";
|
||||
options = ceres.${storage}.options;
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
"/" = {
|
||||
device = "/dev/disk/by-uuid/de4e681b-0667-4bf8-8d6e-c50894aa41cd";
|
||||
fsType = "ext4";
|
||||
};
|
||||
"/boot" = {
|
||||
device = "/dev/disk/by-uuid/C68D-B1C0";
|
||||
fsType = "vfat";
|
||||
};
|
||||
}
|
||||
// (builtins.listToAttrs (map storageMounts storageDrives));
|
||||
|
||||
swapDevices = [
|
||||
{ device = "/dev/disk/by-uuid/259fcc06-912c-4bd3-b781-8f77449e935a"; }
|
||||
];
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"Z ${config.home-manager.users.${user0}.home.homeDirectory} 0755 ${user0} users -"
|
||||
"Z ${ceres.storage0.mount} 2775 root root -"
|
||||
];
|
||||
|
||||
services.udisks2.enable = true;
|
||||
}
|
24
systems/ceres/config/graphics.nix
Executable file
24
systems/ceres/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/ceres/config/hardware.nix
Executable file
15
systems/ceres/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;
|
||||
};
|
||||
}
|
42
systems/ceres/config/networking.nix
Executable file
42
systems/ceres/config/networking.nix
Executable file
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
lib,
|
||||
flake,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (flake.config.machines.devices) ceres;
|
||||
in
|
||||
{
|
||||
networking = {
|
||||
hostName = ceres.name;
|
||||
networkmanager.enable = true;
|
||||
nftables.enable = true;
|
||||
useDHCP = lib.mkDefault true;
|
||||
firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [
|
||||
22 # SSH
|
||||
25 # SMTP
|
||||
139 # SMTP
|
||||
587 # SMTP
|
||||
2525 # SMTP
|
||||
];
|
||||
};
|
||||
};
|
||||
services = {
|
||||
avahi = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
nssmdns4 = true;
|
||||
publish = {
|
||||
enable = true;
|
||||
userServices = true;
|
||||
};
|
||||
};
|
||||
sshd.enable = true;
|
||||
openssh = {
|
||||
enable = true;
|
||||
settings.PasswordAuthentication = false;
|
||||
};
|
||||
};
|
||||
}
|
16
systems/ceres/config/sops.nix
Executable file
16
systems/ceres/config/sops.nix
Executable file
|
@ -0,0 +1,16 @@
|
|||
{ flake, ... }:
|
||||
let
|
||||
inherit (flake.config.people)
|
||||
user0
|
||||
;
|
||||
in
|
||||
{
|
||||
sops = {
|
||||
secrets = {
|
||||
"discord-token" = {
|
||||
path = "/home/${user0}/projects/zookeeper/.env";
|
||||
owner = user0;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
17
systems/ceres/default.nix
Executable file
17
systems/ceres/default.nix
Executable file
|
@ -0,0 +1,17 @@
|
|||
{ lib, ... }:
|
||||
let
|
||||
configPath = ./config;
|
||||
|
||||
ceresImports =
|
||||
let
|
||||
files = builtins.attrNames (builtins.readDir configPath);
|
||||
in
|
||||
map (name: configPath + "/${name}") (
|
||||
builtins.filter (name: builtins.match ".*\\.nix$" name != null) files
|
||||
);
|
||||
in
|
||||
{
|
||||
imports = ceresImports;
|
||||
nixpkgs.hostPlatform = lib.mkForce "x86_64-linux";
|
||||
system.stateVersion = lib.mkForce "24.05";
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue