Begin implement home

This commit is contained in:
Florian RICHER 2024-05-26 01:10:42 +02:00
parent 5a593616f8
commit cc46a03e64
12 changed files with 63 additions and 11 deletions

View file

@ -41,10 +41,6 @@
home-manager.nixosModules.home-manager
agenix.nixosModules.default
];
# home-manager.useGlobalPkgs = true;
# home-manager.useUserPackages = true;
# home-manager.extraSpecialArgs = inputs;
};
}) {} systems;
};

View file

@ -43,9 +43,9 @@
};
modules = {
# users.florian = {
home.users.florian = {
# };
};
desktop = {
plasma.enable = true;

View file

@ -2,8 +2,8 @@
{
imports = [
# ./cli
./desktop
./home
./server
./system
];

View file

@ -0,0 +1,11 @@
{ config, pkgs, ... }:
{
imports = [
./chromium
./flatpak
./jetbrainsToolbox
./kitty
./vscode
];
}

View file

@ -1,6 +1,43 @@
{ config, pkgs, ... }:
inputs@{ config, pkgs, lib, ... }:
with lib;
let
cfg = config.modules.home;
userOpts = { name, userconfig, ... }: {
options = {};
config = {
# home = {
# username = name;
# homeDirectory = "/home/${name}";
# stateVersion = "24.05";
# };
};
};
in
{
imports = [
];
}
options.modules.home = {
users = mkOption {
default = {};
type = with types; attrsOf (submodule userOpts);
example = {
alice = {
shell.atuin.enable = true;
shell.direnv.enable = true;
shell.git.enable = true;
shell.zsh.enable = true;
};
};
description = ''
Additional user home configuration
'';
};
};
config = {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = inputs;
home-manager.users = mapAttrs (name: userconfig: (import ./home.nix (inputs // { name = name; userconfig = userconfig; }))) cfg.users;
};
}

8
modules/home/home.nix Normal file
View file

@ -0,0 +1,8 @@
{ config, pkgs, ... }:
{
imports = [
# ./apps
# ./shell
];
}