Several changes:

- Change secret outputs into home-manager and nixos specific
- Specifiy home-manager module import in flake.
This commit is contained in:
Oystein Kristoffer Tveit 2022-08-19 14:50:03 +02:00
parent 011b20e05e
commit 22419caadd
Signed by: oysteikt
GPG Key ID: 9F2F7D8250F35146
4 changed files with 37 additions and 28 deletions

View File

@ -34,8 +34,8 @@
"fonts": { "fonts": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1649003599, "lastModified": 1651945262,
"narHash": "sha256-QtT+ansp3ombpdS2+jNWgZKSqpxhVq3cyrpAKkDzA9Y=", "narHash": "sha256-7r0hq5G/HjK6yVOt18VKaxuJcGM6GPu/jmwbkksJ7LE=",
"path": "/home/h7x4/git/fonts", "path": "/home/h7x4/git/fonts",
"type": "path" "type": "path"
}, },
@ -67,11 +67,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1660661643, "lastModified": 1660749083,
"narHash": "sha256-WlgPb7KLTZUeY31o9HWhu37pvgA76MKwakaXefkaIB4=", "narHash": "sha256-GHLFMGH+r3OmI4tV0x/RtxN7DkHcH2ZOhK8uzQeSLiY=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "a82127cea64fd801c5e138ae23dfd444ec1e06d1", "rev": "a55a7db823959cf509d55325201f1864af4574b9",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -99,8 +99,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1649874484, "lastModified": 1660913098,
"narHash": "sha256-B1MVa8TInLhivLJMcEltfzUxYFYkiq+55oteHD4DoO8=", "narHash": "sha256-mm27EyD2mxpPjI6KaznqB62VL7/QRkN31VcipTIxso0=",
"ref": "refs/heads/main",
"rev": "ff49c477262f5e2f499e13b32cdef3aa6920f9e7",
"revCount": 32,
"type": "git", "type": "git",
"url": "file:///home/h7x4/git/nix-secrets" "url": "file:///home/h7x4/git/nix-secrets"
}, },
@ -111,11 +114,11 @@
}, },
"unstable-nixpkgs": { "unstable-nixpkgs": {
"locked": { "locked": {
"lastModified": 1660646295, "lastModified": 1660819943,
"narHash": "sha256-V4G+egGRc3elXPTr7QLJ7r7yrYed0areIKDiIAlMLC8=", "narHash": "sha256-TRZV/mlW1eYuojqDC3ueYWj7jsTKXJCtyMLNYX/Ybtw=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "762b003329510ea855b4097a37511eb19c7077f0", "rev": "8ea014acc33da95ea56c902229957d8225005163",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@ -125,13 +125,30 @@
./hosts/common.nix ./hosts/common.nix
./hosts/${name}/configuration.nix ./hosts/${name}/configuration.nix
"${vscode-server}/default.nix" "${vscode-server}/default.nix"
secrets.outputs.nixos-config
{ {
config._module.args = { config._module.args = {
inherit inputs; inherit inputs;
inherit unstable-pkgs; inherit unstable-pkgs;
secrets = secrets.outputs.default; secrets = secrets.outputs.settings;
}; };
} }
({ config, ... }:
{
home-manager = {
useGlobalPkgs = true;
extraSpecialArgs = { inherit inputs; secrets = secrets.outputs.settings; };
users.h7x4 = import ./home/home.nix {
inherit pkgs;
inherit inputs;
inherit (config) machineVars colors;
};
};
})
]; ];
}; };
in { in {

View File

@ -1,8 +1,11 @@
{ pkgs, config, inputs, ... } @ args: let { pkgs, inputs, machineVars, colors, ... } @ args: let
inherit (pkgs) lib; inherit (pkgs) lib;
inherit (pkgs.lib) mkForce mkIf optionals; inherit (pkgs.lib) mkForce mkIf optionals;
graphics = !config.machineVars.headless; graphics = !machineVars.headless;
in { in {
inherit machineVars;
inherit colors;
imports = [ imports = [
./shellOptions.nix ./shellOptions.nix
./packages.nix ./packages.nix
@ -23,7 +26,7 @@ in {
../modules ../modules
inputs.secrets.outputs.nixosModule inputs.secrets.outputs.home-config
] ++ optionals graphics [ ] ++ optionals graphics [
./config/gtk.nix ./config/gtk.nix
@ -45,8 +48,6 @@ in {
./services/sxhkd.nix ./services/sxhkd.nix
]; ];
inherit (config) machineVars colors;
home = { home = {
stateVersion = "22.05"; stateVersion = "22.05";
username = "h7x4"; username = "h7x4";

View File

@ -198,18 +198,6 @@ in {
}; };
}; };
home-manager = {
useGlobalPkgs = true;
extraSpecialArgs = { inherit inputs; inherit secrets; };
# TODO: figure out why specialArgs isn't accessible from the root home file.
users.h7x4 = import ../home/home.nix {
inherit pkgs;
inherit inputs;
inherit config;
};
};
services = { services = {
tumbler.enable = !config.machineVars.headless; tumbler.enable = !config.machineVars.headless;
gnome.gnome-keyring.enable = !config.machineVars.headless; gnome.gnome-keyring.enable = !config.machineVars.headless;