Migrate wg-rpi to flakes
This commit is contained in:
parent
1ad87d46c6
commit
3c3ee84382
2 changed files with 52 additions and 25 deletions
72
flake.nix
72
flake.nix
|
@ -12,29 +12,55 @@
|
||||||
outputs =
|
outputs =
|
||||||
{ nixpkgs, nixvim, ... }:
|
{ nixpkgs, nixvim, ... }:
|
||||||
{
|
{
|
||||||
nixosConfigurations = (
|
nixosConfigurations =
|
||||||
let
|
(
|
||||||
hosts = builtins.attrNames (builtins.readDir ./hosts);
|
let
|
||||||
in
|
x86_64-hosts = builtins.filter (file: file != "aarch64-linux") (
|
||||||
builtins.listToAttrs (
|
builtins.attrNames (builtins.readDir ./hosts)
|
||||||
map (
|
);
|
||||||
host:
|
in
|
||||||
nixpkgs.lib.nameValuePair host (
|
builtins.listToAttrs (
|
||||||
nixpkgs.lib.nixosSystem {
|
map (
|
||||||
specialArgs = {
|
host:
|
||||||
nixpkgs-flake = nixpkgs;
|
nixpkgs.lib.nameValuePair host (
|
||||||
inherit nixvim;
|
nixpkgs.lib.nixosSystem {
|
||||||
};
|
specialArgs = {
|
||||||
system = "x86_64-linux";
|
nixpkgs-flake = nixpkgs;
|
||||||
modules = [
|
inherit nixvim;
|
||||||
{ networking.hostName = host; }
|
};
|
||||||
./hosts/${host}/configuration.nix
|
system = "x86_64-linux";
|
||||||
./hosts/${host}/state.nix
|
modules = [
|
||||||
];
|
{ networking.hostName = host; }
|
||||||
}
|
./hosts/${host}/configuration.nix
|
||||||
)
|
./hosts/${host}/state.nix
|
||||||
) hosts
|
];
|
||||||
|
}
|
||||||
|
)
|
||||||
|
) x86_64-hosts
|
||||||
|
)
|
||||||
)
|
)
|
||||||
);
|
// (
|
||||||
|
let
|
||||||
|
aarch64-linux-hosts = (builtins.attrNames (builtins.readDir ./hosts/aarch64-linux));
|
||||||
|
in
|
||||||
|
builtins.listToAttrs (
|
||||||
|
map (
|
||||||
|
host:
|
||||||
|
nixpkgs.lib.nameValuePair host (
|
||||||
|
nixpkgs.lib.nixosSystem {
|
||||||
|
specialArgs = {
|
||||||
|
nixpkgs-flake = nixpkgs;
|
||||||
|
inherit nixvim;
|
||||||
|
};
|
||||||
|
system = "aarch64-linux";
|
||||||
|
modules = [
|
||||||
|
{ networking.hostName = host; }
|
||||||
|
./hosts/aarch64-linux/${host}/configuration.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
|
)
|
||||||
|
) aarch64-linux-hosts
|
||||||
|
)
|
||||||
|
);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,11 +4,11 @@ let
|
||||||
# SSIDpassword = "ENTER_PASSWORD";
|
# SSIDpassword = "ENTER_PASSWORD";
|
||||||
# interface = "wlan0";
|
# interface = "wlan0";
|
||||||
wg_interface = "end0";
|
wg_interface = "end0";
|
||||||
hostname = "netflix-huijaus";
|
hostname = "wg-rpi";
|
||||||
ddPassFile = "/root/wg-conf/ddPassFile";
|
ddPassFile = "/root/wg-conf/ddPassFile";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [ ../../shared/base.nix ];
|
imports = [ ../../../shared/base.nix ];
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
wireguard-tools
|
wireguard-tools
|
||||||
|
@ -94,6 +94,7 @@ in
|
||||||
passwordFile = ddPassFile;
|
passwordFile = ddPassFile;
|
||||||
};
|
};
|
||||||
#################### EVERYTHING BELOW THIS SHOULD NOT NEED TO CHANGE ####################
|
#################### EVERYTHING BELOW THIS SHOULD NOT NEED TO CHANGE ####################
|
||||||
|
system.stateVersion = "24.11";
|
||||||
|
|
||||||
nix.settings = {
|
nix.settings = {
|
||||||
cores = 3;
|
cores = 3;
|
Loading…
Add table
Add a link
Reference in a new issue