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 = [
114 interactiveShellInit = ''
115 bind '"\e[A":history-search-backward'
116 bind '"\e[B":history-search-forward'
118 # Ignore duplicate commands, ignore commands starting with a space
119 export HISTCONTROL=erasedups:ignorespace
120 export HISTSIZE=42000
121 # Append to the history instead of overwriting (good for multiple connections)
125 mkcd () { mkdir -p "$1"; cd "$1"; }
128 then sudo tee /proc/acpi/ibm/fan <<<"level $1"
129 else grep '^\(level\|speed\):' /proc/acpi/ibm/fan
136 grep = "grep --color";
139 ls = "ls --color=tty";
140 mem = "ps -e -orss=,user=,args= | sort -b -k1,1n";
143 st="sudo systemctl status";
144 u="systemctl --user";
145 j="sudo journalctl -u";
146 jb="sudo journalctl -b";
148 nix-history="sudo nix-env --list-generations --profile /nix/var/nix/profiles/system";
150 sshfs = "sshfs -o ServerAliveInterval=15 -o reconnect -f";
161 openFirewall = false;
167 packages = [ pkgs.gnome3.dconf ];
175 MaxRetentionSec=1month
189 # Allow members of the "adbusers" group to mount Android devices via MTP
190 pkgs.android-udev-rules
196 xkbOptions = "eurosign:e";
197 libinput.enable = true;
200 # Let the session be generated by home-manager
201 { name = "home-manager";
203 ${pkgs.runtimeShell} $HOME/.hm-xsession &
210 defaultSession = "home-manager";
211 #defaultSession = "none+xmonad";
214 user = users.julm.name;
220 systemd.coredump.enable = true;
221 #environment.enableDebugInfo = true;
223 # This value determines the NixOS release with which your system is to be
224 # compatible, in order to avoid breaking some software such as database
225 # servers. You should change this only after NixOS release notes say you should.
226 system.stateVersion = "20.09"; # Did you read the comment?