nixos-configs/modules/base/locate/default.nix
matt1432 6f5a692ea2
All checks were successful
Discord / discord commits (push) Has been skipped
chore: update sources
Flake Inputs:
    • Updated input 'custom-sidebar-src':
        'github:elchininet/custom-sidebar' (2025-01-24) rev: e79f210c2ed68fc29e5630c26457557b1c9fbf34
      → 'github:elchininet/custom-sidebar' (2025-01-27) rev: d680a3353a351fd7670a9ed7d1f8f4bca96b6529

    • Updated input 'gpu-screen-recorder-src':
        'git+https://repo.dec05eba.com/gpu-screen-recorder' (2025-01-25) rev: cafcda102287a836dde5342a53ddf755487b1ccb
      → 'git+https://repo.dec05eba.com/gpu-screen-recorder' (2025-01-27) rev: 26e9029579345392f67bdb2fa962b1c5026f77db

    • Updated input 'gtk-theme-src':
        'github:dracula/gtk' (2025-01-14) rev: f77cf5caeac0ad7d71c8e568f699a197a100e75a
      → 'github:dracula/gtk' (2025-01-27) rev: 7c5c5c8179292fbdf5b3aaf5a11ab61fac980b71

    • Updated input 'home-manager':
        'github:nix-community/home-manager' (2025-01-24) rev: daf04c5950b676f47a794300657f1d3d14c1a120
      → 'github:nix-community/home-manager' (2025-01-27) rev: e1ae908bcc30af792b0bb0a52e53b03d2577255e

    • Updated input 'hyprgrass':
        'github:horriblename/hyprgrass' (2025-01-25) rev: 7f261b4a5558fa49fcfaf3ae6ba295052bbce48f
      → 'github:horriblename/hyprgrass' (2025-01-26) rev: ff3eb4c9147c89f04533bd2e2fe42e94232bc3b0

    • Updated input 'nix-gaming':
        'github:fufexan/nix-gaming' (2025-01-25) rev: 36dd40f5738c082f7d6e6c27ef46927c51c2408d
      → 'github:fufexan/nix-gaming' (2025-01-26) rev: 4845fe94cda365c7550d9fd1ef899d45df0bc18a

    • Updated input 'nix-index-db':
        'github:Mic92/nix-index-database' (2025-01-19) rev: 744d330659e207a1883d2da0141d35e520eb87bd
      → 'github:Mic92/nix-index-database' (2025-01-26) rev: 79b7b8eae3243fc5aa9aad34ba6b9bbb2266f523

    • Updated input 'nixcord':
        'github:kaylorben/nixcord' (2025-01-24) rev: 5e8cebecc895070e041fc259a69295a437ef5c0b
      → 'github:kaylorben/nixcord' (2025-01-26) rev: 299d571ad0fcd176c0bf429c636084f6940ea124

    • Updated input 'nixpkgs':
        'github:NixOS/nixpkgs' (2025-01-25) rev: ed45d51fb4c860e70760a042dd9ff99bd016497e
      → 'github:NixOS/nixpkgs' (2025-01-26) rev: 852ff1d9e153d8875a83602e03fdef8a63f0ecf8

    • Updated input 'nixpkgs-wayland':
        'github:nix-community/nixpkgs-wayland' (2025-01-25) rev: 2c421bd3ad1cd2ce4fc00baff4b6036d353b1ca7
      → 'github:nix-community/nixpkgs-wayland' (2025-01-27) rev: 941190f48211a136b399d9253416b4e7881c1f3f

    • Updated input 'spotifyplus-src':
        'github:thlucas1/homeassistantcomponent_spotifyplus' (2025-01-23) rev: 199308f5b6166f85e043c6ed394d0e146a3d039e
      → 'github:thlucas1/homeassistantcomponent_spotifyplus' (2025-01-27) rev: 5787f6ff24fce3901ca7119ecd43c725adbb17f1

    • Updated input 'spotifywebapi-src':
        'github:thlucas1/SpotifyWebApiPython' (2025-01-24) rev: 55eb8e8d66bf0660a09c0433617447e2ff68c1a6
      → 'github:thlucas1/SpotifyWebApiPython' (2025-01-27) rev: 6e52f64e89103e91100d8d1fbf03bc29e4060090

    • Updated input 'tuya-local-src':
        'github:make-all/tuya-local' (2025-01-25) rev: d0f16969601c82da1e8b42487fd2ee52bd60ca26
      → 'github:make-all/tuya-local' (2025-01-27) rev: f4c2ad8786187f4a4a2e44399ccb4a13e248c523

    • Updated input 'vimplugin-roslyn-nvim-src':
        'github:seblj/roslyn.nvim' (2025-01-20) rev: 6937570ec333cb1fa7febe9df027f260ac070b21
      → 'github:seblj/roslyn.nvim' (2025-01-27) rev: 490fd2d0f76249032ef6ce503e43ccdaeed9616e

    • Updated input 'yamaha-soundbar-src':
        'github:osk2/yamaha-soundbar' (2024-07-10) rev: ebb3949a31a9d8460aed38924ae3a311204a06a2
      → 'github:osk2/yamaha-soundbar' (2025-01-27) rev: df3a3a9c3a1ab90d95eddb6dfcdc06565534061f

Docker Images:
    • rssbridge/rss-bridge latest:
       sha256:a536d4d24f7325204652be2a37fb5b25532c618817657d7e31dfc0c1dc7f8d94
     → sha256:ee6fef3aa2d8699a4379acbaf01da5efeac1a8581a2d02de9b78786b680be8ba

Node modules:
    typescript-eslint: 8.21.0 -> 8.22.0
2025-01-27 20:06:24 -05:00

85 lines
1.8 KiB
Nix

{
config,
pkgs,
lib,
...
}: let
inherit (lib) concatStringsSep getName mkIf;
baseCfg = config.roles.base;
cfg = config.services.locate;
locateGroup = getName cfg.package.name;
locate = "${cfg.package}/bin/locate";
updatedb = "${cfg.package}/bin/updatedb";
database = "/var/lib/locate/locatedb";
pruneFS = concatStringsSep " " cfg.pruneFS;
pruneNames = concatStringsSep " " cfg.pruneNames;
prunePaths = concatStringsSep " " cfg.prunePaths;
updatedbBin = ''
${updatedb} -o ${database} --prunefs "${pruneFS}" \
--prunepaths "${prunePaths}" --prunenames "${pruneNames}"
'';
in {
config = mkIf baseCfg.enable {
users.users.${baseCfg.user}.extraGroups = [
locateGroup
];
# TODO: add timer
systemd.services.locate = {
wantedBy = ["default.target"];
serviceConfig = {
User = baseCfg.user;
Group = locateGroup;
StateDirectory = "locate";
StateDirectoryMode = "0770";
ExecStart = updatedbBin;
};
};
home-manager.users.${baseCfg.user}.programs.bash.shellAliases = {
locate = "${pkgs.writeShellScriptBin "lct" ''
exec ${locate} -d ${database} "$@" 2> >(grep -v "/var/cache/locatedb")
''}/bin/lct";
updatedb = updatedbBin;
};
services.locate = {
enable = true;
package = pkgs.mlocate;
interval = "never";
prunePaths = [
"/var/lib/flatpak"
# Defaults
"/tmp"
"/var/tmp"
"/var/cache"
"/var/lock"
"/var/run"
"/var/spool"
"/nix/var/log/nix"
];
pruneNames = [
"node_modules"
# Defaults
".bzr"
".cache"
".git"
".hg"
".svn"
];
};
};
# For accurate stack trace
_file = ./default.nix;
}