mirror of
https://github.com/smg1024/homelab.git
synced 2026-05-22 20:32:58 +09:00
initial install yggdrasil
This commit is contained in:
parent
5b3f78c854
commit
b538626c12
7 changed files with 186 additions and 72 deletions
82
flake.nix
82
flake.nix
|
|
@ -20,51 +20,47 @@
|
|||
};
|
||||
};
|
||||
|
||||
outputs =
|
||||
inputs@{
|
||||
nixpkgs,
|
||||
disko,
|
||||
home-manager,
|
||||
sops-nix,
|
||||
...
|
||||
}:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
outputs = inputs @ {
|
||||
nixpkgs,
|
||||
disko,
|
||||
home-manager,
|
||||
sops-nix,
|
||||
...
|
||||
}: let
|
||||
system = "x86_64-linux";
|
||||
|
||||
mkHost =
|
||||
hostModule:
|
||||
nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = {
|
||||
inherit inputs;
|
||||
};
|
||||
|
||||
modules = [
|
||||
./modules/base.nix
|
||||
./modules/gc.nix
|
||||
./modules/swap.nix
|
||||
./modules/users.nix
|
||||
./modules/ssh.nix
|
||||
./modules/tailscale.nix
|
||||
|
||||
disko.nixosModules.disko
|
||||
sops-nix.nixosModules.sops
|
||||
home-manager.nixosModules.home-manager
|
||||
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.poby = import ./home/poby.nix;
|
||||
}
|
||||
|
||||
hostModule
|
||||
];
|
||||
mkHost = hostModule:
|
||||
nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = {
|
||||
inherit inputs;
|
||||
};
|
||||
in
|
||||
{
|
||||
nixosConfigurations = {
|
||||
yggdrasil = mkHost ./hosts/yggdrasil;
|
||||
midgard = mkHost ./hosts/midgard;
|
||||
|
||||
modules = [
|
||||
./modules/base.nix
|
||||
./modules/gc.nix
|
||||
./modules/swap.nix
|
||||
./modules/users.nix
|
||||
./modules/ssh.nix
|
||||
./modules/tailscale.nix
|
||||
|
||||
disko.nixosModules.disko
|
||||
sops-nix.nixosModules.sops
|
||||
home-manager.nixosModules.home-manager
|
||||
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.poby = import ./home/poby.nix;
|
||||
}
|
||||
|
||||
hostModule
|
||||
];
|
||||
};
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
yggdrasil = mkHost ./hosts/yggdrasil;
|
||||
midgard = mkHost ./hosts/midgard;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue