From 36f1b046bb940a3964754c6b5611c94d0ba92748 Mon Sep 17 00:00:00 2001 From: Haak Saxberg Date: Wed, 10 Aug 2022 21:21:17 -0700 Subject: [PATCH] make root shell a little more bearable --- nix/deployments/nixops.nix | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/nix/deployments/nixops.nix b/nix/deployments/nixops.nix index a8fded4..76d4c18 100644 --- a/nix/deployments/nixops.nix +++ b/nix/deployments/nixops.nix @@ -21,15 +21,31 @@ in # for nixops to log in and perform operations as haak (instead of root) security.sudo.wheelNeedsPassword = false; + home-manager.users.haak = (import ../home/commandline.nix); + + # Configure the root account users.users.root.openssh.authorizedKeys.keys = [ (import ../system/framework/keys.nix).ssh.public ]; - home-manager.users.haak = (import ../home/commandline.nix); + users.extraUsers.root = { + shell = pkgs.zsh; + }; environment.systemPackages = with pkgs; [ tmux ripgrep + htop ]; + + # Optimize nix store by hardlinking identitical files. + nix.settings.auto-optimise-store = true; + + # Limit the systemd journal to 100 MB of disk or the + # last 7 days of logs, whichever happens first. + services.journald.extraConfig = '' + SystemMaxUse=100M + MaxFileSec=7day + ''; }; server =