1 { config, pkgs, lib, inputs, private, hostName, ... }:
3 inherit (config.users) users;
4 inherit (config.services) davfs2;
8 ../profiles/dnscrypt-proxy2.nix
9 ../profiles/security.nix
10 ../networking/wireguard/wg-intra.nix
17 home-manager.users.julm = {
20 inputs.nix-doom-emacs.hmModule
22 host.hardware = ["ThinkPad" "X201"];
24 systemd.services.home-manager-julm.postStart = ''
25 ${pkgs.nix}/bin/nix-env --delete-generations +1 --profile /nix/var/nix/profiles/per-user/julm/home-manager
27 security.lockKernelModules = false;
28 users.mutableUsers = false;
32 # Put the hashedPassword in /nix/store, but it will also be in /etc/passwd
33 # which is already world readable.
34 hashedPassword = lib.readFile ../private/world/julm/hashedPassword;
47 # If created, zfs-mount.service would require:
48 # zfs set overlay=yes ${hostName}/home
54 secret-key-files = ${private}/${hostName}/nix/binary-cache/priv.pem
56 autoOptimiseStore = true;
60 options = "--delete-older-than 7d";
63 "nixpkgs=/etc/nixpkgs"
64 "nixpkgs-overlays=/etc/nixpkgs-overlays/overlays.nix"
66 trustedUsers = [ users.julm.name ];
67 binaryCaches = [ "http://nix-localcache.losurdo.wg" ];
68 binaryCachePublicKeys = [ "losurdo.sourcephile.fr-1:XGeaIE2AA2mZskSZ5bIDrfx53q+TDDWJOUEpZDX7los=" ];
80 keys = [ (lib.readFile ../private/world/julm/losurdo/ssh.pub) ];
82 users.users.julm.openssh.authorizedKeys.keys = [
83 (lib.readFile ../private/world/julm/losurdo/ssh.pub)
85 services.openssh.openFirewall = false;
86 services.openssh.forwardX11 = true;
87 services.openssh.passwordAuthentication = false;
89 nixpkgs.config.allowUnfree = true;
90 environment.etc."nixpkgs".source = pkgs.path;
91 environment.etc."nixpkgs-overlays".source = inputs.self + "/nixpkgs";
93 time.timeZone = "Europe/Paris";
94 i18n.defaultLocale = "fr_FR.UTF-8";
95 console.font = "Lat2-Terminus16";
96 console.keyMap = "fr";
100 domain = "localdomain";
101 search = [ "sourcephile.fr" ];
108 #backend = "wpa_supplicant";
119 hardware.pulseaudio.enable = true;
120 hardware.sane.enable = true;
121 hardware.sane.extraBackends = [ pkgs.hplipWithPlugin ];
123 environment.variables = {
126 SYSTEMD_LESS = "FKMRX";
128 environment.systemPackages = [
137 interactiveShellInit = ''
138 bind '"\e[A":history-search-backward'
139 bind '"\e[B":history-search-forward'
141 # Ignore duplicate commands, ignore commands starting with a space
142 export HISTCONTROL=erasedups:ignorespace
143 export HISTSIZE=42000
144 # Append to the history instead of overwriting (good for multiple connections)
148 mkcd () { mkdir -p "$1"; cd "$1"; }
151 then sudo tee /proc/acpi/ibm/fan <<<"level $1"
152 else grep '^\(level\|speed\):' /proc/acpi/ibm/fan
159 grep = "grep --color";
162 ls = "ls --color=tty";
163 mem = "ps -e -orss=,user=,args= | sort -b -k1,1n";
166 st="sudo systemctl status";
167 u="systemctl --user";
168 j="sudo journalctl -u";
169 jb="sudo journalctl -b";
171 nix-history="sudo nix-env --list-generations --profile /nix/var/nix/profiles/system";
173 sshfs = "sshfs -o ServerAliveInterval=15 -o reconnect -f";
183 openFirewall = false;
193 fileSystems."/home/julm/mnt/ilico/severine" = {
194 device = "https://nuage.ilico.org/remote.php/dav/files/severine/";
197 let conf = pkgs.writeText "davfs2.conf" ''
198 backup_dir /home/julm/documents/backup/ilico/severine
199 cache_dir /home/julm/.cache/davfs2/ilico/severine
201 [ "conf=${conf}" "user" "noexec" "nosuid" "noauto" ]; # "x-systemd.automount"
204 packages = [ pkgs.gnome3.dconf ];
211 defaultMode = "online";
214 localDiscovery = false;
216 Datastore.StorageMax = "10GB";
217 Discovery.MDNS.Enabled = false;
220 #Swarm.AddrFilters = null;
222 startWhenNeeded = true;
224 services.journald = {
227 MaxRetentionSec=1month
232 services.printing = {
241 # Allow members of the "adbusers" group to mount Android devices via MTP.
242 pkgs.android-udev-rules
243 # Allow the console user access the Yubikey USB device node,
244 # needed for challenge/response to work correctly.
245 pkgs.yubikey-personalization
251 xkbOptions = "eurosign:e";
252 libinput.enable = true;
255 # Let the session be generated by home-manager
256 { name = "home-manager";
258 ${pkgs.runtimeShell} $HOME/.hm-xsession &
265 defaultSession = "home-manager";
266 #defaultSession = "none+xmonad";
269 user = users.julm.name;
274 systemd.coredump.enable = true;
275 #environment.enableDebugInfo = true;
277 # This value determines the NixOS release with which your system is to be
278 # compatible, in order to avoid breaking some software such as database
279 # servers. You should change this only after NixOS release notes say you should.
280 system.stateVersion = "20.09"; # Did you read the comment?