home-manager: fix injection of machineVars

This commit is contained in:
Oystein Kristoffer Tveit 2024-06-08 12:22:23 +02:00
parent 9caab9f6a7
commit ee44e4f952
Signed by: oysteikt
GPG Key ID: 9F2F7D8250F35146
6 changed files with 12 additions and 20 deletions

View File

@ -195,15 +195,12 @@
extraSpecialArgs = { extraSpecialArgs = {
inherit inputs; inherit inputs;
inherit (self) extendedLib; inherit (self) extendedLib;
inherit (config) machineVars;
secrets = secrets.outputs.settings; secrets = secrets.outputs.settings;
}; };
users.h7x4 = import ./home/home.nix { users.h7x4 = {
inherit pkgs; imports = [ ./home/home.nix ];
inherit inputs;
inherit (pkgs) lib;
inherit (config) machineVars;
inherit (self) extendedLib;
}; };
}; };
}) })

View File

@ -1,6 +1,6 @@
{ pkgs, config, ... }: { pkgs, config, machineVars, ... }:
{ {
gtk = pkgs.lib.mkIf (!config.machineVars.headless) { gtk = pkgs.lib.mkIf (!machineVars.headless) {
enable = true; enable = true;
font = { font = {
name = "Droid Sans"; name = "Droid Sans";

View File

@ -1,9 +1,7 @@
{ pkgs, lib, extendedLib, inputs, machineVars, ... } @ args: let { config, pkgs, lib, extendedLib, inputs, machineVars, ... } @ args: let
inherit (lib) mkForce mkIf optionals; inherit (lib) mkForce mkIf optionals;
graphics = !machineVars.headless; graphics = !machineVars.headless;
in { in {
inherit machineVars;
imports = [ imports = [
./shell.nix ./shell.nix
./packages.nix ./packages.nix
@ -26,7 +24,6 @@ in {
./programs/tmux.nix ./programs/tmux.nix
./programs/zsh ./programs/zsh
../modules/machineVars.nix
./modules/colors.nix ./modules/colors.nix
./modules/shellAliases.nix ./modules/shellAliases.nix
] ++ optionals graphics [ ] ++ optionals graphics [

View File

@ -1,6 +1,5 @@
{ pkgs, config, ... }: let { pkgs, config, machineVars, ... }:
inherit (config) machineVars; {
in {
home.packages = with pkgs; [ home.packages = with pkgs; [
beets beets
cloc cloc

View File

@ -1,4 +1,4 @@
{ pkgs, config, ... }: let { config, pkgs, machineVars, ... }: let
inherit (pkgs) lib; inherit (pkgs) lib;
in { in {
programs.xmobar = let programs.xmobar = let
@ -7,8 +7,8 @@ in {
# TODO: loop over dataDrives # TODO: loop over dataDrives
disks = [ disks = [
"/" "/"
"${config.machineVars.dataDrives.default}" "${machineVars.dataDrives.default}"
"${config.machineVars.dataDrives.default}/disks/data2" "${machineVars.dataDrives.default}/disks/data2"
]; ];
mpd_status_script = pkgs.writeShellScript "mpd-status" '' mpd_status_script = pkgs.writeShellScript "mpd-status" ''

View File

@ -1,6 +1,5 @@
{ pkgs, config, ... }: let { pkgs, config, machineVars, ... }: let
colors = config.colors.defaultColorSet; colors = config.colors.defaultColorSet;
inherit (config) machineVars;
in { in {
services.polybar = { services.polybar = {
enable = true; enable = true;