1 { config, pkgs, inputs, machineName, ... }:
3 inherit (config.users) users;
10 users.mutableUsers = false;
14 # Put the hashedPassword in /nix/store, but it will also be in /etc/passwd
15 # which is already world readable.
16 hashedPassword = builtins.readFile ../secrets/julm/hashedPassword;
22 # If created, zfs-mount.service would require:
23 # zfs set overlay=yes ${machineName}/home
29 auto-optimise-store = true
34 options = "--delete-older-than 7d";
37 "nixpkgs=/etc/nixpkgs"
38 "nixpkgs-overlays=/etc/nixpkgs-overlays/overlays.nix"
40 trustedUsers = [ users.julm.name ];
42 environment.etc."nixpkgs".source = pkgs.path;
43 environment.etc."nixpkgs-overlays".source = inputs.self + "/nixpkgs";
49 time.timeZone = "Europe/Paris";
50 i18n.defaultLocale = "fr_FR.UTF-8";
51 console.font = "Lat2-Terminus16";
52 console.keyMap = "fr";
55 hostName = machineName;
56 domain = "localdomain";
63 #backend = "wpa_supplicant";
73 hardware.pulseaudio.enable = true;
75 environment.variables = {
78 SYSTEMD_LESS = "FKMRX";
80 environment.systemPackages = with pkgs; [
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 then sudo tee /proc/acpi/ibm/fan <<<"level $1"
142 else grep '^\(level\|speed\):' /proc/acpi/ibm/fan
151 ls = "ls --color=tty";
152 mem = "ps -e -orss=,user=,args= | sort -b -k1,1n";
155 st="sudo systemctl status";
156 s-u="systemctl --user";
157 j="sudo journalctl -u";
159 nix-clean="sudo nix-collect-garbage -d";
160 nix-catalog="sudo nix-channel --list";
161 nix-history="sudo nix-env --list-generations --profile /nix/var/nix/profiles/system";
162 nix-rollback="sudo nixos-rebuild switch --rollback";
163 nix-update="sudo nix-channel --update";
164 nix-upgrade="sudo nixos-rebuild switch";
165 nix-upstream="sudo nix-channel --list";
166 nix-config="gvim ~/.config/nixos/*.nix";
172 enableSSHSupport = true;
183 packages = [ pkgs.gnome3.dconf ];
191 MaxRetentionSec=1month
199 # NOTE: xfconf-query -c xfce4-session -p /general/LockCommand -s "physlock" --create -t string
210 extraArgs = [ "--verbose" ];
212 "${machineName}/home" = {
221 "${machineName}/var" = {
235 xkbOptions = "eurosign:e";
236 libinput.enable = true;
239 # Let the session be generated by home-manager
240 { name = "home-manager";
242 ${pkgs.runtimeShell} $HOME/.hm-xsession &
251 pkgs.xfce.thunar-archive-plugin
255 xterm.enable = false;
258 defaultSession = "home-manager";
259 #defaultSession = "none+xmonad";
262 user = users.julm.name;
268 #virtualisation.virtualbox.host.enable = 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?