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
17 home-manager.users.julm = {
20 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 = [ "https://nix-localcache.sourcephile.fr" ];
69 binaryCachePublicKeys = [ "losurdo.sourcephile.fr-1:XGeaIE2AA2mZskSZ5bIDrfx53q+TDDWJOUEpZDX7los=" ];
71 documentation.enable = false;
74 keys = [ (lib.readFile ../private/world/julm/losurdo/ssh.pub) ];
76 users.users.julm.openssh.authorizedKeys.keys = [
77 (lib.readFile ../private/world/julm/losurdo/ssh.pub)
79 services.openssh.openFirewall = false;
80 services.openssh.forwardX11 = true;
81 services.openssh.passwordAuthentication = false;
83 nixpkgs.config.allowUnfree = true;
84 environment.etc."nixpkgs".source = pkgs.path;
85 environment.etc."nixpkgs-overlays".source = inputs.self + "/nixpkgs";
87 documentation.nixos.enable = true;
88 time.timeZone = "Europe/Paris";
89 i18n.defaultLocale = "fr_FR.UTF-8";
90 console.font = "Lat2-Terminus16";
91 console.keyMap = "fr";
95 domain = "localdomain";
96 search = [ "sourcephile.fr" ];
103 #backend = "wpa_supplicant";
114 hardware.pulseaudio.enable = true;
115 hardware.sane.enable = true;
116 hardware.sane.extraBackends = [ pkgs.hplipWithPlugin ];
118 environment.variables = {
121 SYSTEMD_LESS = "FKMRX";
123 environment.systemPackages = [
130 interactiveShellInit = ''
131 bind '"\e[A":history-search-backward'
132 bind '"\e[B":history-search-forward'
134 # Ignore duplicate commands, ignore commands starting with a space
135 export HISTCONTROL=erasedups:ignorespace
136 export HISTSIZE=42000
137 # Append to the history instead of overwriting (good for multiple connections)
141 mkcd () { mkdir -p "$1"; cd "$1"; }
144 then sudo tee /proc/acpi/ibm/fan <<<"level $1"
145 else grep '^\(level\|speed\):' /proc/acpi/ibm/fan
152 grep = "grep --color";
155 ls = "ls --color=tty";
156 mem = "ps -e -orss=,user=,args= | sort -b -k1,1n";
159 st="sudo systemctl status";
160 u="systemctl --user";
161 j="sudo journalctl -u";
162 jb="sudo journalctl -b";
164 nix-history="sudo nix-env --list-generations --profile /nix/var/nix/profiles/system";
166 sshfs = "sshfs -o ServerAliveInterval=15 -o reconnect -f";
176 openFirewall = false;
186 fileSystems."/home/julm/mnt/ilico/severine" = {
187 device = "https://nuage.ilico.org/remote.php/dav/files/severine/";
190 let conf = pkgs.writeText "davfs2.conf" ''
191 backup_dir /home/julm/documents/backup/ilico/severine
192 cache_dir /home/julm/.cache/davfs2/ilico/severine
194 [ "conf=${conf}" "user" "noexec" "nosuid" "noauto" ]; # "x-systemd.automount"
197 packages = [ pkgs.gnome3.dconf ];
204 defaultMode = "online";
207 localDiscovery = false;
209 Datastore.StorageMax = "10GB";
210 Discovery.MDNS.Enabled = false;
213 #Swarm.AddrFilters = null;
215 startWhenNeeded = true;
217 services.journald = {
220 MaxRetentionSec=1month
225 services.printing = {
234 # Allow members of the "adbusers" group to mount Android devices via MTP.
235 pkgs.android-udev-rules
236 # Allow the console user access the Yubikey USB device node,
237 # needed for challenge/response to work correctly.
238 pkgs.yubikey-personalization
244 xkbOptions = "eurosign:e";
245 libinput.enable = true;
248 # Let the session be generated by home-manager
249 { name = "home-manager";
251 ${pkgs.runtimeShell} $HOME/.hm-xsession &
258 defaultSession = "home-manager";
259 #defaultSession = "none+xmonad";
262 user = users.julm.name;
267 systemd.coredump.enable = true;
268 #environment.enableDebugInfo = true;
270 # This value determines the NixOS release with which your system is to be
271 # compatible, in order to avoid breaking some software such as database
272 # servers. You should change this only after NixOS release notes say you should.
273 system.stateVersion = "20.09"; # Did you read the comment?