stockholm/lass/2configs/baseX.nix

239 lines
5.6 KiB
Nix
Raw Normal View History

2015-07-16 13:51:01 +00:00
{ config, pkgs, ... }:
2017-02-15 23:05:38 +00:00
with import <stockholm/lib>;
2015-07-16 13:51:01 +00:00
let
2017-02-15 23:05:38 +00:00
user = config.krebs.build.user;
2015-07-16 13:51:01 +00:00
in {
imports = [
2022-04-04 16:20:15 +00:00
./alacritty.nix
./mpv.nix
2016-06-18 20:01:10 +00:00
./power-action.nix
2017-11-29 14:39:14 +00:00
./urxvt.nix
2019-04-17 18:12:01 +00:00
./xdg-open.nix
2019-10-14 13:11:43 +00:00
./yubikey.nix
2021-09-24 14:57:18 +00:00
./pipewire.nix
2021-10-25 18:04:06 +00:00
./tmux.nix
2021-07-16 19:48:21 +00:00
./xmonad.nix
2022-04-04 16:19:51 +00:00
./themes.nix
2017-01-10 16:27:07 +00:00
{
2022-05-29 17:47:05 +00:00
users.users.mainUser.packages = [
2017-01-10 16:27:07 +00:00
pkgs.sshuttle
];
security.sudo.extraConfig = ''
lass ALL= (root) NOPASSWD:SETENV: ${pkgs.sshuttle}/bin/.sshuttle-wrapped
'';
}
2017-09-19 09:45:33 +00:00
{ #font magic
2017-10-09 11:02:14 +00:00
options.lass.fonts = {
regular = mkOption {
type = types.str;
2017-10-18 17:53:05 +00:00
default = "-*-clean-*-*-*-*-*-*-*-*-*-*-iso10646-1";
2017-10-09 11:02:14 +00:00
};
bold = mkOption {
type = types.str;
2017-10-18 17:53:05 +00:00
default = "-*-clean-*-*-*-*-*-*-*-*-*-*-iso10646-1";
2017-10-09 11:02:14 +00:00
};
italic = mkOption {
type = types.str;
2017-10-18 17:53:05 +00:00
default = "-*-clean-*-*-*-*-*-*-*-*-*-*-iso10646-1";
2017-10-09 11:02:14 +00:00
};
2017-09-19 09:45:33 +00:00
};
config.krebs.xresources.resources.X = ''
2017-11-29 14:39:14 +00:00
*.font: ${config.lass.fonts.regular}
*.boldFont: ${config.lass.fonts.bold}
*.italicFont: ${config.lass.fonts.italic}
'';
2017-09-19 09:45:33 +00:00
}
2015-07-16 13:51:01 +00:00
];
2022-05-29 17:52:54 +00:00
users.users.mainUser.extraGroups = [ "audio" "pipewire" "video" ];
2015-10-30 17:35:21 +00:00
2015-07-16 13:51:01 +00:00
time.timeZone = "Europe/Berlin";
2018-01-20 12:03:51 +00:00
programs.ssh.agentTimeout = "10m";
2019-10-14 13:11:43 +00:00
programs.ssh.startAgent = false;
2017-05-22 15:20:58 +00:00
services.openssh.forwardX11 = true;
2015-07-16 13:51:01 +00:00
environment.systemPackages = with pkgs; [
2016-06-10 22:28:09 +00:00
acpi
acpilight
2022-03-23 13:49:58 +00:00
ripgrep
2018-05-14 20:05:49 +00:00
cabal2nix
2016-11-27 14:18:52 +00:00
dic
2015-12-29 19:21:06 +00:00
dmenu
2018-06-27 21:44:02 +00:00
font-size
2018-12-16 15:34:45 +00:00
fzfmenu
2019-10-14 13:12:51 +00:00
gimp
2022-05-29 17:53:03 +00:00
gitAndTools.gh
2021-10-25 18:15:34 +00:00
git-crypt
2018-05-14 20:05:49 +00:00
git-preview
2022-01-24 14:23:51 +00:00
dconf
2020-04-19 14:26:45 +00:00
iodine
2020-09-27 13:29:20 +00:00
libarchive
2017-11-29 15:15:10 +00:00
lm_sensors
2016-12-01 16:10:13 +00:00
ncdu
2018-06-20 11:02:10 +00:00
nix-index
2020-09-27 13:29:20 +00:00
nixpkgs-review
2016-06-02 10:18:49 +00:00
nmap
2015-12-26 16:30:59 +00:00
pavucontrol
2020-04-19 14:26:45 +00:00
ponymix
2015-12-26 16:30:59 +00:00
powertop
2022-11-01 11:40:36 +00:00
rxvt-unicode
2022-05-29 17:53:28 +00:00
sshvnc
2022-11-27 20:51:15 +00:00
sxiv
2022-11-21 23:13:11 +00:00
nsxiv
2018-01-15 23:06:04 +00:00
taskwarrior
2017-11-12 12:04:42 +00:00
termite
2019-09-22 10:19:17 +00:00
transgui
wirelesstools
2022-05-29 17:53:28 +00:00
x11vnc
2016-04-15 14:19:50 +00:00
xclip
2019-04-07 17:18:07 +00:00
xephyrify
2016-06-10 22:28:09 +00:00
xorg.xhost
2015-12-26 16:30:59 +00:00
xsel
2017-11-12 12:04:42 +00:00
zathura
2023-02-03 12:15:23 +00:00
flameshot
2020-07-04 04:51:08 +00:00
(pkgs.writeDashBin "screenshot" ''
2020-09-27 13:29:38 +00:00
set -efu
2023-02-03 12:15:23 +00:00
${pkgs.flameshot}/bin/flameshot
2020-07-04 04:51:08 +00:00
${pkgs.klem}/bin/klem
'')
2015-07-16 13:51:01 +00:00
];
2022-03-23 14:50:55 +00:00
fonts = {
fontDir.enable = true;
enableGhostscriptFonts = true;
fonts = with pkgs; [
xorg.fontschumachermisc
inconsolata
2022-11-21 23:14:31 +00:00
noto-fonts
(iosevka.override {
2022-11-22 08:10:12 +00:00
# https://typeof.net/Iosevka/customizer
2022-11-21 23:14:31 +00:00
privateBuildPlan = {
family = "Iosevka";
2022-11-22 08:10:12 +00:00
spacing = "term";
serifs = "slab";
2022-11-21 23:14:31 +00:00
no-ligation = true;
variants.design = {
capital-j = "serifless";
a = "double-storey-tailed";
b = "toothless-corner";
d = "toothless-corner-serifless";
f = "flat-hook-tailed";
g = "earless-corner";
2022-11-22 08:10:12 +00:00
i = "hooky";
2022-11-21 23:14:31 +00:00
j = "serifless";
l = "tailed";
m = "earless-corner-double-arch";
n = "earless-corner-straight";
p = "earless-corner";
q = "earless-corner";
r = "earless-corner";
u = "toothless-rounded";
y = "cursive-flat-hook";
2022-11-22 08:10:12 +00:00
one = "no-base-long-top-serif";
2022-11-21 23:14:31 +00:00
two = "straight-neck";
three = "flat-top";
four = "open";
six = "open-contour";
seven = "straight-serifless";
eight = "two-circles";
nine = "open-contour";
tilde = "low";
asterisk = "hex-low";
number-sign = "upright";
at = "short";
dollar = "open";
percent = "dots";
question = "corner-flat-hooked";
};
};
set = "kookiefonts";
})
2022-03-23 14:50:55 +00:00
];
};
2017-02-15 23:05:38 +00:00
services.udev.extraRules = ''
SUBSYSTEM=="backlight", ACTION=="add", \
RUN+="${pkgs.coreutils}/bin/chgrp video /sys/class/backlight/%k/brightness", \
RUN+="${pkgs.coreutils}/bin/chmod g+w /sys/class/backlight/%k/brightness"
'';
2017-02-15 23:05:38 +00:00
services.xserver = {
2018-01-18 18:38:56 +00:00
enable = true;
2017-02-15 23:05:38 +00:00
layout = "us";
2018-01-18 18:38:56 +00:00
display = mkForce 0;
2017-02-15 23:05:38 +00:00
xkbVariant = "altgr-intl";
2018-12-09 16:07:53 +00:00
xkbOptions = "caps:escape";
libinput.enable = true;
2021-07-16 19:48:21 +00:00
displayManager = {
lightdm.enable = true;
defaultSession = "none+xmonad";
sessionCommands = ''
2018-01-18 18:38:56 +00:00
${pkgs.xorg.xhost}/bin/xhost +LOCAL:
'';
};
2017-02-15 23:05:38 +00:00
};
2015-07-16 13:51:01 +00:00
2018-11-30 06:48:49 +00:00
nixpkgs.config.packageOverrides = super: {
dmenu = pkgs.writeDashBin "dmenu" ''
${pkgs.fzfmenu}/bin/fzfmenu "$@"
'';
};
krebs.xresources.enable = true;
2017-10-19 16:42:09 +00:00
lass.screenlock.enable = true;
2020-07-04 04:15:53 +00:00
lass.klem = {
kpaste.script = pkgs.writeDash "kpaste-wrapper" ''
${pkgs.kpaste}/bin/kpaste \
| ${pkgs.coreutils}/bin/tail -1 \
| ${pkgs.coreutils}/bin/tr -d '\r\n'
'';
go = {
target = "STRING";
script = "${pkgs.goify}/bin/goify";
};
"go.lassul.us" = {
target = "STRING";
script = pkgs.writeDash "go.lassul.us" ''
export GO_HOST='go.lassul.us'
${pkgs.goify}/bin/goify
'';
};
qrcode = {
target = "image";
script = pkgs.writeDash "zbar" ''
${pkgs.zbar}/bin/zbarimg -q -
'';
};
ocr = {
target = "image";
script = pkgs.writeDash "gocr" ''
${pkgs.netpbm}/bin/pngtopnm - \
| ${pkgs.gocr}/bin/gocr -
'';
};
};
2022-11-21 23:16:06 +00:00
services.clipmenu.enable = true;
# synchronize all the clipboards
systemd.user.services.autocutsel = {
enable = true;
wantedBy = [ "graphical-session.target" ];
after = [ "graphical-session.target" ];
serviceConfig = {
Type = "forking";
ExecStart = pkgs.writers.writeDash "autocutsel" ''
${pkgs.autocutsel}/bin/autocutsel -fork -selection PRIMARY
${pkgs.autocutsel}/bin/autocutsel -fork -selection CLIPBOARD
'';
};
};
2015-07-16 13:51:01 +00:00
}