selfprivacy-nixos-config/flake.nix

42 lines
1 KiB
Nix
Raw Normal View History

2023-07-15 12:52:46 +00:00
{
description = "Selfprivacy NixOS configuration flake";
inputs = {
2023-07-17 00:58:26 +00:00
nixpkgs.url = "github:nixos/nixpkgs";
selfprivacy-overlay.url =
2023-07-17 00:58:26 +00:00
"git+https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nix-repo.git";
# the /etc/nixos folder input is expected to be set by the caller
# for example, upon nix build using --override-input
etc-nixos.flake = false;
2023-07-15 12:52:46 +00:00
};
outputs =
{ self
, etc-nixos
, nixpkgs
, selfprivacy-overlay
}:
2023-07-15 12:52:46 +00:00
let
system = "x86_64-linux";
userdata =
builtins.fromJSON (builtins.readFile "${etc-nixos}/userdata.json");
2023-07-15 12:52:46 +00:00
in
{
nixosConfigurations = {
2023-07-15 12:52:46 +00:00
just-nixos = nixpkgs.lib.nixosSystem {
specialArgs = { inherit system userdata; };
modules = [
# SelfPrivacy overlay
{ nixpkgs.overlays = [ selfprivacy-overlay.overlay ]; }
# machine specifics
"${etc-nixos}/hardware-configuration.nix"
# main configuration part
./configuration.nix
];
2023-07-15 12:52:46 +00:00
};
};
};
}