mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-config.git
synced 2024-11-29 06:01:28 +00:00
use hardware-configuration.nix as a flake input
This commit is contained in:
parent
afcec981bc
commit
d1d025dda6
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -1,4 +1,4 @@
|
|||
userdata/userdata.json
|
||||
userdata/tokens.json
|
||||
hardware-configuration.nix
|
||||
networking.nix
|
||||
networking.nix
|
||||
/result
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
{ userdata, selfprivacy-overlay, config, pkgs, lib, ... }:
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
./variables-module.nix
|
||||
./variables.nix
|
||||
./files.nix
|
||||
|
|
21
flake.nix
21
flake.nix
|
@ -2,25 +2,34 @@
|
|||
description = "Selfprivacy NixOS configuration flake";
|
||||
|
||||
inputs = {
|
||||
#nixpkgs.url = "https://github.com/NixOS/nixpkgs/archive/eef86b8a942913a828b9ef13722835f359deef29.tar.gz";
|
||||
nixpkgs.url = "github:nixos/nixpkgs";
|
||||
|
||||
selfprivacy-overlay.url =
|
||||
"git+https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nix-repo.git";
|
||||
userdata-json.url = "path:./userdata.json";
|
||||
userdata-json.flake = false;
|
||||
|
||||
# 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, userdata-json }:
|
||||
outputs =
|
||||
{ self
|
||||
, nixpkgs
|
||||
, selfprivacy-overlay
|
||||
, userdata-json
|
||||
, hardware-configuration-nix
|
||||
}:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
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 = [ ./configuration.nix ];
|
||||
modules = [ hardware-configuration ./configuration.nix ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
{ modulesPath, ... }:
|
||||
{
|
||||
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
|
||||
boot.loader.grub.device = "/dev/sda";
|
||||
boot.initrd.kernelModules = [ "nvme" ];
|
||||
fileSystems."/" = { device = "/dev/sda1"; fsType = "ext4"; };
|
||||
}
|
Loading…
Reference in a new issue