diff --git a/core/default.nix b/core/default.nix index 1a8185d..08103ac 100755 --- a/core/default.nix +++ b/core/default.nix @@ -8,8 +8,7 @@ inputs.home-manager.nixosModules.home-manager ## Semi-modularised config - ./packages.nix # system-level packages - needs tidying - ./modules # additional modules to import + ./modules/shared # additional modules to import ../home # user-level packages in ../home/programs/ ]; diff --git a/core/hosts/hades/default.nix b/core/hosts/hades/default.nix index eb3f644..cd063d5 100755 --- a/core/hosts/hades/default.nix +++ b/core/hosts/hades/default.nix @@ -3,10 +3,16 @@ { imports = [ - ## Host specific config files - ./modules + ## Host-specific config files + ./disko.nix + ./network.nix + ./hardware.nix ## Shared 'core' config options ../../../core + ## Host-specific core modules + ../../../core/modules/optional/zfs.nix + ../../../core/modules/optional/gaming.nix + ../../../core/modules/optional/jellyfin.nix ]; diff --git a/core/hosts/hades/modules/disko.nix b/core/hosts/hades/disko.nix similarity index 100% rename from core/hosts/hades/modules/disko.nix rename to core/hosts/hades/disko.nix diff --git a/core/hosts/hades/modules/hardware.nix b/core/hosts/hades/hardware.nix similarity index 100% rename from core/hosts/hades/modules/hardware.nix rename to core/hosts/hades/hardware.nix diff --git a/core/hosts/hades/modules/default.nix b/core/hosts/hades/modules/default.nix deleted file mode 100755 index b95403e..0000000 --- a/core/hosts/hades/modules/default.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ ... }: - -{ - - imports = [ - - ## Selected host modules for import - ./hardware.nix # hardware configuration - ./network.nix # network configuration - - ## Additional core modules to import - ../../../modules/jellyfin.nix # temporary for config purposes - ../../../modules/gaming.nix # didnt work in home-manager :( - ../../../modules/zfs.nix # ZFS config - ]; - -} diff --git a/core/hosts/hades/modules/network.nix b/core/hosts/hades/network.nix similarity index 100% rename from core/hosts/hades/modules/network.nix rename to core/hosts/hades/network.nix diff --git a/core/hosts/iso/modules/default.nix b/core/hosts/iso/modules/default.nix deleted file mode 100755 index 2e0c69d..0000000 --- a/core/hosts/iso/modules/default.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ ... }: - -{ - - imports = [ - - ## Selected modules for import - ./network.nix # network/internet config - - ## Selected core modules for import - ../../../core/modules/display.nix # display stuff - ../../../core/modules/regreet.nix # regreet customisation - ../../../core/modules/desktop.nix # didnt work in home-manager :( - ../../../core/modules/audio.nix # sound configuration - - ]; - -} diff --git a/core/hosts/iso/modules/network.nix b/core/hosts/iso/network.nix similarity index 100% rename from core/hosts/iso/modules/network.nix rename to core/hosts/iso/network.nix diff --git a/core/hosts/orcus/modules/default.nix b/core/hosts/orcus/modules/default.nix deleted file mode 100755 index 96264e3..0000000 --- a/core/hosts/orcus/modules/default.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ ... }: - -{ - - imports = [ - - ## Selected modules for import - #./hardware.nix # hardware configuration - ./network.nix # network configuration - ./zfs.nix # zfs configuration - - ## Selected core modules for import - ../../../core/modules/audio.nix - ../../../core/modules/display.nix - ../../../core/modules/desktop.nix - ../../../core/modules/jellyfin.nix - - ]; - -} diff --git a/core/hosts/orcus/modules/zfs.nix b/core/hosts/orcus/modules/zfs.nix deleted file mode 100755 index b40ce60..0000000 --- a/core/hosts/orcus/modules/zfs.nix +++ /dev/null @@ -1,68 +0,0 @@ -## ZFS Support NixOS module - -## temporary location while we figure out how ZFS works, -## eventually this will be embedded into the flake in a better way - -{ lib, pkgs, ... }: - -let - ## This 'let' binding creates an attribute set - ## called "LatestZfsLinux", which we can call as - ## a package to specify when building our kernel. - latestZfsLinux = lib.pipe pkgs.linuxKernel.packages [ - builtins.attrValues - (builtins.filter ( - kPkgs: - (builtins.tryEval kPkgs).success - && kPkgs ? kernel - && kPkgs.kernel.pname == "linux" - && !kPkgs.zfs.meta.broken - )) - (builtins.sort (a: b: (lib.versionOlder a.kernel.version b.kernel.version))) - lib.last - ]; -in - -{ - - imports = [ - ]; - - ## Enable zfs in kernel and boot - boot = { - kernelPackages = latestZfsLinux; - supportedFilesystems = [ "zfs" ]; - zfs = { - extraPools = [ "orcus" ]; - forceImportRoot = false; - }; - }; - - #fileSystems."/home/serenity/Disks/Orcus" = { - #device = "orcus"; - #fsType = "zfs"; - #options = [ "users" ]; - #}; - - environment.systemPackages = with pkgs; [ - zfs - ]; - - ## Enable trim for ZFS SSDs - services = { - zfs = { - ## Trim for SSSds with ZFS - #trim.enable = true; - ## Autoscrub data integrity ZFS service, - ## more to be added soon - autoScrub = { - enable = true; - }; - }; - }; - - networking = { - hostId = "603b0c8b"; - }; - -} diff --git a/core/hosts/orcus/modules/network.nix b/core/hosts/orcus/network.nix similarity index 100% rename from core/hosts/orcus/modules/network.nix rename to core/hosts/orcus/network.nix diff --git a/core/hosts/persephone/modules/disko.nix b/core/hosts/persephone/disko.nix similarity index 100% rename from core/hosts/persephone/modules/disko.nix rename to core/hosts/persephone/disko.nix diff --git a/core/hosts/persephone/modules/hardware.nix b/core/hosts/persephone/hardware.nix similarity index 100% rename from core/hosts/persephone/modules/hardware.nix rename to core/hosts/persephone/hardware.nix diff --git a/core/hosts/persephone/modules/default.nix b/core/hosts/persephone/modules/default.nix deleted file mode 100755 index c53bc11..0000000 --- a/core/hosts/persephone/modules/default.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ ... }: - -{ - - imports = [ - - ## Selected host modules for import - ./hardware.nix # hardware configuration - ./network.nix # network configuration - - ## Selected core modules for import - ../../../core/modules/display.nix # display stuff - ../../../core/modules/regreet.nix # regreet customisation - ../../../core/modules/desktop.nix # didnt work in home-manager :( - ../../../core/modules/misc.nix # exactly what it says - ../../../core/modules/audio.nix # sound configuration - - ]; - -} diff --git a/core/hosts/persephone/modules/network.nix b/core/hosts/persephone/network.nix similarity index 100% rename from core/hosts/persephone/modules/network.nix rename to core/hosts/persephone/network.nix diff --git a/core/modules/default.nix b/core/modules/default.nix deleted file mode 100755 index 6a7ee85..0000000 --- a/core/modules/default.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ config, lib, ... }: -let hostname = config.networking.hostName; -in { - - imports = [ - - ## Semi-modularised config - ./sync.nix # syncthing and gitwatch settings - ./misc.nix # stuff that doesn't work in `/home` :( - ./audio.nix # musnix and ... audio ... config - ./display.nix # declarations for display management - ]; -} diff --git a/core/modules/misc.nix b/core/modules/misc.nix deleted file mode 100755 index 8c759d7..0000000 --- a/core/modules/misc.nix +++ /dev/null @@ -1,31 +0,0 @@ -{ pkgs, ... }: - -{ - - ## Dunno if i did this right, but possible needed for keyring/polkit stuff ? - security.pam.services.serenity.enableGnomeKeyring = true; - - programs = { - gnome-disks.enable = true; # For when bimbo needs to manage disks - seahorse.enable = true; # GTK secrets management - droidcam.enable = true; # Use android device as a webcam - obs-studio = { # screen capture, recording, and sharing - enable = true; - enableVirtualCamera = true; # virtual webcam - plugins = with pkgs.obs-studio-plugins; [ - droidcam-obs # enables droidcam integration - ]; - }; - - }; - - services = { - libinput.enable = true; # don't think we NEED this tbh - unsure - gvfs.enable = true; # virtual filesystem, needed this for ... something - dbus.enable = true; # dbus is for ... unsure - upower.enable = true; # no clue - udisks2.enable = true; # disk management service - gnome.gnome-keyring.enable = true; # for sudo prompts and stuff - }; - -} diff --git a/core/modules/gaming.nix b/core/modules/optional/gaming.nix similarity index 100% rename from core/modules/gaming.nix rename to core/modules/optional/gaming.nix diff --git a/core/modules/jellyfin.nix b/core/modules/optional/jellyfin.nix similarity index 100% rename from core/modules/jellyfin.nix rename to core/modules/optional/jellyfin.nix diff --git a/core/modules/zfs.nix b/core/modules/optional/zfs.nix similarity index 100% rename from core/modules/zfs.nix rename to core/modules/optional/zfs.nix diff --git a/core/modules/audio.nix b/core/modules/shared/audio.nix similarity index 100% rename from core/modules/audio.nix rename to core/modules/shared/audio.nix diff --git a/core/modules/shared/default.nix b/core/modules/shared/default.nix new file mode 100755 index 0000000..e02e8b7 --- /dev/null +++ b/core/modules/shared/default.nix @@ -0,0 +1,14 @@ +{ ... }: + +{ + + imports = [ + ## Semi-modularised config + ./sync.nix # Syncthing and gitwatch settings + ./audio.nix # Musnix and ... audio ... config + ./display.nix # Display configs + ./regreet.nix # Login greeter config + ./packages.nix # All system-level packages here + ]; + +} diff --git a/core/modules/display.nix b/core/modules/shared/display.nix similarity index 73% rename from core/modules/display.nix rename to core/modules/shared/display.nix index 720c58d..42eaf8b 100755 --- a/core/modules/display.nix +++ b/core/modules/shared/display.nix @@ -1,9 +1,6 @@ { pkgs, ... }: { - imports = [ - ./regreet.nix # the greeter(s) to keep this file tidy. - ]; boot = { bootspec.enable = true; @@ -47,7 +44,8 @@ }; }; - xdg.mime.enable = true; # may be unneeded here as already declared in `home/desktop/xdg-mime.nix` + xdg.mime.enable = + true; # may be unneeded here as already declared in `home/desktop/xdg-mime.nix` services = { xserver.enable = true; # xserver still needed for xwayland stuff @@ -118,4 +116,31 @@ }; }; + ## Dunno if i did this right, but possible needed for keyring/polkit stuff ? + security.pam.services.serenity.enableGnomeKeyring = true; + + programs = { + gnome-disks.enable = true; # For when bimbo needs to manage disks + seahorse.enable = true; # GTK secrets management + droidcam.enable = true; # Use android device as a webcam + obs-studio = { # screen capture, recording, and sharing + enable = true; + enableVirtualCamera = true; # virtual webcam + plugins = with pkgs.obs-studio-plugins; + [ + droidcam-obs # enables droidcam integration + ]; + }; + + }; + + services = { + libinput.enable = true; # don't think we NEED this tbh - unsure + gvfs.enable = true; # virtual filesystem, needed this for ... something + dbus.enable = true; # dbus is for ... unsure + upower.enable = true; # no clue + udisks2.enable = true; # disk management service + gnome.gnome-keyring.enable = true; # for sudo prompts and stuff + }; + } diff --git a/core/packages.nix b/core/modules/shared/packages.nix similarity index 100% rename from core/packages.nix rename to core/modules/shared/packages.nix diff --git a/core/modules/regreet.nix b/core/modules/shared/regreet.nix similarity index 100% rename from core/modules/regreet.nix rename to core/modules/shared/regreet.nix diff --git a/core/modules/sync.nix b/core/modules/shared/sync.nix similarity index 100% rename from core/modules/sync.nix rename to core/modules/shared/sync.nix diff --git a/home/default.nix b/home/default.nix index 9f1e9fa..27915ef 100755 --- a/home/default.nix +++ b/home/default.nix @@ -9,10 +9,6 @@ in { ## Modules inputs.home-manager.nixosModules.default # home-manager module - #../../home # home-manager configuration - - ## Users - #./u-username.nix ## User themes - ## to set a different theme for a user, @@ -63,7 +59,7 @@ in { ## home directories. Additional modules ## can be declared alongside `u-username/default.nix` ## and then imported in this section. - ./home.nix + ./programs ]; home = { username = "${primaryUser}"; diff --git a/home/home.nix b/home/home.nix deleted file mode 100755 index d83b2c8..0000000 --- a/home/home.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ ... }: - -{ - - imports = [ - ## Import desktop configs - ./desktop - ## Import program configs - ./programs - ## Import user themes - ./resources/themes - ./resources/themes/SerenityOS.nix - ]; - - ## Enabling home-manager - programs.home-manager.enable = true; # Declarative dots - systemd.user.startServices = "sd-switch"; - - home.stateVersion = "24.11"; - -} diff --git a/home/programs/default.nix b/home/programs/default.nix index 19f5174..d986cf5 100755 --- a/home/programs/default.nix +++ b/home/programs/default.nix @@ -4,45 +4,58 @@ imports = [ + ## Import WM/Desktop config + ./desktop + ## Import program configs ./terminal ./chat ./web ./obs + ## Import user themes + ../resources/themes + ../resources/themes/SerenityOS.nix + ]; - home.packages = with pkgs; [ + home = { + packages = with pkgs; [ - ## Temp. - themix-gui # GTK theme maker + ## Temp. + themix-gui # GTK theme maker - ## Media | Chore: Pick a music player - #lollypop # GTK music player - spotify # Corpo music streaming - #pragha # Music player - #tauon # Music player + ## Media | Chore: Pick a music player + #lollypop # GTK music player + spotify # Corpo music streaming + #pragha # Music player + #tauon # Music player - ## Audio playback and production | Chore: Set up VSTs - neural-amp-modeler-lv2 # Guitar amp emulator - bespokesynth # Modular synthesiser and sequencer - strawberry # Music playback - metronome # A metronome - vcv-rack # Analogue-Synth emulator - #cardinal # VCV Rack but open source and as a plugin - audacity # Audio editing - reaper # DAW - ardour # Digital Audio Workstation - vital # synth - helm # synth :) + ## Audio playback and production | Chore: Set up VSTs + neural-amp-modeler-lv2 # Guitar amp emulator + bespokesynth # Modular synthesiser and sequencer + strawberry # Music playback + metronome # A metronome + vcv-rack # Analogue-Synth emulator + #cardinal # VCV Rack but open source and as a plugin + audacity # Audio editing + reaper # DAW + ardour # Digital Audio Workstation + vital # synth + helm # synth :) - ## Image and Video playback and production - #obs-studio # Screen sharing - inkscape # Vector image editing - shotcut # Video editing - #blender # 3D modelling - gimp # Image editor - vlc # Multimedia player - ]; + ## Image and Video playback and production + #obs-studio # Screen sharing + inkscape # Vector image editing + shotcut # Video editing + #blender # 3D modelling + gimp # Image editor + vlc # Multimedia player + ]; + stateVersion = "24.11"; + }; + + programs.home-manager.enable = true; # Declarative dots + system.user.startServices = "sd-switch"; } diff --git a/home/desktop/default.nix b/home/programs/desktop/default.nix similarity index 100% rename from home/desktop/default.nix rename to home/programs/desktop/default.nix diff --git a/home/desktop/dunst.nix b/home/programs/desktop/dunst.nix similarity index 100% rename from home/desktop/dunst.nix rename to home/programs/desktop/dunst.nix diff --git a/home/desktop/hyprcursor.nix b/home/programs/desktop/hyprcursor.nix similarity index 100% rename from home/desktop/hyprcursor.nix rename to home/programs/desktop/hyprcursor.nix diff --git a/home/desktop/hyprlock.nix b/home/programs/desktop/hyprlock.nix similarity index 100% rename from home/desktop/hyprlock.nix rename to home/programs/desktop/hyprlock.nix diff --git a/home/desktop/keybinds.nix b/home/programs/desktop/keybinds.nix similarity index 100% rename from home/desktop/keybinds.nix rename to home/programs/desktop/keybinds.nix diff --git a/home/desktop/sway.nix b/home/programs/desktop/sway.nix similarity index 100% rename from home/desktop/sway.nix rename to home/programs/desktop/sway.nix diff --git a/home/desktop/swayfx.nix b/home/programs/desktop/swayfx.nix similarity index 100% rename from home/desktop/swayfx.nix rename to home/programs/desktop/swayfx.nix diff --git a/home/desktop/waybar.nix b/home/programs/desktop/waybar.nix similarity index 100% rename from home/desktop/waybar.nix rename to home/programs/desktop/waybar.nix diff --git a/home/desktop/wlogout.nix b/home/programs/desktop/wlogout.nix similarity index 100% rename from home/desktop/wlogout.nix rename to home/programs/desktop/wlogout.nix diff --git a/home/desktop/wofi.nix b/home/programs/desktop/wofi.nix similarity index 100% rename from home/desktop/wofi.nix rename to home/programs/desktop/wofi.nix diff --git a/home/desktop/xdg-mime.nix b/home/programs/desktop/xdg-mime.nix similarity index 100% rename from home/desktop/xdg-mime.nix rename to home/programs/desktop/xdg-mime.nix