refactor: helpers/set-hostname.nix becomes machines/instantiate.nix

This commit is contained in:
colin 2022-10-24 06:06:11 -07:00
parent 9151f58b37
commit 4c4b73f693
3 changed files with 12 additions and 7 deletions

View File

@ -46,13 +46,11 @@
specialArgs = { inherit mobile-nixos home-manager impermanence; };
modules = [
./modules
./machines/${name}
(import ./helpers/set-hostname.nix name)
(import ./machines/instantiate.nix name)
home-manager.nixosModule
impermanence.nixosModule
sops-nix.nixosModules.sops
{
nixpkgs.config.allowUnfree = true;
nixpkgs.overlays = [
(import "${mobile-nixos}/overlay/overlay.nix")
uninsane.overlay

View File

@ -1,4 +0,0 @@
hostName: { ... }:
{
networking.hostName = hostName;
}

11
machines/instantiate.nix Normal file
View File

@ -0,0 +1,11 @@
# trampoline from flake.nix into the specific machine definition, while doing a tiny bit of common setup
hostName: { ... }: {
imports = [
./${hostName}
];
networking.hostName = hostName;
nixpkgs.config.allowUnfree = true;
}