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 = {
18 imports = [ ../homes/julm.nix ];
20 host.hardware = ["ThinkPad" "X201"];
22 systemd.services.home-manager-julm.postStart = ''
23 ${pkgs.nix}/bin/nix-env --delete-generations +1 --profile /nix/var/nix/profiles/per-user/julm/home-manager
25 security.lockKernelModules = false;
26 users.mutableUsers = false;
30 # Put the hashedPassword in /nix/store, but it will also be in /etc/passwd
31 # which is already world readable.
32 hashedPassword = lib.readFile ../private/world/julm/hashedPassword;
45 # If created, zfs-mount.service would require:
46 # zfs set overlay=yes ${hostName}/home
52 auto-optimise-store = true
53 secret-key-files = ${private}/${hostName}/nix/binary-cache/priv.pem
58 options = "--delete-older-than 7d";
61 "nixpkgs=/etc/nixpkgs"
62 "nixpkgs-overlays=/etc/nixpkgs-overlays/overlays.nix"
64 trustedUsers = [ users.julm.name ];
65 binaryCaches = [ "https://nix-localcache.sourcephile.fr" ];
66 binaryCachePublicKeys = [ "losurdo.sourcephile.fr-1:XGeaIE2AA2mZskSZ5bIDrfx53q+TDDWJOUEpZDX7los=" ];
68 documentation.enable = false;
71 keys = [ (lib.readFile ../private/world/julm/losurdo/ssh.pub) ];
73 users.users.julm.openssh.authorizedKeys.keys = [
74 (lib.readFile ../private/world/julm/losurdo/ssh.pub)
76 services.openssh.openFirewall = false;
77 services.openssh.forwardX11 = true;
78 services.openssh.passwordAuthentication = false;
80 nixpkgs.config.allowUnfree = true;
81 environment.etc."nixpkgs".source = pkgs.path;
82 environment.etc."nixpkgs-overlays".source = inputs.self + "/nixpkgs";
84 documentation.nixos.enable = true;
85 time.timeZone = "Europe/Paris";
86 i18n.defaultLocale = "fr_FR.UTF-8";
87 console.font = "Lat2-Terminus16";
88 console.keyMap = "fr";
92 domain = "localdomain";
93 search = [ "sourcephile.fr" ];
100 #backend = "wpa_supplicant";
111 hardware.pulseaudio.enable = true;
112 hardware.sane.enable = true;
113 hardware.sane.extraBackends = [ pkgs.hplipWithPlugin ];
115 environment.variables = {
118 SYSTEMD_LESS = "FKMRX";
120 environment.systemPackages = [
127 interactiveShellInit = ''
128 bind '"\e[A":history-search-backward'
129 bind '"\e[B":history-search-forward'
131 # Ignore duplicate commands, ignore commands starting with a space
132 export HISTCONTROL=erasedups:ignorespace
133 export HISTSIZE=42000
134 # Append to the history instead of overwriting (good for multiple connections)
138 mkcd () { mkdir -p "$1"; cd "$1"; }
141 then sudo tee /proc/acpi/ibm/fan <<<"level $1"
142 else grep '^\(level\|speed\):' /proc/acpi/ibm/fan
149 grep = "grep --color";
152 ls = "ls --color=tty";
153 mem = "ps -e -orss=,user=,args= | sort -b -k1,1n";
156 st="sudo systemctl status";
157 u="systemctl --user";
158 j="sudo journalctl -u";
159 jb="sudo journalctl -b";
161 nix-history="sudo nix-env --list-generations --profile /nix/var/nix/profiles/system";
163 sshfs = "sshfs -o ServerAliveInterval=15 -o reconnect -f";
173 openFirewall = false;
183 fileSystems."/home/julm/mnt/ilico/severine" = {
184 device = "https://nuage.ilico.org/remote.php/dav/files/severine/";
187 let conf = pkgs.writeText "davfs2.conf" ''
188 backup_dir /home/julm/documents/backup/ilico/severine
189 cache_dir /home/julm/.cache/davfs2/ilico/severine
191 [ "conf=${conf}" "user" "noexec" "nosuid" "noauto" ]; # "x-systemd.automount"
194 packages = [ pkgs.gnome3.dconf ];
201 defaultMode = "online";
204 localDiscovery = false;
206 Datastore.StorageMax = "10GB";
207 Discovery.MDNS.Enabled = false;
210 #Swarm.AddrFilters = null;
212 startWhenNeeded = true;
214 services.journald = {
217 MaxRetentionSec=1month
222 services.printing = {
231 # Allow members of the "adbusers" group to mount Android devices via MTP.
232 pkgs.android-udev-rules
233 # Allow the console user access the Yubikey USB device node,
234 # needed for challenge/response to work correctly.
235 pkgs.yubikey-personalization
241 xkbOptions = "eurosign:e";
242 libinput.enable = true;
245 # Let the session be generated by home-manager
246 { name = "home-manager";
248 ${pkgs.runtimeShell} $HOME/.hm-xsession &
255 defaultSession = "home-manager";
256 #defaultSession = "none+xmonad";
259 user = users.julm.name;
264 systemd.coredump.enable = true;
265 #environment.enableDebugInfo = true;
267 # This value determines the NixOS release with which your system is to be
268 # compatible, in order to avoid breaking some software such as database
269 # servers. You should change this only after NixOS release notes say you should.
270 system.stateVersion = "20.09"; # Did you read the comment?