From 575149a3a0e94c79c3369ae5d4282b7fe227f0fc Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Wed, 26 Jun 2024 22:13:02 -0400 Subject: [PATCH] move duplicated hardware configuration to config.ar.hardware module --- flake.nix | 6 +- hardwareModules/cpu/amd/default.nix | 20 + hardwareModules/cpu/default.nix | 12 + hardwareModules/cpu/intel/default.nix | 14 + hardwareModules/default.nix | 13 + hardwareModules/gpu/amd/default.nix | 28 + hardwareModules/gpu/default.nix | 12 + hardwareModules/gpu/intel/default.nix | 41 + hardwareModules/options.nix | 21 + hardwareModules/ssd/default.nix | 10 + homeManagerModules/apps/alacritty/default.nix | 10 +- homeManagerModules/apps/bash/default.nix | 2 +- homeManagerModules/apps/chromium/default.nix | 4 +- homeManagerModules/apps/emacs/default.nix | 2 +- homeManagerModules/apps/fastfetch/default.nix | 2 +- homeManagerModules/apps/firefox/default.nix | 6 +- homeManagerModules/apps/fuzzel/default.nix | 16 +- homeManagerModules/apps/keepassxc/default.nix | 6 +- homeManagerModules/apps/librewolf/default.nix | 2 +- homeManagerModules/apps/mako/default.nix | 10 +- homeManagerModules/apps/nemo/default.nix | 6 +- homeManagerModules/apps/neovim/default.nix | 2 +- homeManagerModules/apps/swaylock/default.nix | 20 +- homeManagerModules/apps/thunar/default.nix | 2 +- homeManagerModules/apps/tmux/default.nix | 2 +- homeManagerModules/apps/vsCodium/default.nix | 12 +- homeManagerModules/apps/waybar/default.nix | 30 +- homeManagerModules/apps/wlogout/default.nix | 8 +- homeManagerModules/defaultApps.nix | 58 +- .../desktop/cinnamon/default.nix | 4 +- homeManagerModules/desktop/default.nix | 6 +- homeManagerModules/desktop/gnome/default.nix | 2 +- .../desktop/hyprland/default.nix | 26 +- homeManagerModules/desktop/startupApps.nix | 2 +- homeManagerModules/desktop/sway/default.nix | 56 +- .../desktop/sway/randomWallpaper.nix | 2 +- homeManagerModules/desktop/sway/redShift.nix | 2 +- homeManagerModules/desktop/waylandComp.nix | 20 +- homeManagerModules/options.nix | 846 +++++++++--------- .../scripts/pp-adjuster/default.nix | 2 +- .../services/easyeffects/default.nix | 4 +- homeManagerModules/services/mpd/default.nix | 4 +- homeManagerModules/theme.nix | 72 +- homes/aly.nix | 6 +- homes/dustin.nix | 2 +- homes/morgan.nix | 2 +- hosts/fallarbor/default.nix | 2 +- hosts/fallarbor/hardware.nix | 49 +- hosts/lavaridge/default.nix | 2 +- hosts/lavaridge/hardware.nix | 28 +- hosts/lavaridge/home.nix | 2 +- hosts/mandarin/default.nix | 2 +- hosts/mandarin/hardware.nix | 27 +- hosts/mandarin/home.nix | 2 +- hosts/mauville/default.nix | 15 +- hosts/mauville/hardware.nix | 32 +- hosts/mauville/home.nix | 2 +- hosts/petalburg/default.nix | 2 +- hosts/petalburg/hardware.nix | 45 +- hosts/petalburg/home.nix | 2 +- hosts/rustboro/default.nix | 2 +- hosts/rustboro/hardware.nix | 55 +- hosts/rustboro/home.nix | 2 +- nixosModules/apps/firefox/default.nix | 2 +- nixosModules/apps/nicotine-plus/default.nix | 2 +- nixosModules/apps/podman/default.nix | 2 +- nixosModules/apps/steam/default.nix | 6 +- nixosModules/apps/virt-manager/default.nix | 2 +- nixosModules/base/default.nix | 2 +- nixosModules/base/networking/default.nix | 2 +- .../base/networking/sambaAutoMount.nix | 2 +- nixosModules/base/nix/default.nix | 2 +- nixosModules/base/nixpkgs/default.nix | 2 +- nixosModules/base/plymouth/default.nix | 2 +- .../base/power-profiles-daemon/default.nix | 2 +- nixosModules/base/sound/default.nix | 2 +- nixosModules/base/zramSwap/default.nix | 4 +- .../nixos/audiobookshelf/default.nix | 6 +- .../containers/nixos/navidrome/default.nix | 6 +- .../containers/oci/audiobookshelf/default.nix | 6 +- .../containers/oci/freshRSS/default.nix | 4 +- .../containers/oci/jellyfin/default.nix | 8 +- .../oci/plexMediaServer/default.nix | 8 +- .../containers/oci/transmission/default.nix | 8 +- nixosModules/desktop/cinnamon/default.nix | 2 +- nixosModules/desktop/default.nix | 2 +- nixosModules/desktop/gnome/default.nix | 2 +- nixosModules/desktop/gnome/fprintdFix.nix | 2 +- nixosModules/desktop/greetd/default.nix | 12 +- nixosModules/desktop/hyprland/default.nix | 2 +- nixosModules/desktop/lightdm/default.nix | 2 +- nixosModules/desktop/plasma/default.nix | 2 +- nixosModules/desktop/sway/default.nix | 2 +- nixosModules/desktop/waylandComp.nix | 2 +- nixosModules/options.nix | 536 ++++++----- nixosModules/scripts/hoenn/default.nix | 2 +- nixosModules/services/binaryCache/default.nix | 2 +- nixosModules/services/flatpak/default.nix | 2 +- nixosModules/services/ollama/default.nix | 8 +- nixosModules/services/syncthing/default.nix | 12 +- nixosModules/services/syncthing/syncMusic.nix | 4 +- nixosModules/services/tailscale/default.nix | 2 +- nixosModules/users/aly/default.nix | 4 +- nixosModules/users/dustin/default.nix | 4 +- nixosModules/users/morgan/default.nix | 4 +- 105 files changed, 1220 insertions(+), 1176 deletions(-) create mode 100644 hardwareModules/cpu/amd/default.nix create mode 100644 hardwareModules/cpu/default.nix create mode 100644 hardwareModules/cpu/intel/default.nix create mode 100644 hardwareModules/default.nix create mode 100644 hardwareModules/gpu/amd/default.nix create mode 100644 hardwareModules/gpu/default.nix create mode 100644 hardwareModules/gpu/intel/default.nix create mode 100644 hardwareModules/options.nix create mode 100644 hardwareModules/ssd/default.nix diff --git a/flake.nix b/flake.nix index b058aad7..c3e21213 100644 --- a/flake.nix +++ b/flake.nix @@ -92,6 +92,9 @@ nixosModules.default = import ./nixosModules inputs; + nixosModules.hardware = + import ./hardwareModules inputs; + nixosConfigurations = inputs.nixpkgs.lib.genAttrs [ "fallarbor" @@ -108,11 +111,12 @@ ./hosts/${host} inputs.agenix.nixosModules.default inputs.disko.nixosModules.disko + inputs.home-manager.nixosModules.home-manager inputs.hyprland.nixosModules.default inputs.nixvim.nixosModules.nixvim inputs.nur.nixosModules.nur - inputs.home-manager.nixosModules.home-manager self.nixosModules.default + self.nixosModules.hardware { home-manager = { backupFileExtension = "backup"; diff --git a/hardwareModules/cpu/amd/default.nix b/hardwareModules/cpu/amd/default.nix new file mode 100644 index 00000000..dc5a5801 --- /dev/null +++ b/hardwareModules/cpu/amd/default.nix @@ -0,0 +1,20 @@ +{ + config, + lib, + pkgs, + ... +}: { + config = lib.mkIf config.ar.hardware.cpu.amd { + boot = { + kernelModules = ["kvm-amd"]; + kernelParams = + lib.optional (config.ar.hardware.laptop) "amd_pstate=active"; + }; + + hardware = { + cpu.amd.updateMicrocode = true; + }; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + }; +} diff --git a/hardwareModules/cpu/default.nix b/hardwareModules/cpu/default.nix new file mode 100644 index 00000000..88ef1b23 --- /dev/null +++ b/hardwareModules/cpu/default.nix @@ -0,0 +1,12 @@ +{ + config, + inputs, + lib, + pkgs, + ... +}: { + imports = [ + ./amd + ./intel + ]; +} diff --git a/hardwareModules/cpu/intel/default.nix b/hardwareModules/cpu/intel/default.nix new file mode 100644 index 00000000..d81fe2f0 --- /dev/null +++ b/hardwareModules/cpu/intel/default.nix @@ -0,0 +1,14 @@ +{ + config, + lib, + pkgs, + ... +}: { + config = lib.mkIf config.ar.hardware.cpu.intel { + boot.kernelModules = ["kvm-intel"]; + hardware.cpu.intel.updateMicrocode = true; + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + powerManagement.powertop.enable = config.ar.hardware.laptop; + services.thermald.enable = config.ar.hardware.laptop; + }; +} diff --git a/hardwareModules/default.nix b/hardwareModules/default.nix new file mode 100644 index 00000000..790d8e9f --- /dev/null +++ b/hardwareModules/default.nix @@ -0,0 +1,13 @@ +inputs: { + config, + pkgs, + lib, + ... +}: { + imports = [ + ./cpu + ./gpu + ./options.nix + ./ssd + ]; +} diff --git a/hardwareModules/gpu/amd/default.nix b/hardwareModules/gpu/amd/default.nix new file mode 100644 index 00000000..d27b9c7d --- /dev/null +++ b/hardwareModules/gpu/amd/default.nix @@ -0,0 +1,28 @@ +{ + config, + lib, + pkgs, + ... +}: { + config = lib.mkIf config.ar.hardware.gpu.amd { + boot = { + initrd.kernelModules = ["amdgpu"]; + + kernelModules = ["amdgpu"]; + # Disable AMD Backlight Management. + # ABM severely degrades display quality for miniscule power efficiency gains. + kernelParams = ["amdgpu.abmlevel=0"]; + }; + + hardware.amdgpu = { + initrd.enable = true; + + amdvlk = { + enable = true; + support32Bit.enable = true; + }; + + opencl.enable = true; + }; + }; +} diff --git a/hardwareModules/gpu/default.nix b/hardwareModules/gpu/default.nix new file mode 100644 index 00000000..88ef1b23 --- /dev/null +++ b/hardwareModules/gpu/default.nix @@ -0,0 +1,12 @@ +{ + config, + inputs, + lib, + pkgs, + ... +}: { + imports = [ + ./amd + ./intel + ]; +} diff --git a/hardwareModules/gpu/intel/default.nix b/hardwareModules/gpu/intel/default.nix new file mode 100644 index 00000000..4754613d --- /dev/null +++ b/hardwareModules/gpu/intel/default.nix @@ -0,0 +1,41 @@ +{ + config, + lib, + pkgs, + ... +}: { + config = lib.mkIf config.ar.hardware.gpu.intel { + boot.initrd.kernelModules = ["i915"]; + + environment.sessionVariables = { + LIBVA_DRIVER_NAME = "iHD"; + VDPAU_DRIVER = "va_gl"; + }; + + hardware = { + enableAllFirmware = true; + + opengl = { + enable = true; + driSupport = true; + driSupport32Bit = true; + + extraPackages = with pkgs; [ + intel-media-driver # LIBVA_DRIVER_NAME=iHD + intel-vaapi-driver # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium) + libvdpau-va-gl + ]; + + extraPackages32 = with pkgs.driversi686Linux; [ + intel-media-driver # LIBVA_DRIVER_NAME=iHD + intel-vaapi-driver # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium) + libvdpau-va-gl + ]; + }; + + sensor.iio.enable = true; # Enable auto-rotate and tablet mode. + }; + + services.xserver.videoDrivers = ["modesetting"]; + }; +} diff --git a/hardwareModules/options.nix b/hardwareModules/options.nix new file mode 100644 index 00000000..4196d67e --- /dev/null +++ b/hardwareModules/options.nix @@ -0,0 +1,21 @@ +{ + config, + inputs, + lib, + pkgs, + self, + ... +}: { + options.ar.hardware = { + cpu = { + amd = lib.mkEnableOption "AMD CPU support."; + intel = lib.mkEnableOption "Intel CPU support."; + }; + gpu = { + amd = lib.mkEnableOption "AMD GPU support."; + intel = lib.mkEnableOption "Intel GPU support."; + }; + laptop = lib.mkEnableOption "Laptop optimizations."; + ssd = lib.mkEnableOption "SSD optimizations."; + }; +} diff --git a/hardwareModules/ssd/default.nix b/hardwareModules/ssd/default.nix new file mode 100644 index 00000000..1242a7f3 --- /dev/null +++ b/hardwareModules/ssd/default.nix @@ -0,0 +1,10 @@ +{ + config, + lib, + pkgs, + ... +}: { + config = lib.mkIf config.ar.hardware.ssd { + services.fstrim.enable = true; + }; +} diff --git a/homeManagerModules/apps/alacritty/default.nix b/homeManagerModules/apps/alacritty/default.nix index c4ff2111..d6307e48 100644 --- a/homeManagerModules/apps/alacritty/default.nix +++ b/homeManagerModules/apps/alacritty/default.nix @@ -4,24 +4,24 @@ config, ... }: { - config = lib.mkIf config.alyraffauf.apps.alacritty.enable { + config = lib.mkIf config.ar.home.apps.alacritty.enable { programs.alacritty = { enable = true; settings = { colors = { primary = { - background = "${config.alyraffauf.theme.colors.background}"; - foreground = "${config.alyraffauf.theme.colors.text}"; + background = "${config.ar.home.theme.colors.background}"; + foreground = "${config.ar.home.theme.colors.text}"; }; transparent_background_colors = true; draw_bold_text_with_bright_colors = true; }; font = { normal = { - family = "${config.alyraffauf.theme.terminalFont.name}"; + family = "${config.ar.home.theme.terminalFont.name}"; style = "Regular"; }; - size = config.alyraffauf.theme.terminalFont.size; + size = config.ar.home.theme.terminalFont.size; }; selection.save_to_clipboard = true; window = { diff --git a/homeManagerModules/apps/bash/default.nix b/homeManagerModules/apps/bash/default.nix index 7ed4ad2c..f5a6066f 100644 --- a/homeManagerModules/apps/bash/default.nix +++ b/homeManagerModules/apps/bash/default.nix @@ -4,7 +4,7 @@ config, ... }: { - config = lib.mkIf config.alyraffauf.apps.bash.enable { + config = lib.mkIf config.ar.home.apps.bash.enable { home.shellAliases = { cat = lib.getExe pkgs.bat; grep = lib.getExe config.programs.ripgrep.package; diff --git a/homeManagerModules/apps/chromium/default.nix b/homeManagerModules/apps/chromium/default.nix index 53e96546..87bc5fb8 100644 --- a/homeManagerModules/apps/chromium/default.nix +++ b/homeManagerModules/apps/chromium/default.nix @@ -4,10 +4,10 @@ config, ... }: { - config = lib.mkIf config.alyraffauf.apps.chromium.enable { + config = lib.mkIf config.ar.home.apps.chromium.enable { programs.chromium = { enable = true; - package = config.alyraffauf.apps.chromium.package; + package = config.ar.home.apps.chromium.package; extensions = [ {id = "enamippconapkdmgfgjchkhakpfinmaj";} # dearrow {id = "jldhpllghnbhlbpcmnajkpdmadaolakh";} # todoist diff --git a/homeManagerModules/apps/emacs/default.nix b/homeManagerModules/apps/emacs/default.nix index d45969bd..fa964ed0 100644 --- a/homeManagerModules/apps/emacs/default.nix +++ b/homeManagerModules/apps/emacs/default.nix @@ -4,7 +4,7 @@ config, ... }: { - config = lib.mkIf config.alyraffauf.apps.emacs.enable { + config = lib.mkIf config.ar.home.apps.emacs.enable { programs.emacs = { enable = true; extraPackages = epkgs: (with epkgs; [ diff --git a/homeManagerModules/apps/fastfetch/default.nix b/homeManagerModules/apps/fastfetch/default.nix index 213d1319..705bb220 100644 --- a/homeManagerModules/apps/fastfetch/default.nix +++ b/homeManagerModules/apps/fastfetch/default.nix @@ -4,7 +4,7 @@ config, ... }: { - config = lib.mkIf config.alyraffauf.apps.fastfetch.enable { + config = lib.mkIf config.ar.home.apps.fastfetch.enable { home.packages = [pkgs.fastfetch]; xdg.configFile."fastfetch/config.jsonc".source = ./config.jsonc; }; diff --git a/homeManagerModules/apps/firefox/default.nix b/homeManagerModules/apps/firefox/default.nix index 86efe858..d5b5d782 100644 --- a/homeManagerModules/apps/firefox/default.nix +++ b/homeManagerModules/apps/firefox/default.nix @@ -4,12 +4,12 @@ config, ... }: { - config = lib.mkIf config.alyraffauf.apps.firefox.enable { + config = lib.mkIf config.ar.home.apps.firefox.enable { programs.firefox = { enable = true; nativeMessagingHosts = - lib.optionals (config.alyraffauf.apps.keepassxc.enable) [pkgs.keepassxc] - ++ lib.optionals (config.alyraffauf.desktop.gnome.enable) [pkgs.gnome-browser-connector]; + lib.optionals (config.ar.home.apps.keepassxc.enable) [pkgs.keepassxc] + ++ lib.optionals (config.ar.home.desktop.gnome.enable) [pkgs.gnome-browser-connector]; }; }; } diff --git a/homeManagerModules/apps/fuzzel/default.nix b/homeManagerModules/apps/fuzzel/default.nix index b7ed210b..90004df7 100644 --- a/homeManagerModules/apps/fuzzel/default.nix +++ b/homeManagerModules/apps/fuzzel/default.nix @@ -4,16 +4,16 @@ config, ... }: { - config = lib.mkIf config.alyraffauf.apps.fuzzel.enable { + config = lib.mkIf config.ar.home.apps.fuzzel.enable { programs.fuzzel = { enable = true; settings = { main = { - font = "${config.alyraffauf.theme.terminalFont.name}:size=${toString config.alyraffauf.theme.terminalFont.size}"; - icon-theme = "${config.alyraffauf.theme.iconTheme.name}"; + font = "${config.ar.home.theme.terminalFont.name}:size=${toString config.ar.home.theme.terminalFont.size}"; + icon-theme = "${config.ar.home.theme.iconTheme.name}"; layer = "overlay"; lines = 3; - terminal = config.alyraffauf.defaultApps.terminal.exe; + terminal = config.ar.home.defaultApps.terminal.exe; width = 36; }; border = { @@ -21,12 +21,12 @@ width = 2; }; colors = { - background = "${config.alyraffauf.theme.colors.background}CC"; - border = "${config.alyraffauf.theme.colors.primary}EE"; - selection = "${config.alyraffauf.theme.colors.background}FF"; + background = "${config.ar.home.theme.colors.background}CC"; + border = "${config.ar.home.theme.colors.primary}EE"; + selection = "${config.ar.home.theme.colors.background}FF"; selection-match = "#e78284FF"; selection-text = "#f4b8e4FF"; - text = "${config.alyraffauf.theme.colors.text}FF"; + text = "${config.ar.home.theme.colors.text}FF"; }; }; }; diff --git a/homeManagerModules/apps/keepassxc/default.nix b/homeManagerModules/apps/keepassxc/default.nix index 08600e51..cea5e532 100644 --- a/homeManagerModules/apps/keepassxc/default.nix +++ b/homeManagerModules/apps/keepassxc/default.nix @@ -4,10 +4,10 @@ config, ... }: { - config = lib.mkIf config.alyraffauf.apps.keepassxc.enable { + config = lib.mkIf config.ar.home.apps.keepassxc.enable { home.packages = [pkgs.keepassxc]; - alyraffauf.apps.keepassxc.settings = lib.mkDefault { + ar.home.apps.keepassxc.settings = lib.mkDefault { Browser = { AlwaysAllowAccess = true; Enabled = true; @@ -47,6 +47,6 @@ xdg.configFile."keepassxc/keepassxc.ini".text = lib.generators.toINI {} - config.alyraffauf.apps.keepassxc.settings; + config.ar.home.apps.keepassxc.settings; }; } diff --git a/homeManagerModules/apps/librewolf/default.nix b/homeManagerModules/apps/librewolf/default.nix index 0f7ba104..14928198 100644 --- a/homeManagerModules/apps/librewolf/default.nix +++ b/homeManagerModules/apps/librewolf/default.nix @@ -4,7 +4,7 @@ config, ... }: { - config = lib.mkIf config.alyraffauf.apps.librewolf.enable { + config = lib.mkIf config.ar.home.apps.librewolf.enable { programs.librewolf = { enable = true; settings = { diff --git a/homeManagerModules/apps/mako/default.nix b/homeManagerModules/apps/mako/default.nix index 867dd9dc..d60d65fe 100644 --- a/homeManagerModules/apps/mako/default.nix +++ b/homeManagerModules/apps/mako/default.nix @@ -4,20 +4,20 @@ config, ... }: { - config = lib.mkIf config.alyraffauf.apps.mako.enable { + config = lib.mkIf config.ar.home.apps.mako.enable { services.mako = { enable = true; anchor = "top-center"; - backgroundColor = "${config.alyraffauf.theme.colors.background}CC"; - borderColor = "${config.alyraffauf.theme.colors.primary}EE"; + backgroundColor = "${config.ar.home.theme.colors.background}CC"; + borderColor = "${config.ar.home.theme.colors.primary}EE"; borderSize = 2; borderRadius = 10; defaultTimeout = 10000; - font = "${config.alyraffauf.theme.font.name} Regular ${toString config.alyraffauf.theme.font.size}"; + font = "${config.ar.home.theme.font.name} Regular ${toString config.ar.home.theme.font.size}"; height = 300; layer = "top"; padding = "15"; - textColor = "${config.alyraffauf.theme.colors.text}"; + textColor = "${config.ar.home.theme.colors.text}"; width = 400; margin = "20,0"; extraConfig = '' diff --git a/homeManagerModules/apps/nemo/default.nix b/homeManagerModules/apps/nemo/default.nix index 91cec25e..b0cfe5fa 100644 --- a/homeManagerModules/apps/nemo/default.nix +++ b/homeManagerModules/apps/nemo/default.nix @@ -4,7 +4,7 @@ config, ... }: { - config = lib.mkIf config.alyraffauf.apps.nemo.enable { + config = lib.mkIf config.ar.home.apps.nemo.enable { home.packages = with pkgs; [ cinnamon.nemo ]; @@ -14,9 +14,9 @@ settings = { "org/nemo/preferences".show-image-thumbnails = "always"; "org/nemo/preferences/menu-config".background-menu-open-as-root = - !(config.alyraffauf.desktop.hyprland.enable || config.alyraffauf.desktop.sway.enable); + !(config.ar.home.desktop.hyprland.enable || config.ar.home.desktop.sway.enable); "org/nemo/preferences/menu-config".selection-menu-open-as-root = - !(config.alyraffauf.desktop.hyprland.enable || config.alyraffauf.desktop.sway.enable); + !(config.ar.home.desktop.hyprland.enable || config.ar.home.desktop.sway.enable); }; }; }; diff --git a/homeManagerModules/apps/neovim/default.nix b/homeManagerModules/apps/neovim/default.nix index 2cbcf5c9..63123da2 100644 --- a/homeManagerModules/apps/neovim/default.nix +++ b/homeManagerModules/apps/neovim/default.nix @@ -4,7 +4,7 @@ config, ... }: { - config = lib.mkIf config.alyraffauf.apps.neovim.enable { + config = lib.mkIf config.ar.home.apps.neovim.enable { programs.nixvim = { enable = true; viAlias = true; diff --git a/homeManagerModules/apps/swaylock/default.nix b/homeManagerModules/apps/swaylock/default.nix index 0249099a..0c523c64 100644 --- a/homeManagerModules/apps/swaylock/default.nix +++ b/homeManagerModules/apps/swaylock/default.nix @@ -4,7 +4,7 @@ config, ... }: { - config = lib.mkIf config.alyraffauf.apps.swaylock.enable { + config = lib.mkIf config.ar.home.apps.swaylock.enable { home.packages = with pkgs; [swaylock]; programs.swaylock.enable = true; @@ -15,8 +15,8 @@ caps-lock-key-hl-color=e78284 color=303446 daemonize - font="${config.alyraffauf.theme.terminalFont.name}-Regular" - image=${config.alyraffauf.theme.wallpaper} + font="${config.ar.home.theme.terminalFont.name}-Regular" + image=${config.ar.home.theme.wallpaper} indicator-caps-lock indicator-idle-visible indicator-radius=120 @@ -27,17 +27,17 @@ inside-ver-color=303446cc inside-wrong-color=303446cc key-hl-color=a6d189 - line-caps-lock-color=${config.alyraffauf.theme.colors.background}CC - line-clear-color=${config.alyraffauf.theme.colors.background}CC - line-color=${config.alyraffauf.theme.colors.background}CC - line-ver-color=${config.alyraffauf.theme.colors.background}CC - line-wrong-color=${config.alyraffauf.theme.colors.background}CC + line-caps-lock-color=${config.ar.home.theme.colors.background}CC + line-clear-color=${config.ar.home.theme.colors.background}CC + line-color=${config.ar.home.theme.colors.background}CC + line-ver-color=${config.ar.home.theme.colors.background}CC + line-wrong-color=${config.ar.home.theme.colors.background}CC ring-caps-lock-color=e78284cc ring-clear-color=85c1dccc - ring-color=${config.alyraffauf.theme.colors.primary}CC + ring-color=${config.ar.home.theme.colors.primary}CC ring-ver-color=a6d189cc ring-wrong-color=e78284cc - separator-color=${config.alyraffauf.theme.colors.background}CC + separator-color=${config.ar.home.theme.colors.background}CC text-caps-lock-color=c6d0f5 text-clear-color=c6d0f5 text-ver-color=c6d0f5 diff --git a/homeManagerModules/apps/thunar/default.nix b/homeManagerModules/apps/thunar/default.nix index 9ead6d1f..6c75229f 100644 --- a/homeManagerModules/apps/thunar/default.nix +++ b/homeManagerModules/apps/thunar/default.nix @@ -4,7 +4,7 @@ config, ... }: { - config = lib.mkIf config.alyraffauf.apps.thunar.enable { + config = lib.mkIf config.ar.home.apps.thunar.enable { home.packages = with pkgs; [ xfce.thunar xfce.thunar-archive-plugin diff --git a/homeManagerModules/apps/tmux/default.nix b/homeManagerModules/apps/tmux/default.nix index 657c1d8e..943e3246 100644 --- a/homeManagerModules/apps/tmux/default.nix +++ b/homeManagerModules/apps/tmux/default.nix @@ -4,7 +4,7 @@ config, ... }: { - config = lib.mkIf config.alyraffauf.apps.tmux.enable { + config = lib.mkIf config.ar.home.apps.tmux.enable { programs.tmux = { enable = true; mouse = true; diff --git a/homeManagerModules/apps/vsCodium/default.nix b/homeManagerModules/apps/vsCodium/default.nix index 825af92b..4ab00a31 100644 --- a/homeManagerModules/apps/vsCodium/default.nix +++ b/homeManagerModules/apps/vsCodium/default.nix @@ -4,7 +4,7 @@ config, ... }: { - config = lib.mkIf config.alyraffauf.apps.vsCodium.enable { + config = lib.mkIf config.ar.home.apps.vsCodium.enable { programs.vscode = { enable = true; package = pkgs.vscodium; @@ -12,7 +12,7 @@ enableExtensionUpdateCheck = false; userSettings = { "diffEditor.ignoreTrimWhitespace" = false; - "editor.fontFamily" = "'NotoSansM Nerd Font','${config.alyraffauf.theme.terminalFont.name}', 'monospace', monospace"; + "editor.fontFamily" = "'NotoSansM Nerd Font','${config.ar.home.theme.terminalFont.name}', 'monospace', monospace"; "editor.fontSize" = lib.mkDefault 14; "terminal.integrated.fontSize" = lib.mkDefault 14; "explorer.confirmDelete" = false; @@ -20,20 +20,20 @@ "git.autofetch" = true; "git.confirmSync" = false; "nix.formatterPath" = lib.getExe pkgs.alejandra; - "terminal.external.linuxExec" = config.alyraffauf.defaultApps.terminal.exe; + "terminal.external.linuxExec" = config.ar.home.defaultApps.terminal.exe; "update.mode" = "none"; "window.menuBarVisibility" = "hidden"; "window.titleBarStyle" = - if config.alyraffauf.desktop.gnome.enable + if config.ar.home.desktop.gnome.enable then "custom" else "native"; "window.zoomPerWindow" = false; "workbench.colorTheme" = - if config.alyraffauf.theme.colors.preferDark + if config.ar.home.theme.colors.preferDark then "Catppuccin Frappé" else "Catppuccin Latte"; "workbench.iconTheme" = - if config.alyraffauf.theme.colors.preferDark + if config.ar.home.theme.colors.preferDark then "catppuccin-frappe" else "catppuccin-latte"; "workbench.preferredDarkColorTheme" = "Catppuccin Frappé"; diff --git a/homeManagerModules/apps/waybar/default.nix b/homeManagerModules/apps/waybar/default.nix index d143b488..fc41b99f 100644 --- a/homeManagerModules/apps/waybar/default.nix +++ b/homeManagerModules/apps/waybar/default.nix @@ -4,7 +4,7 @@ config, ... }: { - config = lib.mkIf config.alyraffauf.apps.waybar.enable { + config = lib.mkIf config.ar.home.apps.waybar.enable { programs.waybar = { enable = true; settings = { @@ -14,11 +14,11 @@ output = ["*"]; position = "top"; modules-left = - lib.optionals (config.alyraffauf.desktop.hyprland.enable) + lib.optionals (config.ar.home.desktop.hyprland.enable) ["hyprland/workspaces" "hyprland/submap"] - ++ lib.optionals (config.alyraffauf.desktop.sway.enable) + ++ lib.optionals (config.ar.home.desktop.sway.enable) ["sway/workspaces" "sway/scratchpad" "sway/mode"] - ++ lib.optionals (config.alyraffauf.desktop.hyprland.tabletMode.menuButton) + ++ lib.optionals (config.ar.home.desktop.hyprland.tabletMode.menuButton) ["custom/menu" "custom/hyprland-close"]; modules-center = ["clock"]; modules-right = [ @@ -138,7 +138,7 @@ "tooltip-format-wifi" = "{essid} ({signalStrength}%) {icon}"; "tooltip-format-ethernet" = "{ifname} "; "tooltip-format-disconnected" = "Disconnected"; - "on-click" = "${config.alyraffauf.defaultApps.terminalEditor.exe} --class nmtui -e ${pkgs.networkmanager}/bin/nmtui"; + "on-click" = "${config.ar.home.defaultApps.terminalEditor.exe} --class nmtui -e ${pkgs.networkmanager}/bin/nmtui"; }; "tray" = {"spacing" = 15;}; "custom/logout" = { @@ -174,25 +174,25 @@ * { border: none; border-radius: 0; - font-family: "${config.alyraffauf.theme.terminalFont.name}"; + font-family: "${config.ar.home.theme.terminalFont.name}"; font-size: 14px; font-weight: 600; } window#waybar { background: rgba (35, 38, 52, 0.0); - color: ${config.alyraffauf.theme.colors.text}; + color: ${config.ar.home.theme.colors.text}; } #workspaces button { padding: 0px 5px; margin: 0 0px; - color: ${config.alyraffauf.theme.colors.text}; + color: ${config.ar.home.theme.colors.text}; } #workspaces button.active, #workspaces button.focused { - color: ${config.alyraffauf.theme.colors.primary}; + color: ${config.ar.home.theme.colors.primary}; } #submap, @@ -205,11 +205,11 @@ #tags button { padding: 0px 5px; margin: 0 0px; - color: ${config.alyraffauf.theme.colors.text}; + color: ${config.ar.home.theme.colors.text}; } #tags button.focused { - color: ${config.alyraffauf.theme.colors.primary}; + color: ${config.ar.home.theme.colors.primary}; } #clock, @@ -229,11 +229,11 @@ } #battery { - color: ${config.alyraffauf.theme.colors.text}; + color: ${config.ar.home.theme.colors.text}; } #battery.charging { - color: ${config.alyraffauf.theme.colors.primary}; + color: ${config.ar.home.theme.colors.primary}; } #battery.critical:not(.charging) { @@ -252,7 +252,7 @@ #hardware { border-radius: 10; background: rgba ${ - if config.alyraffauf.theme.colors.preferDark + if config.ar.home.theme.colors.preferDark then "(35, 38, 52, 0.8);" else "(220, 224, 232, 0.8);" } @@ -266,7 +266,7 @@ #submap, #mode { - color: ${config.alyraffauf.theme.colors.text}; + color: ${config.ar.home.theme.colors.text}; background: rgba(231, 130, 132, 0.8); } ''; diff --git a/homeManagerModules/apps/wlogout/default.nix b/homeManagerModules/apps/wlogout/default.nix index 579de954..4ead639a 100644 --- a/homeManagerModules/apps/wlogout/default.nix +++ b/homeManagerModules/apps/wlogout/default.nix @@ -4,7 +4,7 @@ config, ... }: { - config = lib.mkIf config.alyraffauf.apps.wlogout.enable { + config = lib.mkIf config.ar.home.apps.wlogout.enable { programs.wlogout = { enable = true; layout = [ @@ -29,7 +29,7 @@ ]; style = '' * { - font-family: "${config.alyraffauf.theme.font.name}", sans-serif; + font-family: "${config.ar.home.theme.font.name}", sans-serif; background-image: none; box-shadow: none; transition: 20ms; @@ -42,7 +42,7 @@ button { text-decoration-color: #FAFAFA; color: #FAFAFA; - background-color: ${config.alyraffauf.theme.colors.background}; + background-color: ${config.ar.home.theme.colors.background}; background-color: rgba(12, 12, 12, 0.0); background-repeat: no-repeat; background-size: 10%; @@ -50,7 +50,7 @@ } button:active, button:hover { - background-color: ${config.alyraffauf.theme.colors.primary}; + background-color: ${config.ar.home.theme.colors.primary}; outline-style: none; } diff --git a/homeManagerModules/defaultApps.nix b/homeManagerModules/defaultApps.nix index b5ec436d..9a46de5b 100644 --- a/homeManagerModules/defaultApps.nix +++ b/homeManagerModules/defaultApps.nix @@ -4,8 +4,8 @@ config, ... }: { - config = lib.mkIf config.alyraffauf.defaultApps.enable { - home.packages = with config.alyraffauf.defaultApps; [ + config = lib.mkIf config.ar.home.defaultApps.enable { + home.packages = with config.ar.home.defaultApps; [ audioPlayer.package editor.package fileManager.package @@ -20,42 +20,42 @@ dconf = { enable = true; settings = { - "org/cinnamon/desktop/applications/terminal".exec = "${config.alyraffauf.defaultApps.terminal.exe}"; - "org/cinnamon/desktop/default-applications/terminal".exec = "${config.alyraffauf.defaultApps.terminal.exe}"; + "org/cinnamon/desktop/applications/terminal".exec = "${config.ar.home.defaultApps.terminal.exe}"; + "org/cinnamon/desktop/default-applications/terminal".exec = "${config.ar.home.defaultApps.terminal.exe}"; }; }; xdg.mimeApps = { enable = true; defaultApplications = { - "application/json" = config.alyraffauf.defaultApps.editor.desktop; - "application/pdf" = config.alyraffauf.defaultApps.pdfViewer.desktop; - "application/x-extension-htm" = config.alyraffauf.defaultApps.webBrowser.desktop; - "application/x-extension-html" = config.alyraffauf.defaultApps.webBrowser.desktop; - "application/x-extension-shtml" = config.alyraffauf.defaultApps.webBrowser.desktop; - "application/x-extension-xht" = config.alyraffauf.defaultApps.webBrowser.desktop; - "application/x-extension-xhtml" = config.alyraffauf.defaultApps.webBrowser.desktop; - "application/x-shellscript" = config.alyraffauf.defaultApps.editor.desktop; - "application/xhtml+xml" = config.alyraffauf.defaultApps.webBrowser.desktop; - "audio/*" = config.alyraffauf.defaultApps.audioPlayer.desktop; - "image/*" = config.alyraffauf.defaultApps.imageViewer.desktop; - "inode/directory" = config.alyraffauf.defaultApps.fileManager.desktop; - "text/html" = config.alyraffauf.defaultApps.webBrowser.desktop; - "text/markdown" = config.alyraffauf.defaultApps.editor.desktop; - "text/plain" = config.alyraffauf.defaultApps.editor.desktop; - "text/x-python" = config.alyraffauf.defaultApps.editor.desktop; - "text/xml" = config.alyraffauf.defaultApps.webBrowser.desktop; - "video/*" = config.alyraffauf.defaultApps.videoPlayer.desktop; - "x-scheme-handler/chrome" = config.alyraffauf.defaultApps.webBrowser.desktop; - "x-scheme-handler/ftp" = config.alyraffauf.defaultApps.webBrowser.desktop; - "x-scheme-handler/http" = config.alyraffauf.defaultApps.webBrowser.desktop; - "x-scheme-handler/https" = config.alyraffauf.defaultApps.webBrowser.desktop; + "application/json" = config.ar.home.defaultApps.editor.desktop; + "application/pdf" = config.ar.home.defaultApps.pdfViewer.desktop; + "application/x-extension-htm" = config.ar.home.defaultApps.webBrowser.desktop; + "application/x-extension-html" = config.ar.home.defaultApps.webBrowser.desktop; + "application/x-extension-shtml" = config.ar.home.defaultApps.webBrowser.desktop; + "application/x-extension-xht" = config.ar.home.defaultApps.webBrowser.desktop; + "application/x-extension-xhtml" = config.ar.home.defaultApps.webBrowser.desktop; + "application/x-shellscript" = config.ar.home.defaultApps.editor.desktop; + "application/xhtml+xml" = config.ar.home.defaultApps.webBrowser.desktop; + "audio/*" = config.ar.home.defaultApps.audioPlayer.desktop; + "image/*" = config.ar.home.defaultApps.imageViewer.desktop; + "inode/directory" = config.ar.home.defaultApps.fileManager.desktop; + "text/html" = config.ar.home.defaultApps.webBrowser.desktop; + "text/markdown" = config.ar.home.defaultApps.editor.desktop; + "text/plain" = config.ar.home.defaultApps.editor.desktop; + "text/x-python" = config.ar.home.defaultApps.editor.desktop; + "text/xml" = config.ar.home.defaultApps.webBrowser.desktop; + "video/*" = config.ar.home.defaultApps.videoPlayer.desktop; + "x-scheme-handler/chrome" = config.ar.home.defaultApps.webBrowser.desktop; + "x-scheme-handler/ftp" = config.ar.home.defaultApps.webBrowser.desktop; + "x-scheme-handler/http" = config.ar.home.defaultApps.webBrowser.desktop; + "x-scheme-handler/https" = config.ar.home.defaultApps.webBrowser.desktop; }; }; home.sessionVariables = { - BROWSER = "${config.alyraffauf.defaultApps.webBrowser.exe}"; - EDITOR = "${config.alyraffauf.defaultApps.terminalEditor.exe}"; - TERMINAL = "${config.alyraffauf.defaultApps.terminal.exe}"; + BROWSER = "${config.ar.home.defaultApps.webBrowser.exe}"; + EDITOR = "${config.ar.home.defaultApps.terminalEditor.exe}"; + TERMINAL = "${config.ar.home.defaultApps.terminal.exe}"; }; }; } diff --git a/homeManagerModules/desktop/cinnamon/default.nix b/homeManagerModules/desktop/cinnamon/default.nix index 071422e5..e10b172f 100644 --- a/homeManagerModules/desktop/cinnamon/default.nix +++ b/homeManagerModules/desktop/cinnamon/default.nix @@ -4,7 +4,7 @@ config, ... }: { - config = lib.mkIf config.alyraffauf.desktop.cinnamon.enable { + config = lib.mkIf config.ar.home.desktop.cinnamon.enable { dconf = { enable = true; settings = { @@ -56,7 +56,7 @@ "org/cinnamon/desktop/keybindings/custom-keybindings/custom0" = { binding = ["e"]; name = "Open Editor"; - command = "${config.alyraffauf.defaultApps.editor.exe}"; + command = "${config.ar.home.defaultApps.editor.exe}"; }; }; }; diff --git a/homeManagerModules/desktop/default.nix b/homeManagerModules/desktop/default.nix index 4f462138..d23e6ff4 100644 --- a/homeManagerModules/desktop/default.nix +++ b/homeManagerModules/desktop/default.nix @@ -14,7 +14,7 @@ ./waylandComp.nix ]; - config = lib.mkIf config.alyraffauf.desktop.enable { + config = lib.mkIf config.ar.home.desktop.enable { dconf = { enable = true; settings = { @@ -37,8 +37,8 @@ "file://${config.home.homeDirectory}/src" ] ++ lib.optional ( - osConfig.alyraffauf.services.syncthing.enable - && (osConfig.alyraffauf.services.syncthing.user == config.home.username) + osConfig.ar.services.syncthing.enable + && (osConfig.ar.services.syncthing.user == config.home.username) ) "file://${config.home.homeDirectory}/sync"; xdg = { diff --git a/homeManagerModules/desktop/gnome/default.nix b/homeManagerModules/desktop/gnome/default.nix index 642cb8a4..b36c3ce3 100644 --- a/homeManagerModules/desktop/gnome/default.nix +++ b/homeManagerModules/desktop/gnome/default.nix @@ -4,7 +4,7 @@ config, ... }: { - config = lib.mkIf config.alyraffauf.desktop.gnome.enable { + config = lib.mkIf config.ar.home.desktop.gnome.enable { dconf.enable = true; dconf.settings = { "org/gnome/desktop/datetime".automatic-timezone = true; diff --git a/homeManagerModules/desktop/hyprland/default.nix b/homeManagerModules/desktop/hyprland/default.nix index 5b77a767..8e5d7e20 100644 --- a/homeManagerModules/desktop/hyprland/default.nix +++ b/homeManagerModules/desktop/hyprland/default.nix @@ -4,7 +4,7 @@ config, ... }: { - config = lib.mkIf config.alyraffauf.desktop.hyprland.enable { + config = lib.mkIf config.ar.home.desktop.hyprland.enable { wayland.windowManager.hyprland.enable = true; wayland.windowManager.hyprland.extraConfig = let @@ -16,19 +16,19 @@ # Default apps defaultApps = { - browser = config.alyraffauf.defaultApps.webBrowser.exe; - editor = config.alyraffauf.defaultApps.editor.exe; - fileManager = config.alyraffauf.defaultApps.fileManager.exe; + browser = config.ar.home.defaultApps.webBrowser.exe; + editor = config.ar.home.defaultApps.editor.exe; + fileManager = config.ar.home.defaultApps.fileManager.exe; launcher = lib.getExe pkgs.fuzzel; lock = lib.getExe pkgs.swaylock; logout = lib.getExe pkgs.wlogout; passwordManager = lib.getExe' pkgs.keepassxc "keepassxc"; - terminal = config.alyraffauf.defaultApps.terminal.exe; + terminal = config.ar.home.defaultApps.terminal.exe; virtKeyboard = lib.getExe' pkgs.squeekboard "squeekboard"; }; wallpaperd = - if config.alyraffauf.desktop.hyprland.randomWallpaper + if config.ar.home.desktop.hyprland.randomWallpaper then pkgs.writers.writeRuby "hyprland-randomWallpaper" {} '' require 'fileutils' @@ -66,7 +66,7 @@ end end '' - else "${lib.getExe pkgs.swaybg} -i ${config.alyraffauf.theme.wallpaper}"; + else "${lib.getExe pkgs.swaybg} -i ${config.ar.home.theme.wallpaper}"; startupApps = [ @@ -80,7 +80,7 @@ (lib.getExe pkgs.mako) "${pkgs.mate.mate-polkit}/libexec/polkit-mate-authentication-agent-1" ] - ++ lib.lists.optionals (config.alyraffauf.desktop.hyprland.redShift) [ + ++ lib.lists.optionals (config.ar.home.desktop.hyprland.redShift) [ # "${pkgs.geoclue2}/libexec/geoclue-2.0/demos/agent" "${lib.getExe pkgs.gammastep} -l 33.74:-84.38" ]; @@ -185,7 +185,7 @@ timeout 330 '${hyprctl} dispatch dpms off' \ resume '${hyprctl} dispatch dpms on' \ ${ - if config.alyraffauf.desktop.hyprland.autoSuspend + if config.ar.home.desktop.hyprland.autoSuspend then ''timeout 900 'sleep 2 && ${lib.getExe' pkgs.systemd "systemctl"} suspend' \'' else ''\'' } @@ -216,7 +216,7 @@ env = GDK_SCALE,${gdk_scale} # Some default env vars. - env = XCURSOR_SIZE,${toString config.alyraffauf.theme.cursorTheme.size} + env = XCURSOR_SIZE,${toString config.ar.home.theme.cursorTheme.size} env = QT_QPA_PLATFORMTHEME,qt6ct # Execute necessary apps @@ -257,8 +257,8 @@ gaps_in = 5 gaps_out = 6 border_size = 2 - col.active_border = rgba(${lib.strings.removePrefix "#" config.alyraffauf.theme.colors.secondary}EE) rgba(${lib.strings.removePrefix "#" config.alyraffauf.theme.colors.primary}EE) 45deg - col.inactive_border = rgba(${lib.strings.removePrefix "#" config.alyraffauf.theme.colors.inactive}AA) + col.active_border = rgba(${lib.strings.removePrefix "#" config.ar.home.theme.colors.secondary}EE) rgba(${lib.strings.removePrefix "#" config.ar.home.theme.colors.primary}EE) 45deg + col.inactive_border = rgba(${lib.strings.removePrefix "#" config.ar.home.theme.colors.inactive}AA) layout = dwindle @@ -275,7 +275,7 @@ drop_shadow = yes shadow_range = 4 shadow_render_power = 3 - col.shadow = rgba(${lib.strings.removePrefix "#" config.alyraffauf.theme.colors.shadow}EE) + col.shadow = rgba(${lib.strings.removePrefix "#" config.ar.home.theme.colors.shadow}EE) dim_special = 0.5 diff --git a/homeManagerModules/desktop/startupApps.nix b/homeManagerModules/desktop/startupApps.nix index c69d263c..c1fe6b4c 100644 --- a/homeManagerModules/desktop/startupApps.nix +++ b/homeManagerModules/desktop/startupApps.nix @@ -10,7 +10,7 @@ lib.strings.concatMapStringsSep "\n" (app: "exec-once = sleep 1 && ${app}") - config.alyraffauf.desktop.startupApps + config.ar.home.desktop.startupApps } ''; diff --git a/homeManagerModules/desktop/sway/default.nix b/homeManagerModules/desktop/sway/default.nix index d920fa77..2e2043ca 100644 --- a/homeManagerModules/desktop/sway/default.nix +++ b/homeManagerModules/desktop/sway/default.nix @@ -6,14 +6,14 @@ }: { imports = [./randomWallpaper.nix ./redShift.nix]; - config = lib.mkIf config.alyraffauf.desktop.sway.enable { + config = lib.mkIf config.ar.home.desktop.sway.enable { wayland.windowManager.sway = { enable = true; wrapperFeatures.gtk = true; checkConfig = false; }; - alyraffauf.theme.gtk.hideTitleBar = + ar.home.theme.gtk.hideTitleBar = if config.wayland.windowManager.sway.package == pkgs.sway then true else false; @@ -23,10 +23,10 @@ swaymsg = lib.getExe' config.wayland.windowManager.sway.package "swaymsg"; # Default apps - browser = config.alyraffauf.defaultApps.webBrowser.exe; - fileManager = config.alyraffauf.defaultApps.fileManager.exe; - editor = config.alyraffauf.defaultApps.editor.exe; - terminal = config.alyraffauf.defaultApps.terminal.exe; + browser = config.ar.home.defaultApps.webBrowser.exe; + fileManager = config.ar.home.defaultApps.fileManager.exe; + editor = config.ar.home.defaultApps.editor.exe; + terminal = config.ar.home.defaultApps.terminal.exe; brightness = lib.getExe' pkgs.swayosd "swayosd-client"; brightness_up = "${brightness} --brightness=raise"; @@ -45,7 +45,7 @@ bar = lib.getExe pkgs.waybar; launcher = lib.getExe pkgs.fuzzel; notifyd = lib.getExe pkgs.mako; - wallpaperd = "${lib.getExe pkgs.swaybg} -i ${config.alyraffauf.theme.wallpaper}"; + wallpaperd = "${lib.getExe pkgs.swaybg} -i ${config.ar.home.theme.wallpaper}"; logout = lib.getExe pkgs.wlogout; lock = lib.getExe pkgs.swaylock; idled = pkgs.writeShellScript "sway-idled" '' @@ -58,7 +58,7 @@ timeout 330 '${swaymsg} "output * dpms off"' \ resume '${swaymsg} "output * dpms on"' \ ${ - if config.alyraffauf.desktop.sway.autoSuspend + if config.ar.home.desktop.sway.autoSuspend then ''timeout 900 '${lib.getExe' pkgs.systemd "systemctl"} suspend' \'' else ''\'' } @@ -86,27 +86,27 @@ in { bars = [{command = "${bar}";}]; modifier = "${modifier}"; - colors.background = "${config.alyraffauf.theme.colors.primary}EE"; + colors.background = "${config.ar.home.theme.colors.primary}EE"; colors.focused = { - background = "${config.alyraffauf.theme.colors.primary}EE"; - border = "${config.alyraffauf.theme.colors.primary}EE"; - childBorder = "${config.alyraffauf.theme.colors.primary}EE"; - indicator = "${config.alyraffauf.theme.colors.primary}EE"; - text = "${config.alyraffauf.theme.colors.text}"; + background = "${config.ar.home.theme.colors.primary}EE"; + border = "${config.ar.home.theme.colors.primary}EE"; + childBorder = "${config.ar.home.theme.colors.primary}EE"; + indicator = "${config.ar.home.theme.colors.primary}EE"; + text = "${config.ar.home.theme.colors.text}"; }; colors.focusedInactive = { - background = "${config.alyraffauf.theme.colors.inactive}AA"; - border = "${config.alyraffauf.theme.colors.inactive}AA"; - childBorder = "${config.alyraffauf.theme.colors.inactive}AA"; - indicator = "${config.alyraffauf.theme.colors.inactive}AA"; - text = "${config.alyraffauf.theme.colors.text}"; + background = "${config.ar.home.theme.colors.inactive}AA"; + border = "${config.ar.home.theme.colors.inactive}AA"; + childBorder = "${config.ar.home.theme.colors.inactive}AA"; + indicator = "${config.ar.home.theme.colors.inactive}AA"; + text = "${config.ar.home.theme.colors.text}"; }; colors.unfocused = { - background = "${config.alyraffauf.theme.colors.inactive}AA"; - border = "${config.alyraffauf.theme.colors.inactive}AA"; - childBorder = "${config.alyraffauf.theme.colors.inactive}AA"; - indicator = "${config.alyraffauf.theme.colors.inactive}AA"; - text = "${config.alyraffauf.theme.colors.text}"; + background = "${config.ar.home.theme.colors.inactive}AA"; + border = "${config.ar.home.theme.colors.inactive}AA"; + childBorder = "${config.ar.home.theme.colors.inactive}AA"; + indicator = "${config.ar.home.theme.colors.inactive}AA"; + text = "${config.ar.home.theme.colors.text}"; }; defaultWorkspace = "workspace number 1"; focus = { @@ -115,9 +115,9 @@ # mouseWarping = "container"; }; fonts = { - names = ["${config.alyraffauf.theme.font.name}"]; + names = ["${config.ar.home.theme.font.name}"]; style = "Bold"; - size = config.alyraffauf.theme.font.size + 0.0; + size = config.ar.home.theme.font.size + 0.0; }; gaps.inner = 5; gaps.outer = 5; @@ -279,7 +279,7 @@ startup = [ { command = - if config.alyraffauf.desktop.sway.randomWallpaper + if config.ar.home.desktop.sway.randomWallpaper then "true" else "${wallpaperd}"; } @@ -423,7 +423,7 @@ corner_radius 10 shadows enable shadows_on_csd enable - shadow_color ${config.alyraffauf.theme.colors.shadow} + shadow_color ${config.ar.home.theme.colors.shadow} default_dim_inactive 0.05 diff --git a/homeManagerModules/desktop/sway/randomWallpaper.nix b/homeManagerModules/desktop/sway/randomWallpaper.nix index 885997db..68c92e71 100644 --- a/homeManagerModules/desktop/sway/randomWallpaper.nix +++ b/homeManagerModules/desktop/sway/randomWallpaper.nix @@ -36,7 +36,7 @@ fi ''; in { - config = lib.mkIf config.alyraffauf.desktop.sway.randomWallpaper { + config = lib.mkIf config.ar.home.desktop.sway.randomWallpaper { # Packages that should be installed to the user profile. home.packages = with pkgs; [swaybg sway-randomWallpaper]; diff --git a/homeManagerModules/desktop/sway/redShift.nix b/homeManagerModules/desktop/sway/redShift.nix index 59503b14..9a8f0155 100644 --- a/homeManagerModules/desktop/sway/redShift.nix +++ b/homeManagerModules/desktop/sway/redShift.nix @@ -4,7 +4,7 @@ config, ... }: { - config = lib.mkIf config.alyraffauf.desktop.sway.redShift { + config = lib.mkIf config.ar.home.desktop.sway.redShift { home.packages = with pkgs; [gammastep]; wayland.windowManager.sway.config.startup = [ # {command = "${pkgs.geoclue2}/libexec/geoclue-2.0/demos/agent";} diff --git a/homeManagerModules/desktop/waylandComp.nix b/homeManagerModules/desktop/waylandComp.nix index 55c0dab2..f9aa77a8 100644 --- a/homeManagerModules/desktop/waylandComp.nix +++ b/homeManagerModules/desktop/waylandComp.nix @@ -4,15 +4,13 @@ config, ... }: { - config = lib.mkIf (config.alyraffauf.desktop.hyprland.enable || config.alyraffauf.desktop.sway.enable) { - alyraffauf = { - apps = { - fuzzel.enable = lib.mkDefault true; - mako.enable = lib.mkDefault true; - swaylock.enable = lib.mkDefault true; - waybar.enable = lib.mkDefault true; - wlogout.enable = lib.mkDefault true; - }; + config = lib.mkIf (config.ar.home.desktop.hyprland.enable || config.ar.home.desktop.sway.enable) { + ar.home.apps = { + fuzzel.enable = lib.mkDefault true; + mako.enable = lib.mkDefault true; + swaylock.enable = lib.mkDefault true; + waybar.enable = lib.mkDefault true; + wlogout.enable = lib.mkDefault true; }; dconf = { @@ -34,9 +32,9 @@ xdg.portal = { enable = true; configPackages = - lib.optionals (config.alyraffauf.desktop.hyprland.enable) [pkgs.xdg-desktop-portal-hyprland]; + lib.optionals (config.ar.home.desktop.hyprland.enable) [pkgs.xdg-desktop-portal-hyprland]; extraPortals = - lib.optionals (config.alyraffauf.desktop.hyprland.enable) [pkgs.xdg-desktop-portal-hyprland]; + lib.optionals (config.ar.home.desktop.hyprland.enable) [pkgs.xdg-desktop-portal-hyprland]; }; }; } diff --git a/homeManagerModules/options.nix b/homeManagerModules/options.nix index e880e79d..64fca52d 100644 --- a/homeManagerModules/options.nix +++ b/homeManagerModules/options.nix @@ -5,458 +5,456 @@ pkgs, ... }: { - options = { - alyraffauf = { - apps = { - alacritty.enable = lib.mkEnableOption "Alacritty terminal."; - bash.enable = lib.mkEnableOption "Bash defaults."; - chromium = { - enable = lib.mkEnableOption "Chromium-based browser with default extensions."; - package = lib.mkOption { - description = "Package for Chromium."; - default = pkgs.brave; - type = lib.types.package; - }; + options.ar.home = { + apps = { + alacritty.enable = lib.mkEnableOption "Alacritty terminal."; + bash.enable = lib.mkEnableOption "Bash defaults."; + chromium = { + enable = lib.mkEnableOption "Chromium-based browser with default extensions."; + package = lib.mkOption { + description = "Package for Chromium."; + default = pkgs.brave; + type = lib.types.package; }; - emacs.enable = lib.mkEnableOption "Emacs text editor."; - fastfetch.enable = lib.mkEnableOption "Fastfetch."; - firefox.enable = lib.mkEnableOption "Firefox web browser."; - fuzzel.enable = lib.mkEnableOption "Fuzzel app launcher."; - keepassxc = { - enable = lib.mkEnableOption "KeePassXC password manager."; - settings = lib.mkOption { - description = "KeePassXC settings."; - default = {}; - type = lib.types.attrs; - }; - }; - librewolf.enable = lib.mkEnableOption "Librewolf web browser."; - mako.enable = lib.mkEnableOption "Mako notification daemon."; - nemo.enable = lib.mkOption { - description = "Cinnamon Nemo file manager."; - default = config.alyraffauf.defaultApps.fileManager.package == pkgs.cinnamon.nemo; - type = lib.types.bool; - }; - neovim.enable = lib.mkEnableOption "Neovim text editor."; - swaylock.enable = lib.mkEnableOption "Swaylock screen locker."; - thunar.enable = lib.mkOption { - description = "Thunar file manager."; - default = config.alyraffauf.defaultApps.fileManager.package == pkgs.xfce.thunar; - type = lib.types.bool; - }; - tmux.enable = lib.mkEnableOption "Tmux shell session manager."; - vsCodium.enable = lib.mkEnableOption "VSCodium text editor."; - waybar.enable = lib.mkEnableOption "Waybar wayland panel."; - wlogout.enable = lib.mkEnableOption "Wlogout session prompt."; }; - defaultApps = { + emacs.enable = lib.mkEnableOption "Emacs text editor."; + fastfetch.enable = lib.mkEnableOption "Fastfetch."; + firefox.enable = lib.mkEnableOption "Firefox web browser."; + fuzzel.enable = lib.mkEnableOption "Fuzzel app launcher."; + keepassxc = { + enable = lib.mkEnableOption "KeePassXC password manager."; + settings = lib.mkOption { + description = "KeePassXC settings."; + default = {}; + type = lib.types.attrs; + }; + }; + librewolf.enable = lib.mkEnableOption "Librewolf web browser."; + mako.enable = lib.mkEnableOption "Mako notification daemon."; + nemo.enable = lib.mkOption { + description = "Cinnamon Nemo file manager."; + default = config.ar.home.defaultApps.fileManager.package == pkgs.cinnamon.nemo; + type = lib.types.bool; + }; + neovim.enable = lib.mkEnableOption "Neovim text editor."; + swaylock.enable = lib.mkEnableOption "Swaylock screen locker."; + thunar.enable = lib.mkOption { + description = "Thunar file manager."; + default = config.ar.home.defaultApps.fileManager.package == pkgs.xfce.thunar; + type = lib.types.bool; + }; + tmux.enable = lib.mkEnableOption "Tmux shell session manager."; + vsCodium.enable = lib.mkEnableOption "VSCodium text editor."; + waybar.enable = lib.mkEnableOption "Waybar wayland panel."; + wlogout.enable = lib.mkEnableOption "Wlogout session prompt."; + }; + defaultApps = { + enable = lib.mkOption { + description = "Declaratively set default apps and file associations."; + default = config.ar.home.desktop.enable; + type = lib.types.bool; + }; + audioPlayer = { + exe = lib.mkOption { + description = "Default audio player executable."; + default = lib.getExe config.ar.home.defaultApps.audioPlayer.package; + type = lib.types.str; + }; + desktop = lib.mkOption { + description = "Default audio player desktop file."; + default = config.ar.home.defaultApps.videoPlayer.desktop; + type = lib.types.str; + }; + package = lib.mkOption { + description = "Default audio player package."; + default = config.ar.home.defaultApps.videoPlayer.package; + type = lib.types.package; + }; + }; + editor = { + exe = lib.mkOption { + description = "Default editor executable."; + default = lib.getExe config.ar.home.defaultApps.editor.package; + type = lib.types.str; + }; + desktop = lib.mkOption { + description = "Default editor desktop file."; + default = "codium.desktop"; + type = lib.types.str; + }; + package = lib.mkOption { + description = "Default editor package."; + default = config.programs.vscode.package; + type = lib.types.package; + }; + }; + fileManager = { + exe = lib.mkOption { + description = "Default file manager executable."; + default = lib.getExe config.ar.home.defaultApps.fileManager.package; + type = lib.types.str; + }; + desktop = lib.mkOption { + description = "Default file manager desktop file."; + default = "nemo.desktop"; + type = lib.types.str; + }; + package = lib.mkOption { + description = "Default file manager package."; + default = pkgs.cinnamon.nemo; + type = lib.types.package; + }; + }; + imageViewer = { + exe = lib.mkOption { + description = "Default image viewer executable."; + default = lib.getExe config.ar.home.defaultApps.imageViewer.package; + type = lib.types.str; + }; + desktop = lib.mkOption { + description = "Default image viewer desktop file name."; + default = "org.gnome.eog.desktop"; + type = lib.types.str; + }; + package = lib.mkOption { + description = "Default image viewer package."; + default = pkgs.gnome.eog; + type = lib.types.package; + }; + }; + pdfViewer = { + exe = lib.mkOption { + description = "Default PDF viewer executable."; + default = lib.getExe config.ar.home.defaultApps.pdfEditor.package; + type = lib.types.str; + }; + desktop = lib.mkOption { + description = "Default PDF viewer desktop file."; + default = "org.gnome.Evince.desktop"; + type = lib.types.str; + }; + package = lib.mkOption { + description = "Default PDF viewer package."; + default = pkgs.evince; + type = lib.types.package; + }; + }; + terminal = { + exe = lib.mkOption { + description = "Default terminal executable."; + default = lib.getExe config.ar.home.defaultApps.terminal.package; + type = lib.types.str; + }; + desktop = lib.mkOption { + description = "Default terminal desktop file."; + default = "alacritty.desktop"; + type = lib.types.str; + }; + package = lib.mkOption { + description = "Default terminal package."; + default = config.programs.alacritty.package; + type = lib.types.package; + }; + }; + terminalEditor = { + exe = lib.mkOption { + description = "Default terminal editor executable."; + default = lib.getExe config.ar.home.defaultApps.terminalEditor.package; + type = lib.types.str; + }; + desktop = lib.mkOption { + description = "Default terminal editor desktop file."; + default = "nvim.desktop"; + type = lib.types.str; + }; + package = lib.mkOption { + description = "Default terminal editor package."; + default = config.programs.nixvim.package; + type = lib.types.package; + }; + }; + videoPlayer = { + exe = lib.mkOption { + description = "Default video player executable."; + default = lib.getExe config.ar.home.defaultApps.videoPlayer.package; + type = lib.types.str; + }; + desktop = lib.mkOption { + description = "Default video player desktop file."; + default = "io.github.celluloid_player.Celluloid.desktop"; + type = lib.types.str; + }; + package = lib.mkOption { + description = "Default video player package."; + default = pkgs.celluloid; + type = lib.types.package; + }; + }; + webBrowser = { + exe = lib.mkOption { + description = "Default web browser executable."; + default = lib.getExe config.ar.home.defaultApps.webBrowser.package; + type = lib.types.str; + }; + desktop = lib.mkOption { + description = "Default web browser desktop file."; + default = "firefox.desktop"; + type = lib.types.str; + }; + package = lib.mkOption { + description = "Default web browser package."; + default = config.programs.firefox.package; + type = lib.types.package; + }; + }; + }; + desktop = { + enable = lib.mkOption { + description = "Graphical desktop."; + default = osConfig.ar.desktop.enable; + type = lib.types.bool; + }; + cinnamon.enable = lib.mkOption { + description = "Cinnamon with sane defaults"; + default = osConfig.ar.desktop.cinnamon.enable; + type = lib.types.bool; + }; + gnome.enable = lib.mkOption { + description = "GNOME with sane defaults."; + default = osConfig.ar.desktop.gnome.enable; + type = lib.types.bool; + }; + hyprland = { enable = lib.mkOption { - description = "Declaratively set default apps and file associations."; - default = config.alyraffauf.desktop.enable; + description = "Hyprland with full desktop session components."; + default = osConfig.ar.desktop.hyprland.enable; type = lib.types.bool; }; - audioPlayer = { - exe = lib.mkOption { - description = "Default audio player executable."; - default = lib.getExe config.alyraffauf.defaultApps.audioPlayer.package; - type = lib.types.str; - }; - desktop = lib.mkOption { - description = "Default audio player desktop file."; - default = config.alyraffauf.defaultApps.videoPlayer.desktop; - type = lib.types.str; - }; - package = lib.mkOption { - description = "Default audio player package."; - default = config.alyraffauf.defaultApps.videoPlayer.package; - type = lib.types.package; - }; + autoSuspend = lib.mkOption { + description = "Whether to autosuspend on idle."; + default = config.ar.home.desktop.hyprland.enable; + type = lib.types.bool; }; - editor = { - exe = lib.mkOption { - description = "Default editor executable."; - default = lib.getExe config.alyraffauf.defaultApps.editor.package; - type = lib.types.str; - }; - desktop = lib.mkOption { - description = "Default editor desktop file."; - default = "codium.desktop"; - type = lib.types.str; - }; - package = lib.mkOption { - description = "Default editor package."; - default = config.programs.vscode.package; - type = lib.types.package; - }; + randomWallpaper = lib.mkOption { + description = "Whether to enable random wallpaper script."; + default = config.ar.home.desktop.hyprland.enable; + type = lib.types.bool; }; - fileManager = { - exe = lib.mkOption { - description = "Default file manager executable."; - default = lib.getExe config.alyraffauf.defaultApps.fileManager.package; - type = lib.types.str; - }; - desktop = lib.mkOption { - description = "Default file manager desktop file."; - default = "nemo.desktop"; - type = lib.types.str; - }; - package = lib.mkOption { - description = "Default file manager package."; - default = pkgs.cinnamon.nemo; - type = lib.types.package; - }; + redShift = lib.mkOption { + description = "Whether to redshift display colors at night."; + default = config.ar.home.desktop.hyprland.enable; + type = lib.types.bool; }; - imageViewer = { - exe = lib.mkOption { - description = "Default image viewer executable."; - default = lib.getExe config.alyraffauf.defaultApps.imageViewer.package; - type = lib.types.str; + tabletMode = { + enable = lib.mkEnableOption "Tablet mode for hyprland."; + autoRotate = lib.mkOption { + description = "Whether to autorotate screen."; + default = config.ar.home.desktop.hyprland.tabletMode.enable; + type = lib.types.bool; }; - desktop = lib.mkOption { - description = "Default image viewer desktop file name."; - default = "org.gnome.eog.desktop"; - type = lib.types.str; + menuButton = lib.mkOption { + description = "Whether to add menu button for waybar."; + default = config.ar.home.desktop.hyprland.tabletMode.enable; + type = lib.types.bool; }; - package = lib.mkOption { - description = "Default image viewer package."; - default = pkgs.gnome.eog; - type = lib.types.package; - }; - }; - pdfViewer = { - exe = lib.mkOption { - description = "Default PDF viewer executable."; - default = lib.getExe config.alyraffauf.defaultApps.pdfEditor.package; - type = lib.types.str; - }; - desktop = lib.mkOption { - description = "Default PDF viewer desktop file."; - default = "org.gnome.Evince.desktop"; - type = lib.types.str; - }; - package = lib.mkOption { - description = "Default PDF viewer package."; - default = pkgs.evince; - type = lib.types.package; - }; - }; - terminal = { - exe = lib.mkOption { - description = "Default terminal executable."; - default = lib.getExe config.alyraffauf.defaultApps.terminal.package; - type = lib.types.str; - }; - desktop = lib.mkOption { - description = "Default terminal desktop file."; - default = "alacritty.desktop"; - type = lib.types.str; - }; - package = lib.mkOption { - description = "Default terminal package."; - default = config.programs.alacritty.package; - type = lib.types.package; - }; - }; - terminalEditor = { - exe = lib.mkOption { - description = "Default terminal editor executable."; - default = lib.getExe config.alyraffauf.defaultApps.terminalEditor.package; - type = lib.types.str; - }; - desktop = lib.mkOption { - description = "Default terminal editor desktop file."; - default = "nvim.desktop"; - type = lib.types.str; - }; - package = lib.mkOption { - description = "Default terminal editor package."; - default = config.programs.nixvim.package; - type = lib.types.package; - }; - }; - videoPlayer = { - exe = lib.mkOption { - description = "Default video player executable."; - default = lib.getExe config.alyraffauf.defaultApps.videoPlayer.package; - type = lib.types.str; - }; - desktop = lib.mkOption { - description = "Default video player desktop file."; - default = "io.github.celluloid_player.Celluloid.desktop"; - type = lib.types.str; - }; - package = lib.mkOption { - description = "Default video player package."; - default = pkgs.celluloid; - type = lib.types.package; - }; - }; - webBrowser = { - exe = lib.mkOption { - description = "Default web browser executable."; - default = lib.getExe config.alyraffauf.defaultApps.webBrowser.package; - type = lib.types.str; - }; - desktop = lib.mkOption { - description = "Default web browser desktop file."; - default = "firefox.desktop"; - type = lib.types.str; - }; - package = lib.mkOption { - description = "Default web browser package."; - default = config.programs.firefox.package; - type = lib.types.package; + virtKeyboard = lib.mkOption { + description = "Whether to enable dynamic virtual keyboard."; + default = config.ar.home.desktop.hyprland.tabletMode.enable; + type = lib.types.bool; }; }; }; - desktop = { + sway = { enable = lib.mkOption { - description = "Graphical desktop."; - default = osConfig.alyraffauf.desktop.enable; + description = "Sway with full desktop session components."; + default = osConfig.ar.desktop.sway.enable; type = lib.types.bool; }; - cinnamon.enable = lib.mkOption { - description = "Cinnamon with sane defaults"; - default = osConfig.alyraffauf.desktop.cinnamon.enable; + autoSuspend = lib.mkOption { + description = "Whether to autosuspend on idle."; + default = config.ar.home.desktop.sway.enable; type = lib.types.bool; }; - gnome.enable = lib.mkOption { - description = "GNOME with sane defaults."; - default = osConfig.alyraffauf.desktop.gnome.enable; + randomWallpaper = lib.mkOption { + description = "Whether to enable random wallpaper script."; + default = config.ar.home.desktop.sway.enable; type = lib.types.bool; }; - hyprland = { - enable = lib.mkOption { - description = "Hyprland with full desktop session components."; - default = osConfig.alyraffauf.desktop.hyprland.enable; - type = lib.types.bool; - }; - autoSuspend = lib.mkOption { - description = "Whether to autosuspend on idle."; - default = config.alyraffauf.desktop.hyprland.enable; - type = lib.types.bool; - }; - randomWallpaper = lib.mkOption { - description = "Whether to enable random wallpaper script."; - default = config.alyraffauf.desktop.hyprland.enable; - type = lib.types.bool; - }; - redShift = lib.mkOption { - description = "Whether to redshift display colors at night."; - default = config.alyraffauf.desktop.hyprland.enable; - type = lib.types.bool; - }; - tabletMode = { - enable = lib.mkEnableOption "Tablet mode for hyprland."; - autoRotate = lib.mkOption { - description = "Whether to autorotate screen."; - default = config.alyraffauf.desktop.hyprland.tabletMode.enable; - type = lib.types.bool; - }; - menuButton = lib.mkOption { - description = "Whether to add menu button for waybar."; - default = config.alyraffauf.desktop.hyprland.tabletMode.enable; - type = lib.types.bool; - }; - virtKeyboard = lib.mkOption { - description = "Whether to enable dynamic virtual keyboard."; - default = config.alyraffauf.desktop.hyprland.tabletMode.enable; - type = lib.types.bool; - }; - }; - }; - sway = { - enable = lib.mkOption { - description = "Sway with full desktop session components."; - default = osConfig.alyraffauf.desktop.sway.enable; - type = lib.types.bool; - }; - autoSuspend = lib.mkOption { - description = "Whether to autosuspend on idle."; - default = config.alyraffauf.desktop.sway.enable; - type = lib.types.bool; - }; - randomWallpaper = lib.mkOption { - description = "Whether to enable random wallpaper script."; - default = config.alyraffauf.desktop.sway.enable; - type = lib.types.bool; - }; - redShift = lib.mkOption { - description = "Whether to redshift display colors at night."; - default = config.alyraffauf.desktop.sway.enable; - type = lib.types.bool; - }; - }; - startupApps = lib.mkOption { - description = "Apps to launch at startup"; - default = []; - type = lib.types.listOf (lib.types.str); + redShift = lib.mkOption { + description = "Whether to redshift display colors at night."; + default = config.ar.home.desktop.sway.enable; + type = lib.types.bool; }; }; - scripts = { - pp-adjuster.enable = lib.mkEnableOption "pp-adjuster script."; + startupApps = lib.mkOption { + description = "Apps to launch at startup"; + default = []; + type = lib.types.listOf (lib.types.str); }; - services = { - mpd = { - enable = - lib.mkEnableOption "MPD user service."; - musicDirectory = lib.mkOption { - description = "Name of music directory"; - default = config.xdg.userDirs.music; - type = lib.types.str; - }; - }; - easyeffects = { - enable = - lib.mkEnableOption "EasyEffects user service."; - preset = lib.mkOption { - description = "Name of preset to start with."; - default = ""; - type = lib.types.str; - }; + }; + scripts = { + pp-adjuster.enable = lib.mkEnableOption "pp-adjuster script."; + }; + services = { + mpd = { + enable = + lib.mkEnableOption "MPD user service."; + musicDirectory = lib.mkOption { + description = "Name of music directory"; + default = config.xdg.userDirs.music; + type = lib.types.str; }; }; - theme = { - enable = lib.mkOption { - description = "Gtk, Qt, and application colors."; - default = config.alyraffauf.desktop.enable; - type = lib.types.bool; - }; - gtk = { - name = lib.mkOption { - description = "GTK theme name."; - default = "catppuccin-frappe-mauve-compact+normal"; - type = lib.types.str; - }; - package = lib.mkOption { - description = "GTK theme package."; - default = pkgs.catppuccin-gtk; - type = lib.types.package; - }; - hideTitleBar = lib.mkOption { - description = "Whether to hide GTK3/4 titlebars (useful for some window managers)."; - default = false; - type = lib.types.bool; - }; - }; - qt = { - name = lib.mkOption { - description = "Qt Kvantum theme name."; - default = "Catppuccin-Frappe-Mauve"; - type = lib.types.str; - }; - package = lib.mkOption { - description = "Qt Kvantum theme package."; - default = pkgs.catppuccin-kvantum; - type = lib.types.package; - }; - }; - iconTheme = { - name = lib.mkOption { - description = "Icon theme name."; - default = "Papirus-Dark"; - type = lib.types.str; - }; - package = lib.mkOption { - description = "Icon theme package."; - default = pkgs.catppuccin-papirus-folders; - type = lib.types.package; - }; - }; - cursorTheme = { - name = lib.mkOption { - description = "Cursor theme name."; - default = "Catppuccin-Frappe-Dark-Cursors"; - type = lib.types.str; - }; - size = lib.mkOption { - description = "Cursor size."; - default = 24; - type = lib.types.int; - }; - package = lib.mkOption { - description = "Cursor theme package."; - default = pkgs.catppuccin-cursors.frappeDark; - type = lib.types.package; - }; - }; - font = { - name = lib.mkOption { - description = "Font name."; - default = "NotoSans Nerd Font"; - type = lib.types.str; - }; - size = lib.mkOption { - description = "Font size."; - default = 11; - type = lib.types.int; - }; - package = lib.mkOption { - description = "Font package."; - default = pkgs.nerdfonts; - type = lib.types.package; - }; - }; - terminalFont = { - name = lib.mkOption { - description = "Font name."; - default = "NotoSansM Nerd Font"; - type = lib.types.str; - }; - size = lib.mkOption { - description = "Font size."; - default = 11; - type = lib.types.int; - }; - package = lib.mkOption { - description = "Font package."; - default = pkgs.nerdfonts; - type = lib.types.package; - }; - }; - colors = { - preferDark = lib.mkOption { - description = "Whether to prefer dark mode apps or not."; - default = config.alyraffauf.theme.enable; - type = lib.types.bool; - }; - text = lib.mkOption { - description = "Text color."; - default = "#FAFAFA"; - type = lib.types.str; - }; - background = lib.mkOption { - description = "Background color."; - default = "#232634"; - type = lib.types.str; - }; - primary = lib.mkOption { - description = "Primary color."; - default = "#CA9EE6"; - type = lib.types.str; - }; - secondary = lib.mkOption { - description = "Secondary color."; - default = "#99D1DB"; - type = lib.types.str; - }; - inactive = lib.mkOption { - description = "Inactive color."; - default = "#626880"; - type = lib.types.str; - }; - shadow = lib.mkOption { - description = "Drop shadow color."; - default = "#1A1A1A"; - type = lib.types.str; - }; - }; - wallpaper = lib.mkOption { - description = "Default wallpaper."; - default = "${config.xdg.dataHome}/backgrounds/jr-korpa-9XngoIpxcEo-unsplash.jpg"; + easyeffects = { + enable = + lib.mkEnableOption "EasyEffects user service."; + preset = lib.mkOption { + description = "Name of preset to start with."; + default = ""; type = lib.types.str; }; }; }; + theme = { + enable = lib.mkOption { + description = "Gtk, Qt, and application colors."; + default = config.ar.home.desktop.enable; + type = lib.types.bool; + }; + gtk = { + name = lib.mkOption { + description = "GTK theme name."; + default = "catppuccin-frappe-mauve-compact+normal"; + type = lib.types.str; + }; + package = lib.mkOption { + description = "GTK theme package."; + default = pkgs.catppuccin-gtk; + type = lib.types.package; + }; + hideTitleBar = lib.mkOption { + description = "Whether to hide GTK3/4 titlebars (useful for some window managers)."; + default = false; + type = lib.types.bool; + }; + }; + qt = { + name = lib.mkOption { + description = "Qt Kvantum theme name."; + default = "Catppuccin-Frappe-Mauve"; + type = lib.types.str; + }; + package = lib.mkOption { + description = "Qt Kvantum theme package."; + default = pkgs.catppuccin-kvantum; + type = lib.types.package; + }; + }; + iconTheme = { + name = lib.mkOption { + description = "Icon theme name."; + default = "Papirus-Dark"; + type = lib.types.str; + }; + package = lib.mkOption { + description = "Icon theme package."; + default = pkgs.catppuccin-papirus-folders; + type = lib.types.package; + }; + }; + cursorTheme = { + name = lib.mkOption { + description = "Cursor theme name."; + default = "Catppuccin-Frappe-Dark-Cursors"; + type = lib.types.str; + }; + size = lib.mkOption { + description = "Cursor size."; + default = 24; + type = lib.types.int; + }; + package = lib.mkOption { + description = "Cursor theme package."; + default = pkgs.catppuccin-cursors.frappeDark; + type = lib.types.package; + }; + }; + font = { + name = lib.mkOption { + description = "Font name."; + default = "NotoSans Nerd Font"; + type = lib.types.str; + }; + size = lib.mkOption { + description = "Font size."; + default = 11; + type = lib.types.int; + }; + package = lib.mkOption { + description = "Font package."; + default = pkgs.nerdfonts; + type = lib.types.package; + }; + }; + terminalFont = { + name = lib.mkOption { + description = "Font name."; + default = "NotoSansM Nerd Font"; + type = lib.types.str; + }; + size = lib.mkOption { + description = "Font size."; + default = 11; + type = lib.types.int; + }; + package = lib.mkOption { + description = "Font package."; + default = pkgs.nerdfonts; + type = lib.types.package; + }; + }; + colors = { + preferDark = lib.mkOption { + description = "Whether to prefer dark mode apps or not."; + default = config.ar.home.theme.enable; + type = lib.types.bool; + }; + text = lib.mkOption { + description = "Text color."; + default = "#FAFAFA"; + type = lib.types.str; + }; + background = lib.mkOption { + description = "Background color."; + default = "#232634"; + type = lib.types.str; + }; + primary = lib.mkOption { + description = "Primary color."; + default = "#CA9EE6"; + type = lib.types.str; + }; + secondary = lib.mkOption { + description = "Secondary color."; + default = "#99D1DB"; + type = lib.types.str; + }; + inactive = lib.mkOption { + description = "Inactive color."; + default = "#626880"; + type = lib.types.str; + }; + shadow = lib.mkOption { + description = "Drop shadow color."; + default = "#1A1A1A"; + type = lib.types.str; + }; + }; + wallpaper = lib.mkOption { + description = "Default wallpaper."; + default = "${config.xdg.dataHome}/backgrounds/jr-korpa-9XngoIpxcEo-unsplash.jpg"; + type = lib.types.str; + }; + }; }; } diff --git a/homeManagerModules/scripts/pp-adjuster/default.nix b/homeManagerModules/scripts/pp-adjuster/default.nix index 2b350fa1..232ebe9f 100644 --- a/homeManagerModules/scripts/pp-adjuster/default.nix +++ b/homeManagerModules/scripts/pp-adjuster/default.nix @@ -19,7 +19,7 @@ ${lib.getExe pkgs.libnotify} "Power profile set to $new_profile." ''; in { - config = lib.mkIf config.alyraffauf.scripts.pp-adjuster.enable { + config = lib.mkIf config.ar.home.scripts.pp-adjuster.enable { home.packages = [pp-adjuster]; }; } diff --git a/homeManagerModules/services/easyeffects/default.nix b/homeManagerModules/services/easyeffects/default.nix index 083601fa..a47e84a4 100644 --- a/homeManagerModules/services/easyeffects/default.nix +++ b/homeManagerModules/services/easyeffects/default.nix @@ -4,7 +4,7 @@ config, ... }: { - config = lib.mkIf config.alyraffauf.services.easyeffects.enable { + config = lib.mkIf config.ar.home.services.easyeffects.enable { xdg.configFile = { "easyeffects/output/framework13.json".source = ./framework13.json; @@ -15,7 +15,7 @@ services.easyeffects = { enable = true; - preset = config.alyraffauf.services.easyeffects.preset; + preset = config.ar.home.services.easyeffects.preset; }; }; } diff --git a/homeManagerModules/services/mpd/default.nix b/homeManagerModules/services/mpd/default.nix index 6529d09f..a01d24d9 100644 --- a/homeManagerModules/services/mpd/default.nix +++ b/homeManagerModules/services/mpd/default.nix @@ -4,10 +4,10 @@ config, ... }: { - config = lib.mkIf config.alyraffauf.services.mpd.enable { + config = lib.mkIf config.ar.home.services.mpd.enable { services.mpd = { enable = true; - musicDirectory = config.alyraffauf.services.mpd.musicDirectory; + musicDirectory = config.ar.home.services.mpd.musicDirectory; }; services.mpd-mpris = { enable = true; diff --git a/homeManagerModules/theme.nix b/homeManagerModules/theme.nix index e0b278ee..6f96c95b 100644 --- a/homeManagerModules/theme.nix +++ b/homeManagerModules/theme.nix @@ -4,16 +4,16 @@ config, ... }: { - config = lib.mkIf config.alyraffauf.theme.enable { + config = lib.mkIf config.ar.home.theme.enable { home.pointerCursor = { gtk.enable = true; x11 = { enable = true; - defaultCursor = config.alyraffauf.theme.cursorTheme.name; + defaultCursor = config.ar.home.theme.cursorTheme.name; }; - name = config.alyraffauf.theme.cursorTheme.name; - package = config.alyraffauf.theme.cursorTheme.package; - size = config.alyraffauf.theme.cursorTheme.size; + name = config.ar.home.theme.cursorTheme.name; + package = config.ar.home.theme.cursorTheme.package; + size = config.ar.home.theme.cursorTheme.size; }; qt = { @@ -23,18 +23,18 @@ }; xdg.configFile = { - "Kvantum/${config.alyraffauf.theme.qt.name}".source = "${config.alyraffauf.theme.qt.package}/share/Kvantum/${config.alyraffauf.theme.qt.name}"; + "Kvantum/${config.ar.home.theme.qt.name}".source = "${config.ar.home.theme.qt.package}/share/Kvantum/${config.ar.home.theme.qt.name}"; "Kvantum/kvantum.kvconfig".source = (pkgs.formats.ini {}).generate "kvantum.kvconfig" { - General.theme = config.alyraffauf.theme.qt.name; + General.theme = config.ar.home.theme.qt.name; }; }; fonts.fontconfig = { enable = true; defaultFonts = { - monospace = [config.alyraffauf.theme.terminalFont.name]; + monospace = [config.ar.home.theme.terminalFont.name]; serif = ["NotoSerif Nerd Font"]; - sansSerif = [config.alyraffauf.theme.font.name]; + sansSerif = [config.ar.home.theme.font.name]; }; }; @@ -42,27 +42,27 @@ enable = true; theme = { - package = config.alyraffauf.theme.gtk.package; - name = config.alyraffauf.theme.gtk.name; + package = config.ar.home.theme.gtk.package; + name = config.ar.home.theme.gtk.name; }; iconTheme = { - package = config.alyraffauf.theme.iconTheme.package; - name = config.alyraffauf.theme.iconTheme.name; + package = config.ar.home.theme.iconTheme.package; + name = config.ar.home.theme.iconTheme.name; }; font = { - name = "${config.alyraffauf.theme.font.name} Regular"; - package = config.alyraffauf.theme.font.package; - size = config.alyraffauf.theme.font.size; + name = "${config.ar.home.theme.font.name} Regular"; + package = config.ar.home.theme.font.package; + size = config.ar.home.theme.font.size; }; - gtk3.extraConfig = lib.attrsets.optionalAttrs (config.alyraffauf.theme.colors.preferDark) {gtk-application-prefer-dark-theme = 1;}; + gtk3.extraConfig = lib.attrsets.optionalAttrs (config.ar.home.theme.colors.preferDark) {gtk-application-prefer-dark-theme = 1;}; - gtk4.extraConfig = lib.attrsets.optionalAttrs (config.alyraffauf.theme.colors.preferDark) {gtk-application-prefer-dark-theme = 1;}; + gtk4.extraConfig = lib.attrsets.optionalAttrs (config.ar.home.theme.colors.preferDark) {gtk-application-prefer-dark-theme = 1;}; gtk3.extraCss = - if config.alyraffauf.theme.gtk.hideTitleBar + if config.ar.home.theme.gtk.hideTitleBar then '' /* No (default) title bar on wayland */ headerbar.default-decoration { @@ -90,34 +90,34 @@ }; dconf.settings = { - "org/cinnamon/desktop/background".picture-uri = "file://${config.alyraffauf.theme.wallpaper}"; + "org/cinnamon/desktop/background".picture-uri = "file://${config.ar.home.theme.wallpaper}"; "org/cinnamon/desktop/interface" = { - cursor-size = config.alyraffauf.theme.cursorTheme.size; - cursor-theme = config.alyraffauf.theme.cursorTheme.name; - font-name = "${config.alyraffauf.theme.font.name} Regular ${toString config.alyraffauf.theme.font.size}"; - gtk-theme = config.alyraffauf.theme.gtk.name; - icon-theme = config.alyraffauf.theme.iconTheme.name; + cursor-size = config.ar.home.theme.cursorTheme.size; + cursor-theme = config.ar.home.theme.cursorTheme.name; + font-name = "${config.ar.home.theme.font.name} Regular ${toString config.ar.home.theme.font.size}"; + gtk-theme = config.ar.home.theme.gtk.name; + icon-theme = config.ar.home.theme.iconTheme.name; }; - "org/cinnamon/theme".name = config.alyraffauf.theme.gtk.name; - "org/cinnamon/desktop/wm/preferences".titlebar-font = "${config.alyraffauf.theme.font.name} ${toString config.alyraffauf.theme.font.size}"; + "org/cinnamon/theme".name = config.ar.home.theme.gtk.name; + "org/cinnamon/desktop/wm/preferences".titlebar-font = "${config.ar.home.theme.font.name} ${toString config.ar.home.theme.font.size}"; - "org/gnome/desktop/background".picture-uri = "file://${config.alyraffauf.theme.wallpaper}"; - "org/gnome/desktop/background".picture-uri-dark = "file://${config.alyraffauf.theme.wallpaper}"; + "org/gnome/desktop/background".picture-uri = "file://${config.ar.home.theme.wallpaper}"; + "org/gnome/desktop/background".picture-uri-dark = "file://${config.ar.home.theme.wallpaper}"; "org/gnome/desktop/interface" = { color-scheme = - if config.alyraffauf.theme.colors.preferDark + if config.ar.home.theme.colors.preferDark then "prefer-dark" else "prefer-light"; - cursor-theme = config.alyraffauf.theme.cursorTheme.name; - cursor-size = config.alyraffauf.theme.cursorTheme.size; - gtk-theme = config.alyraffauf.theme.gtk.name; - icon-theme = config.alyraffauf.theme.iconTheme.name; - monospace-font-name = "${config.alyraffauf.theme.terminalFont.name} Regular ${toString config.alyraffauf.theme.terminalFont.size}"; + cursor-theme = config.ar.home.theme.cursorTheme.name; + cursor-size = config.ar.home.theme.cursorTheme.size; + gtk-theme = config.ar.home.theme.gtk.name; + icon-theme = config.ar.home.theme.iconTheme.name; + monospace-font-name = "${config.ar.home.theme.terminalFont.name} Regular ${toString config.ar.home.theme.terminalFont.size}"; }; - "org/gnome/desktop/wm/preferences".titlebar-font = "${config.alyraffauf.theme.font.name} ${toString config.alyraffauf.theme.font.size}"; + "org/gnome/desktop/wm/preferences".titlebar-font = "${config.ar.home.theme.font.name} ${toString config.ar.home.theme.font.size}"; }; }; } diff --git a/homes/aly.nix b/homes/aly.nix index 2b766387..f5172493 100644 --- a/homes/aly.nix +++ b/homes/aly.nix @@ -212,12 +212,12 @@ hyprland.extraConfig = '' # Workspace - Browser - workspace = 1, defaultName:web, on-created-empty:${config.alyraffauf.defaultApps.webBrowser.exe} + workspace = 1, defaultName:web, on-created-empty:${config.ar.home.defaultApps.webBrowser.exe} windowrulev2 = workspace 1,class:(firefox) windowrulev2 = workspace 1,class:(brave-browser) # Workspace - Coding - workspace = 2, defaultName:code, on-created-empty:${config.alyraffauf.defaultApps.editor.exe} + workspace = 2, defaultName:code, on-created-empty:${config.ar.home.defaultApps.editor.exe} windowrulev2 = workspace 2,class:(codium-url-handler) # Workspace - Chrome @@ -244,7 +244,7 @@ ''; }; - alyraffauf = { + ar.home = { apps = { alacritty.enable = true; bash.enable = true; diff --git a/homes/dustin.nix b/homes/dustin.nix index ad9bfba6..717bdb68 100644 --- a/homes/dustin.nix +++ b/homes/dustin.nix @@ -30,7 +30,7 @@ }; }; - alyraffauf = { + ar.home = { apps = { alacritty.enable = true; bash.enable = true; diff --git a/homes/morgan.nix b/homes/morgan.nix index 26123449..d84e4924 100644 --- a/homes/morgan.nix +++ b/homes/morgan.nix @@ -28,7 +28,7 @@ }; }; - alyraffauf = { + ar.home = { apps = { alacritty.enable = true; bash.enable = true; diff --git a/hosts/fallarbor/default.nix b/hosts/fallarbor/default.nix index 4bbe2b48..01b4f428 100644 --- a/hosts/fallarbor/default.nix +++ b/hosts/fallarbor/default.nix @@ -22,7 +22,7 @@ system.stateVersion = "24.05"; - alyraffauf = { + ar = { apps.steam.enable = true; base = { enable = true; diff --git a/hosts/fallarbor/hardware.nix b/hosts/fallarbor/hardware.nix index 5e65d432..d2eb5767 100644 --- a/hosts/fallarbor/hardware.nix +++ b/hosts/fallarbor/hardware.nix @@ -12,17 +12,12 @@ framework-laptop-kmod ]; - initrd = { - availableKernelModules = ["xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod"]; - kernelModules = ["i915"]; - }; + initrd.availableKernelModules = ["xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod"]; kernelModules = [ # https://github.com/DHowett/framework-laptop-kmod?tab=readme-ov-file#usage "cros_ec_lpcs" "cros_ec" - "i915" - "kvm-intel" ]; kernelPackages = pkgs.linuxPackages_latest; @@ -32,55 +27,29 @@ ]; }; - environment = { - sessionVariables = { - LIBVA_DRIVER_NAME = "iHD"; # Force intel-media-driver - VDPAU_DRIVER = "va_gl"; - }; - - systemPackages = [pkgs.framework-tool] ++ lib.optional (pkgs ? "fw-ectool") pkgs.fw-ectool; - }; + environment.systemPackages = [pkgs.framework-tool] ++ lib.optional (pkgs ? "fw-ectool") pkgs.fw-ectool; hardware = { acpilight.enable = true; - cpu.intel.updateMicrocode = true; enableAllFirmware = true; - opengl = { - enable = true; - driSupport = true; - driSupport32Bit = true; - - extraPackages = with pkgs; [ - intel-media-driver # LIBVA_DRIVER_NAME=iHD - intel-vaapi-driver # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium) - libvdpau-va-gl - ]; - - extraPackages32 = with pkgs.driversi686Linux; [ - intel-media-driver # LIBVA_DRIVER_NAME=iHD - intel-vaapi-driver # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium) - libvdpau-va-gl - ]; - }; - sensor.iio.enable = true; }; - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - - # Save power/better manage heat & fans. - powerManagement.powertop.enable = true; - services = { fprintd.enable = true; - fstrim.enable = true; fwupd.enable = true; - thermald.enable = true; udev.extraRules = '' # Ethernet expansion card support ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="0bda", ATTR{idProduct}=="8156", ATTR{power/autosuspend}="20" ''; }; + + ar.hardware = { + cpu.intel = true; + gpu.intel = true; + laptop = true; + ssd = true; + }; } diff --git a/hosts/lavaridge/default.nix b/hosts/lavaridge/default.nix index 6e29c0af..5b8e6a1c 100644 --- a/hosts/lavaridge/default.nix +++ b/hosts/lavaridge/default.nix @@ -22,7 +22,7 @@ system.stateVersion = "24.05"; - alyraffauf = { + ar = { apps = { steam.enable = true; podman.enable = true; diff --git a/hosts/lavaridge/hardware.nix b/hosts/lavaridge/hardware.nix index c23dc60b..bbee1927 100644 --- a/hosts/lavaridge/hardware.nix +++ b/hosts/lavaridge/hardware.nix @@ -10,38 +10,21 @@ framework-laptop-kmod ]; - initrd = { - availableKernelModules = ["nvme" "sd_mod" "thunderbolt" "usb_storage" "xhci_pci"]; - kernelModules = ["amdgpu"]; - }; + initrd.availableKernelModules = ["nvme" "sd_mod" "thunderbolt" "usb_storage" "xhci_pci"]; - kernelModules = ["amdgpu" "cros_ec" "cros_ec_lpcs" "kvm-amd"]; + kernelModules = ["cros_ec" "cros_ec_lpcs"]; kernelPackages = pkgs.linuxPackages_latest; - kernelParams = ["amdgpu.abmlevel=0" "amd_pstate=active"]; }; environment.systemPackages = [pkgs.framework-tool]; hardware = { - cpu.amd.updateMicrocode = true; enableAllFirmware = true; - - opengl = { - enable = true; - driSupport = true; - driSupport32Bit = true; - extraPackages = [pkgs.rocmPackages.clr.icd pkgs.amdvlk]; - extraPackages32 = [pkgs.driversi686Linux.amdvlk]; - }; - sensor.iio.enable = true; }; - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - services = { fprintd.enable = true; - fstrim.enable = true; fwupd.enable = true; udev.extraRules = '' @@ -49,4 +32,11 @@ ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="0bda", ATTR{idProduct}=="8156", ATTR{power/autosuspend}="20" ''; }; + + ar.hardware = { + cpu.amd = true; + gpu.amd = true; + laptop = true; + ssd = true; + }; } diff --git a/hosts/lavaridge/home.nix b/hosts/lavaridge/home.nix index 66037032..9a984716 100644 --- a/hosts/lavaridge/home.nix +++ b/hosts/lavaridge/home.nix @@ -8,7 +8,7 @@ home-manager = { sharedModules = [ { - alyraffauf = { + ar.home = { services.easyeffects = { enable = true; preset = "framework13"; diff --git a/hosts/mandarin/default.nix b/hosts/mandarin/default.nix index 5ab991df..a07bc09a 100644 --- a/hosts/mandarin/default.nix +++ b/hosts/mandarin/default.nix @@ -22,7 +22,7 @@ system.stateVersion = "24.05"; - alyraffauf = { + ar = { apps = { podman.enable = true; steam.enable = true; diff --git a/hosts/mandarin/hardware.nix b/hosts/mandarin/hardware.nix index f19922e7..bb460899 100644 --- a/hosts/mandarin/hardware.nix +++ b/hosts/mandarin/hardware.nix @@ -6,30 +6,17 @@ ... }: { boot = { - initrd = { - availableKernelModules = ["nvme" "sd_mod" "usb_storage" "usbhid" "xhci_pci"]; - kernelModules = ["amdgpu"]; - }; - - kernelModules = ["kvm-amd" "amdgpu"]; + initrd.availableKernelModules = ["nvme" "sd_mod" "usb_storage" "usbhid" "xhci_pci"]; kernelPackages = pkgs.linuxPackages_latest; }; - hardware = { - cpu.amd.updateMicrocode = true; - enableAllFirmware = true; + hardware.enableAllFirmware = true; - opengl = { - enable = true; - driSupport = true; - driSupport32Bit = true; - extraPackages = with pkgs; [rocmPackages.clr.icd amdvlk]; - extraPackages32 = with pkgs; [driversi686Linux.amdvlk]; - }; + ar.hardware = { + cpu.amd = true; + gpu.amd = true; + laptop = false; + ssd = true; }; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - - services.fstrim.enable = true; } diff --git a/hosts/mandarin/home.nix b/hosts/mandarin/home.nix index b5a7d036..9d78cdf1 100644 --- a/hosts/mandarin/home.nix +++ b/hosts/mandarin/home.nix @@ -8,7 +8,7 @@ home-manager = { sharedModules = [ { - alyraffauf = { + ar.home = { desktop = { hyprland.autoSuspend = false; sway.autoSuspend = false; diff --git a/hosts/mauville/default.nix b/hosts/mauville/default.nix index b7ff7236..12b8a05b 100644 --- a/hosts/mauville/default.nix +++ b/hosts/mauville/default.nix @@ -33,11 +33,11 @@ in { allowedTCPPorts = [ 80 443 - config.alyraffauf.containers.oci.transmission.port - config.alyraffauf.containers.oci.transmission.bitTorrentPort + config.ar.containers.oci.transmission.port + config.ar.containers.oci.transmission.bitTorrentPort ]; - allowedUDPPorts = [config.alyraffauf.containers.oci.transmission.bitTorrentPort]; + allowedUDPPorts = [config.ar.containers.oci.transmission.bitTorrentPort]; }; # My router doesn't expose settings for NAT loopback @@ -104,7 +104,7 @@ in { forceSSL = true; locations."/" = { - proxyPass = "http://127.0.0.1:${toString config.alyraffauf.containers.oci.freshRSS.port}"; + proxyPass = "http://127.0.0.1:${toString config.ar.containers.oci.freshRSS.port}"; proxyWebsockets = true; # needed if you need to use WebSocket extraConfig = '' @@ -131,7 +131,7 @@ in { forceSSL = true; locations."/" = { - proxyPass = "http://127.0.0.1:${toString config.alyraffauf.containers.oci.plexMediaServer.port}"; + proxyPass = "http://127.0.0.1:${toString config.ar.containers.oci.plexMediaServer.port}"; proxyWebsockets = true; extraConfig = '' @@ -145,7 +145,7 @@ in { forceSSL = true; locations."/" = { - proxyPass = "http://127.0.0.1:${toString config.alyraffauf.containers.oci.audiobookshelf.port}"; + proxyPass = "http://127.0.0.1:${toString config.ar.containers.oci.audiobookshelf.port}"; extraConfig = '' client_max_body_size 500M; @@ -195,7 +195,7 @@ in { }; }; - alyraffauf = { + ar = { apps = { nicotine-plus.enable = true; podman.enable = true; @@ -234,6 +234,7 @@ in { hyprland.enable = true; steam.enable = true; }; + users = { aly = { enable = true; diff --git a/hosts/mauville/hardware.nix b/hosts/mauville/hardware.nix index a530346d..b116f58f 100644 --- a/hosts/mauville/hardware.nix +++ b/hosts/mauville/hardware.nix @@ -5,30 +5,14 @@ pkgs, ... }: { - boot = { - initrd = { - availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "sd_mod"]; - kernelModules = ["amdgpu"]; - }; + boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "sd_mod"]; - kernelModules = ["kvm-amd" "amdgpu"]; + hardware.enableAllFirmware = true; + + ar.hardware = { + cpu.amd = true; + gpu.amd = true; + laptop = false; + ssd = true; }; - - hardware = { - cpu.amd.updateMicrocode = true; - - enableAllFirmware = true; - - opengl = { - enable = true; - driSupport = true; - driSupport32Bit = true; - extraPackages = with pkgs; [rocmPackages.clr.icd amdvlk]; - extraPackages32 = with pkgs; [driversi686Linux.amdvlk]; - }; - }; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - - services.fstrim.enable = true; } diff --git a/hosts/mauville/home.nix b/hosts/mauville/home.nix index 71331437..daeff713 100644 --- a/hosts/mauville/home.nix +++ b/hosts/mauville/home.nix @@ -14,7 +14,7 @@ }; xdg.userDirs.music = "/mnt/Media/Music"; - alyraffauf = { + ar.home = { desktop = { hyprland.autoSuspend = false; sway.autoSuspend = false; diff --git a/hosts/petalburg/default.nix b/hosts/petalburg/default.nix index ae6bb52b..7d3a1d21 100644 --- a/hosts/petalburg/default.nix +++ b/hosts/petalburg/default.nix @@ -22,7 +22,7 @@ system.stateVersion = "24.05"; - alyraffauf = { + ar = { apps.steam.enable = true; base.enable = true; diff --git a/hosts/petalburg/hardware.nix b/hosts/petalburg/hardware.nix index deece35c..a91f2195 100644 --- a/hosts/petalburg/hardware.nix +++ b/hosts/petalburg/hardware.nix @@ -6,53 +6,20 @@ ... }: { boot = { - initrd = { - availableKernelModules = ["nvme" "sd_mod" "thunderbolt" "usb_storage" "xhci_pci"]; - kernelModules = ["i915"]; - }; + initrd.availableKernelModules = ["nvme" "sd_mod" "thunderbolt" "usb_storage" "xhci_pci"]; - kernelModules = ["kvm-intel"]; kernelPackages = pkgs.linuxPackages_latest; }; - environment.sessionVariables = { - LIBVA_DRIVER_NAME = "iHD"; - VDPAU_DRIVER = "va_gl"; - }; - hardware = { - cpu.intel.updateMicrocode = true; - enableAllFirmware = true; - - opengl = { - enable = true; - driSupport = true; - driSupport32Bit = true; - - extraPackages = with pkgs; [ - intel-media-driver # LIBVA_DRIVER_NAME=iHD - intel-vaapi-driver # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium) - libvdpau-va-gl - ]; - - extraPackages32 = with pkgs.driversi686Linux; [ - intel-media-driver # LIBVA_DRIVER_NAME=iHD - intel-vaapi-driver # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium) - libvdpau-va-gl - ]; - }; - sensor.iio.enable = true; # Enable auto-rotate and tablet mode. }; - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - - # Save power/better manage heat & fans. - powerManagement.powertop.enable = true; - - services = { - fstrim.enable = true; - thermald.enable = true; + ar.hardware = { + cpu.intel = true; + gpu.intel = true; + laptop = true; + ssd = true; }; } diff --git a/hosts/petalburg/home.nix b/hosts/petalburg/home.nix index f16f0c6d..e03c458f 100644 --- a/hosts/petalburg/home.nix +++ b/hosts/petalburg/home.nix @@ -8,7 +8,7 @@ home-manager = { sharedModules = [ { - alyraffauf.desktop.hyprland = { + ar.home.desktop.hyprland = { tabletMode.enable = true; }; wayland.windowManager.hyprland.extraConfig = '' diff --git a/hosts/rustboro/default.nix b/hosts/rustboro/default.nix index d0333d07..78cb4c6e 100644 --- a/hosts/rustboro/default.nix +++ b/hosts/rustboro/default.nix @@ -22,7 +22,7 @@ system.stateVersion = "24.05"; - alyraffauf = { + ar = { base = { enable = true; zramSwap.size = 100; diff --git a/hosts/rustboro/hardware.nix b/hosts/rustboro/hardware.nix index 3b43e8f8..dc995665 100644 --- a/hosts/rustboro/hardware.nix +++ b/hosts/rustboro/hardware.nix @@ -11,57 +11,34 @@ options thinkpad_acpi force_load=1 fan_control=1 ''; - initrd = { - availableKernelModules = ["ahci" "ehci_pci" "i915" "rtsx_pci_sdmmc" "sd_mod" "sr_mod" "usb_storage" "xhci_pci"]; - kernelModules = ["i915"]; - }; - - kernelModules = ["i915" "kvm-intel"]; + initrd.availableKernelModules = [ + "ahci" + "ehci_pci" + "rtsx_pci_sdmmc" + "sd_mod" + "sr_mod" + "usb_storage" + "xhci_pci" + ]; }; - powerManagement = { - cpuFreqGovernor = "ondemand"; # Otherwise, CPU doesn't automatically clock down. - powertop.enable = true; - }; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + powerManagement.cpuFreqGovernor = "ondemand"; # Otherwise, CPU doesn't automatically clock down. hardware = { - cpu.intel.updateMicrocode = true; enableAllFirmware = true; - opengl = { - enable = true; - - driSupport = true; - driSupport32Bit = true; - - extraPackages = with pkgs; [ - intel-media-driver # LIBVA_DRIVER_NAME=iHD - intel-vaapi-driver # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium) - libvdpau-va-gl - ]; - - extraPackages32 = with pkgs.driversi686Linux; [ - intel-media-driver # LIBVA_DRIVER_NAME=iHD - intel-vaapi-driver # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium) - libvdpau-va-gl - ]; - }; - trackpoint = { enable = true; emulateWheel = true; }; }; - environment.sessionVariables = { - LIBVA_DRIVER_NAME = "iHD"; - VDPAU_DRIVER = "va_gl"; - }; + services.fwupd.enable = true; - services = { - fstrim.enable = true; - fwupd.enable = true; + ar.hardware = { + cpu.intel = true; + gpu.intel = true; + laptop = true; + ssd = true; }; } diff --git a/hosts/rustboro/home.nix b/hosts/rustboro/home.nix index 58eab100..a8a00f8c 100644 --- a/hosts/rustboro/home.nix +++ b/hosts/rustboro/home.nix @@ -11,7 +11,7 @@ programs.vscode.userSettings = { "editor.fontSize" = lib.mkForce "16"; }; - alyraffauf = { + ar.home = { services.easyeffects = { enable = true; preset = "LoudnessEqualizer"; diff --git a/nixosModules/apps/firefox/default.nix b/nixosModules/apps/firefox/default.nix index d77ba745..34ed03c6 100644 --- a/nixosModules/apps/firefox/default.nix +++ b/nixosModules/apps/firefox/default.nix @@ -4,7 +4,7 @@ pkgs, ... }: { - config = lib.mkIf config.alyraffauf.apps.firefox.enable { + config = lib.mkIf config.ar.apps.firefox.enable { programs.firefox = { enable = true; policies = { diff --git a/nixosModules/apps/nicotine-plus/default.nix b/nixosModules/apps/nicotine-plus/default.nix index fe30cd13..e04394ea 100644 --- a/nixosModules/apps/nicotine-plus/default.nix +++ b/nixosModules/apps/nicotine-plus/default.nix @@ -4,7 +4,7 @@ config, ... }: { - config = lib.mkIf config.alyraffauf.apps.nicotine-plus.enable { + config = lib.mkIf config.ar.apps.nicotine-plus.enable { environment.systemPackages = [pkgs.nicotine-plus]; networking = { firewall.allowedTCPPortRanges = [ diff --git a/nixosModules/apps/podman/default.nix b/nixosModules/apps/podman/default.nix index b9fdcacb..933668fc 100644 --- a/nixosModules/apps/podman/default.nix +++ b/nixosModules/apps/podman/default.nix @@ -4,7 +4,7 @@ config, ... }: { - config = lib.mkIf config.alyraffauf.apps.podman.enable { + config = lib.mkIf config.ar.apps.podman.enable { virtualisation = { oci-containers = {backend = "podman";}; podman = { diff --git a/nixosModules/apps/steam/default.nix b/nixosModules/apps/steam/default.nix index 51e3e4e6..2aaffa4b 100644 --- a/nixosModules/apps/steam/default.nix +++ b/nixosModules/apps/steam/default.nix @@ -4,10 +4,10 @@ config, ... }: { - config = lib.mkIf config.alyraffauf.apps.steam.enable { + config = lib.mkIf config.ar.apps.steam.enable { hardware.steam-hardware.enable = true; programs = { - gamescope.enable = config.alyraffauf.desktop.steam.enable; + gamescope.enable = config.ar.desktop.steam.enable; steam = { enable = true; @@ -15,7 +15,7 @@ extraCompatPackages = with pkgs; [ proton-ge-bin ]; - gamescopeSession.enable = config.alyraffauf.desktop.steam.enable; + gamescopeSession.enable = config.ar.desktop.steam.enable; localNetworkGameTransfers.openFirewall = true; remotePlay.openFirewall = true; }; diff --git a/nixosModules/apps/virt-manager/default.nix b/nixosModules/apps/virt-manager/default.nix index 13184dd6..f02b1318 100644 --- a/nixosModules/apps/virt-manager/default.nix +++ b/nixosModules/apps/virt-manager/default.nix @@ -4,7 +4,7 @@ config, ... }: { - config = lib.mkIf config.alyraffauf.apps.virt-manager.enable { + config = lib.mkIf config.ar.apps.virt-manager.enable { programs.virt-manager.enable = true; virtualisation = {libvirtd.enable = true;}; diff --git a/nixosModules/base/default.nix b/nixosModules/base/default.nix index b249360d..ba7f2960 100644 --- a/nixosModules/base/default.nix +++ b/nixosModules/base/default.nix @@ -15,7 +15,7 @@ ./zramSwap ]; - config = lib.mkIf config.alyraffauf.base.enable { + config = lib.mkIf config.ar.base.enable { console = { colors = [ "303446" diff --git a/nixosModules/base/networking/default.nix b/nixosModules/base/networking/default.nix index 3b2d8d55..a88d2185 100644 --- a/nixosModules/base/networking/default.nix +++ b/nixosModules/base/networking/default.nix @@ -6,7 +6,7 @@ ... }: { imports = [./sambaAutoMount.nix]; - config = lib.mkIf config.alyraffauf.base.enable { + config = lib.mkIf config.ar.base.enable { age.secrets.wifi.file = ../../../secrets/wifi.age; hardware = { diff --git a/nixosModules/base/networking/sambaAutoMount.nix b/nixosModules/base/networking/sambaAutoMount.nix index ac4e0af7..b8fb5fd4 100644 --- a/nixosModules/base/networking/sambaAutoMount.nix +++ b/nixosModules/base/networking/sambaAutoMount.nix @@ -5,7 +5,7 @@ pkgs, ... }: { - config = lib.mkIf config.alyraffauf.base.sambaAutoMount { + config = lib.mkIf config.ar.base.sambaAutoMount { fileSystems = { "/mnt/Archive" = { device = "//mauville/Archive"; diff --git a/nixosModules/base/nix/default.nix b/nixosModules/base/nix/default.nix index 6aa0b387..0f3002e3 100644 --- a/nixosModules/base/nix/default.nix +++ b/nixosModules/base/nix/default.nix @@ -5,7 +5,7 @@ pkgs, ... }: { - config = lib.mkIf config.alyraffauf.base.enable { + config = lib.mkIf config.ar.base.enable { environment.variables = { FLAKE = "github:alyraffauf/nixcfg"; }; diff --git a/nixosModules/base/nixpkgs/default.nix b/nixosModules/base/nixpkgs/default.nix index d6f4c8a9..d063493c 100644 --- a/nixosModules/base/nixpkgs/default.nix +++ b/nixosModules/base/nixpkgs/default.nix @@ -5,7 +5,7 @@ pkgs, ... }: { - config = lib.mkIf config.alyraffauf.base.enable { + config = lib.mkIf config.ar.base.enable { nixpkgs = let unstable = import inputs.nixpkgsUnstable { system = pkgs.system; diff --git a/nixosModules/base/plymouth/default.nix b/nixosModules/base/plymouth/default.nix index fb662adb..e49d72af 100644 --- a/nixosModules/base/plymouth/default.nix +++ b/nixosModules/base/plymouth/default.nix @@ -5,7 +5,7 @@ pkgs, ... }: { - config = lib.mkIf config.alyraffauf.base.plymouth.enable { + config = lib.mkIf config.ar.base.plymouth.enable { boot = { consoleLogLevel = 0; initrd.verbose = false; diff --git a/nixosModules/base/power-profiles-daemon/default.nix b/nixosModules/base/power-profiles-daemon/default.nix index 049dc662..063875fd 100644 --- a/nixosModules/base/power-profiles-daemon/default.nix +++ b/nixosModules/base/power-profiles-daemon/default.nix @@ -5,7 +5,7 @@ pkgs, ... }: { - config = lib.mkIf config.alyraffauf.base.power-profiles-daemon.enable { + config = lib.mkIf config.ar.base.power-profiles-daemon.enable { services = { power-profiles-daemon.enable = true; upower.enable = true; diff --git a/nixosModules/base/sound/default.nix b/nixosModules/base/sound/default.nix index 68e51a46..014adf5d 100644 --- a/nixosModules/base/sound/default.nix +++ b/nixosModules/base/sound/default.nix @@ -5,7 +5,7 @@ pkgs, ... }: { - config = lib.mkIf config.alyraffauf.base.enable { + config = lib.mkIf config.ar.base.enable { hardware.pulseaudio = { enable = lib.mkForce false; package = pkgs.pulseaudioFull; diff --git a/nixosModules/base/zramSwap/default.nix b/nixosModules/base/zramSwap/default.nix index e0c2bfd2..2cb643af 100644 --- a/nixosModules/base/zramSwap/default.nix +++ b/nixosModules/base/zramSwap/default.nix @@ -4,10 +4,10 @@ pkgs, ... }: { - config = lib.mkIf config.alyraffauf.base.zramSwap.enable { + config = lib.mkIf config.ar.base.zramSwap.enable { zramSwap = { enable = true; - memoryPercent = config.alyraffauf.base.zramSwap.size; + memoryPercent = config.ar.base.zramSwap.size; }; }; } diff --git a/nixosModules/containers/nixos/audiobookshelf/default.nix b/nixosModules/containers/nixos/audiobookshelf/default.nix index 714af8f8..18931f85 100644 --- a/nixosModules/containers/nixos/audiobookshelf/default.nix +++ b/nixosModules/containers/nixos/audiobookshelf/default.nix @@ -4,15 +4,15 @@ config, ... }: { - config = lib.mkIf config.alyraffauf.containers.nixos.audiobookshelf.enable { + config = lib.mkIf config.ar.containers.nixos.audiobookshelf.enable { containers.audiobookshelf = { autoStart = true; bindMounts."/Media" = { - hostPath = config.alyraffauf.containers.nixos.audiobookshelf.mediaDirectory; + hostPath = config.ar.containers.nixos.audiobookshelf.mediaDirectory; isReadOnly = false; }; config = let - port = config.alyraffauf.containers.nixos.audiobookshelf.port; + port = config.ar.containers.nixos.audiobookshelf.port; in { config, diff --git a/nixosModules/containers/nixos/navidrome/default.nix b/nixosModules/containers/nixos/navidrome/default.nix index f558bfbb..0ca7f57f 100644 --- a/nixosModules/containers/nixos/navidrome/default.nix +++ b/nixosModules/containers/nixos/navidrome/default.nix @@ -6,7 +6,7 @@ self, ... }: { - config = lib.mkIf config.alyraffauf.containers.nixos.navidrome.enable { + config = lib.mkIf config.ar.containers.nixos.navidrome.enable { age.secrets.lastFMApiKey.file = ../../../../secrets/lastFM/apiKey.age; age.secrets.lastFMSecret.file = ../../../../secrets/lastFM/secret.age; age.secrets.spotifyClientId.file = ../../../../secrets/spotify/clientId.age; @@ -17,7 +17,7 @@ Address = "0.0.0.0"; DefaultTheme = "Auto"; MusicFolder = "/Music"; - Port = config.alyraffauf.containers.nixos.navidrome.port; + Port = config.ar.containers.nixos.navidrome.port; SubsonicArtistParticipations = true; UIWelcomeMessage = "Welcome to Navidrome @ RaffaufLabs.com"; "Spotify.ID" = "@spotifyClientId@"; @@ -30,7 +30,7 @@ in { autoStart = true; bindMounts = { - "/Music".hostPath = config.alyraffauf.containers.nixos.navidrome.musicDirectory; + "/Music".hostPath = config.ar.containers.nixos.navidrome.musicDirectory; "/var/lib/navidrome/rawNavidrome.json".hostPath = navidromeConfig; "${config.age.secrets.lastFMApiKey.path}".isReadOnly = true; "${config.age.secrets.lastFMSecret.path}".isReadOnly = true; diff --git a/nixosModules/containers/oci/audiobookshelf/default.nix b/nixosModules/containers/oci/audiobookshelf/default.nix index 48cb0b92..b25e9d58 100644 --- a/nixosModules/containers/oci/audiobookshelf/default.nix +++ b/nixosModules/containers/oci/audiobookshelf/default.nix @@ -4,13 +4,13 @@ config, ... }: { - config = lib.mkIf config.alyraffauf.containers.oci.audiobookshelf.enable { + config = lib.mkIf config.ar.containers.oci.audiobookshelf.enable { virtualisation.oci-containers.containers = { audiobookshelf = { - ports = ["0.0.0.0:${toString config.alyraffauf.containers.oci.audiobookshelf.port}:80"]; + ports = ["0.0.0.0:${toString config.ar.containers.oci.audiobookshelf.port}:80"]; image = "ghcr.io/advplyr/audiobookshelf:latest"; environment = {TZ = "America/New_York";}; - volumes = ["abs_config:/config" "abs_metadata:/metadata" "${config.alyraffauf.containers.oci.audiobookshelf.mediaDirectory}:/Media"]; + volumes = ["abs_config:/config" "abs_metadata:/metadata" "${config.ar.containers.oci.audiobookshelf.mediaDirectory}:/Media"]; }; }; }; diff --git a/nixosModules/containers/oci/freshRSS/default.nix b/nixosModules/containers/oci/freshRSS/default.nix index 06f07dd7..5e9173fb 100644 --- a/nixosModules/containers/oci/freshRSS/default.nix +++ b/nixosModules/containers/oci/freshRSS/default.nix @@ -4,10 +4,10 @@ config, ... }: { - config = lib.mkIf config.alyraffauf.containers.oci.freshRSS.enable { + config = lib.mkIf config.ar.containers.oci.freshRSS.enable { virtualisation.oci-containers.containers = { freshrss = { - ports = ["0.0.0.0:${toString config.alyraffauf.containers.oci.freshRSS.port}:80"]; + ports = ["0.0.0.0:${toString config.ar.containers.oci.freshRSS.port}:80"]; image = "freshrss/freshrss:latest"; environment = { TZ = "America/New_York"; diff --git a/nixosModules/containers/oci/jellyfin/default.nix b/nixosModules/containers/oci/jellyfin/default.nix index cc247967..539b995b 100644 --- a/nixosModules/containers/oci/jellyfin/default.nix +++ b/nixosModules/containers/oci/jellyfin/default.nix @@ -4,17 +4,17 @@ config, ... }: { - config = lib.mkIf config.alyraffauf.containers.oci.jellyfin.enable { + config = lib.mkIf config.ar.containers.oci.jellyfin.enable { virtualisation.oci-containers.containers = { jellyfin = { - ports = ["0.0.0.0:${toString config.alyraffauf.containers.oci.jellyfin.port}:8096"]; + ports = ["0.0.0.0:${toString config.ar.containers.oci.jellyfin.port}:8096"]; image = "jellyfin/jellyfin"; environment = {TZ = "America/New_York";}; volumes = [ "jellyfin_config:/config" "jellyfin_cache:/cache" - "${config.alyraffauf.containers.oci.jellyfin.mediaDirectory}:/Media" - "${config.alyraffauf.containers.oci.jellyfin.archiveDirectory}:/Archive" + "${config.ar.containers.oci.jellyfin.mediaDirectory}:/Media" + "${config.ar.containers.oci.jellyfin.archiveDirectory}:/Archive" ]; }; }; diff --git a/nixosModules/containers/oci/plexMediaServer/default.nix b/nixosModules/containers/oci/plexMediaServer/default.nix index dd926ea1..ff348bed 100644 --- a/nixosModules/containers/oci/plexMediaServer/default.nix +++ b/nixosModules/containers/oci/plexMediaServer/default.nix @@ -4,17 +4,17 @@ pkgs, ... }: { - config = lib.mkIf config.alyraffauf.containers.oci.plexMediaServer.enable { + config = lib.mkIf config.ar.containers.oci.plexMediaServer.enable { virtualisation.oci-containers.containers = { plexMediaServer = { - ports = ["0.0.0.0:${toString config.alyraffauf.containers.oci.plexMediaServer.port}:32400"]; + ports = ["0.0.0.0:${toString config.ar.containers.oci.plexMediaServer.port}:32400"]; image = "plexinc/pms-docker:public"; environment = {TZ = "America/New_York";}; volumes = [ "plex_config:/config" "plex_transcode:/transcode" - "${config.alyraffauf.containers.oci.plexMediaServer.mediaDirectory}:/Media" - "${config.alyraffauf.containers.oci.plexMediaServer.archiveDirectory}:/Archive" + "${config.ar.containers.oci.plexMediaServer.mediaDirectory}:/Media" + "${config.ar.containers.oci.plexMediaServer.archiveDirectory}:/Archive" ]; }; }; diff --git a/nixosModules/containers/oci/transmission/default.nix b/nixosModules/containers/oci/transmission/default.nix index 4c489ce9..35d95a94 100644 --- a/nixosModules/containers/oci/transmission/default.nix +++ b/nixosModules/containers/oci/transmission/default.nix @@ -4,10 +4,10 @@ config, ... }: { - config = lib.mkIf config.alyraffauf.containers.oci.transmission.enable { + config = lib.mkIf config.ar.containers.oci.transmission.enable { virtualisation.oci-containers.containers = { transmission = { - ports = ["0.0.0.0:${toString config.alyraffauf.containers.oci.transmission.port}:9091" "0.0.0.0:${toString config.alyraffauf.containers.oci.transmission.bitTorrentPort}:51413"]; + ports = ["0.0.0.0:${toString config.ar.containers.oci.transmission.port}:9091" "0.0.0.0:${toString config.ar.containers.oci.transmission.bitTorrentPort}:51413"]; image = "linuxserver/transmission:latest"; environment = { PGID = "1000"; @@ -16,8 +16,8 @@ }; volumes = [ "transmission_config:/config" - "${config.alyraffauf.containers.oci.transmission.mediaDirectory}:/Media" - "${config.alyraffauf.containers.oci.transmission.archiveDirectory}:/Archive" + "${config.ar.containers.oci.transmission.mediaDirectory}:/Media" + "${config.ar.containers.oci.transmission.archiveDirectory}:/Archive" ]; }; }; diff --git a/nixosModules/desktop/cinnamon/default.nix b/nixosModules/desktop/cinnamon/default.nix index fcb9579d..577a764b 100644 --- a/nixosModules/desktop/cinnamon/default.nix +++ b/nixosModules/desktop/cinnamon/default.nix @@ -4,7 +4,7 @@ config, ... }: { - config = lib.mkIf config.alyraffauf.desktop.cinnamon.enable { + config = lib.mkIf config.ar.desktop.cinnamon.enable { services = { xserver = { enable = true; diff --git a/nixosModules/desktop/default.nix b/nixosModules/desktop/default.nix index 240fc3cb..cee55f3e 100644 --- a/nixosModules/desktop/default.nix +++ b/nixosModules/desktop/default.nix @@ -15,7 +15,7 @@ ./waylandComp.nix ]; - config = lib.mkIf config.alyraffauf.desktop.enable { + config = lib.mkIf config.ar.desktop.enable { environment.sessionVariables.NIXOS_OZONE_WL = "1"; fonts.packages = with pkgs; [ diff --git a/nixosModules/desktop/gnome/default.nix b/nixosModules/desktop/gnome/default.nix index fd2b685a..61614efd 100644 --- a/nixosModules/desktop/gnome/default.nix +++ b/nixosModules/desktop/gnome/default.nix @@ -23,7 +23,7 @@ in { ./fprintdFix.nix ]; - config = lib.mkIf config.alyraffauf.desktop.gnome.enable { + config = lib.mkIf config.ar.desktop.gnome.enable { environment.systemPackages = with pkgs; [ gnomeExtensions.appindicator diff --git a/nixosModules/desktop/gnome/fprintdFix.nix b/nixosModules/desktop/gnome/fprintdFix.nix index 92a5862d..170f39c5 100644 --- a/nixosModules/desktop/gnome/fprintdFix.nix +++ b/nixosModules/desktop/gnome/fprintdFix.nix @@ -4,7 +4,7 @@ config, ... }: { - config = lib.mkIf config.alyraffauf.desktop.gnome.fprintdFix.enable { + config = lib.mkIf config.ar.desktop.gnome.fprintdFix.enable { # Need to change the order pam loads its modules # to get proper fingerprint behavior on GDM and the lockscreen. security.pam.services = { diff --git a/nixosModules/desktop/greetd/default.nix b/nixosModules/desktop/greetd/default.nix index d7a3070c..f6ca52fb 100644 --- a/nixosModules/desktop/greetd/default.nix +++ b/nixosModules/desktop/greetd/default.nix @@ -4,7 +4,7 @@ pkgs, ... }: { - config = lib.mkIf config.alyraffauf.desktop.greetd.enable { + config = lib.mkIf config.ar.desktop.greetd.enable { security.pam.services.greetd = { enableGnomeKeyring = true; gnupg.enable = true; @@ -15,19 +15,19 @@ greetd = { enable = true; settings = - if config.alyraffauf.desktop.greetd.autologin.enable + if config.ar.desktop.greetd.autologin.enable then { default_session = { - command = lib.mkDefault "${lib.getExe pkgs.greetd.tuigreet} --asterisks --user-menu -g 'Welcome to NixOS ${config.system.nixos.release}' --time --remember --cmd ${config.alyraffauf.desktop.greetd.session}"; + command = lib.mkDefault "${lib.getExe pkgs.greetd.tuigreet} --asterisks --user-menu -g 'Welcome to NixOS ${config.system.nixos.release}' --time --remember --cmd ${config.ar.desktop.greetd.session}"; }; initial_session = { - command = config.alyraffauf.desktop.greetd.session; - user = config.alyraffauf.desktop.greetd.autologin.user; + command = config.ar.desktop.greetd.session; + user = config.ar.desktop.greetd.autologin.user; }; } else { default_session = { - command = lib.mkDefault "${lib.getExe pkgs.greetd.tuigreet} --asterisks --user-menu -g 'Welcome to NixOS ${config.system.nixos.release}' --time --remember --cmd ${config.alyraffauf.desktop.greetd.session}"; + command = lib.mkDefault "${lib.getExe pkgs.greetd.tuigreet} --asterisks --user-menu -g 'Welcome to NixOS ${config.system.nixos.release}' --time --remember --cmd ${config.ar.desktop.greetd.session}"; }; }; }; diff --git a/nixosModules/desktop/hyprland/default.nix b/nixosModules/desktop/hyprland/default.nix index 6f232035..11a22efe 100644 --- a/nixosModules/desktop/hyprland/default.nix +++ b/nixosModules/desktop/hyprland/default.nix @@ -4,7 +4,7 @@ pkgs, ... }: { - config = lib.mkIf config.alyraffauf.desktop.hyprland.enable { + config = lib.mkIf config.ar.desktop.hyprland.enable { programs = { hyprland = { enable = true; diff --git a/nixosModules/desktop/lightdm/default.nix b/nixosModules/desktop/lightdm/default.nix index 39cb1471..cfecc6b0 100644 --- a/nixosModules/desktop/lightdm/default.nix +++ b/nixosModules/desktop/lightdm/default.nix @@ -4,7 +4,7 @@ pkgs, ... }: { - config = lib.mkIf config.alyraffauf.desktop.lightdm.enable { + config = lib.mkIf config.ar.desktop.lightdm.enable { security.pam.services.lightdm = { enableGnomeKeyring = true; gnupg.enable = true; diff --git a/nixosModules/desktop/plasma/default.nix b/nixosModules/desktop/plasma/default.nix index b732b419..8d7983d0 100644 --- a/nixosModules/desktop/plasma/default.nix +++ b/nixosModules/desktop/plasma/default.nix @@ -16,7 +16,7 @@ fi ''; in { - config = lib.mkIf config.alyraffauf.desktop.plasma.enable { + config = lib.mkIf config.ar.desktop.plasma.enable { environment.systemPackages = with pkgs; [ kdePackages.kate diff --git a/nixosModules/desktop/sway/default.nix b/nixosModules/desktop/sway/default.nix index 6b0abb55..39ecc7e1 100644 --- a/nixosModules/desktop/sway/default.nix +++ b/nixosModules/desktop/sway/default.nix @@ -5,7 +5,7 @@ config, ... }: { - config = lib.mkIf config.alyraffauf.desktop.sway.enable { + config = lib.mkIf config.ar.desktop.sway.enable { programs = { sway = { enable = true; diff --git a/nixosModules/desktop/waylandComp.nix b/nixosModules/desktop/waylandComp.nix index f3ba37b1..e1ec1b5f 100644 --- a/nixosModules/desktop/waylandComp.nix +++ b/nixosModules/desktop/waylandComp.nix @@ -5,7 +5,7 @@ config, ... }: { - config = lib.mkIf (config.alyraffauf.desktop.hyprland.enable || config.alyraffauf.desktop.sway.enable) { + config = lib.mkIf (config.ar.desktop.hyprland.enable || config.ar.desktop.sway.enable) { programs = { gnupg.agent.pinentryPackage = lib.mkForce pkgs.pinentry-gnome3; }; diff --git a/nixosModules/options.nix b/nixosModules/options.nix index 60c0cf5a..e1292376 100644 --- a/nixosModules/options.nix +++ b/nixosModules/options.nix @@ -6,287 +6,285 @@ self, ... }: { - options = { - alyraffauf = { - apps = { - firefox.enable = lib.mkOption { - description = "Firefox Web Browser."; - default = config.alyraffauf.desktop.enable; - type = lib.types.bool; - }; - nicotine-plus.enable = - lib.mkEnableOption "Nicotine+ Soulseek client."; - podman.enable = - lib.mkEnableOption "Podman for OCI container support."; - steam.enable = lib.mkOption { - description = "Valve's Steam for video games."; - default = config.alyraffauf.desktop.steam.enable; - type = lib.types.bool; - }; - virt-manager.enable = - lib.mkEnableOption "Virt-manager for virtual machines with TPM and EFI support."; - }; - - containers = { - nixos = { - audiobookshelf = { - enable = - lib.mkEnableOption "audiobookshelf audiobook and podcast server in NixOS container."; - mediaDirectory = lib.mkOption { - description = "Media directory for audiobookshelf."; - default = "/mnt/Media"; - type = lib.types.str; - }; - port = lib.mkOption { - description = "Port for audiobookshelf."; - default = 13378; - type = lib.types.int; - }; - }; - navidrome = { - enable = - lib.mkEnableOption "Navidrome music server in NixOS container."; - musicDirectory = lib.mkOption { - description = "Music directory for Navidrome."; - default = "/mnt/Media/Music"; - type = lib.types.str; - }; - port = lib.mkOption { - description = "Port for Navidrome."; - default = 4533; - type = lib.types.int; - }; - }; - }; - oci = { - audiobookshelf = { - enable = - lib.mkEnableOption "audiobookshelf podcast and audiobook server in OCI container."; - mediaDirectory = lib.mkOption { - description = "Media directory for audiobookshelf."; - default = "/mnt/Media"; - type = lib.types.str; - }; - port = lib.mkOption { - description = "Port for audiobookshelf."; - default = 13378; - type = lib.types.int; - }; - }; - freshRSS = { - enable = - lib.mkEnableOption "FreshRSS news client in OCI container."; - port = lib.mkOption { - description = "Port for FreshRSS."; - default = 8080; - type = lib.types.int; - }; - }; - jellyfin = { - enable = - lib.mkEnableOption "Jellyfin media server in OCI container."; - archiveDirectory = lib.mkOption { - description = "Archive directory for Jellyfin."; - default = "/mnt/Archive"; - type = lib.types.str; - }; - mediaDirectory = lib.mkOption { - description = "Media directory for Jellyfin."; - default = "/mnt/Media"; - type = lib.types.str; - }; - port = lib.mkOption { - description = "Port for Jellyfin."; - default = 8096; - type = lib.types.int; - }; - }; - plexMediaServer = { - enable = - lib.mkEnableOption "Plex Media Server in OCI container."; - archiveDirectory = lib.mkOption { - description = "Archive directory for Plex Media Server."; - default = "/mnt/Archive"; - type = lib.types.str; - }; - mediaDirectory = lib.mkOption { - description = "Media directory for Plex Media Server."; - default = "/mnt/Media"; - type = lib.types.str; - }; - port = lib.mkOption { - description = "Port for Plex Media Server."; - default = 32400; - type = lib.types.int; - }; - }; - transmission = { - enable = - lib.mkEnableOption "Transmission Bittorrent client in OCI container."; - archiveDirectory = lib.mkOption { - description = "Archive directory for Transmission."; - default = "/mnt/Archive"; - type = lib.types.str; - }; - bitTorrentPort = lib.mkOption { - description = "Port for BitTorrent p2p services.."; - default = 5143; - type = lib.types.int; - }; - mediaDirectory = lib.mkOption { - description = "Media directory for Transmission."; - default = "/mnt/Media"; - type = lib.types.str; - }; - port = lib.mkOption { - description = "Port for Transmission."; - default = 9091; - type = lib.types.int; - }; - }; - }; - }; - desktop = { - enable = - lib.mkEnableOption "Enable basic GUI X11 and Wayland environment."; - cinnamon.enable = - lib.mkEnableOption "Cinnamon desktop session."; - gnome = { - enable = - lib.mkEnableOption "GNOME desktop session."; - fprintdFix.enable = - lib.mkEnableOption - "Fix fprintd & pam issues with GNOME Display Manager."; - }; - greetd = { - enable = - lib.mkEnableOption "Greetd display manager."; - - autologin = { - enable = lib.mkOption { - description = "Whether to enable autologin."; - default = false; - type = lib.types.bool; - }; - user = lib.mkOption { - description = "User to autologin."; - default = "aly"; - type = lib.types.str; - }; - }; - session = lib.mkOption { - description = "Default command to execute on login."; - default = lib.getExe config.programs.hyprland.package; - type = lib.types.str; - }; - }; - hyprland.enable = - lib.mkEnableOption "Hyprland wayland session."; - lightdm.enable = - lib.mkEnableOption - "Lightdm and slick greeter with Catppuccin theme."; - plasma.enable = - lib.mkEnableOption "Plasma desktop session."; - steam.enable = - lib.mkEnableOption "Steam + Gamescope session."; - sway.enable = - lib.mkEnableOption "Sway wayland session."; - }; - scripts.hoenn.enable = lib.mkOption { - description = "Hoenn system configuration script"; - default = config.alyraffauf.base.enable; + options.ar = { + apps = { + firefox.enable = lib.mkOption { + description = "Firefox Web Browser."; + default = config.ar.desktop.enable; type = lib.types.bool; }; - services = { - binaryCache.enable = lib.mkEnableOption "nixpkgs cache server."; - flatpak.enable = - lib.mkEnableOption "Flatpak support with GUI."; - ollama = { - enable = lib.mkEnableOption "Ollama interface for LLMs."; - listenAddress = lib.mkOption { - description = "Listen Address for Ollama."; - default = "127.0.0.1:11434"; - type = lib.types.str; - }; - gpu = lib.mkOption { - description = "Type of GPU for enabling GPU acceleration."; - default = null; - type = lib.types.str; - }; - }; - syncthing = { - enable = lib.mkEnableOption "Syncthing sync service."; - user = lib.mkOption { - description = "Specify user Syncthing runs as."; - default = "aly"; - type = lib.types.str; - }; - syncMusic = lib.mkOption { - description = "Whether to sync music folder."; - default = config.alyraffauf.services.syncthing.enable; - type = lib.types.bool; - }; - musicPath = lib.mkOption { - description = "Whether to sync music folder."; - default = "/home/${config.alyraffauf.services.syncthing.user}/music"; - type = lib.types.str; - }; - }; - tailscale.enable = lib.mkEnableOption "Tailscale WireGuard VPN."; + nicotine-plus.enable = + lib.mkEnableOption "Nicotine+ Soulseek client."; + podman.enable = + lib.mkEnableOption "Podman for OCI container support."; + steam.enable = lib.mkOption { + description = "Valve's Steam for video games."; + default = config.ar.desktop.steam.enable; + type = lib.types.bool; }; - base = { - enable = - lib.mkEnableOption "Basic system configuration and sane defaults."; - sambaAutoMount = lib.mkOption { - description = "Automounting of mauville Samba Shares."; - default = - config.alyraffauf.services.tailscale.enable && !(config.networking.hostName == "mauville"); - type = lib.types.bool; - }; - plymouth.enable = lib.mkOption { - description = "Plymouth boot screen with catppuccin theme."; - default = config.alyraffauf.base.enable; - type = lib.types.bool; - }; - power-profiles-daemon.enable = lib.mkOption { - description = "Power Profiles Daemon for power management."; - default = config.alyraffauf.base.enable; - type = lib.types.bool; - }; - zramSwap = { - enable = lib.mkOption { - description = "zram swap."; - default = config.alyraffauf.base.enable; - type = lib.types.bool; + virt-manager.enable = + lib.mkEnableOption "Virt-manager for virtual machines with TPM and EFI support."; + }; + + containers = { + nixos = { + audiobookshelf = { + enable = + lib.mkEnableOption "audiobookshelf audiobook and podcast server in NixOS container."; + mediaDirectory = lib.mkOption { + description = "Media directory for audiobookshelf."; + default = "/mnt/Media"; + type = lib.types.str; }; - size = lib.mkOption { - description = "Percent size of the zram swap relative to RAM."; - default = 50; + port = lib.mkOption { + description = "Port for audiobookshelf."; + default = 13378; + type = lib.types.int; + }; + }; + navidrome = { + enable = + lib.mkEnableOption "Navidrome music server in NixOS container."; + musicDirectory = lib.mkOption { + description = "Music directory for Navidrome."; + default = "/mnt/Media/Music"; + type = lib.types.str; + }; + port = lib.mkOption { + description = "Port for Navidrome."; + default = 4533; type = lib.types.int; }; }; }; - users = { - aly = { - enable = lib.mkEnableOption "Aly's user."; - password = lib.mkOption { - description = "Hashed password for aly."; + oci = { + audiobookshelf = { + enable = + lib.mkEnableOption "audiobookshelf podcast and audiobook server in OCI container."; + mediaDirectory = lib.mkOption { + description = "Media directory for audiobookshelf."; + default = "/mnt/Media"; + type = lib.types.str; + }; + port = lib.mkOption { + description = "Port for audiobookshelf."; + default = 13378; + type = lib.types.int; + }; + }; + freshRSS = { + enable = + lib.mkEnableOption "FreshRSS news client in OCI container."; + port = lib.mkOption { + description = "Port for FreshRSS."; + default = 8080; + type = lib.types.int; + }; + }; + jellyfin = { + enable = + lib.mkEnableOption "Jellyfin media server in OCI container."; + archiveDirectory = lib.mkOption { + description = "Archive directory for Jellyfin."; + default = "/mnt/Archive"; + type = lib.types.str; + }; + mediaDirectory = lib.mkOption { + description = "Media directory for Jellyfin."; + default = "/mnt/Media"; + type = lib.types.str; + }; + port = lib.mkOption { + description = "Port for Jellyfin."; + default = 8096; + type = lib.types.int; + }; + }; + plexMediaServer = { + enable = + lib.mkEnableOption "Plex Media Server in OCI container."; + archiveDirectory = lib.mkOption { + description = "Archive directory for Plex Media Server."; + default = "/mnt/Archive"; + type = lib.types.str; + }; + mediaDirectory = lib.mkOption { + description = "Media directory for Plex Media Server."; + default = "/mnt/Media"; + type = lib.types.str; + }; + port = lib.mkOption { + description = "Port for Plex Media Server."; + default = 32400; + type = lib.types.int; + }; + }; + transmission = { + enable = + lib.mkEnableOption "Transmission Bittorrent client in OCI container."; + archiveDirectory = lib.mkOption { + description = "Archive directory for Transmission."; + default = "/mnt/Archive"; + type = lib.types.str; + }; + bitTorrentPort = lib.mkOption { + description = "Port for BitTorrent p2p services.."; + default = 5143; + type = lib.types.int; + }; + mediaDirectory = lib.mkOption { + description = "Media directory for Transmission."; + default = "/mnt/Media"; + type = lib.types.str; + }; + port = lib.mkOption { + description = "Port for Transmission."; + default = 9091; + type = lib.types.int; + }; + }; + }; + }; + desktop = { + enable = + lib.mkEnableOption "Enable basic GUI X11 and Wayland environment."; + cinnamon.enable = + lib.mkEnableOption "Cinnamon desktop session."; + gnome = { + enable = + lib.mkEnableOption "GNOME desktop session."; + fprintdFix.enable = + lib.mkEnableOption + "Fix fprintd & pam issues with GNOME Display Manager."; + }; + greetd = { + enable = + lib.mkEnableOption "Greetd display manager."; + + autologin = { + enable = lib.mkOption { + description = "Whether to enable autologin."; + default = false; + type = lib.types.bool; + }; + user = lib.mkOption { + description = "User to autologin."; + default = "aly"; type = lib.types.str; }; }; - dustin = { - enable = lib.mkEnableOption "Dustin's user."; - password = lib.mkOption { - description = "Hashed password for dustin."; - type = lib.types.str; - }; + session = lib.mkOption { + description = "Default command to execute on login."; + default = lib.getExe config.programs.hyprland.package; + type = lib.types.str; }; - morgan = { - enable = lib.mkEnableOption "Morgan's user."; - password = lib.mkOption { - description = "Hashed password for morgan."; - type = lib.types.str; - }; + }; + hyprland.enable = + lib.mkEnableOption "Hyprland wayland session."; + lightdm.enable = + lib.mkEnableOption + "Lightdm and slick greeter with Catppuccin theme."; + plasma.enable = + lib.mkEnableOption "Plasma desktop session."; + steam.enable = + lib.mkEnableOption "Steam + Gamescope session."; + sway.enable = + lib.mkEnableOption "Sway wayland session."; + }; + scripts.hoenn.enable = lib.mkOption { + description = "Hoenn system configuration script"; + default = config.ar.base.enable; + type = lib.types.bool; + }; + services = { + binaryCache.enable = lib.mkEnableOption "nixpkgs cache server."; + flatpak.enable = + lib.mkEnableOption "Flatpak support with GUI."; + ollama = { + enable = lib.mkEnableOption "Ollama interface for LLMs."; + listenAddress = lib.mkOption { + description = "Listen Address for Ollama."; + default = "127.0.0.1:11434"; + type = lib.types.str; + }; + gpu = lib.mkOption { + description = "Type of GPU for enabling GPU acceleration."; + default = null; + type = lib.types.str; + }; + }; + syncthing = { + enable = lib.mkEnableOption "Syncthing sync service."; + user = lib.mkOption { + description = "Specify user Syncthing runs as."; + default = "aly"; + type = lib.types.str; + }; + syncMusic = lib.mkOption { + description = "Whether to sync music folder."; + default = config.ar.services.syncthing.enable; + type = lib.types.bool; + }; + musicPath = lib.mkOption { + description = "Whether to sync music folder."; + default = "/home/${config.ar.services.syncthing.user}/music"; + type = lib.types.str; + }; + }; + tailscale.enable = lib.mkEnableOption "Tailscale WireGuard VPN."; + }; + base = { + enable = + lib.mkEnableOption "Basic system configuration and sane defaults."; + sambaAutoMount = lib.mkOption { + description = "Automounting of mauville Samba Shares."; + default = + config.ar.services.tailscale.enable && !(config.networking.hostName == "mauville"); + type = lib.types.bool; + }; + plymouth.enable = lib.mkOption { + description = "Plymouth boot screen with catppuccin theme."; + default = config.ar.base.enable; + type = lib.types.bool; + }; + power-profiles-daemon.enable = lib.mkOption { + description = "Power Profiles Daemon for power management."; + default = config.ar.base.enable; + type = lib.types.bool; + }; + zramSwap = { + enable = lib.mkOption { + description = "zram swap."; + default = config.ar.base.enable; + type = lib.types.bool; + }; + size = lib.mkOption { + description = "Percent size of the zram swap relative to RAM."; + default = 50; + type = lib.types.int; + }; + }; + }; + users = { + aly = { + enable = lib.mkEnableOption "Aly's user."; + password = lib.mkOption { + description = "Hashed password for aly."; + type = lib.types.str; + }; + }; + dustin = { + enable = lib.mkEnableOption "Dustin's user."; + password = lib.mkOption { + description = "Hashed password for dustin."; + type = lib.types.str; + }; + }; + morgan = { + enable = lib.mkEnableOption "Morgan's user."; + password = lib.mkOption { + description = "Hashed password for morgan."; + type = lib.types.str; }; }; }; diff --git a/nixosModules/scripts/hoenn/default.nix b/nixosModules/scripts/hoenn/default.nix index d51c4e21..0797c228 100644 --- a/nixosModules/scripts/hoenn/default.nix +++ b/nixosModules/scripts/hoenn/default.nix @@ -4,7 +4,7 @@ config, ... }: { - config = lib.mkIf config.alyraffauf.scripts.hoenn.enable { + config = lib.mkIf config.ar.scripts.hoenn.enable { environment.systemPackages = [ (pkgs.writeShellScriptBin "hoenn" '' FLAKE=''${2:-"github:alyraffauf/nixcfg"} diff --git a/nixosModules/services/binaryCache/default.nix b/nixosModules/services/binaryCache/default.nix index 5db6f55a..3369bbf1 100644 --- a/nixosModules/services/binaryCache/default.nix +++ b/nixosModules/services/binaryCache/default.nix @@ -4,7 +4,7 @@ config, ... }: { - config = lib.mkIf config.alyraffauf.services.binaryCache.enable { + config = lib.mkIf config.ar.services.binaryCache.enable { services.nix-serve = { enable = true; secretKeyFile = "/var/cache-priv-key.pem"; diff --git a/nixosModules/services/flatpak/default.nix b/nixosModules/services/flatpak/default.nix index 84a0b646..10e44518 100644 --- a/nixosModules/services/flatpak/default.nix +++ b/nixosModules/services/flatpak/default.nix @@ -4,7 +4,7 @@ config, ... }: { - config = lib.mkIf config.alyraffauf.services.flatpak.enable { + config = lib.mkIf config.ar.services.flatpak.enable { environment.systemPackages = with pkgs; [gnome.gnome-software]; fileSystems = let diff --git a/nixosModules/services/ollama/default.nix b/nixosModules/services/ollama/default.nix index 1ba30bd6..01162272 100644 --- a/nixosModules/services/ollama/default.nix +++ b/nixosModules/services/ollama/default.nix @@ -4,16 +4,16 @@ config, ... }: { - config = lib.mkIf config.alyraffauf.services.ollama.enable { + config = lib.mkIf config.ar.services.ollama.enable { services.ollama = { enable = true; acceleration = - if config.alyraffauf.services.ollama.gpu == "amd" + if config.ar.services.ollama.gpu == "amd" then "rocm" - else if config.alyraffauf.services.ollama.gpu == "nvidia" + else if config.ar.services.ollama.gpu == "nvidia" then "cuda" else null; - listenAddress = config.alyraffauf.services.ollama.listenAddress; + listenAddress = config.ar.services.ollama.listenAddress; }; }; } diff --git a/nixosModules/services/syncthing/default.nix b/nixosModules/services/syncthing/default.nix index 8f55be3a..9b75d7cb 100644 --- a/nixosModules/services/syncthing/default.nix +++ b/nixosModules/services/syncthing/default.nix @@ -6,7 +6,7 @@ }: { imports = [./syncMusic.nix]; - config = lib.mkIf config.alyraffauf.services.syncthing.enable { + config = lib.mkIf config.ar.services.syncthing.enable { age.secrets = { syncthingCert.file = ../../../secrets/syncthing + "/${config.networking.hostName}/cert.age"; syncthingKey.file = ../../../secrets/syncthing + "/${config.networking.hostName}/key.age"; @@ -17,10 +17,10 @@ services.syncthing = { enable = true; cert = config.age.secrets.syncthingCert.path; - dataDir = "/home/${config.alyraffauf.services.syncthing.user}"; + dataDir = "/home/${config.ar.services.syncthing.user}"; key = config.age.secrets.syncthingKey.path; openDefaultPorts = true; - user = config.alyraffauf.services.syncthing.user; + user = config.ar.services.syncthing.user; settings = { options = { localAnnounceEnabled = true; @@ -43,7 +43,7 @@ folders = { "sync" = { id = "default"; - path = "/home/${config.alyraffauf.services.syncthing.user}/sync"; + path = "/home/${config.ar.services.syncthing.user}/sync"; devices = ["brawly" "fallarbor" "gsgmba" "iphone12" "lavaridge" "mauville" "petalburg" "rustboro" "mossdeep" "wallace" "winona"]; versioning = { type = "staggered"; @@ -55,7 +55,7 @@ }; "camera" = { id = "fcsgh-dlxys"; - path = "/home/${config.alyraffauf.services.syncthing.user}/pics/camera"; + path = "/home/${config.ar.services.syncthing.user}/pics/camera"; devices = ["brawly" "fallarbor" "lavaridge" "mauville" "petalburg" "rustboro" "wallace" "winona"]; versioning = { params.cleanoutDays = "5"; @@ -64,7 +64,7 @@ }; "screenshots" = { id = "screenshots"; - path = "/home/${config.alyraffauf.services.syncthing.user}/pics/screenshots"; + path = "/home/${config.ar.services.syncthing.user}/pics/screenshots"; devices = ["brawly" "fallarbor" "lavaridge" "mauville" "petalburg" "rustboro" "wallace" "winona"]; versioning = { params.cleanoutDays = "5"; diff --git a/nixosModules/services/syncthing/syncMusic.nix b/nixosModules/services/syncthing/syncMusic.nix index a65c29bc..5d87832c 100644 --- a/nixosModules/services/syncthing/syncMusic.nix +++ b/nixosModules/services/syncthing/syncMusic.nix @@ -4,13 +4,13 @@ config, ... }: { - config = lib.mkIf config.alyraffauf.services.syncthing.syncMusic { + config = lib.mkIf config.ar.services.syncthing.syncMusic { services.syncthing = { settings = { folders = { "music" = { id = "6nzmu-z9der"; - path = config.alyraffauf.services.syncthing.musicPath; + path = config.ar.services.syncthing.musicPath; devices = ["lavaridge" "mauville" "petalburg" "rustboro" "wallace"]; }; }; diff --git a/nixosModules/services/tailscale/default.nix b/nixosModules/services/tailscale/default.nix index 357794b9..5e697f2d 100644 --- a/nixosModules/services/tailscale/default.nix +++ b/nixosModules/services/tailscale/default.nix @@ -4,7 +4,7 @@ config, ... }: { - config = lib.mkIf config.alyraffauf.services.tailscale.enable { + config = lib.mkIf config.ar.services.tailscale.enable { age.secrets.tailscaleAuthKey.file = ../../../secrets/tailscale/authKeyFile.age; services.tailscale = { enable = true; diff --git a/nixosModules/users/aly/default.nix b/nixosModules/users/aly/default.nix index ab4dc581..9aad36bf 100644 --- a/nixosModules/users/aly/default.nix +++ b/nixosModules/users/aly/default.nix @@ -5,11 +5,11 @@ config, ... }: { - config = lib.mkIf config.alyraffauf.users.aly.enable { + config = lib.mkIf config.ar.users.aly.enable { users.users.aly = { description = "Aly Raffauf"; extraGroups = ["networkmanager" "wheel" "docker" "libvirtd" "video"]; - hashedPassword = config.alyraffauf.users.aly.password; + hashedPassword = config.ar.users.aly.password; isNormalUser = true; linger = true; uid = 1000; diff --git a/nixosModules/users/dustin/default.nix b/nixosModules/users/dustin/default.nix index 578760f4..2f8bbeba 100644 --- a/nixosModules/users/dustin/default.nix +++ b/nixosModules/users/dustin/default.nix @@ -5,11 +5,11 @@ config, ... }: { - config = lib.mkIf config.alyraffauf.users.dustin.enable { + config = lib.mkIf config.ar.users.dustin.enable { users.users.dustin = { description = "Dustin Raffauf"; extraGroups = ["networkmanager" "wheel" "docker" "libvirtd" "video"]; - hashedPassword = config.alyraffauf.users.dustin.password; + hashedPassword = config.ar.users.dustin.password; isNormalUser = true; uid = 1001; }; diff --git a/nixosModules/users/morgan/default.nix b/nixosModules/users/morgan/default.nix index 31649251..751f66c2 100644 --- a/nixosModules/users/morgan/default.nix +++ b/nixosModules/users/morgan/default.nix @@ -5,11 +5,11 @@ config, ... }: { - config = lib.mkIf config.alyraffauf.users.morgan.enable { + config = lib.mkIf config.ar.users.morgan.enable { users.users.morgan = { description = "Morgan Tamayo"; extraGroups = ["networkmanager" "wheel" "docker" "libvirtd" "video"]; - hashedPassword = config.alyraffauf.users.morgan.password; + hashedPassword = config.ar.users.morgan.password; isNormalUser = true; uid = 1002; };