2023-07-15 15:52:46 +03:00
|
|
|
{
|
2023-11-06 09:40:32 +02:00
|
|
|
description = "SelfPrivacy NixOS configuration flake";
|
2023-07-15 15:52:46 +03:00
|
|
|
|
|
|
|
inputs = {
|
2023-07-17 03:58:26 +03:00
|
|
|
nixpkgs.url = "github:nixos/nixpkgs";
|
2023-11-06 10:18:08 +02:00
|
|
|
|
|
|
|
selfprivacy-graphql-api.url =
|
|
|
|
"git+https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git";
|
|
|
|
selfprivacy-graphql-api.inputs.nixpkgs.follows = "nixpkgs";
|
2023-07-15 15:52:46 +03:00
|
|
|
};
|
|
|
|
|
2023-11-06 10:18:08 +02:00
|
|
|
outputs = { self, nixpkgs, selfprivacy-graphql-api }:
|
2023-07-15 15:52:46 +03:00
|
|
|
let
|
|
|
|
system = "x86_64-linux";
|
|
|
|
in
|
|
|
|
{
|
2023-11-10 04:53:21 +02:00
|
|
|
nixosConfigurations-fun =
|
|
|
|
{ hardware-configuration
|
|
|
|
, userdata
|
|
|
|
, top-level-flake
|
|
|
|
}: {
|
|
|
|
just-nixos = nixpkgs.lib.nixosSystem {
|
|
|
|
specialArgs = {
|
|
|
|
inherit
|
|
|
|
system
|
|
|
|
hardware-configuration
|
|
|
|
userdata;
|
|
|
|
selfprivacy-graphql-api =
|
|
|
|
selfprivacy-graphql-api.packages.${system}.default;
|
|
|
|
};
|
|
|
|
modules = [
|
2023-11-06 10:18:08 +02:00
|
|
|
hardware-configuration
|
2023-11-10 04:53:21 +02:00
|
|
|
./configuration.nix
|
|
|
|
{
|
2023-11-10 05:05:38 +02:00
|
|
|
# embed top-level flake source folder into the build
|
|
|
|
environment.etc."selfprivacy-config-source" =
|
|
|
|
top-level-flake.outPath;
|
2023-11-10 04:53:21 +02:00
|
|
|
# for running "nix search nixpkgs", etc
|
|
|
|
nix.registry.nixpkgs.flake = nixpkgs;
|
2023-11-10 05:05:38 +02:00
|
|
|
# embed commit sha1; dirty builds are intentionally forbidden
|
2023-11-10 05:08:20 +02:00
|
|
|
system.configurationRevision = self.rev;
|
2023-11-10 04:53:21 +02:00
|
|
|
}
|
|
|
|
];
|
|
|
|
inherit system;
|
2023-11-06 10:18:08 +02:00
|
|
|
};
|
2023-07-15 15:52:46 +03:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|