Allow disabling home-manager parts for server

This commit is contained in:
Tyler Beckman 2024-12-11 20:09:53 -07:00
parent 7c9307a2cf
commit 9500cbd57d
Signed by: Ty
GPG key ID: 2813440C772555A4
5 changed files with 40 additions and 16 deletions

View file

@ -68,6 +68,16 @@
# Home manager # Home manager
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
./home-manager ./home-manager
{
hmOptions = {
plasma.enable = true;
beets.enable = true;
firefox.enable = true;
thunderbird.enable = true;
rescrobbled.enable = true;
vscode.enable = true;
};
}
]; ];
specialArgs = { specialArgs = {
@ -84,6 +94,20 @@
# Better command-not-found # Better command-not-found
nix-index-database.nixosModules.nix-index nix-index-database.nixosModules.nix-index
{ programs.nix-index-database.comma.enable = true; } { 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 = { specialArgs = {

View file

@ -1,10 +1,10 @@
{ inputs, system, secrets, ... }: { inputs, system, secrets, lib, config, ... }:
{ {
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
home-manager.sharedModules = [ home-manager.sharedModules = [
inputs.plasma-manager.homeManagerModules.plasma-manager (lib.mkIf config.hmOptions.plasma.enable inputs.plasma-manager.homeManagerModules.plasma-manager)
./custom-modules (lib.mkIf config.hmOptions.beets.enable ./custom-modules)
]; ];
home-manager.extraSpecialArgs = { home-manager.extraSpecialArgs = {
inherit inputs system secrets; inherit inputs system secrets;

View file

@ -1,4 +1,4 @@
{ ... }: { lib, config, ... }:
{ {
home.stateVersion = "24.05"; home.stateVersion = "24.05";
home.username = "ty"; home.username = "ty";
@ -6,17 +6,17 @@
imports = [ imports = [
./modules/packages.nix ./modules/packages.nix
./modules/plasma.nix (lib.mkIf config.hmOptions.plasma.enable ./modules/plasma.nix)
./modules/vcs ./modules/vcs
./modules/firefox.nix (lib.mkIf config.hmOptions.firefox.enable ./modules/firefox.nix)
./modules/thunderbird.nix (lib.mkIf config.hmOptions.thunderbird.enable ./modules/thunderbird.nix)
./modules/accounts ./modules/accounts
./modules/gpg.nix ./modules/gpg.nix
./modules/shell ./modules/shell
./modules/vscode.nix (lib.mkIf config.hmOptions.vscode.enable ./modules/vscode.nix)
./modules/desktop.nix (lib.mkIf config.hmOptions.plasma.enable ./modules/desktop.nix)
./modules/gtk.nix (lib.mkIf config.hmOptions.plasma.enable ./modules/gtk.nix)
./modules/beets.nix (lib.mkIf config.hmOptions.beets.enable ./modules/beets.nix)
./modules/rescrobbled.nix (lib.mkIf config.hmOptions.rescrobbled.enable ./modules/rescrobbled.nix)
]; ];
} }

View file

@ -1,7 +1,7 @@
{ ... }: { lib, config, ... }:
{ {
imports = [ imports = [
./email.nix (lib.mkIf config.hmOptions.thunderbird.enable ./email.nix)
./ssh.nix ./ssh.nix
]; ];
} }

View file

@ -1,9 +1,9 @@
{ ... }: { lib, config, ... }:
{ {
imports = [ imports = [
./btop.nix ./btop.nix
./direnv.nix ./direnv.nix
./konsole.nix (lib.mkIf config.hmOptions.plasma.enable ./konsole.nix)
./starship.nix ./starship.nix
./zsh.nix ./zsh.nix
]; ];