refactor!: multi-host setup
This commit is contained in:
10
nix/modules/commonPackages.nix
Normal file
10
nix/modules/commonPackages.nix
Normal 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
1
nix/modules/default.nix
Normal file
@@ -0,0 +1 @@
|
||||
{ pkgs, lib, config, ... }: { imports = [ ./commonPackages.nix ./hm.nix ]; }
|
||||
11
nix/modules/hm.nix
Normal file
11
nix/modules/hm.nix
Normal 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;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user