Skip to content

Commit

Permalink
feat(modules): home-manager setup
Browse files Browse the repository at this point in the history
  • Loading branch information
bddvlpr committed May 6, 2024
1 parent e7d78bd commit f510e37
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 0 deletions.
1 change: 1 addition & 0 deletions modules/home/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
1 change: 1 addition & 0 deletions modules/module.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
flake = {
homeManagerModules = import ./home;
nixosModules = import ./nixos;
sharedModules = import ./shared;
};
Expand Down
1 change: 1 addition & 0 deletions modules/shared/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
fish = import ./fish;
home-manager = import ./home-manager;
nix = import ./nix;
users-bddvlpr = import ./users/bddvlpr.nix;
}
33 changes: 33 additions & 0 deletions modules/shared/home-manager/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
inputs,
outputs,
lib,
config,
system,
...
}: let
inherit (lib) mkIf mkOption types;

cfg = config.sysc.home-manager;
in {
# TODO: Interchangable with darwinModules.
imports = [inputs.home-manager.nixosModules.home-manager];

options.sysc.home-manager = {
enable = mkOption {
type = types.bool;
default = true;
description = "Whether to enable home-manager.";
};
};

config = mkIf cfg.enable {
home-manager = {
users.bddvlpr = import ./users/bddvlpr.nix;
extraSpecialArgs = {
inherit inputs outputs system;
nixosConfig = config;
};
};
};
}
3 changes: 3 additions & 0 deletions modules/shared/home-manager/users/bddvlpr.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
home.stateVersion = "24.05";
}

0 comments on commit f510e37

Please sign in to comment.