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
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 = [ "https://nix-localcache.sourcephile.fr" ];
68 binaryCachePublicKeys = [ "losurdo.sourcephile.fr-1:XGeaIE2AA2mZskSZ5bIDrfx53q+TDDWJOUEpZDX7los=" ];
70 documentation.enable = false;
73 keys = [ (lib.readFile ../private/world/julm/losurdo/ssh.pub) ];
75 users.users.julm.openssh.authorizedKeys.keys = [
76 (lib.readFile ../private/world/julm/losurdo/ssh.pub)
78 services.openssh.openFirewall = false;
79 services.openssh.forwardX11 = true;
80 services.openssh.passwordAuthentication = false;
82 nixpkgs.config.allowUnfree = true;
83 environment.etc."nixpkgs".source = pkgs.path;
84 environment.etc."nixpkgs-overlays".source = inputs.self + "/nixpkgs";
86 documentation.nixos.enable = true;
87 time.timeZone = "Europe/Paris";
88 i18n.defaultLocale = "fr_FR.UTF-8";
89 console.font = "Lat2-Terminus16";
90 console.keyMap = "fr";
94 domain = "localdomain";
95 search = [ "sourcephile.fr" ];
102 #backend = "wpa_supplicant";
113 hardware.pulseaudio.enable = true;
114 hardware.sane.enable = true;
115 hardware.sane.extraBackends = [ pkgs.hplipWithPlugin ];
117 environment.variables = {
120 SYSTEMD_LESS = "FKMRX";
122 environment.systemPackages = [
129 interactiveShellInit = ''
130 bind '"\e[A":history-search-backward'
131 bind '"\e[B":history-search-forward'
133 # Ignore duplicate commands, ignore commands starting with a space
134 export HISTCONTROL=erasedups:ignorespace
135 export HISTSIZE=42000
136 # Append to the history instead of overwriting (good for multiple connections)
140 mkcd () { mkdir -p "$1"; cd "$1"; }
143 then sudo tee /proc/acpi/ibm/fan <<<"level $1"
144 else grep '^\(level\|speed\):' /proc/acpi/ibm/fan
151 grep = "grep --color";
154 ls = "ls --color=tty";
155 mem = "ps -e -orss=,user=,args= | sort -b -k1,1n";
158 st="sudo systemctl status";
159 u="systemctl --user";
160 j="sudo journalctl -u";
161 jb="sudo journalctl -b";
163 nix-history="sudo nix-env --list-generations --profile /nix/var/nix/profiles/system";
165 sshfs = "sshfs -o ServerAliveInterval=15 -o reconnect -f";
175 openFirewall = false;
185 fileSystems."/home/julm/mnt/ilico/severine" = {
186 device = "https://nuage.ilico.org/remote.php/dav/files/severine/";
189 let conf = pkgs.writeText "davfs2.conf" ''
190 backup_dir /home/julm/documents/backup/ilico/severine
191 cache_dir /home/julm/.cache/davfs2/ilico/severine
193 [ "conf=${conf}" "user" "noexec" "nosuid" "noauto" ]; # "x-systemd.automount"
196 packages = [ pkgs.gnome3.dconf ];
203 defaultMode = "online";
206 localDiscovery = false;
208 Datastore.StorageMax = "10GB";
209 Discovery.MDNS.Enabled = false;
212 #Swarm.AddrFilters = null;
214 startWhenNeeded = true;
216 services.journald = {
219 MaxRetentionSec=1month
224 services.printing = {
233 # Allow members of the "adbusers" group to mount Android devices via MTP.
234 pkgs.android-udev-rules
235 # Allow the console user access the Yubikey USB device node,
236 # needed for challenge/response to work correctly.
237 pkgs.yubikey-personalization
243 xkbOptions = "eurosign:e";
244 libinput.enable = true;
247 # Let the session be generated by home-manager
248 { name = "home-manager";
250 ${pkgs.runtimeShell} $HOME/.hm-xsession &
257 defaultSession = "home-manager";
258 #defaultSession = "none+xmonad";
261 user = users.julm.name;
266 systemd.coredump.enable = true;
267 #environment.enableDebugInfo = true;
269 # This value determines the NixOS release with which your system is to be
270 # compatible, in order to avoid breaking some software such as database
271 # servers. You should change this only after NixOS release notes say you should.
272 system.stateVersion = "20.09"; # Did you read the comment?