diff options
Diffstat (limited to 'configs')
-rw-r--r-- | configs/default.nix | 1 | ||||
-rw-r--r-- | configs/earlyoom.nix | 10 | ||||
-rw-r--r-- | configs/gitrepos.nix | 2 | ||||
-rw-r--r-- | configs/hw/AO753.nix | 3 | ||||
-rw-r--r-- | configs/hw/winmax2.nix | 3 | ||||
-rw-r--r-- | configs/hw/x220.nix | 4 | ||||
-rw-r--r-- | configs/pulse.nix | 2 | ||||
-rw-r--r-- | configs/variables.nix | 19 | ||||
-rw-r--r-- | configs/wiregrill.nix | 4 | ||||
-rw-r--r-- | configs/xserver/default.nix | 2 |
10 files changed, 35 insertions, 15 deletions
diff --git a/configs/default.nix b/configs/default.nix index 06fd83a..fb8627d 100644 --- a/configs/default.nix +++ b/configs/default.nix @@ -19,6 +19,7 @@ ./ssh.nix ./sshd.nix ./tmux.nix + ./variables.nix ./vim.nix ./xdg.nix { diff --git a/configs/earlyoom.nix b/configs/earlyoom.nix new file mode 100644 index 0000000..1249c7a --- /dev/null +++ b/configs/earlyoom.nix @@ -0,0 +1,10 @@ +{ lib, ... }: { + services.earlyoom.enable = true; + systemd.services.earlyoom.environment.EARLYOOM_ARGS = lib.mkForce (toString [ + "-m 5" + "-s 10" + "-r 0" + "--prefer '(^|/)chromium$'" + ]); + +} diff --git a/configs/gitrepos.nix b/configs/gitrepos.nix index 0e61989..174e303 100644 --- a/configs/gitrepos.nix +++ b/configs/gitrepos.nix @@ -126,7 +126,7 @@ hc = {}; mime = {}; quipper = {}; - scanner = {}; + terminal-scanner = {}; wai-middleware-time = {}; web-routes-wai-custom = {}; xintmap = {}; diff --git a/configs/hw/AO753.nix b/configs/hw/AO753.nix index ea58c01..5e91564 100644 --- a/configs/hw/AO753.nix +++ b/configs/hw/AO753.nix @@ -41,7 +41,4 @@ ''; krebs.nixpkgs.allowUnfreePredicate = pkg: packageName pkg == "broadcom-sta"; - - tv.hw.screens.primary.width = 1366; - tv.hw.screens.primary.height = 768; } diff --git a/configs/hw/winmax2.nix b/configs/hw/winmax2.nix index 4bcd6f1..8af5511 100644 --- a/configs/hw/winmax2.nix +++ b/configs/hw/winmax2.nix @@ -41,7 +41,4 @@ ''; tv.lidControl.enable = true; - - tv.hw.screens.primary.width = 2560; - tv.hw.screens.primary.height = 1600; } diff --git a/configs/hw/x220.nix b/configs/hw/x220.nix index 6ae6cec..323be01 100644 --- a/configs/hw/x220.nix +++ b/configs/hw/x220.nix @@ -64,6 +64,7 @@ services.tlp.enable = true; services.tlp.settings = { START_CHARGE_THRESH_BAT0 = 80; + WOL_DISABLE = false; }; @@ -82,7 +83,4 @@ services.xserver = { videoDriver = "intel"; }; - - tv.hw.screens.primary.width = lib.mkDefault 1366; - tv.hw.screens.primary.height = lib.mkDefault 768; } diff --git a/configs/pulse.nix b/configs/pulse.nix index 9c317ae..815c309 100644 --- a/configs/pulse.nix +++ b/configs/pulse.nix @@ -75,7 +75,7 @@ in ]; }; - hardware.pulseaudio = { + services.pulseaudio = { inherit support32Bit; }; diff --git a/configs/variables.nix b/configs/variables.nix new file mode 100644 index 0000000..cdfaceb --- /dev/null +++ b/configs/variables.nix @@ -0,0 +1,19 @@ +{ config, lib, ... }: { + options.hrm.environment.variables = lib.mkOption { + type = lib.types.attrsOf lib.types.str; + default = {}; + description = '' + This is a stricter version of `environment.variables`, using + `escapeShellArg` instead of `"` for quoting. + + Use this when you don't have the need to reference other variables or + inject code into `/nix/store/*-set-environment`. This is also useful + for variables that need be used in contexts that don't perform shell + initialization, like e.g. `systemd.services.*.environment`; + ''; + }; + config.environment.variables = + lib.mapAttrs + (_name: value: ''"${lib.escapeShellArg value}"'') + config.hrm.environment.variables; +} diff --git a/configs/wiregrill.nix b/configs/wiregrill.nix index 55bb6f5..ee73061 100644 --- a/configs/wiregrill.nix +++ b/configs/wiregrill.nix @@ -8,8 +8,8 @@ in lib.mkIf cfg.enable { networking.wireguard.interfaces.wiregrill = { ips = - lib.optional (cfg.net.ip4 != null) cfg.net.ip4.addr ++ - lib.optional (cfg.net.ip6 != null) cfg.net.ip6.addr; + lib.optional (cfg.net.ip4 != null) (toCidrNotation cfg.net.ip4) ++ + lib.optional (cfg.net.ip6 != null) (toCidrNotation cfg.net.ip6); listenPort = 51820; privateKeyFile = "${config.krebs.secret.directory}/wiregrill.key"; allowedIPsAsRoutes = true; diff --git a/configs/xserver/default.nix b/configs/xserver/default.nix index 884a982..88c1afb 100644 --- a/configs/xserver/default.nix +++ b/configs/xserver/default.nix @@ -6,13 +6,11 @@ user = config.krebs.build.user; xmonad.pkg = pkgs.haskellPackages.xmonad-tv.overrideAttrs (_: { au = { - XMONAD_BUILD_SCREEN_WIDTH = 1920; XMONAD_BUILD_TERM_FONT_WIDTH = 10; XMONAD_BUILD_TERM_FONT = "xft:Input Mono:size=12:style=Regular"; XMONAD_BUILD_TERM_PADDING = 2; }; }.${config.krebs.build.host.name} or { - XMONAD_BUILD_SCREEN_WIDTH = 1366; XMONAD_BUILD_TERM_FONT_WIDTH = 6; XMONAD_BUILD_TERM_FONT = "-*-clean-*-*-*-*-*-*-*-*-*-*-iso10646-1"; XMONAD_BUILD_TERM_PADDING = 2; |