]> Git — Sourcephile - julm/julm-nix.git/blob - hosts/patate.nix
bash: add alias gg
[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 trustedUsers = [ config.users.users."sevy".name ];
46 binaryCaches = [
47 #"ssh://nix-ssh@losurdo.wg?priority=30"
48 "ssh://nix-ssh@oignon.wg?priority=10"
49 ];
50 binaryCachePublicKeys = map lib.readFile [
51 ../private/shared/nix/losurdo.pub
52 ../private/shared/nix/oignon.pub
53 ];
54 };
55
56 environment.systemPackages = [
57 pkgs.riseup-vpn # Can't be installed by home-manager because it needs to install policy-kit rules
58 ];
59
60 services.physlock = {
61 enable = true;
62 allowAnyUser = true;
63 # NOTE: xfconf-query -c xfce4-session -p /general/LockCommand -s "physlock" --create -t string
64 };
65
66 services.xserver = {
67 desktopManager = {
68 mate.enable = true;
69 xfce.enable = true;
70 xterm.enable = false;
71 };
72 displayManager = {
73 defaultSession = "mate";
74 autoLogin = {
75 user = config.users.users.sevy.name;
76 };
77 };
78 };
79
80 virtualisation.virtualbox.host.enable = true;
81
82 # This value determines the NixOS release with which your system is to be
83 # compatible, in order to avoid breaking some software such as database
84 # servers. You should change this only after NixOS release notes say you should.
85 system.stateVersion = "20.03"; # Did you read the comment?
86 }