1
0
mirror of https://github.com/ellmau/nixos.git synced 2025-12-19 09:29:36 +01:00

Fix deprecated package names

This commit is contained in:
Stefan Ellmauthaler 2022-05-31 14:41:29 +02:00
parent 9d7e605929
commit 7da4726b9c
Failed to extract signature
4 changed files with 58 additions and 3 deletions

View File

@ -5,7 +5,7 @@ with lib; {
services = { services = {
dbus = { dbus = {
enable = true; enable = true;
packages = with pkgs; [ gnome3.dconf ]; packages = with pkgs; [ dconf ];
}; };
}; };

View File

@ -8,7 +8,7 @@ let
mkdir -p $out/share/emacs/site-lisp mkdir -p $out/share/emacs/site-lisp
cp ${defaultEl} $out/share/emacs/site-lisp/default.el cp ${defaultEl} $out/share/emacs/site-lisp/default.el
''; '';
emacsPackage = (pkgs.emacsPackagesGen pkgs.emacs).emacsWithPackages emacsPackage = (pkgs.emacsPackagesFor pkgs.emacs).emacsWithPackages
(epkgs: (epkgs:
let let
lpkgs = import ./packages.nix { lpkgs = import ./packages.nix {

View File

@ -72,7 +72,7 @@ with lib; {
texlive.combined.scheme-full texlive.combined.scheme-full
usbutils usbutils
keepassxc keepassxc
gnome.libsecret libsecret
arandr arandr
]; ];
}; };

55
modules/nix-index-db.nix Normal file
View File

@ -0,0 +1,55 @@
{ config, pkgs, lib, ... }:
with lib; {
options.elss.nix-index-db-update.enable = mkEnableOption "periodically update the nix-index database";
config =
let
cfg = config.elss.nix-index-db-update;
nix-index-db-update = pkgs.writeShellScript "nix-index-db-update" ''
set -euo pipefail
filename="index-x86_64-$(${pkgs.coreutils}/bin/uname | ${pkgs.coreutils}/bin/tr A-Z a-z)"
cd /var/db/nix-index/
${pkgs.wget}/bin/wget -q -N https://github.com/Mic92/nix-index-database/releases/latest/download/$filename
${pkgs.coreutils}/bin/ln -f $filename files
'';
inherit (lib.elss.withConfig config) mapAllUsers;
in
mkIf cfg.enable {
systemd = {
services.nix-index-db-update = {
description = "Update nix-index database";
serviceConfig = {
CPUSchedulingPolicy = "idle";
IOSchedulingClass = "idle";
ExecStartPre = ''
+${pkgs.coreutils}/bin/mkdir -p /var/db/nix-index/
+${pkgs.coreutils}/bin/chown nobody:nobody /var/db/nix-index/
'';
ExecStart = toString nix-index-db-update;
User = nobody;
Group = nobody;
};
};
timers.nix-index-db-update = {
description = "nix-index database periodic update";
timerConfig = {
Unit = "nix-index-db-update.service";
OnCalendar = "daily";
Persistent = true;
};
wantedBy = [ "timers.target" ];
};
};
home-manager.users = mapAllUsers (_:
{
home.file.".cache/nix-index" = "/var/db/nix-index/";
}
);
};
}