From 7284452aa5d82423de7d138ae661603d7d6af8e8 Mon Sep 17 00:00:00 2001 From: colin Date: Tue, 22 Nov 2022 04:51:03 +0000 Subject: [PATCH] re-enable some environment stuff that got lost during refactors --- hosts/common/default.nix | 56 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 55 insertions(+), 1 deletion(-) diff --git a/hosts/common/default.nix b/hosts/common/default.nix index 58b07522..b2049a80 100644 --- a/hosts/common/default.nix +++ b/hosts/common/default.nix @@ -1,4 +1,4 @@ -{ ... }: +{ pkgs, ... }: { imports = [ ./fs.nix @@ -16,4 +16,58 @@ sane.packages.enableSystemPkgs = true; nixpkgs.config.allowUnfree = true; + + # 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" ]; + environment.systemPackages = with pkgs; [ + # required for pam_mount + gocryptfs + ]; + + # link debug symbols into /run/current-system/sw/lib/debug + # hopefully picked up by gdb automatically? + environment.enableDebugInfo = true; + + security.pam.mount.enable = true; + # security.pam.mount.debugLevel = 1; + # security.pam.enableSSHAgentAuth = true; # ?? + # needed for `allow_other` in e.g. gocryptfs mounts + # or i guess going through mount.fuse sets suid so that's not necessary? + # programs.fuse.userAllowOther = true; }