diff options
| author | Mel <einebeere@gmail.com> | 2024-12-29 16:15:08 +0100 |
|---|---|---|
| committer | Mel <einebeere@gmail.com> | 2024-12-29 16:15:08 +0100 |
| commit | 581f22e248c8ed1008f36356362f6a95e43d0588 (patch) | |
| tree | 02a2a584de929dcc69f545cbaf16d590ace6fe96 /flake.nix | |
| download | specimen-581f22e248c8ed1008f36356362f6a95e43d0588.tar.zst specimen-581f22e248c8ed1008f36356362f6a95e43d0588.zip | |
Flake harness for application and server configuration
Signed-off-by: Mel <einebeere@gmail.com>
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 37 |
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 + ]; + }; + }); + }; +} |
