1 { config, pkgs, lib, inputs, private, hostName, ... }:
3 inherit (config.users) users;
4 inherit (config.services) davfs2;
8 ../profiles/dnscrypt-proxy2.nix
15 home-manager.users.julm = {
16 imports = [ ../homes/julm.nix ];
18 host.hardware = ["ThinkPad" "X201"];
20 systemd.services.home-manager-julm.postStart = ''
21 ${pkgs.nix}/bin/nix-env --delete-generations +1 --profile /nix/var/nix/profiles/per-user/julm/home-manager
23 users.mutableUsers = false;
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/julm/hashedPassword;
42 # If created, zfs-mount.service would require:
43 # zfs set overlay=yes ${hostName}/home
49 auto-optimise-store = true
50 secret-key-files = ${private}/${hostName}/nix/binary-cache/priv.pem
55 options = "--delete-older-than 7d";
58 "nixpkgs=/etc/nixpkgs"
59 "nixpkgs-overlays=/etc/nixpkgs-overlays/overlays.nix"
61 trustedUsers = [ users.julm.name ];
62 binaryCaches = [ "https://nix-localcache.sourcephile.fr" ];
63 binaryCachePublicKeys = [ "losurdo.sourcephile.fr-1:XGeaIE2AA2mZskSZ5bIDrfx53q+TDDWJOUEpZDX7los=" ];
67 keys = [ (lib.readFile ../private/world/julm/losurdo/ssh.pub) ];
69 users.users.julm.openssh.authorizedKeys.keys = [
70 (lib.readFile ../private/world/julm/losurdo/ssh.pub)
72 services.openssh.forwardX11 = true;
73 services.openssh.passwordAuthentication = false;
78 environment.etc."nixpkgs".source = pkgs.path;
79 environment.etc."nixpkgs-overlays".source = inputs.self + "/nixpkgs";
81 documentation.nixos.enable = true;
82 time.timeZone = "Europe/Paris";
83 i18n.defaultLocale = "fr_FR.UTF-8";
84 console.font = "Lat2-Terminus16";
85 console.keyMap = "fr";
89 domain = "localdomain";
90 search = [ "sourcephile.fr" ];
97 #backend = "wpa_supplicant";
108 hardware.pulseaudio.enable = true;
109 hardware.sane.enable = true;
110 hardware.sane.extraBackends = [ pkgs.hplipWithPlugin ];
112 environment.variables = {
115 SYSTEMD_LESS = "FKMRX";
117 environment.systemPackages = [
124 interactiveShellInit = ''
125 bind '"\e[A":history-search-backward'
126 bind '"\e[B":history-search-forward'
128 # Ignore duplicate commands, ignore commands starting with a space
129 export HISTCONTROL=erasedups:ignorespace
130 export HISTSIZE=42000
131 # Append to the history instead of overwriting (good for multiple connections)
135 mkcd () { mkdir -p "$1"; cd "$1"; }
138 then sudo tee /proc/acpi/ibm/fan <<<"level $1"
139 else grep '^\(level\|speed\):' /proc/acpi/ibm/fan
146 grep = "grep --color";
149 ls = "ls --color=tty";
150 mem = "ps -e -orss=,user=,args= | sort -b -k1,1n";
153 st="sudo systemctl status";
154 u="systemctl --user";
155 j="sudo journalctl -u";
156 jb="sudo journalctl -b";
158 nix-history="sudo nix-env --list-generations --profile /nix/var/nix/profiles/system";
160 sshfs = "sshfs -o ServerAliveInterval=15 -o reconnect -f";
170 openFirewall = false;
180 fileSystems."/home/julm/mnt/ilico/severine" = {
181 device = "https://nuage.ilico.org/remote.php/dav/files/severine/";
184 let conf = pkgs.writeText "davfs2.conf" ''
185 backup_dir /home/julm/documents/backup/ilico/severine
186 cache_dir /home/julm/.cache/davfs2/ilico/severine
188 [ "conf=${conf}" "user" "noexec" "nosuid" "noauto" ]; # "x-systemd.automount"
191 packages = [ pkgs.gnome3.dconf ];
198 defaultMode = "online";
201 localDiscovery = false;
203 Datastore.StorageMax = "10GB";
204 Discovery.MDNS.Enabled = false;
207 #Swarm.AddrFilters = null;
209 startWhenNeeded = true;
211 services.journald = {
214 MaxRetentionSec=1month
219 services.printing = {
228 # Allow members of the "adbusers" group to mount Android devices via MTP
229 pkgs.android-udev-rules
235 xkbOptions = "eurosign:e";
236 libinput.enable = true;
239 # Let the session be generated by home-manager
240 { name = "home-manager";
242 ${pkgs.runtimeShell} $HOME/.hm-xsession &
249 defaultSession = "home-manager";
250 #defaultSession = "none+xmonad";
253 user = users.julm.name;
258 systemd.coredump.enable = true;
259 #environment.enableDebugInfo = true;
261 # This value determines the NixOS release with which your system is to be
262 # compatible, in order to avoid breaking some software such as database
263 # servers. You should change this only after NixOS release notes say you should.
264 system.stateVersion = "20.09"; # Did you read the comment?