From 815be385a28b4314c1f2e15a0edacd65db62c202 Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Sun, 16 Jul 2023 18:12:18 +0800 Subject: [PATCH] profiles/desktop: move programs.nix-index to dev profile We now use the NixOS module for it, too. --- modules/nixos/profiles/desktop.nix | 30 +++++------------------------- modules/nixos/profiles/dev.nix | 3 +++ 2 files changed, 8 insertions(+), 25 deletions(-) diff --git a/modules/nixos/profiles/desktop.nix b/modules/nixos/profiles/desktop.nix index 55bc6cfa..be77a356 100644 --- a/modules/nixos/profiles/desktop.nix +++ b/modules/nixos/profiles/desktop.nix @@ -65,17 +65,11 @@ in { # Run unpatched binaries with these! programs.nix-ld.enable = true; + environment.systemPackages = with pkgs; [ - nix-index # locate but for the entire store directory. steam-run # For the heathens that still uses FHS. ]; - # command-not-found except better integrated since we're already using - # nix-index. - environment.interactiveShellInit = '' - . ${pkgs.nix-index}/etc/profile.d/command-not-found.sh - ''; - # Enable running GNOME apps outside GNOME. programs.dconf.enable = true; }) @@ -184,24 +178,10 @@ in { dates = [ "weekly" ]; }; - # Clear logs that are more than a month old weekly. - systemd = { - services.clean-log = { - description = "Weekly log cleanup"; - documentation = [ "man:journalctl(1)" ]; - script = "${pkgs.systemd}/bin/journalctl --vacuum-time=30d"; - }; - - timers.clean-log = { - description = "Weekly log cleanup"; - documentation = [ "man:journalctl(1)" ]; - wantedBy = [ "multi-user.target" ]; - timerConfig = { - OnCalendar = "weekly"; - Persistent = true; - }; - }; - }; + # Journal settings for retention. + services.journald.extraConfig = '' + MaxRetentionSec="3 month" + ''; }) (lib.mkIf cfg.autoUpgrade.enable { diff --git a/modules/nixos/profiles/dev.nix b/modules/nixos/profiles/dev.nix index e8e27949..b7fa09fb 100644 --- a/modules/nixos/profiles/dev.nix +++ b/modules/nixos/profiles/dev.nix @@ -73,6 +73,9 @@ in { # Convenience! environment.localBinInPath = true; + # Find Nix files with these! + programs.nix-index.enable = true; + # Additional settings for developing with nix. nix.settings = { keep-outputs = true;