thelio76: reuse hm config (working)

This commit is contained in:
Alex 2024-07-26 19:05:13 -04:00
parent 577d977e4e
commit c924d9e84e
3 changed files with 14 additions and 40 deletions

View File

@ -1,4 +1,4 @@
{ system, inputs, ... }:
{ system, inputs, user, ... }:
{
modules = [
inputs.home-manager.nixosModules.home-manager
@ -6,8 +6,9 @@
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.backupFileExtension = "backup";
home-manager.users.alex = import ./config/users/alex;
home-manager.extraSpecialArgs = { ff = inputs.firefox-addons.packages.${system}; };
home-manager.users.${user} = import ../users/${user};
home-manager.extraSpecialArgs = { inherit user; firefox-addons = inputs.firefox-addons.packages.${system}; };
}
];
}

View File

@ -1,10 +1,10 @@
{ config, pkgs, ff, ... }:
{ config, pkgs, user, firefox-addons, ... }:
{
# Home Manager needs a bit of information about you and the
# paths it should manage.
home.username = "alex";
home.homeDirectory = "/home/alex";
home.username = user;
home.homeDirectory = "/home/${user}";
# Packages that should be installed to the user profile.
home.packages = with pkgs; [
@ -71,7 +71,7 @@
settings = {
"extensions.autoDisableScopes" = 0;
};
extensions = with ff; [
extensions = with firefox-addons; [
darkreader
multi-account-containers
simple-tab-groups

View File

@ -22,17 +22,6 @@
};
outputs = { self, nixpkgs, home-manager, firefox-addons, ... }@inputs:
let
hmModule = system: (
home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.backupFileExtension = "backup";
home-manager.users.alex = import ./config/users/alex;
home-manager.extraSpecialArgs = { ff = firefox-addons.packages.${system}; };
}
);
in
{
nixosConfigurations = {
## ---- personal computers (linux) ----
@ -40,33 +29,17 @@
system = "x86_64-linux";
modules = [
./config/systems/nixos76
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.backupFileExtension = "backup";
home-manager.users.alex = import ./config/users/alex;
# Optionally, use home-manager.extraSpecialArgs to pass
# arguments to home.nix
}
];
] ++ (import ./config/modules/home-manager.nix {
inherit system inputs; user = "alex";
}).modules;
};
thelio76 = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";
modules = [
./config/systems/thelio76
(import ./config/modules/home-manager.nix {
inherit system inputs;
})
# home-manager.nixosModules.home-manager
# {
# home-manager.useGlobalPkgs = true;
# home-manager.useUserPackages = true;
# home-manager.backupFileExtension = "backup";
# home-manager.users.alex = import ./config/users/alex;
# home-manager.extraSpecialArgs = { ff = firefox-addons.packages.${system}; };
# }
];
] ++ (import ./config/modules/home-manager.nix {
inherit system inputs; user = "alex";
}).modules;
};
## ---- servers ----