Skip to content

Commit

Permalink
Fix suspend, remove old junk and make background updates less disruptive
Browse files Browse the repository at this point in the history
  • Loading branch information
stusmall committed Aug 9, 2024
1 parent 8916281 commit 77f0c28
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
7 changes: 7 additions & 0 deletions base.nix
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,13 @@
operation = "boot";
};

# Limit the parallelism of nix rebuilds. When left on the default it uses all available resources which can make the
# system unusable.
nix.settings = {
cores = 2;
max-jobs = 2;
};

# Enable udev settings for yubikey personalization
services.udev.packages = [ pkgs.yubikey-personalization ];

Expand Down
19 changes: 8 additions & 11 deletions home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@
programs.bash = {
enable = true;
bashrcExtra = ''
# Include secrets managed outside nix
source $HOME/.secrets/*
# Always open terminal in zellij session
eval "$(zellij setup --generate-auto-start bash)"
# Needed to use yubkiey for SSH key
Expand All @@ -61,6 +59,10 @@
'';
};

programs.direnv = {
enable = true;
};

services.gpg-agent = {
enable = true;
enableScDaemon = true;
Expand Down Expand Up @@ -116,18 +118,19 @@
"org/gnome/desktop/screensaver" = {
lock-enabled = true;
};
# TODO: verify
# Screen blanks after 15 minutes
"org/gnome/desktop/session" = {
idle-delay = 900;
idle-delay = lib.hm.gvariant.mkUint32 900;
};
"org/gnome/desktop/notifications" = {
show-in-lock-screen = false;
};
# TODO: verify
# Suspend after 15 minutes
"org/gnome/settings-daemon/plugins/power" = {
sleep-inactive-ac-type = "suspend";
sleep-inactive-ac-timeout = 900;
sleep-inactive-battery-type = "suspend";
sleep-inactive-battery-timeout = 900;
};
"org/gnome/shell" = {
enabled-extensions = [
Expand All @@ -145,11 +148,5 @@
apply-custom-theme = true;
};
};


# maintain a folder to include secrets to be pulled into global envars that we don't want managed by nix
home.activation.name = lib.hm.dag.entryAfter [ "writeBoundary" ] "mkdir -p ~/.secrets";


}

0 comments on commit 77f0c28

Please sign in to comment.