Skip to content

Commit

Permalink
✨ (hm): stop using it separatly
Browse files Browse the repository at this point in the history
It just doesn't make sense
  • Loading branch information
elythh committed Oct 17, 2024
1 parent 7acadb9 commit c14bcd1
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 29 deletions.
1 change: 0 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@

imports = [
./hosts
./home
./pre-commit-hooks.nix
];

Expand Down
26 changes: 6 additions & 20 deletions home/default.nix
Original file line number Diff line number Diff line change
@@ -1,23 +1,9 @@
{ self, inputs, ... }:
{
flake.homeConfigurations =
let
inherit (inputs.hm.lib) homeManagerConfiguration;
grovetender = [
./profiles/grovetender.nix
];

extraSpecialArgs = {
inherit inputs self;
};
pkgs = inputs.nixpkgs.legacyPackages.x86_64-linux;

mkHome =
user: hostname:
homeManagerConfiguration {
inherit extraSpecialArgs pkgs;
modules = [ ./${user}/${hostname}.nix ];
};
in
{
"gwen@grovetender" = mkHome "gwen" "grovetender";
"gwen@aurelionite" = mkHome "gwen" "aurelionite";
};
aurelionite = [
./profiles/aurelionite.nix
];
}
File renamed without changes.
File renamed without changes.
38 changes: 32 additions & 6 deletions hosts/default.nix
Original file line number Diff line number Diff line change
@@ -1,24 +1,50 @@
{ self, inputs, ... }:
{
self,
lib,
inputs,
...
}:
{
flake.nixosConfigurations =
let
inherit (inputs.nixpkgs.lib) nixosSystem;
inherit (import "${self}/modules/nixos") default;

homeImports = import "${self}/home";

specialArgs = {
inherit inputs self;
};

mkHost =
hostname:
{
hostname,
user ? null,
}:
nixosSystem {
inherit specialArgs;
modules = default ++ [ ./${hostname} ];
modules = default ++ [
./${hostname}
(lib.mkIf (user != null) {
home-manager = {
users.${user}.imports = homeImports.${hostname};
extraSpecialArgs = specialArgs;
};
})
];
};
in
{
grovetender = mkHost "grovetender";
aurelionite = mkHost "aurelionite";
mithrix = mkHost "mithrix";
grovetender = mkHost {
hostname = "grovetender";
user = "gwen";
};
aurelionite = mkHost {
hostname = "aurelionite";
user = "gwen";
};
mithrix = mkHost {
hostname = "mithrix";
};
};
}
4 changes: 2 additions & 2 deletions modules/home/core/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{ config, ... }:
{ config, self, ... }:
{
wallpaper = /etc/nixos/home/shared/walls/${config.theme}.jpg;
wallpaper = "${self}/home/shared/walls/${config.theme}.jpg";
home.sessionVariables.EDITOR = "nvim";
imports = [
./gtk.nix
Expand Down

0 comments on commit c14bcd1

Please sign in to comment.