62 lines
1.7 KiB
Nix
Raw Normal View History

2019-09-11 17:17:56 +04:00
{ pkgs, lib, config, ... }: {
2022-07-07 22:46:27 +03:00
environment.sessionVariables = rec {
2021-06-16 05:30:04 +03:00
LESS = "MR";
LESSHISTFILE = "~/.local/share/lesshist";
SYSTEMD_LESS = LESS;
2022-12-10 22:34:39 +03:00
CARGO_HOME = "${config.home-manager.users.${config.mainuser}.xdg.dataHome}/cargo";
2022-08-23 16:13:51 +03:00
LIBVIRT_DEFAULT_URI = "qemu:///system";
2021-02-07 02:38:11 +03:00
};
2020-02-05 04:30:49 +04:00
2022-08-05 21:10:22 +03:00
environment.systemPackages = [ pkgs.pass-secret-service ];
services.dbus.packages = [ pkgs.pass-secret-service ];
xdg.portal.extraPortals = [ pkgs.pass-secret-service ];
2022-07-02 19:30:20 +03:00
2022-12-10 22:34:39 +03:00
home-manager.users.${config.mainuser} = {
2019-09-11 17:17:56 +04:00
news.display = "silent";
systemd.user.startServices = true;
2021-11-20 01:35:09 +03:00
2022-10-01 22:50:36 +03:00
nixpkgs.config.allowUnfree = true;
2021-11-20 01:35:09 +03:00
#TODO: Move to another file
2022-08-05 21:10:22 +03:00
services.pass-secret-service.enable = true;
systemd.user.services.pass-secret-service = {
Service = {
Type = "dbus";
Environment = [ "GPG_TTY=/dev/tty1" "DISPLAY=:0" ];
BusName = "org.freedesktop.secrets";
};
Unit = rec {
Wants = [ "gpg-agent.service" ];
After = Wants;
PartOf = [ "graphical-session-pre.target" ];
};
};
2019-09-11 17:17:56 +04:00
};
2021-02-07 02:38:11 +03:00
2021-06-16 05:30:04 +03:00
systemd.services.systemd-timesyncd.wantedBy = [ "multi-user.target" ];
systemd.timers.systemd-timesyncd = { timerConfig.OnCalendar = "hourly"; };
2022-12-14 23:46:25 +03:00
persist.state.files = lib.mkIf (config.deviceSpecific.devInfo.fileSystem == "zfs") [
"/etc/zfs/zpool.cache"
];
persist.cache.homeDirectories = [
".cache"
".local/share/cargo"
];
persist.cache.directories = [
"/var/cache"
];
persist.state.directories = [
"/var/lib/nixos"
"/var/lib/systemd"
];
persist.state.homeDirectories = [
"projects"
"nixos-config"
] ++ lib.optionals (!config.deviceSpecific.isServer) [
"games"
# "persist"
];
2019-09-11 17:17:56 +04:00
}