2015-07-16 15:51:01 +02:00
|
|
|
{ config, pkgs, ... }:
|
2017-02-16 00:05:38 +01:00
|
|
|
with import <stockholm/lib>;
|
2015-07-16 15:51:01 +02:00
|
|
|
let
|
2017-02-16 00:05:38 +01:00
|
|
|
user = config.krebs.build.user;
|
2015-07-16 15:51:01 +02:00
|
|
|
in {
|
|
|
|
imports = [
|
2016-04-28 22:56:02 +02:00
|
|
|
./mpv.nix
|
2016-06-18 22:01:10 +02:00
|
|
|
./power-action.nix
|
2017-02-16 00:05:38 +01:00
|
|
|
./copyq.nix
|
2017-11-29 15:39:14 +01:00
|
|
|
./urxvt.nix
|
2019-04-17 20:12:01 +02:00
|
|
|
./xdg-open.nix
|
2019-10-14 15:11:43 +02:00
|
|
|
./yubikey.nix
|
2021-09-24 16:57:18 +02:00
|
|
|
./pipewire.nix
|
2021-10-25 20:04:06 +02:00
|
|
|
./tmux.nix
|
2021-07-16 21:48:21 +02:00
|
|
|
./xmonad.nix
|
2017-01-10 17:27:07 +01:00
|
|
|
{
|
|
|
|
krebs.per-user.lass.packages = [
|
|
|
|
pkgs.sshuttle
|
|
|
|
];
|
|
|
|
security.sudo.extraConfig = ''
|
|
|
|
lass ALL= (root) NOPASSWD:SETENV: ${pkgs.sshuttle}/bin/.sshuttle-wrapped
|
|
|
|
'';
|
|
|
|
}
|
2017-09-19 11:45:33 +02:00
|
|
|
{ #font magic
|
2017-10-09 13:02:14 +02:00
|
|
|
options.lass.fonts = {
|
|
|
|
regular = mkOption {
|
|
|
|
type = types.str;
|
2017-10-18 19:53:05 +02:00
|
|
|
default = "-*-clean-*-*-*-*-*-*-*-*-*-*-iso10646-1";
|
2017-10-09 13:02:14 +02:00
|
|
|
};
|
|
|
|
bold = mkOption {
|
|
|
|
type = types.str;
|
2017-10-18 19:53:05 +02:00
|
|
|
default = "-*-clean-*-*-*-*-*-*-*-*-*-*-iso10646-1";
|
2017-10-09 13:02:14 +02:00
|
|
|
};
|
|
|
|
italic = mkOption {
|
|
|
|
type = types.str;
|
2017-10-18 19:53:05 +02:00
|
|
|
default = "-*-clean-*-*-*-*-*-*-*-*-*-*-iso10646-1";
|
2017-10-09 13:02:14 +02:00
|
|
|
};
|
2017-09-19 11:45:33 +02:00
|
|
|
};
|
2017-12-15 19:55:02 +01:00
|
|
|
config.krebs.xresources.resources.X = ''
|
2017-11-29 15:39:14 +01:00
|
|
|
*.font: ${config.lass.fonts.regular}
|
|
|
|
*.boldFont: ${config.lass.fonts.bold}
|
|
|
|
*.italicFont: ${config.lass.fonts.italic}
|
|
|
|
'';
|
2017-09-19 11:45:33 +02:00
|
|
|
}
|
2015-07-16 15:51:01 +02:00
|
|
|
];
|
|
|
|
|
2021-09-24 16:57:18 +02:00
|
|
|
users.users.mainUser.extraGroups = [ "audio" "video" ];
|
2015-10-30 18:35:21 +01:00
|
|
|
|
2015-07-16 15:51:01 +02:00
|
|
|
time.timeZone = "Europe/Berlin";
|
|
|
|
|
2018-01-20 13:03:51 +01:00
|
|
|
programs.ssh.agentTimeout = "10m";
|
2019-10-14 15:11:43 +02:00
|
|
|
programs.ssh.startAgent = false;
|
2017-05-22 17:20:58 +02:00
|
|
|
services.openssh.forwardX11 = true;
|
2015-07-16 15:51:01 +02:00
|
|
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
2016-06-11 00:28:09 +02:00
|
|
|
acpi
|
2019-09-22 12:12:29 +02:00
|
|
|
acpilight
|
2018-06-08 05:04:53 +02:00
|
|
|
ag
|
2018-05-14 22:05:49 +02:00
|
|
|
cabal2nix
|
2016-11-27 15:18:52 +01:00
|
|
|
dic
|
2015-12-29 20:21:06 +01:00
|
|
|
dmenu
|
2018-06-27 23:44:02 +02:00
|
|
|
font-size
|
2018-12-16 16:34:45 +01:00
|
|
|
fzfmenu
|
2019-10-14 15:12:51 +02:00
|
|
|
gimp
|
2021-10-25 20:15:34 +02:00
|
|
|
gitAndTools.hub
|
|
|
|
git-crypt
|
2018-05-14 22:05:49 +02:00
|
|
|
git-preview
|
2018-05-07 19:56:26 +02:00
|
|
|
gnome3.dconf
|
2020-04-19 16:26:45 +02:00
|
|
|
iodine
|
2020-09-27 15:29:20 +02:00
|
|
|
libarchive
|
2017-11-29 16:15:10 +01:00
|
|
|
lm_sensors
|
2016-12-01 17:10:13 +01:00
|
|
|
ncdu
|
2018-06-20 13:02:10 +02:00
|
|
|
nix-index
|
2020-09-27 15:29:20 +02:00
|
|
|
nixpkgs-review
|
2016-06-02 12:18:49 +02:00
|
|
|
nmap
|
2015-12-26 17:30:59 +01:00
|
|
|
pavucontrol
|
2020-04-19 16:26:45 +02:00
|
|
|
ponymix
|
2015-12-26 17:30:59 +01:00
|
|
|
powertop
|
2019-01-27 19:32:04 +01:00
|
|
|
rxvt_unicode-with-plugins
|
2015-12-26 17:30:59 +01:00
|
|
|
sxiv
|
2018-01-16 00:06:04 +01:00
|
|
|
taskwarrior
|
2017-11-12 13:04:42 +01:00
|
|
|
termite
|
2019-09-22 12:19:17 +02:00
|
|
|
transgui
|
|
|
|
wirelesstools
|
2016-04-15 16:19:50 +02:00
|
|
|
xclip
|
2019-04-07 19:18:07 +02:00
|
|
|
xephyrify
|
2016-06-11 00:28:09 +02:00
|
|
|
xorg.xhost
|
2015-12-26 17:30:59 +01:00
|
|
|
xsel
|
2017-11-12 13:04:42 +01:00
|
|
|
zathura
|
2021-10-25 20:15:34 +02:00
|
|
|
flameshot-once
|
2020-07-04 06:51:08 +02:00
|
|
|
(pkgs.writeDashBin "screenshot" ''
|
2020-09-27 15:29:38 +02:00
|
|
|
set -efu
|
|
|
|
|
2020-07-04 06:51:08 +02:00
|
|
|
${pkgs.flameshot-once}/bin/flameshot-once
|
|
|
|
${pkgs.klem}/bin/klem
|
|
|
|
'')
|
2015-07-16 15:51:01 +02:00
|
|
|
];
|
|
|
|
|
2017-10-09 13:02:14 +02:00
|
|
|
fonts.fonts = with pkgs; [
|
|
|
|
hack-font
|
|
|
|
hasklig
|
|
|
|
symbola
|
|
|
|
xlibs.fontschumachermisc
|
2017-02-16 00:05:38 +01:00
|
|
|
];
|
|
|
|
|
2019-09-22 12:12:29 +02: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-16 00:05:38 +01:00
|
|
|
services.xserver = {
|
2018-01-18 19:38:56 +01:00
|
|
|
enable = true;
|
2017-02-16 00:05:38 +01:00
|
|
|
layout = "us";
|
2018-01-18 19:38:56 +01:00
|
|
|
display = mkForce 0;
|
2017-02-16 00:05:38 +01:00
|
|
|
xkbVariant = "altgr-intl";
|
2018-12-09 17:07:53 +01:00
|
|
|
xkbOptions = "caps:escape";
|
|
|
|
libinput.enable = true;
|
2021-07-16 21:48:21 +02:00
|
|
|
displayManager = {
|
|
|
|
lightdm.enable = true;
|
|
|
|
defaultSession = "none+xmonad";
|
|
|
|
sessionCommands = ''
|
2018-01-18 19:38:56 +01:00
|
|
|
${pkgs.xorg.xhost}/bin/xhost +LOCAL:
|
|
|
|
'';
|
|
|
|
};
|
2017-02-16 00:05:38 +01:00
|
|
|
};
|
2015-07-16 15:51:01 +02:00
|
|
|
|
2018-11-30 07:48:49 +01:00
|
|
|
nixpkgs.config.packageOverrides = super: {
|
|
|
|
dmenu = pkgs.writeDashBin "dmenu" ''
|
|
|
|
${pkgs.fzfmenu}/bin/fzfmenu "$@"
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2017-12-15 19:55:02 +01:00
|
|
|
krebs.xresources.enable = true;
|
2017-10-19 18:42:09 +02:00
|
|
|
lass.screenlock.enable = true;
|
2020-07-04 06:15:53 +02: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 -
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
2015-07-16 15:51:01 +02:00
|
|
|
}
|