From 788a642b6a711012c3e71cc51f46de1a8d0fe214 Mon Sep 17 00:00:00 2001 From: Niten Date: Mon, 10 May 2021 18:25:38 -0700 Subject: [PATCH] Various changes... --- config/host-config/limina.nix | 4 ++- config/profile-config/common-ui.nix | 6 ++--- config/profile-config/common.nix | 10 ++++++- home-manager/niten.nix | 42 ++++++++++++++--------------- 4 files changed, 36 insertions(+), 26 deletions(-) diff --git a/config/host-config/limina.nix b/config/host-config/limina.nix index ad02a8c..7255b42 100644 --- a/config/host-config/limina.nix +++ b/config/host-config/limina.nix @@ -30,6 +30,8 @@ in { intif2 = { useDHCP = false; }; }; + nameservers = [ "10.0.0.1" ]; + # FIXME: this should be automatic firewall.trustedInterfaces = [ "intif0" "intif1" "intif2" "lo" "docker0" ]; @@ -51,7 +53,7 @@ in { gateway = primary-ip; dhcp-interfaces = [ "intif0" ]; dns-listen-ips = [ primary-ip "127.0.0.1" "127.0.1.1" "::1" ]; - recursive-resolver = "1.1.1.1"; + recursive-resolver = "${primary-ip} port 5353"; network = site.network; dhcp-dynamic-network = site.dynamic-network; search-domains = [ domain-name "fudo.org" ]; diff --git a/config/profile-config/common-ui.nix b/config/profile-config/common-ui.nix index 504b394..b94859e 100644 --- a/config/profile-config/common-ui.nix +++ b/config/profile-config/common-ui.nix @@ -18,9 +18,7 @@ in { ]; }; - system = { - autoUpgrade.enable = true; - }; + system = { autoUpgrade.enable = true; }; services = { xserver = mkIf enable-gui { @@ -74,6 +72,8 @@ in { gnome-user-share.enable = mkForce false; }; + programs.steam.enable = enable-gui; + fonts = mkIf enable-gui { enableFontDir = true; fontconfig.enable = true; diff --git a/config/profile-config/common.nix b/config/profile-config/common.nix index b1c2cb3..741bcdb 100644 --- a/config/profile-config/common.nix +++ b/config/profile-config/common.nix @@ -3,7 +3,15 @@ with lib; let # Available to all users on the system. Keep it minimal. - global-packages = with pkgs; [ bind git heimdal openssh_gssapi vim wget ]; + global-packages = with pkgs; [ + bind + git + heimdal + openssh_gssapi + tldr + vim + wget + ]; in { environment = { diff --git a/home-manager/niten.nix b/home-manager/niten.nix index 16f8297..9741cea 100644 --- a/home-manager/niten.nix +++ b/home-manager/niten.nix @@ -5,7 +5,22 @@ let name = "Niten"; email = "niten@fudo.org"; - packages = with pkgs; [ + hostname = config.instance.hostname; + host-config = config.fudo.hosts.${hostname}; + + enable-gui = host-config.enable-gui; + + gui-packages = with pkgs; [ + firefox + jq + openttd + redshift + signal-desktop + spotify + xclip + ]; + + common-packages = with pkgs; [ asdf atop binutils @@ -18,7 +33,6 @@ let doomEmacsInit enca file - firefox fortune git gnutls @@ -28,7 +42,6 @@ let ipfs iptables jdk - jq leiningen libisofs lispPackages.quicklisp @@ -43,21 +56,17 @@ let nmap openldap openssl - openttd pciutils pv pwgen ruby rustc sbcl - signal-desktop - spotify stdenv telnet texlive.combined.scheme-basic tmux unzip - xclip youtube-dl yubikey-manager yubikey-personalization @@ -84,7 +93,7 @@ in { }; }; - xresources.properties = { + xresources.properties = mkIf enable-gui { "Xft.antialias" = 1; "Xft.autohint" = 0; "Xft.dpi" = 192; @@ -96,7 +105,8 @@ in { services.gpg-agent.enable = true; home = { - packages = packages; + packages = + if enable-gui then common-packages ++ gui-packages else common-packages; file = { ".doom.d" = { @@ -105,18 +115,8 @@ in { onChange = "${pkgs.doomEmacsInit}/bin/doom-emacs-init.sh"; }; - ".local/share/openttd/baseset" = { - source = "${pkgs.openttd-data}/data"; - }; - - # ".k5login" = { - # source = pkgs.writeText "niten-k5login" '' - # niten@FUDO.ORG - # niten/root@FUDO.ORG - # niten@INFORMIS.LAND - # niten/root@INFORMIS.LAND - # ''; - # }; + ".local/share/openttd/baseset" = + mkIf enable-gui { source = "${pkgs.openttd-data}/data"; }; }; sessionVariables = {