From 79bad31c5d88f6d51748c70d20ce1b06e8446736 Mon Sep 17 00:00:00 2001 From: krizej Date: Tue, 17 Sep 2024 15:45:36 +0200 Subject: [PATCH] fix hardcoded usernames --- modules/stuff/alacritty.nix | 3 ++- modules/stuff/firefox.nix | 4 ++-- modules/stuff/flameshot.nix | 5 +++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/modules/stuff/alacritty.nix b/modules/stuff/alacritty.nix index cf49eb5..d73c0ab 100644 --- a/modules/stuff/alacritty.nix +++ b/modules/stuff/alacritty.nix @@ -1,13 +1,14 @@ { lib, pkgs, config, ... }: let inherit (lib) mkIf mkEnableOption; cfg = config.chuj.stuff.alacritty; + user = config.chuj.system.user; in { options.chuj.stuff.alacritty = { enable = mkEnableOption "alacritty"; }; config = mkIf cfg.enable { - home-manager.users.krizej.programs.alacritty = { + home-manager.users.${user}.programs.alacritty = { package = pkgs.alacritty-sixel; enable = true; settings = { diff --git a/modules/stuff/firefox.nix b/modules/stuff/firefox.nix index b1f77b8..ef5788b 100644 --- a/modules/stuff/firefox.nix +++ b/modules/stuff/firefox.nix @@ -8,7 +8,7 @@ in { }; config = mkIf cfg.enable { - home-manager.users.krizej.programs.firefox = { + home-manager.users.${user}.programs.firefox = { enable = true; policies = { DisableTelemetry = true; @@ -52,7 +52,7 @@ in { }; }; }; - profiles.krizej = { + profiles.${user} = { id = 0; isDefault = true; search = { diff --git a/modules/stuff/flameshot.nix b/modules/stuff/flameshot.nix index 84c4b7c..8e200f9 100644 --- a/modules/stuff/flameshot.nix +++ b/modules/stuff/flameshot.nix @@ -1,12 +1,13 @@ { lib, pkgs, config, ...}: let inherit (lib) mkIf mkEnableOption mkOption; cfg = config.chuj.stuff.flameshot; + user = config.chuj.system.user; in { options.chuj.stuff.flameshot = { enable = mkEnableOption "flameshot"; }; config = mkIf cfg.enable { - home-manager.users.krizej.services.flameshot = { + home-manager.users.${user}.services.flameshot = { enable = true; settings = { General = { @@ -16,4 +17,4 @@ in { }; }; }; -} \ No newline at end of file +}