From 765f346eb613e386685962d4ef770f3a75a48c4c Mon Sep 17 00:00:00 2001 From: Grey Jones Date: Thu, 27 Aug 2026 19:28:28 +0100 Subject: [PATCH] more progress on custom options config --- ...group_rdp_takamaki_greyweather-dev.remmina | 110 +++++ modules/capabilities/graphics.nix | 66 ++- modules/components/boot-loaders/grub.nix | 8 + modules/components/boot-loaders/limine.nix | 8 + .../components/display-managers/lightdm.nix | 11 + modules/components/display-managers/ly.nix | 10 +- modules/components/shells/noctalia.nix | 31 ++ modules/components/window-managers/niri.nix | 50 +++ .../components/window-managers/niri/niri.nix | 52 --- .../shells/noctalia/noctalia.nix | 39 -- modules/features/applications/gui/equibop.nix | 39 +- modules/features/applications/gui/floorp.nix | 395 +++++++++--------- modules/features/applications/gui/fluxer.nix | 78 ++++ modules/features/applications/gui/kitty.nix | 16 +- .../features/applications/gui/nautilus.nix | 39 +- modules/features/applications/gui/remmina.nix | 20 + modules/features/applications/gui/vscode.nix | 31 +- modules/features/nixos/home-manager.nix | 7 +- modules/features/nixos/stylix.nix | 2 +- modules/{meta => }/flake-parts.nix | 4 - modules/global.nix | 136 ------ modules/global/global.nix | 85 ++++ modules/global/helpers.nix | 15 + modules/global/home.nix | 61 +++ modules/global/options.nix | 41 ++ modules/hosts/kitagawa/kitagawa.nix | 107 ++--- 26 files changed, 900 insertions(+), 561 deletions(-) create mode 100644 dotfiles/kitagawa/remmina/group_rdp_takamaki_greyweather-dev.remmina create mode 100644 modules/components/boot-loaders/grub.nix create mode 100644 modules/components/boot-loaders/limine.nix create mode 100644 modules/components/display-managers/lightdm.nix create mode 100644 modules/components/shells/noctalia.nix create mode 100644 modules/components/window-managers/niri.nix delete mode 100644 modules/components/window-managers/niri/niri.nix delete mode 100644 modules/components/window-managers/shells/noctalia/noctalia.nix create mode 100644 modules/features/applications/gui/fluxer.nix create mode 100644 modules/features/applications/gui/remmina.nix rename modules/{meta => }/flake-parts.nix (50%) delete mode 100644 modules/global.nix create mode 100644 modules/global/global.nix create mode 100644 modules/global/helpers.nix create mode 100644 modules/global/home.nix create mode 100644 modules/global/options.nix diff --git a/dotfiles/kitagawa/remmina/group_rdp_takamaki_greyweather-dev.remmina b/dotfiles/kitagawa/remmina/group_rdp_takamaki_greyweather-dev.remmina new file mode 100644 index 0000000..4a1a42b --- /dev/null +++ b/dotfiles/kitagawa/remmina/group_rdp_takamaki_greyweather-dev.remmina @@ -0,0 +1,110 @@ +[remmina] +password=fEyBOZsHZDgKWSF2JAM6zg== +gateway_username= +smartcard_pin= +window_height=780 +notes_text= +vc= +preferipv6=0 +ssh_tunnel_loopback=1 +serialname= +tls-seclevel= +sound=local +scale=2 +printer_overrides= +name=takamaki +console=0 +colordepth=99 +scaler_expand=0 +smartcard-logon=0 +precommand= +security= +disable_fastpath=0 +left-handed=0 +multitransport=0 +ssh_tunnel_command_args= +group= +server=greyweather.dev +viewonly=0 +ssh_tunnel_certfile= +glyph-cache=0 +rdp_idle_keypress_combo=1 +disableclipboard=0 +rdp_idle_keypress_time=No +audio-output= +ssh_tunnel_command= +monitorids= +parallelpath= +disconnect-prompt=0 +gateway_server= +protocol=RDP +old-license=0 +labels= +ssh_tunnel_password= +resolution_mode=2 +cert_ignore=0 +assistance_mode=0 +pth= +loadbalanceinfo= +disableautoreconnect=0 +ssh_tunnel_enabled=1 +clientbuild= +serialpermissive=0 +postcommand= +clientname= +resolution_width=0 +allow_empty_pass=0 +drive= +relax-order-checks=0 +base-cred-for-gw=0 +gateway_domain= +network=none +rdp2tcp= +serialdriver= +rdp_reconnect_attempts= +domain= +profile-lock=0 +username=grey +restricted-admin=0 +force_multimon=0 +exec= +multimon=0 +serialpath= +gateway_password= +enable-autostart=0 +usb= +ssh_tunnel_passphrase= +shareparallel=0 +smartcardname= +disablepasswordstoring=0 +quality=0 +shareprinter=0 +viewmode=4 +span=0 +parallelname= +ssh_tunnel_auth=1 +keymap= +ssh_tunnel_username=grey +execpath= +shareserial=0 +resolution_height=0 +rdp_mouse_jitter=No +useproxyenv=0 +sharesmartcard=0 +freerdp_log_filters= +microphone= +timeout= +ssh_tunnel_privatekey=/home/grey/.ssh/id_takamaki +gwtransp=auto +ssh_tunnel_server=takamaki +ignore-tls-errors=1 +window_maximize=1 +forceipvx=0 +dvc= +gateway_usage=0 +keyboard_grab=1 +window_width=1536 +no-suppress=0 +freerdp_log_level=INFO +websockets=0 +disable-smooth-scrolling=0 diff --git a/modules/capabilities/graphics.nix b/modules/capabilities/graphics.nix index f9ba43a..f029b63 100644 --- a/modules/capabilities/graphics.nix +++ b/modules/capabilities/graphics.nix @@ -1,15 +1,51 @@ { inputs, self, ... }: { - flake.nixosModules.graphics = { config, pkgs, ... }: { - environment.systemPackages = with pkgs; [ - wayland-utils - mesa-demos - vulkan-tools - ]; + flake.nixosModules.graphics = { config, pkgs, lib, ... }: { + options = { + components = { + displayManager = lib.mkOption { + # enum that dynamically populates itself with the contents of the display-managers directory + type = lib.types.enum (map (name: lib.removeSuffix ".nix" name) ( + builtins.attrNames (builtins.readDir "${self}/modules/components/display-managers") + )); + default = "lightdm"; + }; - fonts.packages = with pkgs; [ - iosevka-comfy.comfy - nerd-fonts.jetbrains-mono - ]; + windowManagers = lib.mkOption { + type = lib.types.either (lib.types.listOf ( + lib.types.enum (map (name: lib.removeSuffix ".nix" name) ( + builtins.attrNames (builtins.readDir "${self}/modules/components/window-managers") + )) + )) (lib.types.enum (map (name: lib.removeSuffix ".nix" name) ( + builtins.attrNames (builtins.readDir "${self}/modules/components/window-managers") + ))); + default = []; + }; + + shells = lib.mkOption { + type = lib.types.either (lib.types.listOf ( + lib.types.enum (map (name: lib.removeSuffix ".nix" name) ( + builtins.attrNames (builtins.readDir "${self}/modules/components/shells") + )) + )) (lib.types.enum (map (name: lib.removeSuffix ".nix" name) ( + builtins.attrNames (builtins.readDir "${self}/modules/components/shells") + ))); + default = []; + }; + }; + }; + + config = { + environment.systemPackages = with pkgs; [ + wayland-utils + mesa-demos + vulkan-tools + ]; + + fonts.packages = with pkgs; [ + iosevka-comfy.comfy + nerd-fonts.jetbrains-mono + ]; + }; }; flake.homeModules.graphics = { config, pkgs, ... }: { @@ -19,5 +55,15 @@ gparted vlc ]; + + dconf.settings = { + "org/gnome/desktop/interface" = { + color-scheme = "prefer-dark"; + }; + }; + + gtk = { + enable = true; + }; }; } \ No newline at end of file diff --git a/modules/components/boot-loaders/grub.nix b/modules/components/boot-loaders/grub.nix new file mode 100644 index 0000000..e600c44 --- /dev/null +++ b/modules/components/boot-loaders/grub.nix @@ -0,0 +1,8 @@ +{ inputs, self, ... }: { + flake.nixosModules.global = { pkgs, config, lib, ... }: { + boot.loader.grub = lib.mkIf (config.components.bootLoader == "grub") { + enable = true; + useOSProber = true; + }; + }; +} \ No newline at end of file diff --git a/modules/components/boot-loaders/limine.nix b/modules/components/boot-loaders/limine.nix new file mode 100644 index 0000000..5018a6b --- /dev/null +++ b/modules/components/boot-loaders/limine.nix @@ -0,0 +1,8 @@ +{ inputs, self, ... }: { + flake.nixosModules.global = { pkgs, config, lib, ... }: { + boot.loader.limine = lib.mkIf (config.components.bootLoader == "limine") { + enable = true; + maxGenerations = 10; + }; + }; +} \ No newline at end of file diff --git a/modules/components/display-managers/lightdm.nix b/modules/components/display-managers/lightdm.nix new file mode 100644 index 0000000..08947c7 --- /dev/null +++ b/modules/components/display-managers/lightdm.nix @@ -0,0 +1,11 @@ +{ inputs, self, ... }: { + flake.nixosModules.graphics = { config, pkgs, lib, ... }: { + config = lib.mkIf (config.components.displayManager == "lightdm") { + services.xserver.enable = true; + services.xserver.displayManager.lightdm = { + enable = true; + greeters.gtk.enable = true; + }; + }; + }; +} \ No newline at end of file diff --git a/modules/components/display-managers/ly.nix b/modules/components/display-managers/ly.nix index 8adb800..2f635df 100644 --- a/modules/components/display-managers/ly.nix +++ b/modules/components/display-managers/ly.nix @@ -1,9 +1,9 @@ { inputs, self, ... }: { - flake.nixosModules.ly = { config, pkgs, ... }: { - services.displayManager.ly = { - enable = true; - }; + flake.nixosModules.graphics = { config, pkgs, lib, ... }: { + config = lib.mkIf (config.components.displayManager == "ly") { + services.displayManager.ly.enable = true; - security.pam.services.login.fprintAuth = false; + security.pam.services.login.fprintAuth = false; + }; }; } \ No newline at end of file diff --git a/modules/components/shells/noctalia.nix b/modules/components/shells/noctalia.nix new file mode 100644 index 0000000..0a84161 --- /dev/null +++ b/modules/components/shells/noctalia.nix @@ -0,0 +1,31 @@ +{ inputs, self, ... }: { + flake.nixosModules.graphics = { pkgs, config, lib, ... }: { + config = lib.mkIf ((config.components.shells == "noctalia")||(builtins.elem "noctalia" config.components.shells)) { + environment.systemPackages = with pkgs; [ + inputs.noctalia.packages.${system}.default + ]; + + programs.noctalia.enable = true; + }; + }; + + flake.homeModules.graphics = { lib, pkgs, osConfig, ... }: { + config = lib.mkIf ((osConfig.components.shells == "noctalia")||(builtins.elem "noctalia" osConfig.components.shells)) { + home.activation = { + symlinkNoctaliaState = lib.hm.dag.entryAfter ["writeBoundary"] (osConfig.helpers.mkSymlinkActivationScript { + target = ".local/state/noctalia/settings.toml"; + source = "dotfiles/${osConfig.info.hostName}/noctalia/settings.toml"; + }); + + symlinkNoctaliaStatePlugins = lib.hm.dag.entryAfter ["writeBoundary"] (osConfig.helpers.mkSymlinkActivationScript { + target = ".local/state/noctalia/plugins"; + source = "dotfiles/${osConfig.info.hostName}/noctalia/plugins"; + isDir = true; + }); + }; + + xdg.configFile."noctalia/settings.toml".source = "${self}/dotfiles/${osConfig.info.hostName}/noctalia/settings.toml"; + xdg.configFile."noctalia/plugins".source = "${self}/dotfiles/${osConfig.info.hostName}/noctalia/plugins"; + }; + }; +} \ No newline at end of file diff --git a/modules/components/window-managers/niri.nix b/modules/components/window-managers/niri.nix new file mode 100644 index 0000000..74bdcde --- /dev/null +++ b/modules/components/window-managers/niri.nix @@ -0,0 +1,50 @@ +{ inputs, self, ... }: { + flake.nixosModules.graphics = { config, pkgs, inputs, lib, ... }: { + config = lib.mkIf ((config.components.windowManagers == "niri")||(builtins.elem "niri" config.components.windowManagers)) { + environment.systemPackages = with pkgs; [ + xdg-desktop-portal-gnome + wl-clipboard + libsecret + cage + wev + qalculate-qt + ]; + + features.applications.gui.nautilus.enable = true; + + services.upower.enable = true; + + services.udisks2.enable = true; + + programs.niri = { + enable = true; + useNautilus = true; + # override niri source to use https://github.com/niri-wm/niri/pull/3642 + package = (pkgs.niri.overrideAttrs (finalAttrs: prevAttrs: + { + cargoHash = "sha256-HypBB3PL4nVFMNH2+jEK0+dG9dJ920nHi8GwRoeH/v4="; + src = pkgs.fetchFromGitHub { + owner = "niri-wm"; + repo = "niri"; + rev = "cb41d54703eef73883bb2be58e19bcf3715d777c"; + sha256 = "sha256-cLzTeMcCdQJ+kHGcOposjeheFyEG/tGOA1jFAORMHjI="; + }; + cargoDeps = pkgs.rustPlatform.fetchCargoVendor { + inherit (finalAttrs) pname src version; + hash = finalAttrs.cargoHash; + }; + } + )); + }; + }; + }; + + flake.homeModules.graphics = { lib, osConfig, ... }: { + config = lib.mkIf ((osConfig.components.windowManagers == "niri")||(builtins.elem "niri" osConfig.components.windowManagers)) { + home.activation.symlinkNiriConfig = lib.hm.dag.entryAfter ["writeBoundary"] (osConfig.helpers.mkSymlinkActivationScript { + target = ".config/niri/config.kdl"; + source = "dotfiles/${osConfig.info.hostName}/niri.kdl"; + }); + }; + }; +} \ No newline at end of file diff --git a/modules/components/window-managers/niri/niri.nix b/modules/components/window-managers/niri/niri.nix deleted file mode 100644 index fbec49c..0000000 --- a/modules/components/window-managers/niri/niri.nix +++ /dev/null @@ -1,52 +0,0 @@ -{ inputs, self, ... }: { - flake.nixosModules.niri = { config, pkgs, inputs, lib, ... }: { - imports = with self.nixosModules; [ - nautilus - ]; - - environment.systemPackages = with pkgs; [ - xdg-desktop-portal-gnome - wl-clipboard - libsecret - cage - wev - qalculate-qt - ]; - - services.upower.enable = true; - - services.udisks2.enable = true; - - programs.niri = { - enable = true; - useNautilus = true; - # override niri source to use https://github.com/niri-wm/niri/pull/3642 - package = (pkgs.niri.overrideAttrs (finalAttrs: prevAttrs: - { - cargoHash = "sha256-HypBB3PL4nVFMNH2+jEK0+dG9dJ920nHi8GwRoeH/v4="; - src = pkgs.fetchFromGitHub { - owner = "niri-wm"; - repo = "niri"; - rev = "cb41d54703eef73883bb2be58e19bcf3715d777c"; - sha256 = "sha256-cLzTeMcCdQJ+kHGcOposjeheFyEG/tGOA1jFAORMHjI="; - }; - cargoDeps = pkgs.rustPlatform.fetchCargoVendor { - inherit (finalAttrs) pname src version; - hash = finalAttrs.cargoHash; - }; - } - )); - }; - }; - - flake.homeModules.niri = { lib, osConfig, ... }: - { - home.activation.symlinkNiriConfig = lib.hm.dag.entryAfter ["writeBoundary"] '' - #!/bin/bash - if [ -f /home/grey/.config/niri/config.kdl ]; then - rm /home/grey/.config/niri/config.kdl - fi - ln -s ${osConfig.info.rootPath}/dotfiles/${osConfig.networking.hostName}/niri.kdl /home/grey/.config/niri/config.kdl - ''; - }; -} \ No newline at end of file diff --git a/modules/components/window-managers/shells/noctalia/noctalia.nix b/modules/components/window-managers/shells/noctalia/noctalia.nix deleted file mode 100644 index c9741fe..0000000 --- a/modules/components/window-managers/shells/noctalia/noctalia.nix +++ /dev/null @@ -1,39 +0,0 @@ -{ inputs, self, ... }: { - flake.nixosModules.noctalia = { pkgs, ... }: { - environment.systemPackages = with pkgs; [ - inputs.noctalia.packages.${system}.default - ]; - - programs.noctalia.enable = true; - }; - - flake.homeModules.noctalia = { lib, pkgs, osConfig, ... }: { - home.activation = { - symlinkNoctaliaState = lib.hm.dag.entryAfter ["writeBoundary"] '' - #!/bin/bash - if [ -f /home/grey/.local/state/noctalia/settings.toml ]; then - rm /home/grey/.local/state/noctalia/settings.toml - fi - ln -s ${osConfig.info.rootPath}/dotfiles/${osConfig.networking.hostName}/noctalia/settings.toml /home/grey/.local/state/noctalia/settings.toml - - if [ -d /home/grey/.local/state/noctalia/plugins ]; then - rm -rf /home/grey/.local/state/noctalia/plugins - fi - ln -s ${osConfig.info.rootPath}/dotfiles/${osConfig.networking.hostName}/noctalia/plugins /home/grey/.local/state/noctalia/plugins - ''; - - copyNoctaliaConfig = lib.hm.dag.entryAfter ["writeBoundary"] '' - #!/bin/bash - if [ -f /home/grey/.config/noctalia/settings.toml ]; then - rm /home/grey/.config/noctalia/settings.toml - fi - cp ${osConfig.info.rootPath}/dotfiles/${osConfig.networking.hostName}/noctalia/settings.toml /home/grey/.config/noctalia/settings.toml - - if [ -d /home/grey/.config/noctalia/plugins ]; then - rm -rf /home/grey/.config/noctalia/plugins - fi - cp -r ${osConfig.info.rootPath}/dotfiles/${osConfig.networking.hostName}/noctalia/plugins /home/grey/.config/noctalia/plugins - ''; - }; - }; -} \ No newline at end of file diff --git a/modules/features/applications/gui/equibop.nix b/modules/features/applications/gui/equibop.nix index 13713a5..91e60ef 100644 --- a/modules/features/applications/gui/equibop.nix +++ b/modules/features/applications/gui/equibop.nix @@ -1,25 +1,28 @@ { inputs, self, ... }: { - flake.homeModules.equibop = { pkgs, lib, osConfig, ... }: { - programs.equibop.enable = true; + flake.nixosModules.graphics = { pkgs, lib, config, ... }: { + options.features.applications.gui.equibop.enable = lib.mkEnableOption "equibop"; + }; - home.activation = { - linkEquibopConfig = lib.hm.dag.entryAfter ["writeBoundary"] '' - #!/bin/bash - if [ -f /home/grey/.config/equibop/settings.json ]; then - rm /home/grey/.config/equibop/settings.json - fi - ln -s ${osConfig.info.rootPath}/dotfiles/${osConfig.networking.hostName}/equibop/settings.json /home/grey/.config/equibop/settings.json + flake.homeModules.graphics = { pkgs, lib, osConfig, ... }: { + config = lib.mkIf (osConfig.features.applications.gui.equibop.enable) { + programs.equibop.enable = true; - if [ -f /home/grey/.config/equibop/settings/settings.json ]; then - rm /home/grey/.config/equibop/settings/settings.json - fi - ln -s ${osConfig.info.rootPath}/dotfiles/${osConfig.networking.hostName}/equibop/equicord-settings.json /home/grey/.config/equibop/settings/settings.json + home.activation = { + linkEquibopConfigSettings = lib.hm.dag.entryAfter ["writeBoundary"] (osConfig.helpers.mkSymlinkActivationScript { + target = ".config/equibop/settings.json"; + source = "dotfiles/${osConfig.info.hostName}/equibop/settings.json"; + }); - if [ -f /home/grey/.config/equibop/settings/quickCss.css ]; then - rm /home/grey/.config/equibop/settings/quickCss.css - fi - ln -s ${osConfig.info.rootPath}/dotfiles/${osConfig.networking.hostName}/equibop/quickCss.css /home/grey/.config/equibop/settings/quickCss.css - ''; + linkEquibopConfigEquicordSettings = lib.hm.dag.entryAfter ["writeBoundary"] (osConfig.helpers.mkSymlinkActivationScript { + target = ".config/equibop/settings/settings.json"; + source = "dotfiles/${osConfig.info.hostName}/equibop/equicord-settings.json"; + }); + + linkEquibopConfigQuickCss = lib.hm.dag.entryAfter ["writeBoundary"] (osConfig.helpers.mkSymlinkActivationScript { + target = ".config/equibop/settings/quickCss.css"; + source = "dotfiles/${osConfig.info.hostName}/equibop/quickCss.css"; + }); + }; }; }; } \ No newline at end of file diff --git a/modules/features/applications/gui/floorp.nix b/modules/features/applications/gui/floorp.nix index b5f3703..a0de9e2 100644 --- a/modules/features/applications/gui/floorp.nix +++ b/modules/features/applications/gui/floorp.nix @@ -1,207 +1,216 @@ { inputs, self, ... }: { - flake.homeModules.floorp = { pkgs, ... }: - let - firefox-addons = with pkgs; inputs.firefox-addons.packages.${system}; - in { - programs.floorp = { - enable = true; - nativeMessagingHosts = [ - pkgs.firefoxpwa - ]; - policies = { - AIControls.Default = { - Value = "blocked"; - Locked = true; - }; - AutofillAddressEnabled = false; - AutofillCreditCardEnabled = false; - DisableAppUpdate = true; - DisableFeedbackCommands = true; - DisableFirefoxStudies = true; - DisablePocket = true; - DisableTelemetry = true; - NoDefaultBookmarks = true; - EnableTrackingProtection = { - Value = true; - Locked = true; - Cryptomining = true; - Fingerprinting = true; - }; - }; - profiles.default = { - extensions = { - packages = with firefox-addons; [ - adnauseam - bitwarden - indie-wiki-buddy - pwas-for-firefox - gnome-shell-integration + flake.nixosModules.graphics = { pkgs, config, lib, ... }: { + options.features.applications.gui.floorp.enable = lib.mkEnableOption "floorp"; + }; + + flake.homeModules.graphics = { pkgs, lib, osConfig, ... }: { + config = lib.mkIf (osConfig.features.applications.gui.floorp.enable) ( + let + firefox-addons = with pkgs; inputs.firefox-addons.packages.${system}; + in { + stylix.targets.floorp.profileNames = lib.mkIf (osConfig.features.nixos.stylix.enable) [ "default" ]; + + programs.floorp = { + enable = true; + nativeMessagingHosts = [ + pkgs.firefoxpwa ]; + policies = { + AIControls.Default = { + Value = "blocked"; + Locked = true; + }; + AutofillAddressEnabled = false; + AutofillCreditCardEnabled = false; + DisableAppUpdate = true; + DisableFeedbackCommands = true; + DisableFirefoxStudies = true; + DisablePocket = true; + DisableTelemetry = true; + NoDefaultBookmarks = true; + EnableTrackingProtection = { + Value = true; + Locked = true; + Cryptomining = true; + Fingerprinting = true; + }; + }; + profiles.default = { + extensions = { + packages = with firefox-addons; [ + adnauseam + bitwarden + indie-wiki-buddy + pwas-for-firefox + gnome-shell-integration + ]; - settings = { - ${firefox-addons.adnauseam.addonId} = { - force = true; settings = { - "firstInstall" = false; - "hidingAds" = true; - "clickingAds" = true; - "blockingMalware" = true; - "disableClickingForDNT" = true; - "clickProbability" = 0.75; - selectedFilterLists = [ - "user-filters" - "adnauseam-filters" - "eff-dnt-whitelist" - "ublock-filters" - "ublock-badware" - "ublock-privacy" - "ublock-quick-fixes" - "ublock-unbreak" - "easylist" - "easyprivacy" - "urlhaus-1" - "fanboy-cookiemonster" - "ublock-cookies-easylist" - "adguard-cookies" - "ublock-cookies-adguard" - "fanboy-ai-suggestions" - "easylist-chat" - "easylist-newsletters" - "easylist-notifications" - "easylist-annoyances" - "adguard-mobile-app-banners" - "adguard-other-annoyances" - "adguard-popup-overlays" - "adguard-widgets" - "ublock-annoyances" - ]; - }; - }; - }; - }; - - - settings = { - "signon.rememberSignons" = false; - "signon.autofillForms" = false; - "floorp.panelSidebar.enabled" = false; - "floorp.workspaces.enabled" = false; - "browser.toolbars.bookmarks.visibility" = "newtab"; - "floorp.browser.welcome.page.shown" = true; - "browser.newtabpage.activity-stream.feeds.topsites" = false; - "browser.newtabpage.activity-stream.feeds.section.topstories" = false; - "browser.newtabpage.activity-stream.feeds.adsfeed" = false; - "browser.newtabpage.activity-stream.feeds.telemetry" = false; - "browser.newtabpage.activity-stream.feeds.weatherfeed" = false; - "browser.newtabpage.activity-stream.newtabWallpapers.user.enabled" = true; - "browser.newtabpage.activity-stream.widgets.enabled" = false; - "browser.newtabpage.activity-stream.discoverystream.enabled" = false; - "browser.newtabpage.activity-stream.newtabWallpapers.wallpaper" = "suspension-bridge"; - "floorp.design.configs" = { - globalConfigs = { - userInterface = "proton"; - uiCustomization = { - qrCode.disableButton = true; - disableFloorpStart = true; - }; - }; - }; - "ui.key.menuAccessKeyFocuses" = false; - "floorp.keyboardshortcut.enabled" = true; - "floorp.keyboardshortcut.config" = { - enabled = true; - shortcuts = { - gecko-close-tab = { - modifiers = { - alt = true; - ctrl = false; - meta = false; - shift = false; + ${firefox-addons.adnauseam.addonId} = { + force = true; + settings = { + "firstInstall" = false; + "hidingAds" = true; + "clickingAds" = true; + "blockingMalware" = true; + "disableClickingForDNT" = true; + "clickProbability" = 0.75; + selectedFilterLists = [ + "user-filters" + "adnauseam-filters" + "eff-dnt-whitelist" + "ublock-filters" + "ublock-badware" + "ublock-privacy" + "ublock-quick-fixes" + "ublock-unbreak" + "easylist" + "easyprivacy" + "urlhaus-1" + "fanboy-cookiemonster" + "ublock-cookies-easylist" + "adguard-cookies" + "ublock-cookies-adguard" + "fanboy-ai-suggestions" + "easylist-chat" + "easylist-newsletters" + "easylist-notifications" + "easylist-annoyances" + "adguard-mobile-app-banners" + "adguard-other-annoyances" + "adguard-popup-overlays" + "adguard-widgets" + "ublock-annoyances" + ]; + }; }; - key = "Q"; - action = "gecko-close-tab"; - }; - gecko-open-new-tab = { - modifiers = { - alt = true; - ctrl = false; - meta = false; - shift = false; - }; - key = "Enter"; - action = "gecko-open-new-tab"; }; }; - }; - }; - search = { - force = true; - default = "ddg-noai"; - engines = { - ddg-noai = { - name = "DuckDuckGo No-AI"; - urls = [ - { - template = "https://noai.duckduckgo.com/?q={searchTerms}"; - } - ]; - icon = "https://duckduckgo.com/favicon.ico"; - definedAliases = ["@noai"]; + + settings = { + "signon.rememberSignons" = false; + "signon.autofillForms" = false; + "floorp.panelSidebar.enabled" = false; + "floorp.workspaces.enabled" = false; + "browser.toolbars.bookmarks.visibility" = "newtab"; + "floorp.browser.welcome.page.shown" = true; + "browser.newtabpage.activity-stream.feeds.topsites" = false; + "browser.newtabpage.activity-stream.feeds.section.topstories" = false; + "browser.newtabpage.activity-stream.feeds.adsfeed" = false; + "browser.newtabpage.activity-stream.feeds.telemetry" = false; + "browser.newtabpage.activity-stream.feeds.weatherfeed" = false; + "browser.newtabpage.activity-stream.newtabWallpapers.user.enabled" = true; + "browser.newtabpage.activity-stream.widgets.enabled" = false; + "browser.newtabpage.activity-stream.discoverystream.enabled" = false; + "browser.newtabpage.activity-stream.newtabWallpapers.wallpaper" = "suspension-bridge"; + "floorp.design.configs" = { + globalConfigs = { + userInterface = "proton"; + uiCustomization = { + qrCode.disableButton = true; + disableFloorpStart = true; + }; + }; + }; + "ui.key.menuAccessKeyFocuses" = false; + "floorp.keyboardshortcut.enabled" = true; + "floorp.keyboardshortcut.config" = { + enabled = true; + shortcuts = { + gecko-close-tab = { + modifiers = { + alt = true; + ctrl = false; + meta = false; + shift = false; + }; + key = "Q"; + action = "gecko-close-tab"; + }; + gecko-open-new-tab = { + modifiers = { + alt = true; + ctrl = false; + meta = false; + shift = false; + }; + key = "Enter"; + action = "gecko-open-new-tab"; + }; + }; + }; }; - nixpkgs = { - name = "nixpkgs packages"; - urls = [ - { - template = "https://search.nixos.org/packages?query={searchTerms}"; - } - ]; - icon = "https://wiki.nixos.org/favicon.ico"; - definedAliases = ["@np"]; - }; - nixos-options = { - name = "NixOS options"; - urls = [ - { - template = "https://search.nixos.org/options?query={searchTerms}"; - } - ]; - icon = "https://wiki.nixos.org/favicon.ico"; - definedAliases = ["@no"]; - }; - nixos-wiki = { - name = "NixOS Wiki"; - urls = [ - { - template = "https://wiki.nixos.org/w/index.php?search={searchTerms}"; - } - ]; - icon = "https://wiki.nixos.org/favicon.ico"; - definedAliases = ["@nw"]; - }; - noogle = { - name = "Noogle"; - urls = [ - { - template = "https://noogle.dev/q/?term={searchTerms}"; - } - ]; - icon = "https://noogle.dev/favicon.ico"; - definedAliases = ["@ng"]; - }; - arch-wiki = { - name = "ArchWiki"; - urls = [ - { - template = "https://wiki.archlinux.org/index.php?search={searchTerms}"; - } - ]; - icon = "https://wiki.archlinux.org/favicon.ico"; - definedAliases = ["@aw"]; + + search = { + force = true; + default = "ddg-noai"; + engines = { + ddg-noai = { + name = "DuckDuckGo No-AI"; + urls = [ + { + template = "https://noai.duckduckgo.com/?q={searchTerms}"; + } + ]; + icon = "https://duckduckgo.com/favicon.ico"; + definedAliases = ["@noai"]; + }; + nixpkgs = { + name = "nixpkgs packages"; + urls = [ + { + template = "https://search.nixos.org/packages?query={searchTerms}"; + } + ]; + icon = "https://wiki.nixos.org/favicon.ico"; + definedAliases = ["@np"]; + }; + nixos-options = { + name = "NixOS options"; + urls = [ + { + template = "https://search.nixos.org/options?query={searchTerms}"; + } + ]; + icon = "https://wiki.nixos.org/favicon.ico"; + definedAliases = ["@no"]; + }; + nixos-wiki = { + name = "NixOS Wiki"; + urls = [ + { + template = "https://wiki.nixos.org/w/index.php?search={searchTerms}"; + } + ]; + icon = "https://wiki.nixos.org/favicon.ico"; + definedAliases = ["@nw"]; + }; + noogle = { + name = "Noogle"; + urls = [ + { + template = "https://noogle.dev/q/?term={searchTerms}"; + } + ]; + icon = "https://noogle.dev/favicon.ico"; + definedAliases = ["@ng"]; + }; + arch-wiki = { + name = "ArchWiki"; + urls = [ + { + template = "https://wiki.archlinux.org/index.php?search={searchTerms}"; + } + ]; + icon = "https://wiki.archlinux.org/favicon.ico"; + definedAliases = ["@aw"]; + }; + }; }; }; }; - }; - }; + } + ); }; } \ No newline at end of file diff --git a/modules/features/applications/gui/fluxer.nix b/modules/features/applications/gui/fluxer.nix new file mode 100644 index 0000000..b97cae7 --- /dev/null +++ b/modules/features/applications/gui/fluxer.nix @@ -0,0 +1,78 @@ +{ inputs, self, ... }: { + flake.nixosModules.graphics = { pkgs, config, lib, ... }: { + options.features.applications.gui = { + fluxer.enable = lib.mkEnableOption "fluxer"; + fluxer-canary.enable = lib.mkEnableOption "fluxer-canary"; + }; + + config = { + environment.systemPackages = (if config.features.applications.gui.fluxer.enable then [ + (pkgs.callPackage ({ appimageTools, fetchurl, lib, pkgs, ... }: + let + pname = "fluxer"; + version = "0.0.8"; + + src = fetchurl { + url = "https://api.fluxer.app/dl/desktop/stable/linux/x64/latest/appimage"; + sha256 = "sha256-GdoBK+Z/d2quEIY8INM4IQy5tzzIBBM+3CgJXQn0qAw="; + }; + + appimageContents = appimageTools.extract { inherit pname version src; }; + in + appimageTools.wrapType2 rec { + inherit pname version src; + + extraInstallCommands = '' + install -m 444 -D ${appimageContents}/${pname}.desktop $out/share/applications/${pname}.desktop + + install -m 444 -D ${appimageContents}/${pname}.png $out/share/icons/hicolor/512x512/apps/${pname}.png + + substituteInPlace $out/share/applications/${pname}.desktop \ + --replace 'Exec=AppRun --no-sandbox %U' 'Exec=${pname} %U' + ''; + + meta = with lib; { + description = "Open-source, self-hosted alternative to Discord"; + homepage = "https://fluxer.app/"; + license = licenses.agpl3Only; + maintainers = [ ]; + platforms = [ "x86_64-linux" ]; + }; + }) {}) + ] else []) ++ (if config.features.applications.gui.fluxer-canary.enable then [ + (pkgs.callPackage ({ appimageTools, fetchurl, lib, pkgs, ... }: + let + pname = "fluxer-canary"; + version = "2026.827.132039"; + + src = fetchurl { + url = "https://api.canary.fluxer.app/dl/desktop/canary/linux/x64/latest/appimage"; + sha256 = "sha256-eRR9JZa4LPuUtjdDO+JvzaOLxQeDgVziLrFr5iIgr1Q="; + }; + + appimageContents = appimageTools.extract { inherit pname version src; }; + in + appimageTools.wrapType2 rec { + inherit pname version src; + + extraInstallCommands = '' + install -m 444 -D ${appimageContents}/${pname}.desktop $out/share/applications/${pname}.desktop + + install -m 444 -D ${appimageContents}/${pname}.png $out/share/icons/hicolor/512x512/apps/${pname}.png + + substituteInPlace $out/share/applications/${pname}.desktop \ + --replace 'Exec=AppRun %U' 'Exec=${pname} %U' + ''; + + meta = with lib; { + description = "Open-source, self-hosted alternative to Discord"; + homepage = "https://fluxer.app/"; + license = licenses.agpl3Only; + maintainers = [ ]; + platforms = [ "x86_64-linux" ]; + }; + }) {}) + ] else []); + }; + }; +} \ No newline at end of file diff --git a/modules/features/applications/gui/kitty.nix b/modules/features/applications/gui/kitty.nix index 06ebfc6..21f91d9 100644 --- a/modules/features/applications/gui/kitty.nix +++ b/modules/features/applications/gui/kitty.nix @@ -1,10 +1,16 @@ { inputs, self, ... }: { - flake.homeModules.kitty = { pkgs, ... }: { - programs.kitty = { - enable = true; + flake.nixosModules.graphics = { pkgs, config, lib, ... }: { + options.features.applications.gui.kitty.enable = lib.mkEnableOption "kitty"; + }; - shellIntegration.enableBashIntegration = true; - enableGitIntegration = true; + flake.homeModules.graphics = { pkgs, osConfig, lib, ... }: { + config = lib.mkIf (osConfig.features.applications.gui.kitty.enable) { + programs.kitty = { + enable = true; + + shellIntegration.enableBashIntegration = true; + enableGitIntegration = true; + }; }; }; } \ No newline at end of file diff --git a/modules/features/applications/gui/nautilus.nix b/modules/features/applications/gui/nautilus.nix index 0b95715..0538b7d 100644 --- a/modules/features/applications/gui/nautilus.nix +++ b/modules/features/applications/gui/nautilus.nix @@ -1,14 +1,35 @@ { inputs, self, ... }: { - flake.nixosModules.nautilus = { pkgs, config, ... }: { - environment.systemPackages = with pkgs; [ - nautilus - code-nautilus - adwaita-icon-theme - ]; + flake.nixosModules.graphics = { pkgs, config, lib, ... }: { + options.features.applications.gui.nautilus.enable = lib.mkEnableOption "nautilus"; - programs.nautilus-open-any-terminal = { - enable = true; - terminal = "kitty"; + config = lib.mkIf (config.features.applications.gui.nautilus.enable) { + environment.systemPackages = with pkgs; [ + nautilus + adwaita-icon-theme + ] ++ ( + if (config.features.applications.gui.vscode.enable) + then [ pkgs.code-nautilus ] + else [] + ); + + programs.nautilus-open-any-terminal = lib.mkIf (config.features.applications.gui.kitty.enable) { + enable = true; + terminal = "kitty"; + }; + }; + }; + + flake.homeModules.graphics = { pkgs, osConfig, lib, ... }: { + config = lib.mkIf (osConfig.features.applications.gui.nautilus.enable) { + gtk.gtk3.bookmarks = [ + "file://${osConfig.info.rootPath} NixOS" + "file:///home/grey/Downloads Downloads" + "file:///home/grey/Documents Documents" + "file:///home/grey/Pictures Pictures" + "file:///home/grey/Music Music" + "file:///home/grey/Videos Videos" + "file:/// Root" + ]; }; }; } \ No newline at end of file diff --git a/modules/features/applications/gui/remmina.nix b/modules/features/applications/gui/remmina.nix new file mode 100644 index 0000000..58b7622 --- /dev/null +++ b/modules/features/applications/gui/remmina.nix @@ -0,0 +1,20 @@ +{ inputs, self, ... }: { + flake.nixosModules.graphics = { pkgs, config, lib, ... }: { + options.features.applications.gui.remmina.enable = lib.mkEnableOption "remmina"; + }; + + flake.homeModules.graphics = { pkgs, osConfig, lib, ... }: { + config = lib.mkIf (osConfig.features.applications.gui.remmina.enable) { + home.packages = with pkgs; [ + remmina + freerdp + ]; + + home.activation.linkRemminaPresets = lib.hm.dag.entryAfter ["writeBoundary"] (osConfig.helpers.mkSymlinkActivationScript { + target = ".local/share/remmina"; + source = "dotfiles/${osConfig.info.hostName}/remmina"; + isDir = true; + }); + }; + }; +} \ No newline at end of file diff --git a/modules/features/applications/gui/vscode.nix b/modules/features/applications/gui/vscode.nix index 7cc01ee..749d60e 100644 --- a/modules/features/applications/gui/vscode.nix +++ b/modules/features/applications/gui/vscode.nix @@ -1,20 +1,23 @@ { inputs, self, ... }: { - flake.homeModules.vscode = { osConfig, pkgs, lib, ... }: { - home.packages = [ pkgs.vscode ]; + flake.nixosModules.graphics = { pkgs, config, lib, ... }: { + options.features.applications.gui.vscode.enable = lib.mkEnableOption "vscode"; + }; - home.activation = { - linkVsCodeConfig = lib.hm.dag.entryAfter ["writeBoundary"] '' - #!/bin/bash - if [ -f /home/grey/.config/Code/User/settings.json ]; then - rm /home/grey/.config/Code/User/settings.json - fi - ln -s ${osConfig.info.rootPath}/dotfiles/global/vscode/settings.json /home/grey/.config/Code/User/settings.json + flake.homeModules.graphics = { osConfig, pkgs, lib, ... }: { + config = lib.mkIf (osConfig.features.applications.gui.vscode.enable) { + home.packages = [ pkgs.vscode ]; - if [ -f /home/grey/.config/Code/User/keybindings.json ]; then - rm /home/grey/.config/Code/User/keybindings.json - fi - ln -s ${osConfig.info.rootPath}/dotfiles/global/vscode/keybindings.json /home/grey/.config/Code/User/keybindings.json - ''; + home.activation = { + linkVsCodeConfigSettings = lib.hm.dag.entryAfter ["writeBoundary"] (osConfig.helpers.mkSymlinkActivationScript { + target = ".config/Code/User/settings.json"; + source = "dotfiles/global/vscode/settings.json"; + }); + + linkVsCodeConfigKeybindings = lib.hm.dag.entryAfter ["writeBoundary"] (osConfig.helpers.mkSymlinkActivationScript { + target = ".config/Code/User/keybindings.json"; + source = "dotfiles/global/vscode/keybindings.json"; + }); + }; }; }; } \ No newline at end of file diff --git a/modules/features/nixos/home-manager.nix b/modules/features/nixos/home-manager.nix index ef8de12..b3516a4 100644 --- a/modules/features/nixos/home-manager.nix +++ b/modules/features/nixos/home-manager.nix @@ -1,4 +1,8 @@ { inputs, self, ... }: { + imports = [ + inputs.home-manager.flakeModules.home-manager + ]; + flake.nixosModules.global = { pkgs, lib, config, ... }: { imports = [ inputs.home-manager.nixosModules.default @@ -9,7 +13,8 @@ config.home-manager = lib.mkIf (config.features.nixos.home-manager.enable) { useGlobalPkgs = true; useUserPackages = true; - users.grey = self.homeModules.${config.networking.hostName}; + backupFileExtension = "bak"; + users.grey = self.homeModules.${config.info.hostName}; }; }; } \ No newline at end of file diff --git a/modules/features/nixos/stylix.nix b/modules/features/nixos/stylix.nix index 8703571..8155263 100644 --- a/modules/features/nixos/stylix.nix +++ b/modules/features/nixos/stylix.nix @@ -8,7 +8,7 @@ config = lib.mkIf (config.features.nixos.stylix.enable) { stylix.enable = true; - stylix.image = builtins.path { path = "${self.outPath}/modules/hosts/${config.networking.hostName}/wallpaper.jpg"; }; + stylix.image = builtins.path { path = "${self}/modules/hosts/${config.info.hostName}/wallpaper.jpg"; }; stylix.polarity = "dark"; }; }; diff --git a/modules/meta/flake-parts.nix b/modules/flake-parts.nix similarity index 50% rename from modules/meta/flake-parts.nix rename to modules/flake-parts.nix index 961ce60..59f9470 100644 --- a/modules/meta/flake-parts.nix +++ b/modules/flake-parts.nix @@ -1,8 +1,4 @@ { inputs, self, ...}: { - imports = [ - inputs.home-manager.flakeModules.home-manager - ]; - config.systems = [ "x86_64-linux" ]; diff --git a/modules/global.nix b/modules/global.nix deleted file mode 100644 index 7b46af6..0000000 --- a/modules/global.nix +++ /dev/null @@ -1,136 +0,0 @@ -{ inputs, self, ... }: { - flake.nixosModules.global = { pkgs, config, lib, ... }: { - options = { - info.rootPath = lib.mkOption { - type = lib.types.str; - default = "/home/grey/nixos"; - }; - }; - - config = { - nix.settings.experimental-features = [ - "nix-command" - "flakes" - ]; - - nix.gc = { - automatic = true; - persistent = true; - dates = "Sun 05:00"; - }; - - boot.loader.efi.canTouchEfiVariables = true; - - networking.networkmanager.enable = true; - - time.timeZone = "Europe/London"; - i18n.defaultLocale = "en_GB.UTF-8"; - i18n.extraLocaleSettings = { - LC_ADDRESS = "en_GB.UTF-8"; - LC_IDENTIFICATION = "en_GB.UTF-8"; - LC_MEASUREMENT = "en_GB.UTF-8"; - LC_MONETARY = "en_GB.UTF-8"; - LC_NAME = "en_GB.UTF-8"; - LC_NUMERIC = "en_GB.UTF-8"; - LC_PAPER = "en_GB.UTF-8"; - LC_TELEPHONE = "en_GB.UTF-8"; - LC_TIME = "en_GB.UTF-8"; - }; - - services.xserver.xkb = { - layout = "gb"; - variant = ""; - }; - console.keyMap = "uk"; - - users.users."grey" = { - isNormalUser = true; - description = "grey"; - extraGroups = [ "networkmanager" "wheel" ]; - }; - - nixpkgs.config.allowUnfree = true; - - environment.systemPackages = with pkgs; [ - git - fzf - jq - busybox - ethtool - hyperfine - ]; - - programs.nano = { - enable = true; - nanorc = '' - set nowrap - set tabstospaces - set tabsize 2 - ''; - }; - - hardware.bluetooth = { - enable = true; - powerOnBoot = false; - }; - - programs.gnupg.agent = { - enable = true; - }; - }; - }; - - flake.homeModules.global = { config, pkgs, ... }: { - nix.gc = { - automatic = true; - persistent = true; - dates = "Sun 05:00"; - }; - - home.packages = with pkgs; [ - speedtest-go - ]; - - programs.git = { - enable = true; - - lfs.enable = true; - - settings = { - user.name = "Grey Jones"; - user.email = "grey@greyweather.dev"; - }; - - signing = { - format = "openpgp"; - key = "CC7388DF8E1890729921BCFF7C67C51C2FF524D9"; - signByDefault = true; - }; - }; - - programs.gpg = { - enable = true; - }; - - programs.ssh = { - enable = true; - enableDefaultConfig = false; - settings = { - "git.greyweather.dev" = { - HostName = "git.greyweather.dev"; - Port = "222"; - User = "git"; - IdentityFile = "~/.ssh/id_gitea"; - }; - "github.com" = { - HostName = "github.com"; - Port = 22; - User = "git"; - IdentityFile = "~/.ssh/id_github"; - }; - }; - }; - - home.shell.enableBashIntegration = true; - }; -} \ No newline at end of file diff --git a/modules/global/global.nix b/modules/global/global.nix new file mode 100644 index 0000000..18e626c --- /dev/null +++ b/modules/global/global.nix @@ -0,0 +1,85 @@ +{ inputs, self, ... }: { + flake.nixosModules.global = { pkgs, config, lib, ... }: { + system.stateVersion = config.info.stateVersion; + + nix = { + settings.experimental-features = [ + "nix-command" + "flakes" + ]; + + gc = { + automatic = true; + persistent = true; + dates = "Sun 05:00"; + }; + }; + + boot.loader.efi.canTouchEfiVariables = true; + + networking = { + networkmanager.enable = true; + hostName = config.info.hostName; + }; + + time.timeZone = "Europe/London"; + i18n = { + defaultLocale = "en_GB.UTF-8"; + extraLocaleSettings = with config.i18n; { + LC_ADDRESS = defaultLocale; + LC_IDENTIFICATION = defaultLocale; + LC_MEASUREMENT = defaultLocale; + LC_MONETARY = defaultLocale; + LC_NAME = defaultLocale; + LC_NUMERIC = defaultLocale; + LC_PAPER = defaultLocale; + LC_TELEPHONE = defaultLocale; + LC_TIME = defaultLocale; + }; + }; + + services.xserver.xkb = { + layout = "gb"; + variant = ""; + }; + + console.keyMap = "uk"; + + users.users."grey" = { + isNormalUser = true; + description = "grey"; + extraGroups = [ "networkmanager" "wheel" ]; + }; + + nixpkgs.config.allowUnfree = true; + + environment.systemPackages = with pkgs; [ + git + fzf + jq + busybox + ethtool + hyperfine + ] ++ config.features.applications.extraPackages; + + programs = { + nano = { + enable = true; + nanorc = '' + set nowrap + set tabstospaces + set tabsize 2 + ''; + }; + + gnupg.agent = { + enable = true; + }; + }; + + hardware.bluetooth = { + enable = true; + powerOnBoot = false; + }; + }; +} \ No newline at end of file diff --git a/modules/global/helpers.nix b/modules/global/helpers.nix new file mode 100644 index 0000000..c5d6acd --- /dev/null +++ b/modules/global/helpers.nix @@ -0,0 +1,15 @@ +{ inputs, self, ... }: { + flake.nixosModules.global = { pkgs, config, lib, ... }: { + options.helpers = { + mkSymlinkActivationScript = lib.mkOption { + type = lib.types.functionTo lib.types.str; + default = {target, source, isDir ? false}: '' + if [ ${if isDir then "-d" else "-f"} /home/grey/${target} ]; then + rm${if isDir then " -rf" else ""} /home/grey/${target} + fi + ln -s ${config.info.rootPath}/${source} /home/grey/${target} + ''; + }; + }; + }; +} \ No newline at end of file diff --git a/modules/global/home.nix b/modules/global/home.nix new file mode 100644 index 0000000..539eab1 --- /dev/null +++ b/modules/global/home.nix @@ -0,0 +1,61 @@ +{ inputs, self, ... }: { + flake.homeModules.global = { osConfig, config, pkgs, ... }: { + nix.gc = { + automatic = true; + persistent = true; + dates = "Sun 05:00"; + }; + + home = { + stateVersion = osConfig.info.stateVersion; + + packages = with pkgs; [ + speedtest-go + ] ++ osConfig.features.applications.extraUserPackages; + + shell.enableBashIntegration = true; + }; + + programs = { + git = { + enable = true; + + lfs.enable = true; + + settings = { + user.name = "Grey Jones"; + user.email = "grey@greyweather.dev"; + }; + + signing = { + format = "openpgp"; + key = "CC7388DF8E1890729921BCFF7C67C51C2FF524D9"; + signByDefault = true; + }; + }; + + gpg = { + enable = true; + }; + + ssh = { + enable = true; + enableDefaultConfig = false; + settings = { + "git.greyweather.dev" = { + HostName = "git.greyweather.dev"; + Port = "222"; + User = "git"; + IdentityFile = "~/.ssh/id_gitea"; + }; + "github.com" = { + HostName = "github.com"; + Port = 22; + User = "git"; + IdentityFile = "~/.ssh/id_github"; + }; + }; + }; + }; + }; +} \ No newline at end of file diff --git a/modules/global/options.nix b/modules/global/options.nix new file mode 100644 index 0000000..7bea9af --- /dev/null +++ b/modules/global/options.nix @@ -0,0 +1,41 @@ +{ inputs, self, ... }: { + flake.nixosModules.global = { pkgs, config, lib, ... }: { + options = { + info = { + rootPath = lib.mkOption { + type = lib.types.str; + default = "/home/grey/nixos"; + }; + + hostName = lib.mkOption { + type = lib.types.str; + default = ""; + }; + + stateVersion = lib.mkOption { + type = lib.types.str; + default = ""; + }; + }; + + components.bootLoader = lib.mkOption { + type = lib.types.enum (map (name: lib.removeSuffix ".nix" name) ( + builtins.attrNames (builtins.readDir "${self}/modules/components/boot-loaders") + )); + default = "grub"; + }; + + features.applications = { + extraPackages = lib.mkOption { + type = lib.types.listOf (lib.types.package); + default = []; + }; + + extraUserPackages = lib.mkOption { + type = lib.types.listOf (lib.types.package); + default = []; + }; + }; + }; + }; +} \ No newline at end of file diff --git a/modules/hosts/kitagawa/kitagawa.nix b/modules/hosts/kitagawa/kitagawa.nix index 5477270..c2b6249 100644 --- a/modules/hosts/kitagawa/kitagawa.nix +++ b/modules/hosts/kitagawa/kitagawa.nix @@ -8,15 +8,17 @@ }; flake.nixosModules.kitagawa = { config, pkgs, ... }: { - system.stateVersion = "26.05"; + info = { + hostName = "kitagawa"; + stateVersion = "26.05"; + }; - networking.hostName = "kitagawa"; - - imports = with self.nixosModules; [ - ly - niri - noctalia - ]; + components = { + bootLoader = "limine"; + displayManager = "ly"; + windowManagers = "niri"; + shells = "noctalia"; + }; features = { nixos = { @@ -39,7 +41,30 @@ enable = true; spicetify.enable = true; }; + kitty.enable = true; + vscode.enable = true; + floorp.enable = true; + equibop.enable = true; + remmina.enable = true; }; + + extraPackages = with pkgs; [ + github-desktop + moonlight-qt + ]; + + extraUserPackages = with pkgs; [ + obsidian + thunderbird + jetbrains.clion + jetbrains.idea + proton-vpn + ente-auth + signal-desktop + xarchiver + kdePackages.filelight + loupe + ]; }; }; @@ -64,11 +89,6 @@ openFirewall = true; }; - environment.systemPackages = with pkgs; [ - github-desktop - moonlight-qt - ]; - hardware.steam-hardware.enable = true; boot = { @@ -80,26 +100,13 @@ "rd.udev.log_level=3" "rd.systemd.show_status=auto" ]; - - loader.limine = { - enable = true; - maxGenerations = 10; - }; }; }; flake.homeModules.kitagawa = { config, pkgs, inputs, lib, ... }: { - home.stateVersion = "26.05"; - imports = with self.homeModules; [ global graphics - niri - noctalia - vscode - kitty - floorp - equibop ]; /* @@ -109,42 +116,6 @@ ]; */ - home.packages = with pkgs; [ - obsidian - thunderbird - jetbrains.clion - jetbrains.idea - proton-vpn - ente-auth - signal-desktop - xarchiver - kdePackages.filelight - remmina - freerdp - loupe - ]; - - stylix.targets.floorp.profileNames = [ "default" ]; - - dconf.settings = { - "org/gnome/desktop/interface" = { - color-scheme = "prefer-dark"; - }; - }; - - gtk = { - enable = true; - gtk3.bookmarks = [ - "file:///home/grey/nixos NixOS" - "file:///home/grey/Downloads Downloads" - "file:///home/grey/Documents Documents" - "file:///home/grey/Pictures Pictures" - "file:///home/grey/Music Music" - "file:///home/grey/Videos Videos" - "file:/// Root" - ]; - }; - services.udiskie = { enable = true; settings = { @@ -192,17 +163,5 @@ }; }; }; - - /* - home.activation = { - linkRemminaPresets = lib.hm.dag.entryAfter ["writeBoundary"] '' - #!/bin/bash - if [ -d /home/grey/.local/share/remmina ]; then - rm -rf /home/grey/.local/share/remmina - fi - ln -s /home/grey/nixos/assets/dotfiles/remmina-presets /home/grey/.local/share/remmina - ''; - }; - */ }; } \ No newline at end of file