2022-11-22 04:51:03 +00:00
|
|
|
{ pkgs, ... }:
|
2022-06-07 00:51:35 +00:00
|
|
|
{
|
|
|
|
imports = [
|
2022-12-03 11:05:09 +00:00
|
|
|
./bluetooth.nix
|
2022-11-22 04:29:17 +00:00
|
|
|
./fs.nix
|
2022-11-22 02:52:07 +00:00
|
|
|
./hardware
|
2022-12-16 22:15:19 +00:00
|
|
|
./i2p.nix
|
2022-11-22 04:29:17 +00:00
|
|
|
./machine-id.nix
|
|
|
|
./net.nix
|
2022-11-22 03:37:57 +00:00
|
|
|
./secrets.nix
|
2022-11-22 04:29:17 +00:00
|
|
|
./ssh.nix
|
|
|
|
./users.nix
|
2022-11-22 03:46:25 +00:00
|
|
|
./vpn.nix
|
2022-06-07 00:51:35 +00:00
|
|
|
];
|
2022-11-22 03:07:11 +00:00
|
|
|
|
2022-11-22 05:28:41 +00:00
|
|
|
sane.home-manager.enable = true;
|
2022-11-22 03:07:11 +00:00
|
|
|
sane.nixcache.enable-trusted-keys = true;
|
2022-11-22 04:40:24 +00:00
|
|
|
sane.packages.enableConsolePkgs = true;
|
|
|
|
sane.packages.enableSystemPkgs = true;
|
2022-11-22 03:09:41 +00:00
|
|
|
|
2023-01-03 07:04:49 +00:00
|
|
|
sane.impermanence.dirs.sys.plaintext = [
|
2022-12-29 16:38:58 +00:00
|
|
|
"/var/log"
|
|
|
|
"/var/backup" # for e.g. postgres dumps
|
|
|
|
# TODO: move elsewhere
|
|
|
|
"/var/lib/alsa" # preserve output levels, default devices
|
|
|
|
"/var/lib/bluetooth" # preserve bluetooth handshakes
|
|
|
|
"/var/lib/colord" # preserve color calibrations (?)
|
|
|
|
"/var/lib/machines" # maybe not needed, but would be painful to add a VM and forget.
|
|
|
|
];
|
|
|
|
|
2022-11-22 03:09:41 +00:00
|
|
|
nixpkgs.config.allowUnfree = true;
|
2022-11-22 04:51:03 +00:00
|
|
|
|
|
|
|
# time.timeZone = "America/Los_Angeles";
|
|
|
|
time.timeZone = "Etc/UTC"; # DST is too confusing for me => use a stable timezone
|
|
|
|
|
|
|
|
# allow `nix flake ...` command
|
|
|
|
nix.extraOptions = ''
|
|
|
|
experimental-features = nix-command flakes
|
|
|
|
'';
|
|
|
|
|
|
|
|
# TODO: move this into home-manager?
|
|
|
|
fonts = {
|
|
|
|
enableDefaultFonts = true;
|
|
|
|
fonts = with pkgs; [ font-awesome twitter-color-emoji hack-font ];
|
|
|
|
fontconfig.enable = true;
|
|
|
|
fontconfig.defaultFonts = {
|
|
|
|
emoji = [ "Font Awesome 6 Free" "Twitter Color Emoji" ];
|
|
|
|
monospace = [ "Hack" ];
|
|
|
|
serif = [ "DejaVu Serif" ];
|
|
|
|
sansSerif = [ "DejaVu Sans" ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
# disable non-required packages like nano, perl, rsync, strace
|
|
|
|
environment.defaultPackages = [];
|
|
|
|
|
|
|
|
# programs.vim.defaultEditor = true;
|
|
|
|
environment.variables = {
|
|
|
|
EDITOR = "vim";
|
|
|
|
# git claims it should use EDITOR, but it doesn't!
|
|
|
|
GIT_EDITOR = "vim";
|
|
|
|
# TODO: these should be moved to `home.sessionVariables` (home-manager)
|
|
|
|
# Electron apps should use native wayland backend:
|
|
|
|
# https://nixos.wiki/wiki/Slack#Wayland
|
|
|
|
# Discord under sway crashes with this.
|
|
|
|
# NIXOS_OZONE_WL = "1";
|
|
|
|
# LIBGL_ALWAYS_SOFTWARE = "1";
|
|
|
|
};
|
|
|
|
# enable zsh completions
|
|
|
|
environment.pathsToLink = [ "/share/zsh" ];
|
|
|
|
|
|
|
|
# link debug symbols into /run/current-system/sw/lib/debug
|
|
|
|
# hopefully picked up by gdb automatically?
|
|
|
|
environment.enableDebugInfo = true;
|
2022-06-07 00:51:35 +00:00
|
|
|
}
|