2023-03-27 20:57:06 +03:00
|
|
|
{ pkgs, lib, config, ... }:
|
|
|
|
with config.deviceSpecific; {
|
2019-09-11 17:17:56 +04:00
|
|
|
|
2023-03-27 15:48:23 +03:00
|
|
|
environment.sessionVariables =
|
|
|
|
builtins.mapAttrs (_: toString)
|
|
|
|
config.home-manager.users.${config.mainuser}.home.sessionVariables // rec {
|
|
|
|
LESS = "MR";
|
|
|
|
LESSHISTFILE = "~/.local/share/lesshist";
|
|
|
|
SYSTEMD_LESS = LESS;
|
|
|
|
CARGO_HOME = "${config.home-manager.users.${config.mainuser}.xdg.dataHome}/cargo";
|
|
|
|
LIBVIRT_DEFAULT_URI = "qemu:///system";
|
|
|
|
};
|
2022-07-02 19:30:20 +03:00
|
|
|
|
2023-03-14 22:56:00 +03:00
|
|
|
services.journald.extraConfig = "Compress=false";
|
2023-03-27 20:57:06 +03:00
|
|
|
services.gvfs.enable = !isServer;
|
|
|
|
services.upower.enable = isLaptop;
|
2023-03-06 10:24:24 +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;
|
2024-01-21 19:29:36 +03:00
|
|
|
|
2023-10-13 19:51:59 +03:00
|
|
|
xdg.configFile."nixpkgs/config.nix".text = ''
|
|
|
|
{ allowUnfree = true; android_sdk.accept_license = true; }
|
|
|
|
'';
|
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
|
|
|
|
2023-03-27 20:57:06 +03:00
|
|
|
persist.state.files = lib.mkIf (devInfo.fileSystem == "zfs") [
|
2022-12-14 23:46:25 +03:00
|
|
|
"/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"
|
2023-01-13 04:03:15 +03:00
|
|
|
] ++ lib.optionals config.services.postgresql.enable [
|
|
|
|
config.services.postgresql.dataDir
|
2023-01-26 00:41:28 +03:00
|
|
|
] ++ lib.optionals config.services.mysql.enable [
|
|
|
|
config.services.mysql.dataDir
|
2022-12-14 23:46:25 +03:00
|
|
|
];
|
|
|
|
persist.state.homeDirectories = [
|
|
|
|
"projects"
|
2023-01-26 00:41:28 +03:00
|
|
|
"nixos-config"
|
2023-11-22 06:31:23 +03:00
|
|
|
".config/sops"
|
2023-03-27 20:57:06 +03:00
|
|
|
] ++ lib.optionals (!isServer) [
|
2022-12-14 23:46:25 +03:00
|
|
|
"games"
|
|
|
|
# "persist"
|
|
|
|
];
|
2019-09-11 17:17:56 +04:00
|
|
|
}
|