Move some config to home manager.
This commit is contained in:
parent
20a9d22423
commit
9c5add0ffb
5 changed files with 473 additions and 470 deletions
18
helpers.nix
18
helpers.nix
|
@ -12,8 +12,11 @@ with inputs.nixpkgs.lib; {
|
|||
suite ? "",
|
||||
hostModules ? [],
|
||||
}: let
|
||||
# Secrets directory.
|
||||
secrets = builtins.toString inputs.secrets;
|
||||
# specialArgs/extraSpecialArgs.
|
||||
args = {
|
||||
inherit inputs hostname;
|
||||
secrets = builtins.toString inputs.secrets;
|
||||
};
|
||||
|
||||
# Architecture.
|
||||
system = platform;
|
||||
|
@ -57,14 +60,10 @@ with inputs.nixpkgs.lib; {
|
|||
nixosConfigurations.${hostname} = nixosSystem {
|
||||
inherit system pkgs;
|
||||
|
||||
specialArgs = {
|
||||
# Pass variables to config.
|
||||
inherit inputs secrets hostname;
|
||||
};
|
||||
specialArgs = args;
|
||||
|
||||
modules =
|
||||
[
|
||||
nixvim.nixosModules.nixvim # Neovim.
|
||||
lanzaboote.nixosModules.lanzaboote # Secure boot.
|
||||
sops-nix.nixosModules.sops # Secrets management.
|
||||
|
||||
|
@ -78,6 +77,7 @@ with inputs.nixpkgs.lib; {
|
|||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
backupFileExtension = "backup";
|
||||
extraSpecialArgs = args;
|
||||
users.fern = {
|
||||
# Me!
|
||||
home.username = "fern";
|
||||
|
@ -90,7 +90,9 @@ with inputs.nixpkgs.lib; {
|
|||
programs.home-manager.enable = true;
|
||||
|
||||
# Import config.
|
||||
imports = [./suites/${suite}/home.nix];
|
||||
imports = [
|
||||
nixvim.homeModules.nixvim
|
||||
./suites/${suite}/home.nix];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue