Allow disabling home-manager parts for server
This commit is contained in:
parent
7c9307a2cf
commit
9500cbd57d
5 changed files with 40 additions and 16 deletions
24
flake.nix
24
flake.nix
|
@ -68,6 +68,16 @@
|
|||
# Home manager
|
||||
home-manager.nixosModules.home-manager
|
||||
./home-manager
|
||||
{
|
||||
hmOptions = {
|
||||
plasma.enable = true;
|
||||
beets.enable = true;
|
||||
firefox.enable = true;
|
||||
thunderbird.enable = true;
|
||||
rescrobbled.enable = true;
|
||||
vscode.enable = true;
|
||||
};
|
||||
}
|
||||
];
|
||||
|
||||
specialArgs = {
|
||||
|
@ -84,6 +94,20 @@
|
|||
# Better command-not-found
|
||||
nix-index-database.nixosModules.nix-index
|
||||
{ programs.nix-index-database.comma.enable = true; }
|
||||
|
||||
# Home manager
|
||||
home-manager.nixosModules.home-manager
|
||||
./home-manager
|
||||
{
|
||||
hmOptions = {
|
||||
plasma.enable = false;
|
||||
beets.enable = false;
|
||||
firefox.enable = false;
|
||||
thunderbird.enable = false;
|
||||
rescrobbled.enable = false;
|
||||
vscode.enable = false;
|
||||
};
|
||||
}
|
||||
];
|
||||
|
||||
specialArgs = {
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
{ inputs, system, secrets, ... }:
|
||||
{ inputs, system, secrets, lib, config, ... }:
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.sharedModules = [
|
||||
inputs.plasma-manager.homeManagerModules.plasma-manager
|
||||
./custom-modules
|
||||
(lib.mkIf config.hmOptions.plasma.enable inputs.plasma-manager.homeManagerModules.plasma-manager)
|
||||
(lib.mkIf config.hmOptions.beets.enable ./custom-modules)
|
||||
];
|
||||
home-manager.extraSpecialArgs = {
|
||||
inherit inputs system secrets;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ ... }:
|
||||
{ lib, config, ... }:
|
||||
{
|
||||
home.stateVersion = "24.05";
|
||||
home.username = "ty";
|
||||
|
@ -6,17 +6,17 @@
|
|||
|
||||
imports = [
|
||||
./modules/packages.nix
|
||||
./modules/plasma.nix
|
||||
(lib.mkIf config.hmOptions.plasma.enable ./modules/plasma.nix)
|
||||
./modules/vcs
|
||||
./modules/firefox.nix
|
||||
./modules/thunderbird.nix
|
||||
(lib.mkIf config.hmOptions.firefox.enable ./modules/firefox.nix)
|
||||
(lib.mkIf config.hmOptions.thunderbird.enable ./modules/thunderbird.nix)
|
||||
./modules/accounts
|
||||
./modules/gpg.nix
|
||||
./modules/shell
|
||||
./modules/vscode.nix
|
||||
./modules/desktop.nix
|
||||
./modules/gtk.nix
|
||||
./modules/beets.nix
|
||||
./modules/rescrobbled.nix
|
||||
(lib.mkIf config.hmOptions.vscode.enable ./modules/vscode.nix)
|
||||
(lib.mkIf config.hmOptions.plasma.enable ./modules/desktop.nix)
|
||||
(lib.mkIf config.hmOptions.plasma.enable ./modules/gtk.nix)
|
||||
(lib.mkIf config.hmOptions.beets.enable ./modules/beets.nix)
|
||||
(lib.mkIf config.hmOptions.rescrobbled.enable ./modules/rescrobbled.nix)
|
||||
];
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
{ ... }:
|
||||
{ lib, config, ... }:
|
||||
{
|
||||
imports = [
|
||||
./email.nix
|
||||
(lib.mkIf config.hmOptions.thunderbird.enable ./email.nix)
|
||||
./ssh.nix
|
||||
];
|
||||
}
|
|
@ -1,9 +1,9 @@
|
|||
{ ... }:
|
||||
{ lib, config, ... }:
|
||||
{
|
||||
imports = [
|
||||
./btop.nix
|
||||
./direnv.nix
|
||||
./konsole.nix
|
||||
(lib.mkIf config.hmOptions.plasma.enable ./konsole.nix)
|
||||
./starship.nix
|
||||
./zsh.nix
|
||||
];
|
||||
|
|
Loading…
Reference in a new issue