1 { config, pkgs, lib, inputs, private, hostName, ... }:
2 let inherit (config.users) users; in
5 ../profiles/dnscrypt-proxy2.nix
11 home-manager.users.julm = {
12 imports = [ ../homes/julm.nix ];
14 host.hardware = ["ThinkPad" "X201"];
16 systemd.services.home-manager-julm.postStart = ''
17 ${pkgs.nix}/bin/nix-env --delete-generations +1 --profile /nix/var/nix/profiles/per-user/julm/home-manager
19 users.mutableUsers = false;
23 # Put the hashedPassword in /nix/store, but it will also be in /etc/passwd
24 # which is already world readable.
25 hashedPassword = lib.readFile ../private/world/julm/hashedPassword;
37 # If created, zfs-mount.service would require:
38 # zfs set overlay=yes ${hostName}/home
44 auto-optimise-store = true
45 secret-key-files = ${private}/${hostName}/nix/binary-cache/priv.pem
50 options = "--delete-older-than 7d";
53 "nixpkgs=/etc/nixpkgs"
54 "nixpkgs-overlays=/etc/nixpkgs-overlays/overlays.nix"
56 trustedUsers = [ users.julm.name ];
57 binaryCaches = [ "https://nix-localcache.sourcephile.fr" ];
58 binaryCachePublicKeys = [ "losurdo.sourcephile.fr-1:XGeaIE2AA2mZskSZ5bIDrfx53q+TDDWJOUEpZDX7los=" ];
62 keys = [ (lib.readFile ../private/world/julm/losurdo/ssh.pub) ];
64 users.users.julm.openssh.authorizedKeys.keys = [
65 (lib.readFile ../private/world/julm/losurdo/ssh.pub)
67 services.openssh.forwardX11 = true;
68 services.openssh.passwordAuthentication = false;
73 environment.etc."nixpkgs".source = pkgs.path;
74 environment.etc."nixpkgs-overlays".source = inputs.self + "/nixpkgs";
76 documentation.nixos.enable = true;
77 time.timeZone = "Europe/Paris";
78 i18n.defaultLocale = "fr_FR.UTF-8";
79 console.font = "Lat2-Terminus16";
80 console.keyMap = "fr";
84 domain = "localdomain";
85 search = [ "sourcephile.fr" ];
92 #backend = "wpa_supplicant";
103 hardware.pulseaudio.enable = true;
104 hardware.sane.enable = true;
105 hardware.sane.extraBackends = [ pkgs.hplipWithPlugin ];
107 environment.variables = {
110 SYSTEMD_LESS = "FKMRX";
112 environment.systemPackages = [
119 interactiveShellInit = ''
120 bind '"\e[A":history-search-backward'
121 bind '"\e[B":history-search-forward'
123 # Ignore duplicate commands, ignore commands starting with a space
124 export HISTCONTROL=erasedups:ignorespace
125 export HISTSIZE=42000
126 # Append to the history instead of overwriting (good for multiple connections)
130 mkcd () { mkdir -p "$1"; cd "$1"; }
133 then sudo tee /proc/acpi/ibm/fan <<<"level $1"
134 else grep '^\(level\|speed\):' /proc/acpi/ibm/fan
141 grep = "grep --color";
144 ls = "ls --color=tty";
145 mem = "ps -e -orss=,user=,args= | sort -b -k1,1n";
148 st="sudo systemctl status";
149 u="systemctl --user";
150 j="sudo journalctl -u";
151 jb="sudo journalctl -b";
153 nix-history="sudo nix-env --list-generations --profile /nix/var/nix/profiles/system";
155 sshfs = "sshfs -o ServerAliveInterval=15 -o reconnect -f";
166 openFirewall = false;
172 packages = [ pkgs.gnome3.dconf ];
180 MaxRetentionSec=1month
194 # Allow members of the "adbusers" group to mount Android devices via MTP
195 pkgs.android-udev-rules
201 xkbOptions = "eurosign:e";
202 libinput.enable = true;
205 # Let the session be generated by home-manager
206 { name = "home-manager";
208 ${pkgs.runtimeShell} $HOME/.hm-xsession &
215 defaultSession = "home-manager";
216 #defaultSession = "none+xmonad";
219 user = users.julm.name;
225 systemd.coredump.enable = true;
226 #environment.enableDebugInfo = true;
228 # This value determines the NixOS release with which your system is to be
229 # compatible, in order to avoid breaking some software such as database
230 # servers. You should change this only after NixOS release notes say you should.
231 system.stateVersion = "20.09"; # Did you read the comment?