]> Git — Sourcephile - julm/julm-nix.git/blob - hosts/patate.nix
nix: tweak nix-daemon and nix-gc schedulings
[julm/julm-nix.git] / hosts / patate.nix
1 { config, pkgs, lib, ... }:
2 {
3 imports = [
4 ../nixos/profiles/graphical.nix
5 ../nixos/profiles/lang-fr.nix
6 ../nixos/profiles/laptop.nix
7 ../nixos/profiles/printing.nix
8 patate/backup.nix
9 patate/hardware.nix
10 patate/networking.nix
11 ];
12
13 # Lower kernel's security for better performances
14 boot.kernelParams = [ "mitigations=off" ];
15
16 home-manager.users.sevy = {
17 imports = [ ../homes/sevy.nix ];
18 };
19 users.users.sevy = {
20 isNormalUser = true;
21 uid = 1000;
22 # Put the hashedPassword in /nix/store, but it will also be in /etc/passwd
23 # which is already world readable.
24 hashedPassword = lib.readFile patate/users/sevy/login/hashedPassword.clear;
25 extraGroups = [
26 "adbusers"
27 config.services.davfs2.davGroup
28 "lp"
29 "networkmanager"
30 "scanner"
31 "systemd-journal"
32 "tor"
33 "vboxusers"
34 "video"
35 "wheel"
36 ];
37 };
38
39 nix = {
40 settings = {
41 substituters = [
42 #"ssh://nix-ssh@losurdo.wg?priority=30"
43 #"ssh://nix-ssh@oignon.wg?priority=10"
44 ];
45 trusted-public-keys = map lib.readFile [
46 ../users/root/nix/losurdo.pub
47 ../users/root/nix/oignon.pub
48 ];
49 };
50 };
51
52 environment.systemPackages = [
53 pkgs.riseup-vpn # Can't be installed by home-manager because it needs to install policy-kit rules
54 ];
55
56 services.xserver = {
57 desktopManager = {
58 mate.enable = true;
59 xfce.enable = true;
60 xterm.enable = false;
61 };
62 displayManager = {
63 defaultSession = "mate";
64 autoLogin = {
65 user = config.users.users.sevy.name;
66 };
67 };
68 };
69
70 virtualisation.virtualbox.host.enable = true;
71
72 # This value determines the NixOS release with which your system is to be
73 # compatible, in order to avoid breaking some software such as database
74 # servers. You should change this only after NixOS release notes say you should.
75 system.stateVersion = "20.03"; # Did you read the comment?
76 }