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; cfg = config.my;
in { in {
imports = [ imports = [
./home/default.nix
./gnome.nix ./gnome.nix
./home-vinzenz.nix
./home-ronja.nix
./kde.nix ./kde.nix
# enable home manager
<home-manager/nixos>
(modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
]; ];

View file

@ -54,8 +54,8 @@ in {
]; ];
home-manager.users = { home-manager.users = {
vinzenz = lib.mkIf config.my.users.vinzenz.enable applyGnomeUserSettings; vinzenz = lib.mkIf config.my.home.vinzenz.enable applyGnomeUserSettings;
ronja = lib.mkIf config.my.users.ronja.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 with lib; let
cfg = config.my.users.ronja; cfg = config.my.home.ronja;
in { in {
options.my.users.ronja = { options.my.home.ronja = {
enable = lib.mkEnableOption "user ronja"; enable = lib.mkEnableOption "user ronja";
}; };
@ -21,8 +21,7 @@ in {
}; };
# home manager # home manager
home-manager.useUserPackages = true; my.home.enable = true;
home-manager.useGlobalPkgs = true;
home-manager.users.ronja = { home-manager.users.ronja = {
config, config,
pkgs, pkgs,

View file

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

View file

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

View file

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

View file

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