massive clean-up/restructure

This commit is contained in:
serenity-F 2024-09-11 23:51:42 +10:00
parent 54da646c04
commit b13498571e
No known key found for this signature in database
48 changed files with 166 additions and 236 deletions

View file

@ -1,48 +0,0 @@
{ inputs, outputs, config, lib, pkgs, ... }:
{
imports = [
];
# Enable swap on luks
boot = {
kernelModules = [ "kvm-intel" ];
extraModulePackages = [ ];
initrd = {
availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
kernelModules = [ ];
systemd.enable = true;
secrets = {
"/boot/crypto_keyfile.bin" = null;
};
luks = {
devices."luks-3de671ef-22a3-4f28-9251-a0687ab44f96" = {
device = "/dev/disk/by-uuid/3de671ef-22a3-4f28-9251-a0687ab44f96";
#keyFile = "/boot/crypto_keyfile.bin";
};
};
};
loader = {
efi = {
canTouchEfiVariables = true;
#efiSysMountPoint = "/boot/efi";
};
#systemd-boot = {
#enable = false;
#configurationLimit = 10;
#};
grub = {
enable = true;
#efiSupport = true;
#efiInstallAsRemovable = true;
device = "/dev/sda";
#useOSProber = true;
enableCryptodisk = true;
};
};
};
}

View file

@ -1,27 +0,0 @@
{ inputs, outputs, config, lib, pkgs, ... }:
{
imports = [
# Include the results of the hardware scan.
./hardware-config.nix
# "${builtins.fetchTarball "https://github.com/nix-community/disko/archive/master.tar.gz"}/module.nix"
# ./disko-config.nix
# ./network-config.nix
../../core/configuration.nix
];
# powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
nix = {
# settings = {
# };
gc = {
automatic = true;
dates = "daily";
options = "--delete-older-than 10d";
persistent = true;
};
};
}

View file

@ -1,69 +0,0 @@
{
disko.devices = {
disk = {
sda = {
type = "disk";
device = "/dev/sda";
content = {
type = "gpt";
partitions = {
ESP = {
size = "1024M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [
"defaults"
];
};
};
luks = {
size = "100%";
content = {
type = "luks";
name = "pomegranate";
# disable settings.keyFile if you want to use interactive password entry
#passwordFile = "/tmp/secret.key"; # Interactive
settings = {
allowDiscards = true;
#keyFile = "/tmp/secret.key";
};
#additionalKeyFiles = [ "/tmp/additionalSecret.key" ];
content = {
type = "btrfs";
extraArgs = [ "-f" ];
subvolumes = {
"/root" = {
mountpoint = "/";
mountOptions = [ "compress=zstd" "noatime" ];
};
"/home" = {
mountpoint = "/home";
mountOptions = [ "compress=zstd" "noatime" ];
};
"/nix" = {
mountpoint = "/nix";
mountOptions = [ "compress=zstd" "noatime" ];
};
"/swap" = {
mountpoint = "/.swapvol";
swap.swapfile.size = "8192M";
};
};
};
};
};
};
};
};
};
};
}

View file

@ -1,70 +0,0 @@
# Do not modify this file! It was generated by ‘nixos-generate-config’
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
./boot-config.nix
];
#boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
#boot.initrd.kernelModules = [ ];
#boot.kernelModules = [ "kvm-intel" ];
#boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/5cbed60c-33e3-4d69-a39e-c1d6d19406ea";
fsType = "btrfs";
options = [ "subvol=@" ];
};
#fileSystems."/boot" =
#{ device = "/dev/disk/by-uuid/5cbed60c-33e3-4d69-a39e-c1d6d19406ea";
#fsType = "btrfs";
#options = [ "subvol=@" ];
#};
#boot.initrd.luks.devices."luks-3de671ef-22a3-4f28-9251-a0687ab44f96".device = "/dev/disk/by-uuid/3de671ef-22a3-4f28-9251-a0687ab44f96";
swapDevices = [ ];
services.fstrim.enable = true;
hardware = {
#cpu.intel.updateMicrocode = true;
## Pick either "true" OR "lib.mkDefault -"
cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
enableAllFirmware = true;
bluetooth.enable = false;
opengl = {
enable = true;
extraPackages = with pkgs; [
intel-compute-runtime
intel-media-driver
vaapiIntel
vaapiVdpau
libvdpau-va-gl
];
};
};
environment.systemPackages = with pkgs; [
umr
radeontop
amdgpu_top
radeontools
radeon-profile
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp58s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}

View file

@ -1,63 +0,0 @@
{ pkgs, lib, config, ... }:
{
imports = [
# ./file.nix
];
networking = {
hostName = "hades";
wireless.enable = false;
networkmanager = {
enable = true;
};
# nameservers = [
# "1.1.1.1"
# ];
};
# networking.proxy = {
# default = "https://user:password@proxy:port/";
# noProxy = "127.0.0.1, localhost, internal.comain";
# };
networking.firewall = {
enable = false;
# checkReversePath = "loose";
# allowedTCPPorts = [ 22000 21027 25565 ];
# allowedUDPPorts = [ 22000 21027 41641 51820 ];
# allowedTCPPortRanges = [
# { from = 9999; to = 9999; } # KDE COnnect
# { from = 9999; to = 9999; } # Nicotine+
# ];
# allowedUDPPortRanges = [
# { from = 9999; to = 9999; } # KDE COnnect
# ];
# interfaces."DEVICENAME".allowedTCPPorts = [ 22999 ]
};
services.syncthing = {
enable = false;
dataDir = "/home/serenity/";
configDir = "/home/serenity/.config/syncthing";
user = "serenity";
settings.devices = {
# hades.id = "DEVICE_ID";
# proserpina.id = "DEVICE_ID";
# hecate.id = "DEVICE_ID";
};
settings.folders = {
# "FOLDER_ID" = {
# path = "/home/serenity/Documents/Notes";
# devices = [ "hecate" "hades" "persephone" ];
# };
};
};
}

