don't pass selfprivacy-overlay to configuration.nix; nix flake lock

flake-to-override
Alexander Tomokhov 2023-08-23 01:41:39 +04:00
parent d1d025dda6
commit 50c554e6e7
4 changed files with 47 additions and 8 deletions

View File

@ -1,4 +1,4 @@
{ userdata, selfprivacy-overlay, config, pkgs, lib, ... }:
{ userdata, config, pkgs, lib, ... }:
{
imports = [
./variables-module.nix
@ -23,7 +23,6 @@
./git/gitea.nix
];
nixpkgs.overlays = [ (import selfprivacy-overlay) ];
# this should be specified in hardware-configuration.nix?
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";

View File

@ -1,5 +1,18 @@
{
"nodes": {
"hardware-configuration-nix": {
"flake": false,
"locked": {
"lastModified": 1692731346,
"narHash": "sha256-rQIpYKwowqbbVVurEl5qNpuPfoRyEUMefoZXrUoO6p8=",
"path": "hardware-configuration.nix",
"type": "path"
},
"original": {
"id": "hardware-configuration-nix",
"type": "indirect"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1686476475,
@ -17,11 +30,13 @@
},
"root": {
"inputs": {
"hardware-configuration-nix": "hardware-configuration-nix",
"nixpkgs": "nixpkgs",
"selfprivacy-overlay": "selfprivacy-overlay"
"selfprivacy-overlay-path": "selfprivacy-overlay-path",
"userdata-json": "userdata-json"
}
},
"selfprivacy-overlay": {
"selfprivacy-overlay-path": {
"locked": {
"lastModified": 1689554432,
"narHash": "sha256-hegMIgxBHUuRFbCecQpbjFfTHpduV3VZWr8OINtQO6k=",
@ -35,6 +50,19 @@
"type": "git",
"url": "https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nix-repo.git"
}
},
"userdata-json": {
"flake": false,
"locked": {
"lastModified": 1689259484,
"narHash": "sha256-Co3QGsxCjDspP5Nzzu1zICkee5CEq+ORlxSF3bFqbCY=",
"path": "userdata/userdata.json",
"type": "path"
},
"original": {
"id": "userdata-json",
"type": "indirect"
}
}
},
"root": "root",

View File

@ -4,7 +4,7 @@
inputs = {
nixpkgs.url = "github:nixos/nixpkgs";
selfprivacy-overlay.url =
selfprivacy-overlay-path.url =
"git+https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nix-repo.git";
# these inputs are expected to be set by the caller
@ -16,20 +16,25 @@
outputs =
{ self
, nixpkgs
, selfprivacy-overlay
, 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 selfprivacy-overlay userdata; };
modules = [ hardware-configuration ./configuration.nix ];
specialArgs = { inherit system userdata; };
modules = [
{ nixpkgs.overlays = [ selfprivacy-overlay ]; }
hardware-configuration
./configuration.nix
];
};
};
};

View File

@ -0,0 +1,7 @@
{ modulesPath, ... }:
{
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
boot.loader.grub.device = "/dev/sda";
boot.initrd.kernelModules = [ "nvme" ];
fileSystems."/" = { device = "/dev/sda1"; fsType = "ext4"; };
}