mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-config.git
synced 2024-11-26 21:01:31 +00:00
42 lines
1.1 KiB
Nix
42 lines
1.1 KiB
Nix
{
|
|
description = "Selfprivacy NixOS configuration flake";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs";
|
|
|
|
selfprivacy-overlay-path.url =
|
|
"git+https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nix-repo.git";
|
|
|
|
# these inputs are expected to be set by the caller
|
|
# for example, upon nix build using --override-input
|
|
userdata-json.flake = false; # userdata.json
|
|
hardware-configuration-nix.flake = false; # hardware-configuration.nix
|
|
};
|
|
|
|
outputs =
|
|
{ self
|
|
, nixpkgs
|
|
, selfprivacy-overlay-path
|
|
, userdata-json
|
|
, hardware-configuration-nix
|
|
}:
|
|
let
|
|
system = "x86_64-linux";
|
|
selfprivacy-overlay = import selfprivacy-overlay-path;
|
|
userdata = builtins.fromJSON (builtins.readFile userdata-json);
|
|
hardware-configuration = import hardware-configuration-nix;
|
|
in
|
|
{
|
|
nixosConfigurations = {
|
|
just-nixos = nixpkgs.lib.nixosSystem {
|
|
specialArgs = { inherit system userdata; };
|
|
modules = [
|
|
{ nixpkgs.overlays = [ selfprivacy-overlay ]; }
|
|
hardware-configuration
|
|
./configuration.nix
|
|
];
|
|
};
|
|
};
|
|
};
|
|
}
|