aboutsummaryrefslogtreecommitdiff
path: root/nix/mkSystem.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nix/mkSystem.nix')
-rw-r--r--nix/mkSystem.nix27
1 files changed, 27 insertions, 0 deletions
diff --git a/nix/mkSystem.nix b/nix/mkSystem.nix
new file mode 100644
index 0000000..28e42b1
--- /dev/null
+++ b/nix/mkSystem.nix
@@ -0,0 +1,27 @@
+inputs@{ self, ... }:
+{ system ? "x86_64-linux", hostname, }:
+inputs.nixpkgs.lib.nixosSystem {
+ inherit system;
+ specialArgs = { inherit inputs system hostname; };
+ modules = [
+ "${self}/modules"
+ "${self}/hosts/${hostname}"
+ ./private-wireguard.nix
+ {
+ networking.hostName = hostname;
+ nixpkgs = {
+ config.allowUnfree = true;
+ overlays = [
+ inputs.emacs-overlay.overlay
+ inputs.nur.overlay
+ (final: prev: {
+ tools = { gerrit-hook = import ../tools/gerrit-hook final; };
+ })
+ ];
+ };
+ # Add each input as a registry
+ nix.registry = inputs.nixpkgs.lib.mapAttrs'
+ (n: v: inputs.nixpkgs.lib.nameValuePair (n) ({ flake = v; })) inputs;
+ }
+ ];
+}