summary refs log tree commit diff
path: root/flake.nix
diff options
context:
space:
mode:
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix37
1 files changed, 37 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix
new file mode 100644
index 0000000..7c225bb
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,37 @@
+{
+  description = ''
+    specimen, application and server configuration.
+    enjoy! :)
+  '';
+
+  inputs = {
+    nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
+  };
+
+  outputs = { self, nixpkgs }:
+  let
+    inherit (nixpkgs) lib;
+
+    name = "specimen";
+    systems = [ "x86_64-linux" "aarch64-linux" ];
+
+    pkgsForSystem = system: import nixpkgs { inherit system; };
+
+    forAllSystems = f: lib.genAttrs systems
+      (system: f { inherit system; pkgs = pkgsForSystem system; });
+  in
+  {
+    packages = forAllSystems ({ system, pkgs }: {
+      default = pkgs.callPackage ./application/. { };
+    });
+
+    nixosConfigurations = forAllSystems ({ system, pkgs }: {
+      ${name} = {
+        inherit system;
+        modules = [
+          ./configuration/configuration.nix
+        ];
+      };
+    });
+  };
+}