Refactor Home Manager modules

This commit is contained in:
Oliver Davies 2025-01-15 08:00:00 +00:00
parent 5229429bc4
commit 7771c88040
6 changed files with 22 additions and 29 deletions

View file

@ -62,6 +62,8 @@
nixosModules.default = ./nix/modules/nixos; nixosModules.default = ./nix/modules/nixos;
homeManagerModules.default = ./nix/modules/home-manager;
nixosConfigurations = { nixosConfigurations = {
lemp11 = nixpkgs.lib.nixosSystem { lemp11 = nixpkgs.lib.nixosSystem {
specialArgs = specialArgs // { specialArgs = specialArgs // {

View file

@ -0,0 +1,12 @@
{
outputs,
hostname,
username,
...
}:
{
imports = builtins.attrValues outputs.homeManagerModules ++ [
../../home/${username}/hosts/${hostname}.nix
];
}

View file

@ -44,7 +44,10 @@ let
}; };
in in
{ {
imports = [ shared-config ]; imports = [
../common
shared-config
];
home.packages = home.packages =
shared-packages shared-packages
@ -64,6 +67,7 @@ in
); );
home.sessionVariables = { home.sessionVariables = {
DOCUMENTS = "$HOME/Documents";
EDITOR = "nvim"; EDITOR = "nvim";
LANG = "en_GB.UTF-8"; LANG = "en_GB.UTF-8";
LC_ALL = "en_GB.UTF-8"; LC_ALL = "en_GB.UTF-8";

View file

@ -1,12 +1,5 @@
{ { lib, username, ... }:
config,
hostname,
inputs,
lib,
pkgs,
username,
self,
}:
{ {
home.username = "${username}"; home.username = "${username}";
home.homeDirectory = "/home/${username}"; home.homeDirectory = "/home/${username}";
@ -41,18 +34,4 @@
}; };
} }
]; ];
imports = [
(import ../../modules/home-manager {
inherit
config
inputs
lib
self
pkgs
;
})
../../home/${username}/hosts/${hostname}.nix
];
} }

View file

@ -18,10 +18,7 @@
pkgs pkgs
; ;
}) })
./features/desktop ./features/desktop
]; ];
home.sessionVariables = {
DOCUMENTS = "$HOME/Documents";
};
} }

View file

@ -1,4 +1,3 @@
Use nixosModules and homeManagerModules outputs in flake.nix to simplify importing modules
Add daily script Add daily script
Add create-podcast-tasks script Add create-podcast-tasks script
Replace doppler with agenix Replace doppler with agenix