home submodule

This commit is contained in:
Vinzenz Schroeter 2023-09-09 15:11:49 +02:00
parent 068c4469b2
commit 48024a6bae
8 changed files with 51 additions and 31 deletions

View file

@ -9,13 +9,9 @@ with lib; let
cfg = config.my;
in {
imports = [
./home/default.nix
./gnome.nix
./home-vinzenz.nix
./home-ronja.nix
./kde.nix
# enable home manager
<home-manager/nixos>
(modulesPath + "/installer/scan/not-detected.nix")
];

View file

@ -54,8 +54,8 @@ in {
];
home-manager.users = {
vinzenz = lib.mkIf config.my.users.vinzenz.enable applyGnomeUserSettings;
ronja = lib.mkIf config.my.users.ronja.enable applyGnomeUserSettings;
vinzenz = lib.mkIf config.my.home.vinzenz.enable applyGnomeUserSettings;
ronja = lib.mkIf config.my.home.ronja.enable applyGnomeUserSettings;
};
};
}

25
my/home/default.nix Normal file
View file

@ -0,0 +1,25 @@
{
config,
pkgs,
lib,
...
}:
with lib; let
cfg = config.my.home;
in {
imports = [
./vinzenz.nix
./ronja.nix
# enable home manager
<home-manager/nixos>
];
options.my.home = {
enable = lib.mkEnableOption "my home management";
};
config = lib.mkIf cfg.enable {
home-manager.useUserPackages = true;
home-manager.useGlobalPkgs = true;
};
}

View file

@ -5,9 +5,9 @@
...
}:
with lib; let
cfg = config.my.users.ronja;
cfg = config.my.home.ronja;
in {
options.my.users.ronja = {
options.my.home.ronja = {
enable = lib.mkEnableOption "user ronja";
};
@ -21,8 +21,7 @@ in {
};
# home manager
home-manager.useUserPackages = true;
home-manager.useGlobalPkgs = true;
my.home.enable = true;
home-manager.users.ronja = {
config,
pkgs,

View file

@ -4,9 +4,9 @@
lib,
...
}: let
cfg = config.my.users.vinzenz;
cfg = config.my.home.vinzenz;
in {
options.my.users.vinzenz = {
options.my.home.vinzenz = {
enable = lib.mkEnableOption "user vinzenz";
};
@ -20,8 +20,7 @@ in {
};
# home manager
home-manager.useUserPackages = true;
home-manager.useGlobalPkgs = true;
my.home.enable = true;
home-manager.users.vinzenz = {
config,
pkgs,

View file

@ -5,6 +5,18 @@
...
}: let
cfg = config.my.kde;
applyKdeUserSettings = {
home = {
packages = with pkgs; [
];
};
services.kdeconnect = {
enable = true;
indicator = true;
};
};
in {
options.my.kde = {
enable = lib.mkEnableOption "KDE desktop";
@ -40,20 +52,9 @@ in {
partition-manager.enable = true;
};
home-manager.users.vinzenz = {
config,
pkgs,
...
}: {
home = {
packages = with pkgs; [
];
};
services.kdeconnect = {
enable = true;
indicator = true;
};
home-manager.users = {
vinzenz = lib.mkIf config.my.home.vinzenz.enable applyKdeUserSettings;
ronja = lib.mkIf config.my.home.ronja.enable applyKdeUserSettings;
};
};
}

View file

@ -10,7 +10,7 @@
networking.hostName = "vinzenz-lpt";
my.gnome.enable = true;
my.users.vinzenz.enable = true;
my.home.vinzenz.enable = true;
services.flatpak.enable = true;

View file

@ -10,7 +10,7 @@
networking.hostName = "vinzenz-pc3";
my.kde.enable = true;
my.users = {
my.home = {
vinzenz.enable = true;
ronja.enable = true;
};