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 = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOOaag1MS41CRZrAji3K5IDROh5szSo34SDB0HNXGQtX julm@losurdo" ];
64 services.openssh.passwordAuthentication = false;
69 environment.etc."nixpkgs".source = pkgs.path;
70 environment.etc."nixpkgs-overlays".source = inputs.self + "/nixpkgs";
72 documentation.nixos.enable = true;
73 time.timeZone = "Europe/Paris";
74 i18n.defaultLocale = "fr_FR.UTF-8";
75 console.font = "Lat2-Terminus16";
76 console.keyMap = "fr";
80 domain = "localdomain";
81 search = [ "sourcephile.fr" ];
88 #backend = "wpa_supplicant";
99 hardware.pulseaudio.enable = true;
100 hardware.sane.enable = true;
101 hardware.sane.extraBackends = [ pkgs.hplipWithPlugin ];
103 environment.variables = {
106 SYSTEMD_LESS = "FKMRX";
108 environment.systemPackages = [
115 interactiveShellInit = ''
116 bind '"\e[A":history-search-backward'
117 bind '"\e[B":history-search-forward'
119 # Ignore duplicate commands, ignore commands starting with a space
120 export HISTCONTROL=erasedups:ignorespace
121 export HISTSIZE=42000
122 # Append to the history instead of overwriting (good for multiple connections)
126 mkcd () { mkdir -p "$1"; cd "$1"; }
129 then sudo tee /proc/acpi/ibm/fan <<<"level $1"
130 else grep '^\(level\|speed\):' /proc/acpi/ibm/fan
137 grep = "grep --color";
140 ls = "ls --color=tty";
141 mem = "ps -e -orss=,user=,args= | sort -b -k1,1n";
144 st="sudo systemctl status";
145 u="systemctl --user";
146 j="sudo journalctl -u";
147 jb="sudo journalctl -b";
149 nix-history="sudo nix-env --list-generations --profile /nix/var/nix/profiles/system";
151 sshfs = "sshfs -o ServerAliveInterval=15 -o reconnect -f";
162 openFirewall = false;
168 packages = [ pkgs.gnome3.dconf ];
176 MaxRetentionSec=1month
190 # Allow members of the "adbusers" group to mount Android devices via MTP
191 pkgs.android-udev-rules
197 xkbOptions = "eurosign:e";
198 libinput.enable = true;
201 # Let the session be generated by home-manager
202 { name = "home-manager";
204 ${pkgs.runtimeShell} $HOME/.hm-xsession &
211 defaultSession = "home-manager";
212 #defaultSession = "none+xmonad";
215 user = users.julm.name;
221 systemd.coredump.enable = true;
222 #environment.enableDebugInfo = true;
224 # This value determines the NixOS release with which your system is to be
225 # compatible, in order to avoid breaking some software such as database
226 # servers. You should change this only after NixOS release notes say you should.
227 system.stateVersion = "20.09"; # Did you read the comment?