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