more tidying - commented most of hosts/hades

This commit is contained in:
serenity-F 2024-09-14 01:56:29 +10:00
parent b91d96a84c
commit 5ccd508676
No known key found for this signature in database
6 changed files with 141 additions and 148 deletions

View file

@ -12,10 +12,9 @@
inputs.home-manager.nixosModules.home-manager inputs.home-manager.nixosModules.home-manager
## semi-modularised config ## semi-modularised config
./packages.nix # system-level packages here ./packages.nix # system-level packages here
../home/users # user defined configs and packages here ../home/users # user-level packages here
]; ];
## locale is common across machines
## crikey ! ## crikey !
time.timeZone = "Australia/Brisbane"; time.timeZone = "Australia/Brisbane";
i18n.defaultLocale = "en_GB.UTF-8"; i18n.defaultLocale = "en_GB.UTF-8";
@ -39,7 +38,6 @@
sudo.execWheelOnly = true; sudo.execWheelOnly = true;
}; };
## settings for nix
nix.settings = { nix.settings = {
## use all cores during build ## use all cores during build
cores = 0; cores = 0;
@ -62,12 +60,6 @@
systemd-networkd-wait-online.enable = lib.mkForce false; systemd-networkd-wait-online.enable = lib.mkForce false;
}; };
## autoupgrades ? disabled for now, need to read into
# system.autoUpgrade = {
# enable = true;
# channel = "";
# };
## https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion ## https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
system.stateVersion = "23.11"; system.stateVersion = "23.11";

View file

