Several changes:

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

View File

@ -125,13 +125,30 @@
./hosts/common.nix
./hosts/${name}/configuration.nix
"${vscode-server}/default.nix"
secrets.outputs.nixos-config
{
config._module.args = {
inherit inputs;
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 {

View File

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