diff --git a/home-config/config/desktop/sway.nix b/home-config/config/desktop/sway.nix index a7d92c62..82bdafb3 100644 --- a/home-config/config/desktop/sway.nix +++ b/home-config/config/desktop/sway.nix @@ -97,37 +97,39 @@ in configDir = ../../dotfiles/eww; }; - systemd.user.services.eww = { - Unit = { - Description = "System tray"; - After = [ "graphical-session-pre.target" ]; - PartOf = [ "graphical-session.target" ]; + systemd.user.services = { + eww = { + Unit = { + Description = "System tray"; + After = [ "graphical-session-pre.target" ]; + PartOf = [ "graphical-session.target" ]; + }; + + Service = { + ExecStart = "${config.programs.eww.package}/bin/eww daemon --no-daemonize"; + ExecStartPost = "${config.programs.eww.package}/bin/eww open tray"; + }; + Install.WantedBy = [ "graphical-session.target" ]; }; - Service = { - ExecStart = "${config.programs.eww.package}/bin/eww daemon --no-daemonize"; - ExecStartPost = "${config.programs.eww.package}/bin/eww open tray"; + swaylock = { + Unit.Description = "Lock screen"; + Service.ExecStart = "${config.programs.swaylock.package}/bin/swaylock"; }; - Install.WantedBy = [ "graphical-session.target" ]; - }; - systemd.user.services.swaylock = { - Unit.Description = "Lock screen"; - Service.ExecStart = "${config.programs.swaylock.package}/bin/swaylock"; - }; + wpaperd = { + Unit = { + Description = "Wallpaper daemon"; + After = [ "graphical-session-pre.target" ]; + PartOf = [ "graphical-session.target" ]; + }; - systemd.user.services.wpaperd = { - Unit = { - Description = "Wallpaper daemon"; - After = [ "graphical-session-pre.target" ]; - PartOf = [ "graphical-session.target" ]; - }; + Service = { + ExecStart = "${pkgs.wpaperd}/bin/wpaperd"; + Environment = "XDG_CONFIG_HOME=${wpaperd-config-dir}"; + }; - Service = { - ExecStart = "${pkgs.wpaperd}/bin/wpaperd"; - Environment = "XDG_CONFIG_HOME=${wpaperd-config-dir}"; + Install.WantedBy = [ "graphical-session.target" ]; }; - - Install.WantedBy = [ "graphical-session.target" ]; }; } diff --git a/home-modules/firefox-webapp.nix b/home-modules/firefox-webapp.nix index 561a0c1c..1ef92950 100644 --- a/home-modules/firefox-webapp.nix +++ b/home-modules/firefox-webapp.nix @@ -15,7 +15,7 @@ let mapAttrs' ( name: cfg: nameValuePair "home-manager-webapp-${name}" { - inherit (cfg) id; + inherit (cfg) extensions id; userChrome = '' @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); @@ -66,8 +66,6 @@ let system = 2; }; }; - - extensions = cfg.extensions; } ) cfg; in diff --git a/nixos-config/default.nix b/nixos-config/default.nix index 287ef9b4..034a3e03 100644 --- a/nixos-config/default.nix +++ b/nixos-config/default.nix @@ -73,8 +73,6 @@ }; time.timeZone = lib.mkDefault "Asia/Hong_Kong"; - services.automatic-timezoned.enable = true; - services.geoclue2.geoProviderUrl = "https://api.beacondb.net/v1/geolocate"; users = { defaultUserShell = pkgs.zsh; @@ -222,6 +220,8 @@ flatpak.enable = true; fstrim.enable = true; fwupd.enable = true; + automatic-timezoned.enable = true; + geoclue2.geoProviderUrl = "https://api.beacondb.net/v1/geolocate"; }; hardware = { diff --git a/nixos-modules/nvidia/default.nix b/nixos-modules/nvidia/default.nix index b4e7aba8..aaee24bd 100644 --- a/nixos-modules/nvidia/default.nix +++ b/nixos-modules/nvidia/default.nix @@ -47,7 +47,7 @@ in # https://download.nvidia.com/XFree86/Linux-x86_64/565.57.01/README/kernel_open.html open = true; - dynamicBoost.enable = cfg.withIntegratedGPU; + dynamicBoost.enable = cfg.enable && cfg.withIntegratedGPU; }; boot = { diff --git a/nixos-modules/nvidia/prime.nix b/nixos-modules/nvidia/prime.nix index ff4626bd..0ed44e61 100644 --- a/nixos-modules/nvidia/prime.nix +++ b/nixos-modules/nvidia/prime.nix @@ -1,5 +1,4 @@ { - pkgs, config, lib, ... @@ -11,7 +10,7 @@ in options.easyNvidia.offload = with lib.types; { enable = lib.mkOption { type = bool; - enable = config.easyNvidia.prime.withIntegratedGPU; + enable = config.easyNvidia.enable && config.easyNvidia.prime.withIntegratedGPU; description = '' Whether to configure prime offload. diff --git a/nixos-modules/nvidia/vaapi.nix b/nixos-modules/nvidia/vaapi.nix index 6e8851ac..088f7acb 100644 --- a/nixos-modules/nvidia/vaapi.nix +++ b/nixos-modules/nvidia/vaapi.nix @@ -11,7 +11,7 @@ in options.easyNvidia.vaapi = with lib.types; { enable = lib.mkOption { type = bool; - default = !config.easyNvidia.withIntegratedGPU; + default = config.easyNvidia.enable && !config.easyNvidia.withIntegratedGPU; description = '' Whether to enable the NVIDIA vaapi driver.