diff --git a/frame12/default.nix b/frame12/default.nix index fe19f25..613d4aa 100644 --- a/frame12/default.nix +++ b/frame12/default.nix @@ -18,6 +18,7 @@ hostName = hostName; fullName = fullName; de = desktop; + flakePath = "/home/${userName}/nixos"; }; # Limit the number of generations to keep diff --git a/frame12/desktop-configuration.nix b/frame12/desktop-configuration.nix index 6567af7..24f6717 100644 --- a/frame12/desktop-configuration.nix +++ b/frame12/desktop-configuration.nix @@ -33,6 +33,10 @@ in default = "User"; description = "Full display name for the user"; }; + flakePath = lib.mkOption { + type = lib.types.str; + description = "Absolute path to the NixOS flake configuration directory"; + }; }; imports = [ @@ -101,8 +105,10 @@ in dark = "Papirus-Dark"; }; - # Keep custom Framework plymouth theme - targets.plymouth.enable = false; + targets = { + # Keep custom Framework plymouth theme + plymouth.enable = false; + }; }; nixpkgs.overlays = [ diff --git a/frame12/modules/home-manager/home.nix b/frame12/modules/home-manager/home.nix index 25ca371..3b950c6 100644 --- a/frame12/modules/home-manager/home.nix +++ b/frame12/modules/home-manager/home.nix @@ -3,6 +3,7 @@ config, pkgs, lib, + osConfig, ... }: let @@ -46,7 +47,16 @@ in }; # Stylix auto-theming - applies to all programs..enable apps - stylix.autoEnable = true; + stylix = { + autoEnable = true; + + # Must tell which profile + targets.firefox = { + profileNames = [ "default" ]; + colorTheme.enable = true; # use firefox color + firefoxGnomeTheme.enable = true; + }; + }; # Enable niri home configuration nirihome = { @@ -257,7 +267,8 @@ in # Active symlinks xdg.configFile = { # Active linked dotfiles - "niri".source = config.lib.file.mkOutOfStoreSymlink "/home/nate/nixos/frame12/linked-dotfiles/niri"; + "niri".source = + config.lib.file.mkOutOfStoreSymlink "${osConfig.deskCfg.flakePath}/frame12/linked-dotfiles/niri"; }; # Override Flatpak Steam to disable GPU acceleration (fixes black window on Niri) diff --git a/jaci/default.nix b/jaci/default.nix index 1127958..0624558 100644 --- a/jaci/default.nix +++ b/jaci/default.nix @@ -20,6 +20,7 @@ fullName = fullName; de = desktop; installGaming = gaming; + flakePath = "/home/${userName}/nixos"; }; # Limit the number of generations to keep diff --git a/jaci/desktop-configuration.nix b/jaci/desktop-configuration.nix index 35cd2fe..eb9bf67 100644 --- a/jaci/desktop-configuration.nix +++ b/jaci/desktop-configuration.nix @@ -38,6 +38,10 @@ in default = true; description = "Whether to install gaming software or not"; }; + flakePath = lib.mkOption { + type = lib.types.str; + description = "Absolute path to the NixOS flake configuration directory"; + }; }; imports = [ @@ -103,8 +107,10 @@ in dark = "Reversal"; }; - # Disable plymouth styling (use default) - targets.plymouth.enable = false; + targets = { + # Disable plymouth styling (use custom) + plymouth.enable = false; + }; }; nixpkgs.overlays = [ @@ -125,7 +131,7 @@ in boot = { plymouth = { enable = true; - theme = "kiki-pixel"; # Options: "kiki" or "kiki-pixel" (pixel art) + theme = "kiki-pixel"; # Options: "kiki" or "kiki-pixel" (pixel art) themePackages = [ (pkgs.runCommand "plymouth-kiki-theme" { } '' mkdir -p $out/share/plymouth/themes/kiki @@ -186,7 +192,7 @@ in power_manager = { enable = true; - backend = "power-profiles-daemon"; # Required for Noctalia power profile widget + backend = "power-profiles-daemon"; # Required for Noctalia power profile widget }; # Enable Noctalia shell system services diff --git a/jaci/modules/home-manager/home.nix b/jaci/modules/home-manager/home.nix index 35330ed..b3f045f 100644 --- a/jaci/modules/home-manager/home.nix +++ b/jaci/modules/home-manager/home.nix @@ -4,6 +4,7 @@ pkgs, lib, unstablePkgs, + osConfig, ... }: let @@ -37,7 +38,16 @@ in fonts.fontconfig.enable = true; # Stylix auto-theming - applies to all programs..enable apps - stylix.autoEnable = true; + stylix = { + autoEnable = true; + targets.firefox = { + profileNames = [ + "default" + ]; + colorTheme.enable = true; # use firefox color + firefoxGnomeTheme.enable = true; + }; + }; # Enable niri home configuration nirihome = { @@ -137,7 +147,7 @@ in # Active symlinks for live-edited config xdg.configFile = { "niri".source = - config.lib.file.mkOutOfStoreSymlink "/home/${userName}/nixos/jaci/linked-dotfiles/niri"; + config.lib.file.mkOutOfStoreSymlink "${osConfig.deskCfg.flakePath}/jaci/linked-dotfiles/niri"; }; # Override Flatpak Steam to disable GPU acceleration (fixes black window on Niri) diff --git a/luci/default.nix b/luci/default.nix index 2be63ef..bde970a 100644 --- a/luci/default.nix +++ b/luci/default.nix @@ -23,6 +23,7 @@ nfsIpExport = "192.168.1.1/24"; syncthingEnable = true; caldavEnable = true; + flakePath = "/home/${userName}/nixos"; }; # deskCfg = { diff --git a/nate-work/default.nix b/nate-work/default.nix index fabbd87..f5cf044 100644 --- a/nate-work/default.nix +++ b/nate-work/default.nix @@ -20,6 +20,7 @@ fullName = fullName; de = desktop; installGaming = gaming; + flakePath = "/home/${userName}/nixos"; }; # Limit the number of generations to keep @@ -62,6 +63,8 @@ autoCfg = { userName = userName; + flakePath = "/home/${userName}/nixos"; + hostName = hostName; }; services.clamav.daemon.enable = true; diff --git a/nate-work/desktop-configuration.nix b/nate-work/desktop-configuration.nix index 3a76c92..c49f9f9 100644 --- a/nate-work/desktop-configuration.nix +++ b/nate-work/desktop-configuration.nix @@ -1,49 +1,66 @@ -{ config, lib, inputs, outputs, pkgs, timeZone, system, ... }: +{ + config, + lib, + inputs, + outputs, + pkgs, + timeZone, + system, + ... +}: let - supportedDesktops = [ "sway" "hyprland" "niri" ]; + supportedDesktops = [ + "sway" + "hyprland" + "niri" + ]; supportedDesktopsStr = lib.strings.concatStringsSep ", " supportedDesktops; deskCfg = config.deskCfg; in { options.deskCfg = { - de = lib.mkOption { - default = "niri"; - type = lib.types.str; - description = "Desktop Environment"; - }; - userName = lib.mkOption { - type = lib.types.str; - description = "Main username for system"; - }; - hostName = lib.mkOption { - type = lib.types.str; - description = "Hostname for system"; - }; - fullName = lib.mkOption { - type = lib.types.str; - default = "User"; - description = "Full display name for the user"; - }; - installGaming = lib.mkOption { - type = lib.types.bool; - default = true; - description = "Whether to install gaming software or not"; - }; + de = lib.mkOption { + default = "niri"; + type = lib.types.str; + description = "Desktop Environment"; + }; + userName = lib.mkOption { + type = lib.types.str; + description = "Main username for system"; + }; + hostName = lib.mkOption { + type = lib.types.str; + description = "Hostname for system"; + }; + fullName = lib.mkOption { + type = lib.types.str; + default = "User"; + description = "Full display name for the user"; + }; + installGaming = lib.mkOption { + type = lib.types.bool; + default = true; + description = "Whether to install gaming software or not"; + }; + flakePath = lib.mkOption { + type = lib.types.str; + description = "Absolute path to the NixOS flake configuration directory"; + }; }; - imports = [ - ../shared/modules/user/main_user.nix - modules/sway/sway_conf.nix - modules/hypr/hyprland.nix - modules/niri/niri_conf.nix - ../shared/modules/system/power_manager.nix - ../shared/modules/system/noctalia-system.nix - ../shared/modules/services/motu-m4-combined.nix - # ../shared/modules/services/theme_switcher/default.nix - # inputs.nur.hmModules.nur - ]; + imports = [ + ../shared/modules/user/main_user.nix + modules/sway/sway_conf.nix + modules/hypr/hyprland.nix + modules/niri/niri_conf.nix + ../shared/modules/system/power_manager.nix + ../shared/modules/system/noctalia-system.nix + ../shared/modules/services/motu-m4-combined.nix + # ../shared/modules/services/theme_switcher/default.nix + # inputs.nur.hmModules.nur + ]; - config = { + config = { assertions = [ { assertion = builtins.elem deskCfg.de supportedDesktops; @@ -100,28 +117,30 @@ in dark = "Papirus-Dark"; }; - # Let plymouth use its own theme - targets.plymouth.enable = false; + targets = { + # Let plymouth use its own theme + plymouth.enable = false; + }; }; - + nixpkgs.overlays = [ inputs.nur.overlays.default ]; - - + # Enable flakes feature nix.settings.experimental-features = [ - "nix-command" "flakes" + "nix-command" + "flakes" ]; - + # Use the systemd-boot EFI boot loader. boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; # boot.plymouth.enable = true; - + networking.hostName = deskCfg.hostName; # Define your hostname. - networking.networkmanager.enable = true; # Easiest to use and most distros use this by default. - + networking.networkmanager.enable = true; # Easiest to use and most distros use this by default. + time.timeZone = timeZone; hardware.sane = { @@ -131,7 +150,7 @@ in power_manager = { enable = true; - backend = "power-profiles-daemon"; # Required for Noctalia power profile widget + backend = "power-profiles-daemon"; # Required for Noctalia power profile widget }; # Enable Noctalia shell system services @@ -142,16 +161,23 @@ in userName = deskCfg.userName; fullName = deskCfg.fullName; isDesktopUser = true; - extraGroups = [ "dialout" "docker" "i2c" "lp" "scanner" "syncthing" ]; + extraGroups = [ + "dialout" + "docker" + "i2c" + "lp" + "scanner" + "syncthing" + ]; }; - + swaywm = { - enable = false; - useNonFree = true; - installGaming = deskCfg.installGaming; - systemPackages = with pkgs; [ - libreoffice - ]; + enable = false; + useNonFree = true; + installGaming = deskCfg.installGaming; + systemPackages = with pkgs; [ + libreoffice + ]; }; hypr = { @@ -175,8 +201,7 @@ in enable = true; user = deskCfg.userName; }; - + system.stateVersion = "23.11"; # Did you read the comment? }; } - diff --git a/nate-work/modules/home-manager/home.nix b/nate-work/modules/home-manager/home.nix index f2c62fb..8bdf458 100644 --- a/nate-work/modules/home-manager/home.nix +++ b/nate-work/modules/home-manager/home.nix @@ -3,6 +3,7 @@ config, pkgs, lib, + osConfig, ... }: let @@ -35,7 +36,15 @@ in home.stateVersion = "23.11"; # Please read the comment before changing. # Stylix auto-theming - applies to all programs..enable apps - stylix.autoEnable = true; + stylix = { + autoEnable = true; + # Must tell which profile + targets.firefox = { + profileNames = [ "default" ]; + colorTheme.enable = true; # use firefox color + firefoxGnomeTheme.enable = true; + }; + }; # Enable shared modules firefoxApp.enable = true; @@ -339,9 +348,9 @@ in xdg.configFile = { # Active linked dotfiles "hypr".source = - config.lib.file.mkOutOfStoreSymlink "/home/nate/nixos/nate-work/linked-dotfiles/hypr"; + config.lib.file.mkOutOfStoreSymlink "${osConfig.deskCfg.flakePath}/nate-work/linked-dotfiles/hypr"; "niri".source = - config.lib.file.mkOutOfStoreSymlink "/home/nate/nixos/nate-work/linked-dotfiles/niri"; + config.lib.file.mkOutOfStoreSymlink "${osConfig.deskCfg.flakePath}/nate-work/linked-dotfiles/niri"; # waybar is now managed by shared/modules/home-manager/waybar.nix via waybarConfig.enable }; diff --git a/nate-work/nixos/auto-update.nix b/nate-work/nixos/auto-update.nix index aecd43f..ff163dc 100644 --- a/nate-work/nixos/auto-update.nix +++ b/nate-work/nixos/auto-update.nix @@ -9,6 +9,14 @@ in type = lib.types.str; description = "username for enabling sudo-less system updates"; }; + flakePath = lib.mkOption { + type = lib.types.str; + description = "Absolute path to the NixOS flake configuration directory"; + }; + hostName = lib.mkOption { + type = lib.types.str; + description = "Hostname for the nixos-rebuild flake target"; + }; }; config = { @@ -35,7 +43,7 @@ in Type = "oneshot"; ExecStart = pkgs.writeShellScript "nixos-flake-update.sh" '' set -e - cd ~/nixos + cd ${autoCfg.flakePath} echo "Updating flake inputs..." ${pkgs.nix}/bin/nix flake lock \ @@ -60,7 +68,7 @@ in echo "Rebuilding NixOS..." ${pkgs.nixos-rebuild}/bin/nixos-rebuild switch \ -L \ - --flake ~/nixos#nate-work + --flake ${autoCfg.flakePath}#${autoCfg.hostName} echo "NixOS rebuild completed successfully" ''; diff --git a/nate/default.nix b/nate/default.nix index 0a38d46..a6fb1f3 100644 --- a/nate/default.nix +++ b/nate/default.nix @@ -19,6 +19,7 @@ fullName = fullName; de = desktop; installGaming = gaming; + flakePath = "/home/${userName}/nixos"; }; # Limit the number of generations to keep diff --git a/nate/desktop-configuration.nix b/nate/desktop-configuration.nix index 8bab6c4..0993807 100644 --- a/nate/desktop-configuration.nix +++ b/nate/desktop-configuration.nix @@ -29,6 +29,10 @@ in default = true; description = "Whether to install gaming software or not"; }; + flakePath = lib.mkOption { + type = lib.types.str; + description = "Absolute path to the NixOS flake configuration directory"; + }; }; imports = [ diff --git a/nate/modules/home-manager/home.nix b/nate/modules/home-manager/home.nix index 0c3939b..e4258fc 100644 --- a/nate/modules/home-manager/home.nix +++ b/nate/modules/home-manager/home.nix @@ -1,4 +1,4 @@ -{ inputs, config, pkgs, lib, ... }: +{ inputs, config, pkgs, lib, osConfig, ... }: let userName = "nate"; fullName = "Nathan Anderson"; @@ -159,7 +159,7 @@ xdg.configFile = { # Active linked dotfiles - "niri".source = config.lib.file.mkOutOfStoreSymlink "/home/nate/nixos/nate/linked-dotfiles/niri"; + "niri".source = config.lib.file.mkOutOfStoreSymlink "${osConfig.deskCfg.flakePath}/nate/linked-dotfiles/niri"; }; # Configure default applications for opening links diff --git a/shared/modules/apps/firefox/firefox.nix b/shared/modules/apps/firefox/firefox.nix index 9eed1a8..898176a 100644 --- a/shared/modules/apps/firefox/firefox.nix +++ b/shared/modules/apps/firefox/firefox.nix @@ -87,7 +87,7 @@ in }; settings = { "browser.startup.blankWindow" = true; - "browser.startup.homepage" = "https://www.startpage.com/do/mypage.pl?prfe=11898a1adf7b7dfb587580692f358773a11ca25e993b8e077476641cec033319e15f2449c345f5be919fd0a082015c3e4ed23143bd4337512466c04c2999831a54abca2eaeb42963c63ff064"; + "browser.startup.homepage" = "https://www.kagi.com"; "browser.search.region" = "US"; "browser.search.isUS" = true; "distribution.searchplugins.defaultLocale" = "en-US"; diff --git a/shared/server-configuration.nix b/shared/server-configuration.nix index 486e0db..01aacc5 100644 --- a/shared/server-configuration.nix +++ b/shared/server-configuration.nix @@ -56,6 +56,10 @@ in default = false; description = "Setups up avahi and printer services to expose local printer to network"; }; + flakePath = lib.mkOption { + type = lib.types.str; + description = "Absolute path to the NixOS flake configuration directory"; + }; }; imports = [