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
18 home-manager.users.julm = {
21 inputs.nix-doom-emacs.hmModule
23 host.hardware = ["ThinkPad" "X201"];
25 systemd.services.home-manager-julm.postStart = ''
26 ${pkgs.nix}/bin/nix-env --delete-generations +1 --profile /nix/var/nix/profiles/per-user/julm/home-manager
28 security.lockKernelModules = false;
29 users.mutableUsers = false;
33 # Put the hashedPassword in /nix/store, but it will also be in /etc/passwd
34 # which is already world readable.
35 hashedPassword = lib.readFile ../private/world/julm/hashedPassword;
48 # If created, zfs-mount.service would require:
49 # zfs set overlay=yes ${hostName}/home
55 secret-key-files = ${private}/${hostName}/nix/binary-cache/priv.pem
57 autoOptimiseStore = true;
61 options = "--delete-older-than 7d";
64 "nixpkgs=/etc/nixpkgs"
65 "nixpkgs-overlays=/etc/nixpkgs-overlays/overlays.nix"
67 trustedUsers = [ users.julm.name ];
68 binaryCaches = [ "http://nix-localcache.losurdo.wg" ];
69 binaryCachePublicKeys = [ "losurdo.sourcephile.fr-1:XGeaIE2AA2mZskSZ5bIDrfx53q+TDDWJOUEpZDX7los=" ];
81 keys = [ (lib.readFile ../private/world/julm/losurdo/ssh.pub) ];
83 users.users.julm.openssh.authorizedKeys.keys = [
84 (lib.readFile ../private/world/julm/losurdo/ssh.pub)
86 services.openssh.openFirewall = false;
87 services.openssh.forwardX11 = true;
88 services.openssh.passwordAuthentication = false;
90 nixpkgs.config.allowUnfree = true;
91 environment.etc."nixpkgs".source = pkgs.path;
92 environment.etc."nixpkgs-overlays".source = inputs.self + "/nixpkgs";
94 time.timeZone = "Europe/Paris";
95 i18n.defaultLocale = "fr_FR.UTF-8";
96 console.font = "Lat2-Terminus16";
97 console.keyMap = "fr";
101 domain = "localdomain";
102 search = [ "sourcephile.fr" ];
109 #backend = "wpa_supplicant";
120 hardware.pulseaudio.enable = true;
121 hardware.sane.enable = true;
122 hardware.sane.extraBackends = [ pkgs.hplipWithPlugin ];
124 environment.variables = {
127 SYSTEMD_LESS = "FKMRX";
129 environment.systemPackages = [
136 interactiveShellInit = ''
137 bind '"\e[A":history-search-backward'
138 bind '"\e[B":history-search-forward'
140 # Ignore duplicate commands, ignore commands starting with a space
141 export HISTCONTROL=erasedups:ignorespace
142 export HISTSIZE=42000
143 # Append to the history instead of overwriting (good for multiple connections)
147 mkcd () { mkdir -p "$1"; cd "$1"; }
150 then sudo tee /proc/acpi/ibm/fan <<<"level $1"
151 else grep '^\(level\|speed\):' /proc/acpi/ibm/fan
158 grep = "grep --color";
161 ls = "ls --color=tty";
162 mem = "ps -e -orss=,user=,args= | sort -b -k1,1n";
165 st="sudo systemctl status";
166 u="systemctl --user";
167 j="sudo journalctl -u";
168 jb="sudo journalctl -b";
170 nix-history="sudo nix-env --list-generations --profile /nix/var/nix/profiles/system";
172 sshfs = "sshfs -o ServerAliveInterval=15 -o reconnect -f";
182 openFirewall = false;
192 fileSystems."/home/julm/mnt/ilico/severine" = {
193 device = "https://nuage.ilico.org/remote.php/dav/files/severine/";
196 let conf = pkgs.writeText "davfs2.conf" ''
197 backup_dir /home/julm/documents/backup/ilico/severine
198 cache_dir /home/julm/.cache/davfs2/ilico/severine
200 [ "conf=${conf}" "user" "noexec" "nosuid" "noauto" ]; # "x-systemd.automount"
203 packages = [ pkgs.gnome3.dconf ];
210 defaultMode = "online";
213 localDiscovery = false;
215 Datastore.StorageMax = "10GB";
216 Discovery.MDNS.Enabled = false;
219 #Swarm.AddrFilters = null;
221 startWhenNeeded = true;
223 services.journald = {
226 MaxRetentionSec=1month
231 services.printing = {
240 # Allow members of the "adbusers" group to mount Android devices via MTP.
241 pkgs.android-udev-rules
242 # Allow the console user access the Yubikey USB device node,
243 # needed for challenge/response to work correctly.
244 pkgs.yubikey-personalization
250 xkbOptions = "eurosign:e";
251 libinput.enable = true;
254 # Let the session be generated by home-manager
255 { name = "home-manager";
257 ${pkgs.runtimeShell} $HOME/.hm-xsession &
264 defaultSession = "home-manager";
265 #defaultSession = "none+xmonad";
268 user = users.julm.name;
273 systemd.coredump.enable = true;
274 #environment.enableDebugInfo = true;
276 # This value determines the NixOS release with which your system is to be
277 # compatible, in order to avoid breaking some software such as database
278 # servers. You should change this only after NixOS release notes say you should.
279 system.stateVersion = "20.09"; # Did you read the comment?