@ -2,20 +2,22 @@
{ {
imports = [ imports = [
# Include the results of the hardware scan. ## Include the results of the hardware scan.
./hardware-config.nix ./hardware.nix
#"${builtins.fetchTarball "https://github.com/nix-community/disko/archive/master.tar.gz"}/module.nix" #"${builtins.fetchTarball "https://github.com/nix-community/disko/archive/master.tar.gz"}/module.nix"
./network-config.nix ./network.nix
../../config.nix ../../config.nix
]; ];
## trim to keep SSDs healthy-ish
services.fstrim.enable = true; services.fstrim.enable = true;
nix = { nix = {
#settings = { #settings = {
#}; #};
gc = { gc = {
## every day, automatically collect garbage older than 10 days
automatic = true; automatic = true;
dates = "daily"; dates = "daily";
options = "--delete-older-than 10d"; options = "--delete-older-than 10d";

View file

@ -27,7 +27,7 @@
content = { content = {
type = "luks"; type = "luks";
name = "pomegranate"; name = "pomegranate";
# disable settings.keyFile if you want to use interactive password entry ## disable settings.keyFile if you want to use interactive password entry
#passwordFile = "/tmp/secret.key"; # Interactive #passwordFile = "/tmp/secret.key"; # Interactive
settings = { settings = {
allowDiscards = true; allowDiscards = true;

View file

@ -1,12 +1,10 @@
# 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, ... }: { config, lib, pkgs, modulesPath, ... }:
{ {
imports = [ imports = [
(modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
#./disko-config.nix ## commented out disko for now as I have broken it :D
#./disko.nix
]; ];
fileSystems."/" = fileSystems."/" =
@ -15,17 +13,9 @@
options = [ "subvol=@" ]; 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 = [ ]; swapDevices = [ ];
# Enable swap on luks ## Enable swap on luks
boot = { boot = {
kernelModules = [ "kvm-intel" ]; kernelModules = [ "kvm-intel" ];
extraModulePackages = [ ]; extraModulePackages = [ ];
@ -46,34 +36,30 @@
loader = { loader = {
efi = { efi = {
canTouchEfiVariables = true; canTouchEfiVariables = true;
#efiSysMountPoint = "/boot/efi";
}; };
#systemd-boot = { ## for some reason GPT/UEFI didn't work, so neither does systemd-boot
#enable = false; ## stuck using MBR/DOS and GRUB instead
#configurationLimit = 10;
#};
grub = { grub = {
enable = true; enable = true;
#efiSupport = true;
#efiInstallAsRemovable = true;
device = "/dev/sda"; device = "/dev/sda";
#useOSProber = true;
enableCryptodisk = true; enableCryptodisk = true;
}; };
}; };
}; };
## trim to keep SSDs healthy-ish
services.fstrim.enable = true; services.fstrim.enable = true;
hardware = { hardware = {
#cpu.intel.updateMicrocode = true;
## Pick either "true" OR "lib.mkDefault -" ## Pick either "true" OR "lib.mkDefault -"
#cpu.intel.updateMicrocode = true;
cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
enableAllFirmware = true; enableAllFirmware = true;
bluetooth.enable = false; bluetooth.enable = false;
graphics = { graphics = {
enable = true; enable = true;
## packages for integrated graphics inside Hades
extraPackages = with pkgs; [ extraPackages = with pkgs; [
intel-compute-runtime intel-compute-runtime
intel-media-driver intel-media-driver
@ -84,6 +70,7 @@
}; };
}; };
## some packages for managing the radeon GPU inside Hades
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
umr umr
radeontop radeontop
@ -92,10 +79,10 @@
radeon-profile radeon-profile
]; ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking ## 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 ## (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 ## 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`. ## with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true; networking.useDHCP = lib.mkDefault true;
#networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true; #networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true;
#networking.interfaces.wlp58s0.useDHCP = lib.mkDefault true; #networking.interfaces.wlp58s0.useDHCP = lib.mkDefault true;

View file

@ -7,51 +7,57 @@
]; ];
networking = { networking = {
## ooh, hostname - that one's important!
hostName = "hades"; hostName = "hades";
wireless.enable = false; wireless.enable = false;
networkmanager = { networkmanager = {
enable = true; enable = true;
}; };
#nameservers = [ #nameservers = [
#"1.1.1.1" #"1.1.1.1"
#]; #];
};
# networking.proxy = { #proxy = {
#default = "https://user:password@proxy:port/"; #default = "https://user:password@proxy:port/";
# noProxy = "127.0.0.1, localhost, internal.comain"; #noProxy = "127.0.0.1, localhost, internal.domain";
#}; #};
};
## i knooooowwwwwww i need a firewall but im laaaazzyyyyyyyyyy
networking.firewall = { networking.firewall = {
enable = false; enable = false;
#checkReversePath = "loose"; #checkReversePath = "loose";
#allowedTCPPorts = [ 22000 21027 25565 ]; #allowedTCPPorts = [ 22000 21027 25565 ];
#allowedUDPPorts = [ 22000 21027 41641 51820 ]; #allowedUDPPorts = [ 22000 21027 41641 51820 ];
#allowedTCPPortRanges = [ #allowedTCPPortRanges = [
# { from = 9999; to = 9999; } # KDE COnnect #{ from = 9999; to = 9999; } # KDE Connect
#{ from = 9999; to = 9999; } # Nicotine+ #{ from = 9999; to = 9999; } # Nicotine+
#]; #];
#allowedUDPPortRanges = [ #allowedUDPPortRanges = [
# { from = 9999; to = 9999; } # KDE COnnect #{ from = 9999; to = 9999; } # KDE Connect
#]; #];
#interfaces."DEVICENAME".allowedTCPPorts = [ 22999 ] #interfaces."DEVICENAME".allowedTCPPorts = [ 22999 ]
}; };
## syncthing for device <-> device filesharing and,,, syncing
## still not set up, grrrr
services.syncthing = { services.syncthing = {
enable = false; enable = false;
dataDir = "/home/serenity/"; dataDir = "/home/serenity/";
configDir = "/home/serenity/.config/syncthing"; configDir = "/home/serenity/.config/syncthing";
user = "serenity"; user = "serenity";
## these 3 devices are pretty much my entire ecosystem for now
settings.devices = { settings.devices = {
#hades.id = "DEVICE_ID"; #hades.id = "DEVICE_ID";
#proserpina.id = "DEVICE_ID"; #proserpina.id = "DEVICE_ID";
#hecate.id = "DEVICE_ID"; #hecate.id = "DEVICE_ID";
}; };
settings.folders = {
## plan to have this dir automatically committed and pushed to a git repo daily
settings.folders = {
#"FOLDER_ID" = { #"FOLDER_ID" = {
#path = "/home/serenity/Documents/Notes"; #path = "/home/serenity/Documents/Notes";
#devices = [ "hecate" "hades" "persephone" ]; #devices = [ "hecate" "hades" "persephone" ];

View file

@ -8,14 +8,13 @@
nixpkgs = { nixpkgs = {
## configure nixpkgs instance
config = { config = {
allowUnfree = true; allowUnfree = true;
permittedInsecurePackages = [ permittedInsecurePackages = [
]; ];
}; };
## add overlays here ## [START - Stolen code, no clue how it works]
overlays = [ overlays = [
## to use overlays exported from other flakes: ## to use overlays exported from other flakes:
#neovim-nightly-overlay.overlays.default #neovim-nightly-overlay.overlays.default
@ -27,16 +26,15 @@
#}); #});
#}) #})
]; ];
}; };
## This will add each flake input as a registry ## This will add each flake input as a registry
## To make nix3 commands consistent with your flake ## To make nix3 commands consistent with your flake
nix.registry = (lib.mapAttrs (_: flake: {inherit flake;})) ((lib.filterAttrs (_: lib.isType "flake")) inputs); nix.registry = (lib.mapAttrs (_: flake: {inherit flake;})) ((lib.filterAttrs (_: lib.isType "flake")) inputs);
## This will additionally add your inputs to the system's legacy channels ## This will additionally add your inputs to the system's legacy channels
## Making legacy nix commands consistent as well, awesome! ## Making legacy nix commands consistent as well, awesome!
nix.nixPath = ["/etc/nix/path"]; nix.nixPath = ["/etc/nix/path"];
environment.etc = environment.etc =
lib.mapAttrs' lib.mapAttrs'
(name: value: { (name: value: {
@ -44,7 +42,10 @@
value.source = value.flake; value.source = value.flake;
}) })
config.nix.registry; config.nix.registry;
## [END - Stolen code, mostly understand from here again]
## I put fonts here because i didn't know where tf else to put them lol
fonts = { fonts = {
packages = with pkgs; [ packages = with pkgs; [
spleen spleen
@ -52,7 +53,6 @@
terminus_font_ttf terminus_font_ttf
(nerdfonts.override { fonts = ["NerdFontsSymbolsOnly"]; }) (nerdfonts.override { fonts = ["NerdFontsSymbolsOnly"]; })
]; ];
fontDir.enable = true; fontDir.enable = true;
fontconfig = { fontconfig = {
defaultFonts = { defaultFonts = {
@ -65,24 +65,24 @@
programs = { programs = {
#git = { ## a catgirl's favourite shell
#enable = true;
#};
fish = { fish = {
enable = true; enable = true;
}; };
## for when bimbo needs to manage platters
gnome-disks = { gnome-disks = {
enable = true; enable = true;
}; };
## for handling encryption keys
gnupg.agent = { gnupg.agent = {
enable = true; enable = true;
enableSSHSupport = true; enableSSHSupport = true;
#pinentryPackage = [ ]; #pinentryPackage = [ ];
}; };
## temporary, fuck vax-bingus or w/e his name is
hyprland = { hyprland = {
enable = true; enable = true;
xwayland.enable = true; xwayland.enable = true;
@ -90,23 +90,51 @@
}; };
## GNOME virtual file system, needed this for something i think ?
services.gvfs.enable = true; services.gvfs.enable = true;
## xserver still needed for xwayland stuff
services.xserver.enable = true; services.xserver.enable = true;
## login greeter/display manager
## set to run on wayland also
services.displayManager.sddm = { services.displayManager.sddm = {
enable = true; enable = true;
wayland.enable = true; wayland.enable = true;
}; };
## i use micro btw (neovim scares me)
environment.variables = { environment.variables = {
EDITOR = "micro"; EDITOR = "micro";
SYSTEMD_EDITOR = "micro"; SYSTEMD_EDITOR = "micro";
VISUAL = "micro"; VISUAL = "micro";
}; };
## enabling flatpak in case i need it
services.flatpak.enable = true; services.flatpak.enable = true;
## all system-level packages declared here
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
## filsesystems ## temporary desktop/user-level
#waybar
udiskie
gparted
pavucontrol
networkmanager
seahorse
#polkit-gnome
gnome-keyring
polkit-kde-agent
## nix specific tools
#nix-tree
#nix-init
#nix-index
#nixpkgs-review
#nix-output-monitor
## filsesystem utilities
zfs zfs
ntfs3g ntfs3g
xfsprogs xfsprogs
@ -114,7 +142,7 @@
btrfs-progs btrfs-progs
ntfs2btrfs ntfs2btrfs
## tools ## cli tools & utilities
fd fd
bc bc
zip zip
@ -141,28 +169,6 @@
undervolt undervolt
#gitwatch #gitwatch
## nixos
#nix-tree
#nix-init
#nix-index
#nixpkgs-review
#nix-output-monitor
## languages and libraries
#rustup
#python313
## temporary/desktop
#waybar
udiskie
gparted
pavucontrol
#polkit-gnome
seahorse
polkit-kde-agent
gnome-keyring
networkmanager
]; ];
} }