add (options): add options template for all config's type
* config's type: host, home, device
This commit is contained in:
parent
a78ecc46a9
commit
c96e7f7620
4 changed files with 22 additions and 1 deletions
|
|
@ -14,7 +14,10 @@ deviceName:
|
||||||
let
|
let
|
||||||
inherit (nixpkgs) lib;
|
inherit (nixpkgs) lib;
|
||||||
|
|
||||||
CustomOptions = ../options;
|
DeviceCustomOptions = ../options/device;
|
||||||
|
HostCustomOptions = ../options/host;
|
||||||
|
HomeCustomOptions = ../options/home;
|
||||||
|
|
||||||
DeviceConfig = ../devices/${deviceName};
|
DeviceConfig = ../devices/${deviceName};
|
||||||
HostConfig = ../users/${hostName}/host;
|
HostConfig = ../users/${hostName}/host;
|
||||||
HomeConfig = ../users/${userName}/home;
|
HomeConfig = ../users/${userName}/home;
|
||||||
|
|
@ -57,6 +60,9 @@ lib.nixosSystem {
|
||||||
specialArgs = additionalArgs;
|
specialArgs = additionalArgs;
|
||||||
|
|
||||||
modules = [
|
modules = [
|
||||||
|
DeviceCustomOptions
|
||||||
|
HostCustomOptions
|
||||||
|
|
||||||
CustomOptions
|
CustomOptions
|
||||||
DeviceConfig
|
DeviceConfig
|
||||||
HostConfig
|
HostConfig
|
||||||
|
|
@ -74,6 +80,7 @@ lib.nixosSystem {
|
||||||
{
|
{
|
||||||
home-manager = {
|
home-manager = {
|
||||||
users.${userName} = import HomeConfig;
|
users.${userName} = import HomeConfig;
|
||||||
|
users.${userName} = import HomeCustomOptions;
|
||||||
useGlobalPkgs = true;
|
useGlobalPkgs = true;
|
||||||
useUserPackages = true;
|
useUserPackages = true;
|
||||||
extraSpecialArgs = additionalArgs;
|
extraSpecialArgs = additionalArgs;
|
||||||
|
|
|
||||||
7
options/home/default.nix
Normal file
7
options/home/default.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
{ customFunctions, ... }:
|
||||||
|
{
|
||||||
|
imports = customFunctions.scan {
|
||||||
|
path = ./.;
|
||||||
|
exclude = [ ./default.nix ];
|
||||||
|
};
|
||||||
|
}
|
||||||
7
options/host/default.nix
Normal file
7
options/host/default.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
{ customFunctions, ... }:
|
||||||
|
{
|
||||||
|
imports = customFunctions.scan {
|
||||||
|
path = ./.;
|
||||||
|
exclude = [ ./default.nix ];
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in a new issue