Compare commits

...

2 commits

Author SHA1 Message Date
d1f197d179
Migrate wg-rpi to flakes 2025-06-05 01:12:48 +03:00
1ad87d46c6
Adjust generic conf 2025-06-05 01:04:54 +03:00
3 changed files with 43 additions and 30 deletions

View file

@ -12,29 +12,43 @@
outputs =
{ nixpkgs, nixvim, ... }:
{
nixosConfigurations = (
let
hosts = builtins.attrNames (builtins.readDir ./hosts);
in
builtins.listToAttrs (
map (
host:
nixpkgs.lib.nameValuePair host (
nixpkgs.lib.nixosSystem {
specialArgs = {
nixpkgs-flake = nixpkgs;
inherit nixvim;
};
system = "x86_64-linux";
modules = [
{ networking.hostName = host; }
./hosts/${host}/configuration.nix
./hosts/${host}/state.nix
];
}
)
) hosts
nixosConfigurations =
(
let
hosts = builtins.attrNames (builtins.readDir ./hosts);
in
builtins.listToAttrs (
map (
host:
nixpkgs.lib.nameValuePair host (
nixpkgs.lib.nixosSystem {
specialArgs = {
nixpkgs-flake = nixpkgs;
inherit nixvim;
};
system = "x86_64-linux";
modules = [
{ networking.hostName = host; }
./hosts/${host}/configuration.nix
./hosts/${host}/state.nix
];
}
)
) hosts
)
)
);
// {
wg-rpi = nixpkgs.lib.nixosSystem {
specialArgs = {
nixpkgs-flake = nixpkgs;
inherit nixvim;
};
system = "aarch64-linux";
modules = [
{ networking.hostName = "wg-rpi"; }
./hosts/special/wg-rpi/configuration.nix
];
};
};
};
}

View file

@ -1,11 +1,9 @@
{ lib, ... }:
{
networking.hostName = "nixos";
imports = [ ../../shared/base.nix ];
#Many installs will need this, and it won't hurt either way
services.qemuGuest.enable = true;
imports = [
../../shared/base.nix
../../shared/hardware/vm.nix
];
#Prevent user from being locked out of the system before switching to proper config
users.mutableUsers = lib.mkForce true;

View file

@ -8,7 +8,7 @@ let
ddPassFile = "/root/wg-conf/ddPassFile";
in
{
imports = [ ../../shared/base.nix ];
imports = [ ../../../shared/base.nix ];
environment.systemPackages = with pkgs; [
wireguard-tools
@ -94,6 +94,7 @@ in
passwordFile = ddPassFile;
};
#################### EVERYTHING BELOW THIS SHOULD NOT NEED TO CHANGE ####################
stateVersion = "24.11";
nix.settings = {
cores = 3;