2020-12-21 14:13:39 +00:00
|
|
|
|
# Edit this configuration file to define what should be installed on
|
|
|
|
|
# your system. Help is available in the configuration.nix(5) man page
|
|
|
|
|
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
|
|
|
|
|
|
|
|
|
{ config, pkgs, ... }:
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
imports =
|
|
|
|
|
[ # Include the results of the hardware scan.
|
|
|
|
|
./hardware-configuration.nix
|
2021-11-18 18:04:41 +00:00
|
|
|
|
|
|
|
|
|
./modules/audio.nix
|
|
|
|
|
./modules/video.nix
|
|
|
|
|
./modules/virtualisation.nix
|
|
|
|
|
|
|
|
|
|
# Desktop configuration
|
2021-05-18 12:09:48 +00:00
|
|
|
|
./modules/sway.nix
|
2021-11-18 18:04:41 +00:00
|
|
|
|
./modules/kde.nix
|
2021-05-18 12:09:48 +00:00
|
|
|
|
# old i3 compositor
|
|
|
|
|
# ./modules/i3.nix
|
2021-11-18 18:04:41 +00:00
|
|
|
|
|
|
|
|
|
./modules/printing.nix
|
2021-10-14 14:15:27 +00:00
|
|
|
|
./modules/backup.nix
|
2021-11-18 18:04:41 +00:00
|
|
|
|
|
|
|
|
|
# include and configure R
|
|
|
|
|
./modules/r.nix
|
|
|
|
|
# python with modules
|
|
|
|
|
./modules/python.nix
|
2020-12-21 14:13:39 +00:00
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
# set up LUKS discovery
|
|
|
|
|
boot.initrd.luks.devices.cryptlvm.device = "/dev/disk/by-uuid/f382cd01-9048-4b1b-8a73-48e1f61e6c08";
|
|
|
|
|
|
|
|
|
|
# Use the systemd-boot EFI boot loader.
|
|
|
|
|
boot.loader.systemd-boot.enable = true;
|
|
|
|
|
boot.loader.efi.canTouchEfiVariables = true;
|
|
|
|
|
|
2021-11-18 18:04:41 +00:00
|
|
|
|
# ------------ networking ---------------------------------------------------
|
2020-12-21 14:13:39 +00:00
|
|
|
|
networking.hostName = "entropy"; # Define your hostname.
|
2021-10-14 14:15:27 +00:00
|
|
|
|
networking.wireless = {
|
|
|
|
|
enable = true; # Enables wireless support via wpa_supplicant.
|
|
|
|
|
interfaces = [ "wlp0s20f3" ];
|
|
|
|
|
};
|
2020-12-21 14:13:39 +00:00
|
|
|
|
# The global useDHCP flag is deprecated, therefore explicitly set to false here.
|
|
|
|
|
# Per-interface useDHCP will be mandatory in the future, so this generated config
|
|
|
|
|
# replicates the default behaviour.
|
|
|
|
|
networking.useDHCP = false;
|
|
|
|
|
networking.interfaces.enp0s31f6.useDHCP = true;
|
2021-03-29 08:15:23 +00:00
|
|
|
|
# USB-C dock
|
|
|
|
|
networking.interfaces.enp0s20f0u2u1.useDHCP = true;
|
2020-12-21 14:13:39 +00:00
|
|
|
|
networking.interfaces.wlp0s20f3.useDHCP = true;
|
|
|
|
|
|
2021-11-18 18:04:41 +00:00
|
|
|
|
# enable OpenVPN for connecting to the TUD network
|
|
|
|
|
services.openvpn.servers.tud = {
|
|
|
|
|
config = '' config /home/felix/.config/vpn/TUD.ovpn '';
|
|
|
|
|
autoStart = false; #true;
|
|
|
|
|
updateResolvConf = true;
|
2021-01-15 17:19:13 +00:00
|
|
|
|
};
|
|
|
|
|
|
2021-11-18 18:04:41 +00:00
|
|
|
|
# for SAMBA file shares
|
|
|
|
|
services.gvfs.enable = true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# ------------ time, location & input ---------------------------------------
|
|
|
|
|
# Set your time zone.
|
|
|
|
|
time.timeZone = "Europe/Berlin";
|
|
|
|
|
# geoclue2 does not yield a location at home, so I'll make the manual configuration the default
|
|
|
|
|
# location.provider = "geoclue2";
|
|
|
|
|
location.provider = "manual";
|
|
|
|
|
# using the location of the cafe ascii should be good enough
|
|
|
|
|
location.latitude = 51.0250869;
|
|
|
|
|
location.longitude = 13.7210005;
|
|
|
|
|
|
2020-12-21 14:13:39 +00:00
|
|
|
|
# Select internationalisation properties.
|
|
|
|
|
i18n.defaultLocale = "en_US.UTF-8";
|
|
|
|
|
console = {
|
|
|
|
|
#font = "Lat2-Terminus16";
|
|
|
|
|
font = "${pkgs.terminus_font}/share/consolefonts/ter-u28n.psf.gz";
|
|
|
|
|
keyMap = pkgs.lib.mkForce "uk";
|
|
|
|
|
};
|
|
|
|
|
# use the xkb-config from the X server
|
|
|
|
|
console.useXkbConfig = true;
|
|
|
|
|
|
|
|
|
|
# Configure keymap in X11
|
|
|
|
|
services.xserver.layout = "gb";
|
2021-12-21 09:37:24 +00:00
|
|
|
|
services.xserver.xkbOptions = "eurosign:e,ctrl:nocaps,compose:ralt";
|
2021-05-18 12:09:48 +00:00
|
|
|
|
# enable touchpad support
|
2020-12-21 14:13:39 +00:00
|
|
|
|
services.xserver.libinput.enable = true;
|
|
|
|
|
|
|
|
|
|
|
2021-11-18 18:04:41 +00:00
|
|
|
|
# ------------ security -----------------------------------------------------
|
2020-12-21 14:13:39 +00:00
|
|
|
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
|
|
|
|
users.users.felix = {
|
|
|
|
|
createHome = true;
|
|
|
|
|
isNormalUser = true;
|
2021-03-04 15:28:11 +00:00
|
|
|
|
extraGroups = [ "wheel" "video" "audio" "dialout" ]; # wheel: Enable ‘sudo’ for the user.
|
2020-12-21 14:13:39 +00:00
|
|
|
|
group = "users";
|
|
|
|
|
home = "/home/felix";
|
|
|
|
|
shell = pkgs.fish;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
# allow user felix to run openconnect without password
|
|
|
|
|
security.sudo.extraRules = [
|
|
|
|
|
{
|
|
|
|
|
users = [ "felix" ];
|
|
|
|
|
commands = [
|
|
|
|
|
{ command = "${pkgs.openconnect}/bin/openconnect"; options = [ "NOPASSWD" ]; }
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
];
|
|
|
|
|
|
2021-11-18 18:04:41 +00:00
|
|
|
|
programs.gnupg.agent = {
|
|
|
|
|
enable = true;
|
|
|
|
|
enableSSHSupport = true;
|
|
|
|
|
pinentryFlavor = "curses";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
services.udev.packages = [ pkgs.libu2f-host ];
|
|
|
|
|
|
2021-05-18 12:09:48 +00:00
|
|
|
|
## enable fingerprint reader
|
|
|
|
|
#services.fprintd.enable = true;
|
|
|
|
|
#security.pam.services.login.fprintAuth = true;
|
|
|
|
|
##security.pam.services.xscreensaver.fprintAuth = true;
|
|
|
|
|
#security.pam.services.sudo.fprintAuth = true;
|
|
|
|
|
|
2021-10-14 14:15:27 +00:00
|
|
|
|
|
2021-11-18 18:04:41 +00:00
|
|
|
|
# ------------ programs -----------------------------------------------------
|
|
|
|
|
programs.fish.enable = true;
|
|
|
|
|
programs.vim.defaultEditor = true;
|
2021-10-26 14:25:03 +00:00
|
|
|
|
|
2021-11-18 18:04:41 +00:00
|
|
|
|
# List of packages installed in system profile.
|
2020-12-21 14:13:39 +00:00
|
|
|
|
environment.systemPackages = with pkgs; [
|
2021-03-29 08:15:23 +00:00
|
|
|
|
## basic command line tooling
|
2020-12-21 14:13:39 +00:00
|
|
|
|
wget
|
2021-10-14 14:15:27 +00:00
|
|
|
|
emacs
|
2020-12-21 14:13:39 +00:00
|
|
|
|
w3m
|
|
|
|
|
htop
|
|
|
|
|
bat
|
|
|
|
|
lsd
|
|
|
|
|
ripgrep
|
|
|
|
|
sshfs
|
|
|
|
|
ncdu
|
|
|
|
|
tldr
|
|
|
|
|
unzip
|
2021-01-15 17:19:13 +00:00
|
|
|
|
ncat
|
2021-04-23 09:57:47 +00:00
|
|
|
|
bind
|
2021-01-15 17:19:13 +00:00
|
|
|
|
inetutils
|
2021-03-04 15:28:11 +00:00
|
|
|
|
usbutils
|
2021-04-23 09:57:47 +00:00
|
|
|
|
moreutils
|
|
|
|
|
file
|
2021-03-29 08:15:23 +00:00
|
|
|
|
## audio management
|
2021-02-01 09:01:17 +00:00
|
|
|
|
pavucontrol
|
2021-03-29 08:15:23 +00:00
|
|
|
|
## password management
|
2020-12-21 14:13:39 +00:00
|
|
|
|
pass
|
|
|
|
|
pinentry-curses
|
2021-10-14 14:15:27 +00:00
|
|
|
|
## admin foo
|
|
|
|
|
ansible
|
2021-03-29 08:15:23 +00:00
|
|
|
|
## mail
|
2020-12-21 14:13:39 +00:00
|
|
|
|
isync
|
|
|
|
|
msmtp
|
|
|
|
|
neomutt urlview
|
|
|
|
|
notmuch
|
2021-03-29 08:15:23 +00:00
|
|
|
|
## programming languages and compilers
|
2020-12-21 14:13:39 +00:00
|
|
|
|
rustup
|
2021-03-04 15:28:11 +00:00
|
|
|
|
cargo-flamegraph
|
|
|
|
|
cargo-watch
|
2020-12-21 14:13:39 +00:00
|
|
|
|
stack
|
2021-10-14 14:15:27 +00:00
|
|
|
|
haskell-language-server
|
2020-12-21 14:13:39 +00:00
|
|
|
|
gcc
|
2021-03-29 08:15:23 +00:00
|
|
|
|
binutils-unwrapped
|
2020-12-21 14:13:39 +00:00
|
|
|
|
gnumake
|
2021-03-04 15:28:11 +00:00
|
|
|
|
cmake
|
2021-03-29 08:15:23 +00:00
|
|
|
|
gdb
|
2021-10-14 14:15:27 +00:00
|
|
|
|
ccls
|
2021-03-29 08:15:23 +00:00
|
|
|
|
valgrind
|
|
|
|
|
heaptrack
|
2021-10-14 14:15:27 +00:00
|
|
|
|
#lingua-franca-ide
|
2021-03-29 08:15:23 +00:00
|
|
|
|
## I heard you like man pages?
|
2020-12-21 14:13:39 +00:00
|
|
|
|
man-pages
|
2021-03-29 08:15:23 +00:00
|
|
|
|
## git and friends
|
2020-12-21 14:13:39 +00:00
|
|
|
|
git
|
|
|
|
|
gitAndTools.delta
|
|
|
|
|
gitAndTools.gitui
|
2021-10-14 14:15:27 +00:00
|
|
|
|
## GitHub actions
|
|
|
|
|
act
|
2021-03-29 08:15:23 +00:00
|
|
|
|
## terminal, browsers, text editing
|
2020-12-21 14:13:39 +00:00
|
|
|
|
kitty
|
|
|
|
|
vscodium
|
2021-05-18 12:09:48 +00:00
|
|
|
|
firefox-wayland
|
2021-03-29 08:15:23 +00:00
|
|
|
|
## time tracking
|
2020-12-21 14:13:39 +00:00
|
|
|
|
watson
|
2021-03-29 08:15:23 +00:00
|
|
|
|
## file managers
|
2020-12-21 14:13:39 +00:00
|
|
|
|
ranger
|
|
|
|
|
xfce.thunar
|
2021-03-29 08:15:23 +00:00
|
|
|
|
## document viewers
|
2020-12-21 14:13:39 +00:00
|
|
|
|
pdfpc
|
|
|
|
|
zathura
|
2021-03-29 08:15:23 +00:00
|
|
|
|
## image manipulation
|
2021-03-04 15:28:11 +00:00
|
|
|
|
gimp
|
|
|
|
|
inkscape
|
|
|
|
|
libheif
|
2021-03-29 08:15:23 +00:00
|
|
|
|
## LaTeX
|
2020-12-21 14:13:39 +00:00
|
|
|
|
texlive.combined.scheme-full
|
2021-03-29 08:15:23 +00:00
|
|
|
|
## the eternal pain continues
|
2020-12-21 14:13:39 +00:00
|
|
|
|
libreoffice-fresh
|
2021-03-29 08:15:23 +00:00
|
|
|
|
## video and media applications
|
2020-12-21 14:13:39 +00:00
|
|
|
|
zoom-us
|
2021-02-01 09:01:17 +00:00
|
|
|
|
teams
|
2020-12-21 14:13:39 +00:00
|
|
|
|
youtube-dl
|
2021-02-01 09:01:17 +00:00
|
|
|
|
mpv
|
|
|
|
|
streamlink
|
2020-12-21 14:13:39 +00:00
|
|
|
|
ffmpeg-full
|
2021-05-21 16:00:09 +00:00
|
|
|
|
musikcube
|
2021-03-29 08:15:23 +00:00
|
|
|
|
## messenger
|
2021-05-31 14:36:40 +00:00
|
|
|
|
slack
|
2020-12-21 14:13:39 +00:00
|
|
|
|
tdesktop
|
2021-01-15 17:19:13 +00:00
|
|
|
|
signal-desktop
|
2021-10-14 14:15:27 +00:00
|
|
|
|
weechat
|
2021-03-29 08:15:23 +00:00
|
|
|
|
## networking
|
2020-12-21 14:13:39 +00:00
|
|
|
|
openconnect
|
2021-10-14 14:15:27 +00:00
|
|
|
|
|
|
|
|
|
## maybe screensharing???
|
|
|
|
|
pipewire
|
|
|
|
|
xdg-desktop-portal-wlr
|
2020-12-21 14:13:39 +00:00
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
# install fonts
|
|
|
|
|
fonts.fonts = with pkgs; [
|
|
|
|
|
font-awesome
|
2021-05-18 13:01:16 +00:00
|
|
|
|
fira
|
2020-12-21 14:13:39 +00:00
|
|
|
|
fira-code
|
|
|
|
|
fira-code-symbols
|
2021-10-14 14:15:27 +00:00
|
|
|
|
iosevka
|
2020-12-21 14:13:39 +00:00
|
|
|
|
roboto
|
|
|
|
|
roboto-mono
|
|
|
|
|
roboto-slab
|
2021-03-04 15:28:11 +00:00
|
|
|
|
open-sans
|
2020-12-21 14:13:39 +00:00
|
|
|
|
overpass
|
|
|
|
|
(nerdfonts.override {
|
2021-05-18 13:01:16 +00:00
|
|
|
|
fonts = [ "FiraCode" "DroidSansMono" "Hack" "SourceCodePro" "RobotoMono" "Ubuntu" "UbuntuMono" ];
|
2020-12-21 14:13:39 +00:00
|
|
|
|
})
|
|
|
|
|
];
|
|
|
|
|
|
2021-05-21 16:00:09 +00:00
|
|
|
|
# periodic automated mail fetching
|
|
|
|
|
systemd.user.services.mailfetch = {
|
|
|
|
|
enable = true;
|
2021-10-14 14:15:27 +00:00
|
|
|
|
description = "Automatically fetches new mails.";
|
2021-05-31 14:36:40 +00:00
|
|
|
|
wantedBy = [ "graphical-session.target" ];
|
|
|
|
|
after = [ "graphical-session.target" ];
|
2021-05-21 16:00:09 +00:00
|
|
|
|
serviceConfig = {
|
|
|
|
|
Restart = "always";
|
|
|
|
|
RestartSec = "60";
|
|
|
|
|
};
|
|
|
|
|
path = with pkgs; [ bash notmuch isync ];
|
|
|
|
|
script = ''
|
|
|
|
|
mbsync -a && /home/felix/.config/neomutt/notmuch-hook.sh
|
|
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
|
2020-12-21 14:13:39 +00:00
|
|
|
|
# This value determines the NixOS release from which the default
|
|
|
|
|
# settings for stateful data, like file locations and database versions
|
|
|
|
|
# on your system were taken. It‘s perfectly fine and recommended to leave
|
|
|
|
|
# this value at the release version of the first install of this system.
|
|
|
|
|
# Before changing this value read the documentation for this option
|
|
|
|
|
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
2021-10-14 14:15:27 +00:00
|
|
|
|
system.stateVersion = "21.05"; # Did you read the comment?
|
2020-12-21 14:13:39 +00:00
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|