feat: add global variables for nix configs
This commit is contained in:
parent
32e2e974ca
commit
e946124478
9 changed files with 59 additions and 17 deletions
common
|
@ -1,10 +1,20 @@
|
|||
{ config, home-manager, lib, nixpkgs, nur, nix-melt, nurl, pkgs, ... }: {
|
||||
|
||||
{ config
|
||||
, home-manager
|
||||
, lib
|
||||
, nixpkgs
|
||||
, nur
|
||||
, nix-melt
|
||||
, nurl
|
||||
, pkgs
|
||||
, ...
|
||||
}: {
|
||||
imports = [
|
||||
home-manager.nixosModules.default
|
||||
./modules/programs.nix
|
||||
./modules/locale.nix
|
||||
./overlays
|
||||
|
||||
./hostvars.nix
|
||||
];
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
@ -38,6 +48,11 @@
|
|||
./modules/bash
|
||||
./modules/git
|
||||
./modules/neovim
|
||||
|
||||
./hostvars.nix
|
||||
({ osConfig, ... }: {
|
||||
services.hostvars = osConfig.services.hostvars;
|
||||
})
|
||||
];
|
||||
|
||||
home.packages = [
|
||||
|
|
21
common/hostvars.nix
Normal file
21
common/hostvars.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{ lib, ... }: {
|
||||
options.services.hostvars = with lib; {
|
||||
username = mkOption {
|
||||
description = ''
|
||||
Username that was defined at the initial setup process
|
||||
'';
|
||||
type = types.nullOr types.str;
|
||||
};
|
||||
|
||||
configDir = mkOption {
|
||||
description = ''
|
||||
The path to where most of the hosts' configs are in the .nix folder
|
||||
'';
|
||||
type = types.nullOr types.str;
|
||||
};
|
||||
|
||||
fontSize = mkOption {
|
||||
type = types.nullOr types.float;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue