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 = {
inherit inputs;
inherit (self) extendedLib;
inherit (config) machineVars;
secrets = secrets.outputs.settings;
};
users.h7x4 = import ./home/home.nix {
inherit pkgs;
inherit inputs;
inherit (pkgs) lib;
inherit (config) machineVars;
inherit (self) extendedLib;
users.h7x4 = {
imports = [ ./home/home.nix ];
};
};
})

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;
font = {
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;
graphics = !machineVars.headless;
in {
inherit machineVars;
imports = [
./shell.nix
./packages.nix
@ -26,7 +24,6 @@ in {
./programs/tmux.nix
./programs/zsh
../modules/machineVars.nix
./modules/colors.nix
./modules/shellAliases.nix
] ++ optionals graphics [

View File

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

View File

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

View File

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