Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix suspend, remove old junk and make background updates less disruptive #11

Merged
merged 1 commit into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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";


}