aboutsummaryrefslogtreecommitdiff
path: root/lib/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'lib/default.nix')
-rw-r--r--lib/default.nix35
1 files changed, 35 insertions, 0 deletions
diff --git a/lib/default.nix b/lib/default.nix
new file mode 100644
index 0000000..4331bf3
--- /dev/null
+++ b/lib/default.nix
@@ -0,0 +1,35 @@
+{ inputs }:
+
+{
+ mkSystem =
+ { hostname
+ , system
+ }:
+ inputs.nixpkgs.lib.nixosSystem {
+ inherit system;
+ specialArgs = {
+ inherit inputs system hostname;
+ };
+ modules = [
+ ../modules
+ ../profiles
+ ../hosts/${hostname}
+ ./private-wireguard.nix
+ {
+ networking.hostName = hostname;
+ nixpkgs = {
+ config.allowUnfree = true;
+ overlays = [
+ inputs.emacs-overlay.overlay
+ inputs.nur.overlay
+ ];
+ };
+ # Add each input as a registry
+ nix.registry = inputs.nixpkgs.lib.mapAttrs'
+ (n: v:
+ inputs.nixpkgs.lib.nameValuePair (n) ({ flake = v; }))
+ inputs;
+ }
+ ];
+ };
+}