mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-config.git
synced 2025-02-18 07:14:36 +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/userdata.json
|
||||||
userdata/tokens.json
|
userdata/tokens.json
|
||||||
hardware-configuration.nix
|
networking.nix
|
||||||
networking.nix
|
/result
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
{ userdata, selfprivacy-overlay, config, pkgs, lib, ... }:
|
{ userdata, selfprivacy-overlay, config, pkgs, lib, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
|
||||||
./variables-module.nix
|
./variables-module.nix
|
||||||
./variables.nix
|
./variables.nix
|
||||||
./files.nix
|
./files.nix
|
||||||
|
|
21
flake.nix
21
flake.nix
|
@ -2,25 +2,34 @@
|
||||||
description = "Selfprivacy NixOS configuration flake";
|
description = "Selfprivacy NixOS configuration flake";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
#nixpkgs.url = "https://github.com/NixOS/nixpkgs/archive/eef86b8a942913a828b9ef13722835f359deef29.tar.gz";
|
|
||||||
nixpkgs.url = "github:nixos/nixpkgs";
|
nixpkgs.url = "github:nixos/nixpkgs";
|
||||||
|
|
||||||
selfprivacy-overlay.url =
|
selfprivacy-overlay.url =
|
||||||
"git+https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nix-repo.git";
|
"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
|
let
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
userdata = builtins.fromJSON (builtins.readFile userdata-json);
|
userdata = builtins.fromJSON (builtins.readFile userdata-json);
|
||||||
|
hardware-configuration = import hardware-configuration-nix;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
just-nixos = nixpkgs.lib.nixosSystem {
|
just-nixos = nixpkgs.lib.nixosSystem {
|
||||||
specialArgs = { inherit system selfprivacy-overlay userdata; };
|
specialArgs = { inherit system selfprivacy-overlay userdata; };
|
||||||
|
modules = [ hardware-configuration ./configuration.nix ];
|
||||||
modules = [ ./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