{ config, pkgs, ... }: { nix = { extraOptions = '' auto-optimise-store = true ''; gc = { automatic = true; dates = "weekly"; options = "--delete-older-than 30d"; }; }; nixpkgs.config = { allowUnfree = false; }; time.timeZone = "Europe/Paris"; i18n = { # internationalization consoleFont = "Lat2-Terminus16"; consoleKeyMap = "fr"; defaultLocale = "fr_FR.UTF-8"; }; networking = { networkmanager = { enable = true; }; firewall = { enable = true; allowedTCPPorts = [ 51413 # transmission-gtk 4662 # edonkey ]; allowedUDPPorts = [ 51413 # transmission-gtk 4667 # edonkey 4672 # edonkey ]; }; }; sound.enable = true; hardware.pulseaudio.enable = true; environment = { variables = { EDITOR = "gvim"; PAGER = "less -R"; }; systemPackages = with pkgs; [ acpi binutils coreutils cryptsetup curl direnv dstat e2fsprogs elementary-xfce-icon-theme file glib # gio gnome3.defaultIconTheme gnome3.file-roller gnome3.gnome-keyring gnome3.seahorse gvfs gnumake gnupg gparted ffmpeg hicolor-icon-theme htop less libfaketime lsof man miniupnpc ncdu ncurses networkmanagerapplet ntfs3g #pasystray pavucontrol powertop procps python redshift sudo tig tmux tree utillinux wget which xdg_utils xfce.thunar-volman ]; }; programs = { bash = { interactiveShellInit = '' bind '"\e[A":history-search-backward' bind '"\e[B":history-search-forward' # Ignore duplicate commands, ignore commands starting with a space export HISTCONTROL=erasedups:ignorespace export HISTSIZE=42000 # Append to the history instead of overwriting (good for multiple connections) shopt -s histappend fan () { if [ $# -gt 0 ] then sudo tee /proc/acpi/ibm/fan <<<"level $1" else grep '^\(level\|speed\):' /proc/acpi/ibm/fan fi acpi -t } ''; shellAliases = { cl = "clear"; l = "ls -alh"; ll = "ls -l"; ls = "ls --color=tty"; s="sudo systemctl"; s-u="systemctl --user"; nix-clean="sudo nix-collect-garbage -d"; nix-catalog="sudo nix-channel --list"; nix-history="sudo nix-env --list-generations --profile /nix/var/nix/profiles/system"; nix-rollback="sudo nixos-rebuild switch --rollback"; nix-update="sudo nix-channel --update"; nix-upgrade="sudo nixos-rebuild switch"; nix-upstream="sudo nix-channel --list"; nix-config="gvim ~/.config/nixos/*.nix"; }; }; dconf.enable = true; gnupg.agent = { enable = true; enableSSHSupport = true; }; mtr.enable = true; }; services = { avahi = { enable = true; nssmdns = true; }; dbus = { packages = [ pkgs.gnome3.dconf ]; }; gnome3 = { gvfs = { enable = true; }; }; physlock = { enable = true; allowAnyUser = true; # NOTE: xfconf-query -c xfce4-session -p /general/LockCommand -s "physlock" --create -t string }; printing = { enable = true; drivers = [ pkgs.gutenprint ]; }; xserver = { enable = true; layout = "fr"; xkbOptions = "eurosign:e"; libinput.enable = true; desktopManager = { default = "xfce"; xfce = { enable = true; thunarPlugins = [ pkgs.xfce.thunar-archive-plugin ]; }; xterm.enable = false; }; }; }; # This value determines the NixOS release with which your system is to be # compatible, in order to avoid breaking some software such as database # servers. You should change this only after NixOS release notes say you should. system.stateVersion = "19.09"; # Did you read the comment? }