]> Git — Sourcephile - julm/julm-nix.git/blob - nixos/profiles/system.nix
tlp: enable on all hardwares
[julm/julm-nix.git] / nixos / profiles / system.nix
1 { config, pkgs, lib, ... }:
2 {
3 imports = [
4 ./bash.nix
5 ./nixos-fallback.nix
6 ];
7 documentation = {
8 enable = lib.mkDefault true;
9 dev.enable = lib.mkDefault false;
10 doc.enable = lib.mkDefault true;
11 info.enable = lib.mkDefault false;
12 man.enable = lib.mkDefault true;
13 nixos.enable = lib.mkDefault false;
14 };
15 environment.variables = {
16 EDITOR = "vim";
17 PAGER = "less -R";
18 SYSTEMD_LESS = "FKMRX";
19 };
20 home-manager.users.root = {
21 imports = [
22 ../../home-manager/options.nix
23 ../../home-manager/profiles/essential.nix
24 ];
25 };
26 systemd.services.home-manager-root.postStart = ''
27 ${pkgs.nix}/bin/nix-env --delete-generations +1 --profile /nix/var/nix/profiles/per-user/root/home-manager
28 '';
29 nix = {
30 settings.auto-optimise-store = lib.mkDefault true;
31 gc.automatic = lib.mkDefault true;
32 gc.dates = lib.mkDefault "weekly";
33 gc.options = lib.mkDefault "--delete-older-than 7d";
34 nixPath = lib.mkForce [ ];
35 };
36 security.lockKernelModules = false;
37 services.journald = {
38 extraConfig = ''
39 Compress=true
40 MaxRetentionSec=1month
41 Storage=persistent
42 SystemMaxUse=100M
43 '';
44 };
45 users.mutableUsers = false;
46 }