diff --git a/core/config.nix b/core/config.nix index 787caa3..0fb9ee1 100644 --- a/core/config.nix +++ b/core/config.nix @@ -12,10 +12,9 @@ inputs.home-manager.nixosModules.home-manager ## semi-modularised config ./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 ! time.timeZone = "Australia/Brisbane"; i18n.defaultLocale = "en_GB.UTF-8"; @@ -24,22 +23,21 @@ #sound.enable = false; hardware.pulseaudio.enable = false; services.pipewire = { - enable = true; - #jack.enable = false; - pulse.enable = true; - alsa.enable = true; - #alsa.support32Bit = false; + enable = true; + #jack.enable = false; + pulse.enable = true; + alsa.enable = true; + #alsa.support32Bit = false; #lowLatency.enable = true; }; ## genuinely dunno what these do hey, like isnt sudo ## already restricted to @wheel only? & wut is rtkit security = { - rtkit.enable = true; - sudo.execWheelOnly = true; + rtkit.enable = true; + sudo.execWheelOnly = true; }; - ## settings for nix nix.settings = { ## use all cores during build cores = 0; @@ -58,16 +56,10 @@ ## disable these cuz they cause problems (thx sasha) ## see: https://github.com/NixOS/nixpkgs/issues/180175 systemd.services = { - networkManager-wait-online.enable = lib.mkForce false; - systemd-networkd-wait-online.enable = lib.mkForce false; + networkManager-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 system.stateVersion = "23.11"; diff --git a/core/hosts/hades/config.nix b/core/hosts/hades/config.nix index 787c5ac..89fc031 100644 --- a/core/hosts/hades/config.nix +++ b/core/hosts/hades/config.nix @@ -2,25 +2,27 @@ { 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-config.nix + ## Include the results of the hardware scan. + ./hardware.nix + #"${builtins.fetchTarball "https://github.com/nix-community/disko/archive/master.tar.gz"}/module.nix" + ./network.nix ../../config.nix ]; + ## trim to keep SSDs healthy-ish services.fstrim.enable = true; nix = { - # settings = { - # }; - gc = { - automatic = true; - dates = "daily"; - options = "--delete-older-than 10d"; - persistent = true; - }; + #settings = { + #}; + gc = { + ## every day, automatically collect garbage older than 10 days + automatic = true; + dates = "daily"; + options = "--delete-older-than 10d"; + persistent = true; + }; }; } diff --git a/core/hosts/hades/disko-config.nix b/core/hosts/hades/disko-config.nix index 7a99201..7d1aaa6 100644 --- a/core/hosts/hades/disko-config.nix +++ b/core/hosts/hades/disko-config.nix @@ -27,7 +27,7 @@ content = { type = "luks"; 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 settings = { allowDiscards = true; diff --git a/core/hosts/hades/hardware-config.nix b/core/hosts/hades/hardware-config.nix index cedaa46..fe5ed36 100644 --- a/core/hosts/hades/hardware-config.nix +++ b/core/hosts/hades/hardware-config.nix @@ -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, ... }: { imports = [ (modulesPath + "/installer/scan/not-detected.nix") - #./disko-config.nix + ## commented out disko for now as I have broken it :D + #./disko.nix ]; fileSystems."/" = @@ -15,17 +13,9 @@ 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 = [ ]; - # Enable swap on luks + ## Enable swap on luks boot = { kernelModules = [ "kvm-intel" ]; extraModulePackages = [ ]; @@ -46,44 +36,41 @@ loader = { efi = { canTouchEfiVariables = true; - #efiSysMountPoint = "/boot/efi"; - }; - #systemd-boot = { - #enable = false; - #configurationLimit = 10; - #}; + }; + ## for some reason GPT/UEFI didn't work, so neither does systemd-boot + ## stuck using MBR/DOS and GRUB instead grub = { enable = true; - #efiSupport = true; - #efiInstallAsRemovable = true; device = "/dev/sda"; - #useOSProber = true; enableCryptodisk = true; }; }; }; + ## trim to keep SSDs healthy-ish services.fstrim.enable = true; hardware = { - #cpu.intel.updateMicrocode = true; ## Pick either "true" OR "lib.mkDefault -" + #cpu.intel.updateMicrocode = true; cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; - enableAllFirmware = true; - bluetooth.enable = false; - graphics = { - enable = true; - extraPackages = with pkgs; [ - intel-compute-runtime - intel-media-driver - vaapiIntel - vaapiVdpau - libvdpau-va-gl + enableAllFirmware = true; + bluetooth.enable = false; + graphics = { + enable = true; + ## packages for integrated graphics inside Hades + extraPackages = with pkgs; [ + intel-compute-runtime + intel-media-driver + vaapiIntel + vaapiVdpau + libvdpau-va-gl ]; - }; + }; }; + ## some packages for managing the radeon GPU inside Hades environment.systemPackages = with pkgs; [ umr radeontop @@ -92,10 +79,10 @@ 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..useDHCP`. + ## 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..useDHCP`. networking.useDHCP = lib.mkDefault true; #networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true; #networking.interfaces.wlp58s0.useDHCP = lib.mkDefault true; diff --git a/core/hosts/hades/network-config.nix b/core/hosts/hades/network-config.nix index 3e732c7..c20940a 100644 --- a/core/hosts/hades/network-config.nix +++ b/core/hosts/hades/network-config.nix @@ -3,59 +3,65 @@ { imports = [ - # ./file.nix + # ./file.nix ]; networking = { + ## ooh, hostname - that one's important! hostName = "hades"; - wireless.enable = false; - networkmanager = { - enable = true; - }; - # nameservers = [ - # "1.1.1.1" - # ]; + wireless.enable = false; + networkmanager = { + enable = true; + }; + + #nameservers = [ + #"1.1.1.1" + #]; + + #proxy = { + #default = "https://user:password@proxy:port/"; + #noProxy = "127.0.0.1, localhost, internal.domain"; + #}; + }; - # networking.proxy = { - # default = "https://user:password@proxy:port/"; - # noProxy = "127.0.0.1, localhost, internal.comain"; - # }; - + ## i knooooowwwwwww i need a firewall but im laaaazzyyyyyyyyyy 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 ] + 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 ] }; + ## syncthing for device <-> device filesharing and,,, syncing + ## still not set up, grrrr services.syncthing = { enable = false; dataDir = "/home/serenity/"; configDir = "/home/serenity/.config/syncthing"; user = "serenity"; - + + ## these 3 devices are pretty much my entire ecosystem for now settings.devices = { - - # hades.id = "DEVICE_ID"; - # proserpina.id = "DEVICE_ID"; - # hecate.id = "DEVICE_ID"; - - }; - settings.folders = { + #hades.id = "DEVICE_ID"; + #proserpina.id = "DEVICE_ID"; + #hecate.id = "DEVICE_ID"; + }; - # "FOLDER_ID" = { - # path = "/home/serenity/Documents/Notes"; - # devices = [ "hecate" "hades" "persephone" ]; - # }; + ## plan to have this dir automatically committed and pushed to a git repo daily + settings.folders = { + #"FOLDER_ID" = { + #path = "/home/serenity/Documents/Notes"; + #devices = [ "hecate" "hades" "persephone" ]; + #}; }; }; diff --git a/core/packages.nix b/core/packages.nix index fe3ee76..b4160a2 100644 --- a/core/packages.nix +++ b/core/packages.nix @@ -8,35 +8,33 @@ nixpkgs = { - ## configure nixpkgs instance config = { allowUnfree = true; permittedInsecurePackages = [ ]; }; - ## add overlays here + ## [START - Stolen code, no clue how it works] overlays = [ ## to use overlays exported from other flakes: - # neovim-nightly-overlay.overlays.default + #neovim-nightly-overlay.overlays.default ## or define it inline, for example: - # (final: prev: { - # hi = final.hello.overrideAttrs (oldAttrs: { - # patches = [ ./change-hello-to-hi.patch ]; - # }); - # }) + #(final: prev: { + #hi = final.hello.overrideAttrs (oldAttrs: { + #patches = [ ./change-hello-to-hi.patch ]; + #}); + #}) ]; + }; ## This will add each flake input as a registry ## To make nix3 commands consistent with your flake 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 ## Making legacy nix commands consistent as well, awesome! - nix.nixPath = ["/etc/nix/path"]; - + nix.nixPath = ["/etc/nix/path"]; environment.etc = lib.mapAttrs' (name: value: { @@ -44,7 +42,10 @@ value.source = value.flake; }) 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 = { packages = with pkgs; [ spleen @@ -52,7 +53,6 @@ terminus_font_ttf (nerdfonts.override { fonts = ["NerdFontsSymbolsOnly"]; }) ]; - fontDir.enable = true; fontconfig = { defaultFonts = { @@ -64,25 +64,25 @@ }; programs = { - - #git = { - #enable = true; - #}; - + + ## a catgirl's favourite shell fish = { enable = true; }; + ## for when bimbo needs to manage platters gnome-disks = { enable = true; }; + ## for handling encryption keys gnupg.agent = { enable = true; enableSSHSupport = true; #pinentryPackage = [ ]; }; + ## temporary, fuck vax-bingus or w/e his name is hyprland = { enable = true; xwayland.enable = true; @@ -90,23 +90,51 @@ }; + ## GNOME virtual file system, needed this for something i think ? services.gvfs.enable = true; + + ## xserver still needed for xwayland stuff services.xserver.enable = true; + + ## login greeter/display manager + ## set to run on wayland also services.displayManager.sddm = { enable = true; wayland.enable = true; }; + ## i use micro btw (neovim scares me) environment.variables = { EDITOR = "micro"; SYSTEMD_EDITOR = "micro"; VISUAL = "micro"; }; + ## enabling flatpak in case i need it services.flatpak.enable = true; + + ## all system-level packages declared here 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 ntfs3g xfsprogs @@ -114,7 +142,7 @@ btrfs-progs ntfs2btrfs - ## tools + ## cli tools & utilities fd bc zip @@ -141,28 +169,6 @@ undervolt #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 - ]; }