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