View file

@ -1,83 +0,0 @@
{ inputs, outputs, lib, config, pkgs, ... }:
{
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
# "${builtins.fetchTarball "https://github.com/nix-community/disko/archive/master.tar.gz"}/module.nix"
./disko-config.nix
# ./network-configuration.nix
../../core/configuration.nix
];
# Enable swap on luks
boot = {
loader = {
systemd-boot = {
enable = true;
configurationLimit = 5;
};
efi = {
canTouchEfiVariables = true;
# efiSysMountPoint = "/boot/efi";
};
};
initrd = {
systemd.enable = true;
secrets = {
# "crypto_keyfile.bin" = null;
};
luks = {
# devices."luks-DISK_UUID" = {
# device = "/dev/disk/by-uuid/DISK_UUID";
# keyfile = "/crypto_keyfile.bin";
# };
};
};
};
networking = {
hostName = "persephone";
wireless.enable = false;
networkmanager = {
enable = true;
};
};
services.fstrim.enable = true;
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
hardware = {
cpu.intel.updateMicrocode = true;
enableAllFirmware = false;
bluetooth.enable = true;
opengl = {
enable = true;
extraPackages = with pkgs; [
intel-compute-runtime
intel-media-driver
vaapiIntel
vaapiVdpau
libvdpau-va-gl
];
};
};
nix = {
# settings = {
# };
gc = {
automatic = true;
dates = "daily";
options = "--delete-older-than 2d";
persistent = true;
};
};
system.stateVersion = "23.11";
}

View file

@ -1,66 +0,0 @@
{
disko.devices = {
disk = {
sda = {
type = "disk";
device = "/dev/sda";
content = {
type = "gpt";
partitions = {
ESP = {
size = "512M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [
"defaults"
];
};
};
luks = {
size = "100%";
content = {
type = "luks";
name = "pomegranate";
# disable settings.keyFile if you want to use interactive password entry
#passwordFile = "/tmp/secret.key"; # Interactive
settings = {
allowDiscards = true;
#keyFile = "/tmp/secret.key";
};
#additionalKeyFiles = [ "/tmp/additionalSecret.key" ];
content = {
type = "btrfs";
extraArgs = [ "-f" ];
subvolumes = {
"/root" = {
mountpoint = "/";
mountOptions = [ "compress=zstd" "noatime" ];
};
"/home" = {
mountpoint = "/home";
mountOptions = [ "compress=zstd" "noatime" ];
};
"/nix" = {
mountpoint = "/nix";
mountOptions = [ "compress=zstd" "noatime" ];
};
};
};
};
};
};
};
};
};
};
}

View file

@ -1,28 +0,0 @@
# Do not modify this file! It was generated by ‘nixos-generate-config’
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[
(modulesPath + "/installer/scan/not-detected.nix")
./disko-config.nix
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp58s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View file

@ -1,72 +0,0 @@
{ pkgs, lib, config, ... }:
{
imports = [
# ./file.nix
];
networking = {
hostName = "persephone";
wireless.enable = false;
networkmanager = {
enable = true;
};
# nameservers = [
# "1.1.1.1"
# ];
};
# networking.proxy = {
# default = "https://user:password@proxy:port/";
# noProxy = "127.0.0.1, localhost, internal.comain";
# };
networking.firewall = {
enable = false;
# checkReversePath = "loose";
# allowedTCPPorts = [ 22000 21027 25565 ];
# allowedUDPPorts = [ 22000 21027 41641 51820 ];
# allowedTCPPortRanges = [
# { from = 9999; to = 9999; } # KDE COnnect
# { from = 9999; to = 9999; } # Nicotine+
# ];
# allowedUDPPortRanges = [
# { from = 9999; to = 9999; } # KDE COnnect
# ];
# interfaces."DEVICENAME".allowedTCPPorts = [ 22999 ]
};
services.syncthing = {
enable = false;
dataDir = "/home/serenity/";
configDir = "/home/serenity/.config/syncthing";
user = "serenity";
settings.devices = {
# hades.id = "DEVICE_ID";
# proserpina.id = "DEVICE_ID";
# hecate.id = "DEVICE_ID";
};
settings.folders = {
# "FOLDER_ID" = {
# path = "/home/serenity/Documents/Notes";
# devices = [ "hecate" "hades" "proserpina" ];
# };
# "FOLDER_ID" = {
# path = "/home/serenity/Documents/Notes";
# devices = [ "hecate" "hades" "proserpina" ];
# };
# "FOLDER_ID" = {
# path = "/home/serenity/Documents/Notes";
# devices = [ "hecate" "hades" "proserpina" ];
# };
};
};
}