massive clean-up/restructure
This commit is contained in:
parent
54da646c04
commit
b13498571e
48 changed files with 166 additions and 236 deletions
|
|
@ -10,13 +10,9 @@
|
|||
{
|
||||
imports = [
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
|
||||
## semi-modularised config
|
||||
./packages.nix
|
||||
#./fonts.nix
|
||||
./misc.nix
|
||||
./system-packages.nix
|
||||
../home/users
|
||||
|
||||
];
|
||||
|
||||
## locale is common across machines
|
||||
|
|
@ -56,6 +52,9 @@
|
|||
];
|
||||
};
|
||||
|
||||
## apparently prevents getting stuck at shutdown
|
||||
systemd.extraConfig = "DefaultTimeoutStopSec=10s";
|
||||
|
||||
## disable these cuz they cause problems (thx sasha)
|
||||
## see: https://github.com/NixOS/nixpkgs/issues/180175
|
||||
systemd.services = {
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
{ inputs, outputs, lib, config, pkgs, ... }:
|
||||
|
||||
{
|
||||
|
||||
fonts = {
|
||||
|
||||
packages = with pkgs; [
|
||||
spleen
|
||||
terminus_font
|
||||
terminus_font_ttf
|
||||
(nerdfonts.override { fonts = ["NerdFontsSymbolsOnly"]; })
|
||||
];
|
||||
|
||||
fontDir.enable = true;
|
||||
fontconfig = {
|
||||
|
||||
defaultFonts = {
|
||||
serif = [ "spleen-32x64" ];
|
||||
sansSerif = [ "spleen-32x64" ];
|
||||
monospace = [ "TerminusTTF" ];
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
25
core/hosts/hades/config.nix
Normal file
25
core/hosts/hades/config.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{ 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"
|
||||
../../config.nix
|
||||
|
||||
];
|
||||
|
||||
services.fstrim.enable = true;
|
||||
|
||||
nix = {
|
||||
# settings = {
|
||||
# };
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "daily";
|
||||
options = "--delete-older-than 10d";
|
||||
persistent = true;
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
69
core/hosts/hades/disko-config.nix
Normal file
69
core/hosts/hades/disko-config.nix
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
{
|
||||
|
||||
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";
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
105
core/hosts/hades/hardware-config.nix
Normal file
105
core/hosts/hades/hardware-config.nix
Normal file
|
|
@ -0,0 +1,105 @@
|
|||
# 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
|
||||
];
|
||||
|
||||
# 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;
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
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";
|
||||
}
|
||||
63
core/hosts/hades/network-config.nix
Normal file
63
core/hosts/hades/network-config.nix
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
{ 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" ];
|
||||
# };
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
82
core/hosts/persephone/config.nix
Normal file
82
core/hosts/persephone/config.nix
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
{ inputs, outputs, lib, config, 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"
|
||||
#./network-configuration.nix
|
||||
../../config.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";
|
||||
}
|
||||
66
core/hosts/persephone/disko-config.nix
Normal file
66
core/hosts/persephone/disko-config.nix
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
{
|
||||
|
||||
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" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
28
core/hosts/persephone/hardware-config.nix
Normal file
28
core/hosts/persephone/hardware-config.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
# 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;
|
||||
}
|
||||
72
core/hosts/persephone/network-config.nix
Normal file
72
core/hosts/persephone/network-config.nix
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
{ 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" ];
|
||||
# };
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
{ inputs, outputs, lib, config, pkgs, ... }:
|
||||
|
||||
{
|
||||
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
xwayland.enable = true;
|
||||
};
|
||||
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
displayManager.sddm = {
|
||||
enable = true;
|
||||
wayland.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
## apparently prevents getting stuck at shutdown
|
||||
systemd.extraConfig = "DefaultTimeoutStopSec=10s";
|
||||
|
||||
}
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
{
|
||||
|
||||
imports = [
|
||||
./fonts.nix
|
||||
#./file.nix
|
||||
];
|
||||
|
||||
nixpkgs = {
|
||||
|
|
@ -45,19 +45,55 @@
|
|||
})
|
||||
config.nix.registry;
|
||||
|
||||
fonts = {
|
||||
packages = with pkgs; [
|
||||
spleen
|
||||
terminus_font
|
||||
terminus_font_ttf
|
||||
(nerdfonts.override { fonts = ["NerdFontsSymbolsOnly"]; })
|
||||
];
|
||||
|
||||
fontDir.enable = true;
|
||||
fontconfig = {
|
||||
defaultFonts = {
|
||||
serif = [ "spleen-32x64" ];
|
||||
sansSerif = [ "spleen-32x64" ];
|
||||
monospace = [ "TerminusTTF" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs = {
|
||||
|
||||
git.enable = true;
|
||||
fish.enable = true;
|
||||
gnome-disks.enable = true;
|
||||
|
||||
gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
#pinentryPackage = [ ];
|
||||
};
|
||||
|
||||
hyprland = {
|
||||
enable = true;
|
||||
xwayland.enable = true;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
services.gvfs.enable = true;
|
||||
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
displayManager.sddm = {
|
||||
enable = true;
|
||||
wayland.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
services.flatpak.enable = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
|
||||
## filsesystems
|
||||
|
|
@ -67,8 +103,6 @@
|
|||
exfatprogs
|
||||
btrfs-progs
|
||||
ntfs2btrfs
|
||||
udiskie
|
||||
gparted
|
||||
|
||||
## tools
|
||||
fd
|
||||
|
|
@ -95,7 +129,6 @@
|
|||
libsecret
|
||||
git-crypt
|
||||
undervolt
|
||||
pavucontrol
|
||||
|
||||
## nixos
|
||||
nix-tree
|
||||
|
|
@ -110,6 +143,9 @@
|
|||
|
||||
## temporary/desktop
|
||||
waybar
|
||||
udiskie
|
||||
gparted
|
||||
pavucontrol
|
||||
#polkit-gnome
|
||||
gnome.seahorse
|
||||
polkit-kde-agent
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue