From e16674c81787227f1658fc24a14dea1a4cd8c960 Mon Sep 17 00:00:00 2001 From: Noah Masur <7386960+nmasur@users.noreply.github.com> Date: Fri, 28 Oct 2022 23:58:33 -0400 Subject: [PATCH] tweaks for i3 and common --- hosts/common.nix | 2 +- hosts/desktop/default.nix | 1 - modules/graphical/i3.nix | 22 ++++++++++++---------- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/hosts/common.nix b/hosts/common.nix index 2beb87b..5143bce 100644 --- a/hosts/common.nix +++ b/hosts/common.nix @@ -23,7 +23,7 @@ }; identityFile = lib.mkOption { type = lib.types.str; - description = "Path to existing identity file."; + description = "Path to existing private key file."; default = "/etc/ssh/ssh_host_ed25519_key"; }; gui = { diff --git a/hosts/desktop/default.nix b/hosts/desktop/default.nix index ace5cad..2244179 100644 --- a/hosts/desktop/default.nix +++ b/hosts/desktop/default.nix @@ -14,7 +14,6 @@ nixpkgs.lib.nixosSystem { nix.registry.nixpkgs.flake = nixpkgs; identityFile = "/home/${globals.user}/.ssh/id_ed25519"; gaming.steam = true; - gaming.leagueoflegends = true; gaming.legendary = true; gui = { enable = true; diff --git a/modules/graphical/i3.nix b/modules/graphical/i3.nix index 6c01f65..ff9891d 100644 --- a/modules/graphical/i3.nix +++ b/modules/graphical/i3.nix @@ -9,11 +9,11 @@ let in { - config = lib.mkIf config.services.xserver.enable { + config = { services.xserver.windowManager = { i3 = { - enable = true; + enable = config.services.xserver.enable; package = pkgs.i3-gaps; }; }; @@ -25,7 +25,7 @@ in { home-manager.users.${config.user} = { xsession.windowManager.i3 = { - enable = true; + enable = config.services.xserver.enable; package = pkgs.i3-gaps; config = let modifier = "Mod4"; # Super key @@ -238,7 +238,7 @@ in { }; programs.fish.functions = { - update-lock-screen = { + update-lock-screen = lib.mkIf config.services.xserver.enable { description = "Update lockscreen with wallpaper"; body = lockUpdate; }; @@ -247,17 +247,19 @@ in { # Update lock screen cache only if cache is empty home.activation.updateLockScreenCache = let cacheDir = "${config.homePath}/.cache/betterlockscreen/current"; - in config.home-manager.users.${config.user}.lib.dag.entryAfter - [ "writeBoundary" ] '' - if [ ! -d ${cacheDir} ] || [ -z "$(ls ${cacheDir})" ]; then - $DRY_RUN_CMD ${lockUpdate} - fi - ''; + in lib.mkIf config.services.xserver.enable + (config.home-manager.users.${config.user}.lib.dag.entryAfter + [ "writeBoundary" ] '' + if [ ! -d ${cacheDir} ] || [ -z "$(ls ${cacheDir})" ]; then + $DRY_RUN_CMD ${lockUpdate} + fi + ''); }; # Ref: https://github.com/betterlockscreen/betterlockscreen/blob/next/system/betterlockscreen%40.service systemd.services.lock = { + enable = config.services.xserver.enable; description = "Lock the screen on resume from suspend"; before = [ "sleep.target" "suspend.target" ]; serviceConfig = {