refactor!: multi-host setup

This commit is contained in:
2025-01-21 08:18:09 +00:00
parent b03daef66c
commit c03f3cb182
7 changed files with 46 additions and 37 deletions

View File

@@ -0,0 +1,10 @@
{ pkgs, lib, ... }: {
options = {
commonPackages = lib.mkOption {
type = lib.types.listOf lib.types.package;
default = [ ];
description = "Common packages";
};
};
config.commonPackages = with pkgs; [ wget busybox curl ];
}

1
nix/modules/default.nix Normal file
View File

@@ -0,0 +1 @@
{ pkgs, lib, config, ... }: { imports = [ ./commonPackages.nix ./hm.nix ]; }

11
nix/modules/hm.nix Normal file
View File

@@ -0,0 +1,11 @@
{ lib, config, pkgs, ... }: {
options = { hm.enable = lib.mkEnableOption "enable home-manager"; };
config = lib.mkIf config.hm.enable {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.luca = import ../users/luca/home.nix;
users.users.luca.shell = pkgs.zsh;
programs.zsh.enable = true;
};
}