summaryrefslogtreecommitdiffstats
path: root/configs
diff options
context:
space:
mode:
Diffstat (limited to 'configs')
-rw-r--r--configs/alacritty.nix18
-rw-r--r--configs/bluetooth.nix7
-rw-r--r--configs/default.nix5
-rw-r--r--configs/earlyoom.nix10
-rw-r--r--configs/gitrepos.nix2
-rw-r--r--configs/htop.nix39
-rw-r--r--configs/hw/AO753.nix3
-rw-r--r--configs/hw/winmax2.nix10
-rw-r--r--configs/hw/x220.nix6
-rw-r--r--configs/man.nix2
-rw-r--r--configs/pulse.nix12
-rw-r--r--configs/sshd.nix1
-rw-r--r--configs/tmux.nix11
-rw-r--r--configs/variables.nix19
-rw-r--r--configs/vim.nix2
-rw-r--r--configs/wiregrill.nix4
-rw-r--r--configs/xserver/default.nix4
-rw-r--r--configs/xserver/urxvt.nix2
-rw-r--r--configs/xsessions/urxvtd.nix2
19 files changed, 82 insertions, 77 deletions
diff --git a/configs/alacritty.nix b/configs/alacritty.nix
index 25fb2c3..1a8eb92 100644
--- a/configs/alacritty.nix
+++ b/configs/alacritty.nix
@@ -24,7 +24,7 @@ let
colors.bright.magenta = "#fb53fb";
colors.bright.cyan = "#72fbfb";
colors.bright.white = "#fbfbfb";
- draw_bold_text_with_bright_colors = false;
+ colors.draw_bold_text_with_bright_colors = false;
hints.enabled = [
{
regex = "(ipfs:|ipns:|magnet:|mailto:|gemini:|gopher:|https:|http:|news:|file:|git:|ssh:|ftp:)[^\\u0000-\\u001F\\u007F-\\u009F<>\"\\s{-}\\^⟨⟩`]+";
@@ -33,6 +33,7 @@ let
action = "Select";
}
];
+ mouse.hide_when_typing = true;
scrolling.multiplier = 8;
};
configs.root = lib.recursiveUpdate configs.default {
@@ -51,18 +52,18 @@ let
font.bold.family = "iosevka tv 2 Medium";
font.bold_italic.family = "iosevka tv 2 Medium";
font.size = 5;
- key_bindings = [
+ keyboard.bindings = [
{ key = "Up"; mods = "Control"; action = "IncreaseFontSize"; }
{ key = "Down"; mods = "Control"; action = "DecreaseFontSize"; }
{ key = "Down"; mods = "Shift|Control"; action = "ResetFontSize"; }
];
};
- variants.x220 = {
+ variants.lodpi = {
font.normal.family = "Clean";
font.bold.family = "Clean";
font.bold.style = "Regular";
font.size = 10;
- key_bindings = let
+ keyboard.bindings = let
font-size = arg: {
program = "${pkgs.font-size-alacritty}/bin/font-size-alacritty";
args = [arg];
@@ -79,14 +80,17 @@ let
fu = "hidpi";
leg = "hidpi";
ru = "hidpi";
- }.${config.krebs.build.host.name} or "x220";
+ zoppo = "hidpi";
+ }.${config.krebs.build.host.name} or "lodpi";
+
+ format = pkgs.formats.toml {};
in
{
environment.etc =
lib.mapAttrs'
- (name: config: lib.nameValuePair "alacritty/${name}.json" {
- source = pkgs.writeJSON "alacritty-${name}.json" config;
+ (name: config: lib.nameValuePair "alacritty/${name}.toml" {
+ source = format.generate "alacritty-${name}.toml" config;
})
configs;
diff --git a/configs/bluetooth.nix b/configs/bluetooth.nix
new file mode 100644
index 0000000..899dd2f
--- /dev/null
+++ b/configs/bluetooth.nix
@@ -0,0 +1,7 @@
+{ pkgs, ... }: {
+ hardware.bluetooth.enable = true;
+ systemd.user.services.obex.enable = false;
+ environment.systemPackages = [
+ pkgs.bluetuith
+ ];
+}
diff --git a/configs/default.nix b/configs/default.nix
index 5d74d96..fb8627d 100644
--- a/configs/default.nix
+++ b/configs/default.nix
@@ -11,7 +11,6 @@
imports = [
./backup.nix
./bash
- ./htop.nix
./nets/hkw.nix
./networkd.nix
./nginx
@@ -19,6 +18,8 @@
./pki
./ssh.nix
./sshd.nix
+ ./tmux.nix
+ ./variables.nix
./vim.nix
./xdg.nix
{
@@ -53,7 +54,7 @@
environment.profileRelativeEnvVars.PATH = lib.mkForce [ "/bin" ];
environment.systemPackages = with pkgs; [
- rxvt_unicode.terminfo
+ rxvt-unicode-unwrapped.terminfo
];
environment.shellAliases = lib.mkForce {
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/htop.nix b/configs/htop.nix
deleted file mode 100644
index e60cc51..0000000
--- a/configs/htop.nix
+++ /dev/null
@@ -1,39 +0,0 @@
-{ pkgs, ... }: {
- nixpkgs.config.packageOverrides = super: {
- htop = pkgs.symlinkJoin {
- name = "htop";
- paths = [
- (pkgs.writeDashBin "htop" ''
- export HTOPRC=${pkgs.writeText "htoprc" ''
- fields=0 48 17 18 38 39 40 2 46 47 49 1
- sort_key=46
- sort_direction=1
- hide_threads=0
- hide_kernel_threads=1
- hide_userland_threads=0
- shadow_other_users=1
- show_thread_names=1
- show_program_path=1
- highlight_base_name=1
- highlight_megabytes=1
- highlight_threads=1
- tree_view=1
- header_margin=0
- detailed_cpu_time=0
- cpu_count_from_zero=0
- update_process_names=0
- account_guest_in_cpu_meter=1
- color_scheme=0
- delay=15
- left_meters=LeftCPUs2 RightCPUs2 Memory Swap
- left_meter_modes=1 1 1 1
- right_meters=Uptime Tasks LoadAverage Battery
- right_meter_modes=2 2 2 2
- ''}
- exec ${super.htop}/bin/htop "$@"
- '')
- super.htop
- ];
- };
- };
-}
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 7b28466..8af5511 100644
--- a/configs/hw/winmax2.nix
+++ b/configs/hw/winmax2.nix
@@ -20,11 +20,10 @@
hardware.cpu.amd.updateMicrocode = true;
hardware.enableRedistributableFirmware = true;
- hardware.opengl.enable = true;
- hardware.opengl.extraPackages = [
+ hardware.graphics.enable = true;
+ hardware.graphics.extraPackages = [
pkgs.amdvlk
- pkgs.rocm-opencl-icd
- pkgs.rocm-opencl-runtime
+ pkgs.rocmPackages.clr
];
networking.wireless.enable = true;
@@ -42,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 6993413..323be01 100644
--- a/configs/hw/x220.nix
+++ b/configs/hw/x220.nix
@@ -49,7 +49,7 @@
# Required for Centrino.
hardware.enableRedistributableFirmware = true;
- hardware.opengl.extraPackages = [ pkgs.vaapiIntel pkgs.vaapiVdpau ];
+ hardware.graphics.extraPackages = [ pkgs.vaapiIntel pkgs.vaapiVdpau ];
hardware.trackpoint = {
enable = true;
@@ -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/man.nix b/configs/man.nix
index c723138..8839476 100644
--- a/configs/man.nix
+++ b/configs/man.nix
@@ -7,7 +7,7 @@
#'';
environment.systemPackages = [
pkgs.man-pages
- pkgs.posix_man_pages
+ pkgs.man-pages-posix
pkgs.xorg.xorgdocs
];
}
diff --git a/configs/pulse.nix b/configs/pulse.nix
index 17c203c..815c309 100644
--- a/configs/pulse.nix
+++ b/configs/pulse.nix
@@ -6,19 +6,19 @@
support32Bit =
pkgs.stdenv.isx86_64 &&
- pkgs_i686.alsaLib != null &&
+ pkgs_i686.alsa-lib != null &&
pkgs_i686.libpulseaudio != null;
alsaConf = pkgs.writeText "asound.conf" ''
ctl_type.pulse {
- libs.native = ${pkgs.alsaPlugins}/lib/alsa-lib/libasound_module_ctl_pulse.so;
+ libs.native = ${pkgs.alsa-plugins}/lib/alsa-lib/libasound_module_ctl_pulse.so;
${lib.optionalString support32Bit
- "libs.32Bit = ${pkgs_i686.alsaPlugins}/lib/alsa-lib/libasound_module_ctl_pulse.so;"}
+ "libs.32Bit = ${pkgs_i686.alsa-plugins}/lib/alsa-lib/libasound_module_ctl_pulse.so;"}
}
pcm_type.pulse {
- libs.native = ${pkgs.alsaPlugins}/lib/alsa-lib/libasound_module_pcm_pulse.so;
+ libs.native = ${pkgs.alsa-plugins}/lib/alsa-lib/libasound_module_pcm_pulse.so;
${lib.optionalString support32Bit
- "libs.32Bit = ${pkgs_i686.alsaPlugins}/lib/alsa-lib/libasound_module_pcm_pulse.so;"}
+ "libs.32Bit = ${pkgs_i686.alsa-plugins}/lib/alsa-lib/libasound_module_pcm_pulse.so;"}
}
ctl.!default {
type pulse
@@ -75,7 +75,7 @@ in
];
};
- hardware.pulseaudio = {
+ services.pulseaudio = {
inherit support32Bit;
};
diff --git a/configs/sshd.nix b/configs/sshd.nix
index 281d498..d99ceb5 100644
--- a/configs/sshd.nix
+++ b/configs/sshd.nix
@@ -1,6 +1,7 @@
{ config, lib, ... }: let
cfg.host = config.krebs.build.host;
nets =
+ lib.optional (cfg.host.nets?mycelium) cfg.host.nets.mycelium ++
lib.optional (cfg.host.nets?retiolum) cfg.host.nets.retiolum ++
lib.optional (cfg.host.nets?wiregrill) cfg.host.nets.wiregrill;
in {
diff --git a/configs/tmux.nix b/configs/tmux.nix
new file mode 100644
index 0000000..a61b8c3
--- /dev/null
+++ b/configs/tmux.nix
@@ -0,0 +1,11 @@
+{
+ programs.tmux.enable = true;
+ programs.tmux.baseIndex = 1;
+ programs.tmux.clock24 = true;
+ programs.tmux.escapeTime = 0;
+ programs.tmux.historyLimit = 10000;
+ programs.tmux.terminal = "tmux-direct";
+ programs.tmux.extraConfig = ''
+ setw -g mouse on
+ '';
+}
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/vim.nix b/configs/vim.nix
index cfe30eb..8f06084 100644
--- a/configs/vim.nix
+++ b/configs/vim.nix
@@ -130,6 +130,8 @@
au BufRead,BufNewFile /dev/shm/* set nobackup nowritebackup noswapfile
+ au TabClosed * tabp
+
cnoremap <C-A> <Home>
noremap <C-c> :q<cr>
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 e0b8d77..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;
@@ -115,7 +113,7 @@ in {
config.tv.slock.package
pkgs.flameshot-once-tv
pkgs.pulseaudio.out
- pkgs.rxvt_unicode
+ pkgs.rxvt-unicode-unwrapped
pkgs.xcalib
"/run/wrappers" # for su
];
diff --git a/configs/xserver/urxvt.nix b/configs/xserver/urxvt.nix
index c4e619d..d3c90fd 100644
--- a/configs/xserver/urxvt.nix
+++ b/configs/xserver/urxvt.nix
@@ -6,7 +6,7 @@ in {
restartIfChanged = false;
serviceConfig = {
SyslogIdentifier = "urxvtd";
- ExecStart = "${pkgs.rxvt_unicode}/bin/urxvtd";
+ ExecStart = "${pkgs.rxvt-unicode-unwrapped}/bin/urxvtd";
Restart = "always";
RestartSec = "2s";
StartLimitBurst = 0;
diff --git a/configs/xsessions/urxvtd.nix b/configs/xsessions/urxvtd.nix
index de16a63..80d4b3d 100644
--- a/configs/xsessions/urxvtd.nix
+++ b/configs/xsessions/urxvtd.nix
@@ -9,7 +9,7 @@
RXVT_SOCKET = "%t/urxvtd";
};
serviceConfig = {
- ExecStart = "${pkgs.rxvt_unicode}/bin/urxvtd";
+ ExecStart = "${pkgs.rxvt-unicode-unwrapped}/bin/urxvtd";
};
};
}