fix: refactor flake.nix, home-manager/home.nix, nixos/configuration.nix to avoid home-manager.useGlobalPkgs conflict error

This commit is contained in:
autumn-the-kitty-cat
2025-11-28 18:06:06 -05:00
parent 629929b657
commit c7ba15d42a
3 changed files with 29 additions and 32 deletions
+6 -30
View File
@@ -31,40 +31,16 @@
{ ... }@inputs: { ... }@inputs:
let let
system = "x86_64-linux"; system = "x86_64-linux";
pkgs = import inputs.nixpkgs { #pkgs = import inputs.nixpkgs {
inherit system; # inherit system;
config.allowUnfree = true; #};
};
hostName = "january"; hostName = "january";
userName = "autumn";
in in
{ {
nixosConfigurations.${hostName} = inputs.nixpkgs.lib.nixosSystem { nixosConfigurations.${hostName} = inputs.nixpkgs.lib.nixosSystem {
inherit system; specialArgs = { inherit inputs; inherit hostName; };
inherit pkgs; modules = [ ./nixos/configuration.nix ];
specialArgs = {
inherit hostName;
};
modules = [
./nixos/configuration.nix
inputs.home-manager.nixosModules.home-manager
{
home-manager.backupFileExtension = "hm-bak";
home-manager.extraSpecialArgs = { inherit inputs; };
home-manager.sharedModules = [
inputs.nixvim.homeModules.nixvim
inputs.stylix.homeModules.stylix
inputs.zen-browser.homeModules.default
];
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users."autumn" = ./home-manager/home.nix;
}
];
}; };
}; };
} }
+10 -1
View File
@@ -1,6 +1,10 @@
{ pkgs, ... }: { inputs, pkgs, ... }:
{ {
imports = [ imports = [
inputs.nixvim.homeModules.nixvim
inputs.stylix.homeModules.stylix
inputs.zen-browser.homeModules.default
./programs ./programs
./clangd.nix ./clangd.nix
@@ -14,6 +18,11 @@
home.homeDirectory = "/home/autumn"; home.homeDirectory = "/home/autumn";
home.stateVersion = "25.05"; home.stateVersion = "25.05";
nixpkgs.config = {
allowUnfree = true;
allowUnfreePredicate = _: true;
};
home.pointerCursor = { home.pointerCursor = {
name = "Adwaita"; name = "Adwaita";
package = pkgs.adwaita-icon-theme; package = pkgs.adwaita-icon-theme;
+13 -1
View File
@@ -1,20 +1,25 @@
{ pkgs, hostName, ... }: { inputs, hostName, pkgs, ... }:
{ {
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
inputs.home-manager.nixosModules.home-manager
]; ];
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
boot.tmp.cleanOnBoot = true; boot.tmp.cleanOnBoot = true;
nix.package = pkgs.lixPackageSets.latest.lix;
networking.hostName = "${hostName}"; networking.hostName = "${hostName}";
hardware.graphics.enable = true; hardware.graphics.enable = true;
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
nixpkgs.config.allowUnfree = true;
time.timeZone = "America/Toronto"; time.timeZone = "America/Toronto";
i18n.defaultLocale = "en_CA.UTF-8"; i18n.defaultLocale = "en_CA.UTF-8";
@@ -24,6 +29,13 @@
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0660", GROUP="users", TAG+="uaccess", TAG+="udev-acl" KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0660", GROUP="users", TAG+="uaccess", TAG+="udev-acl"
''; '';
home-manager = {
extraSpecialArgs = { inherit inputs; };
users = {
autumn = import ../home-manager/home.nix;
};
};
services.gnome.glib-networking.enable = true; services.gnome.glib-networking.enable = true;
programs.hyprland = { programs.hyprland = {