Merge remote-tracking branch 'lass/master'
This commit is contained in:
commit
8ad08b3096
krebs
lass
1systems
2configs
5pkgs
nin
shared/2configs
tv
|
@ -49,10 +49,10 @@ let
|
|||
type = with types; attrsOf (submodule {
|
||||
options = {
|
||||
test = mkOption {
|
||||
type = path;
|
||||
type = either path str;
|
||||
};
|
||||
alarm = mkOption {
|
||||
type = path;
|
||||
type = either path str;
|
||||
};
|
||||
interval = mkOption {
|
||||
type = str;
|
||||
|
|
|
@ -12,7 +12,34 @@ let
|
|||
api = {
|
||||
enable = mkEnableOption "repo-sync";
|
||||
repos = mkOption {
|
||||
type = with types;attrsOf (attrsOf (attrsOf (attrsOf str)));
|
||||
type = types.attrsOf (types.submodule {
|
||||
options = {
|
||||
branches = mkOption {
|
||||
type = types.attrsOf (types.submodule ({ config, ... }: {
|
||||
options = {
|
||||
origin = mkOption {
|
||||
type = types.git-source;
|
||||
};
|
||||
mirror = mkOption {
|
||||
type = types.git-source;
|
||||
};
|
||||
};
|
||||
config = {
|
||||
origin.ref = mkDefault "heads/master";
|
||||
mirror.ref = mkDefault "heads/${config._module.args.name}";
|
||||
};
|
||||
}));
|
||||
};
|
||||
latest = mkOption {
|
||||
type = types.nullOr types.git-source;
|
||||
default = null;
|
||||
};
|
||||
timerConfig = mkOption {
|
||||
type = types.attrsOf types.str;
|
||||
default = cfg.timerConfig;
|
||||
};
|
||||
};
|
||||
});
|
||||
example = literalExample ''
|
||||
# see `repo-sync --help`
|
||||
# `ref` provides sane defaults and can be omitted
|
||||
|
@ -23,53 +50,53 @@ let
|
|||
# each attrset defines a group of repos for syncing
|
||||
|
||||
{ nxpkgs = {
|
||||
makefu = {
|
||||
origin = {
|
||||
url = http://github.com/makefu/nixpkgs;
|
||||
ref = "heads/dev" ;
|
||||
branches = {
|
||||
makefu = {
|
||||
origin = {
|
||||
url = http://github.com/makefu/nixpkgs;
|
||||
ref = "heads/dev" ;
|
||||
};
|
||||
mirror = {
|
||||
url = "git@internal:nixpkgs-mirror" ;
|
||||
ref = "heads/github-mirror-dev" ;
|
||||
};
|
||||
};
|
||||
mirror = {
|
||||
url = "git@internal:nixpkgs-mirror" ;
|
||||
ref = "heads/github-mirror-dev" ;
|
||||
lass = {
|
||||
origin = {
|
||||
url = http://github.com/lass/nixpkgs;
|
||||
};
|
||||
mirror = {
|
||||
url = "git@internal:nixpkgs-mirror" ;
|
||||
};
|
||||
};
|
||||
};
|
||||
lass = {
|
||||
origin = {
|
||||
url = http://github.com/lass/nixpkgs;
|
||||
};
|
||||
mirror = {
|
||||
url = "git@internal:nixpkgs-mirror" ;
|
||||
};
|
||||
};
|
||||
"@latest" = {
|
||||
mirror = {
|
||||
url = "git@internal:nixpkgs-mirror";
|
||||
ref = "heads/master";
|
||||
};
|
||||
latest = {
|
||||
url = "git@internal:nixpkgs-mirror";
|
||||
ref = "heads/master";
|
||||
};
|
||||
};
|
||||
stockholm = {
|
||||
lass = {
|
||||
origin = {
|
||||
url = http://cgit.prism.r/stockholm;
|
||||
branches = {
|
||||
lass = {
|
||||
origin = {
|
||||
url = http://cgit.prism.r/stockholm;
|
||||
};
|
||||
mirror = {
|
||||
url = "git@internal:stockholm-mirror" ;
|
||||
};
|
||||
};
|
||||
mirror = {
|
||||
url = "git@internal:stockholm-mirror" ;
|
||||
makefu = {
|
||||
origin = {
|
||||
url = http://gum.krebsco.de/stockholm;
|
||||
};
|
||||
mirror = {
|
||||
url = "git@internal:stockholm-mirror" ;
|
||||
};
|
||||
};
|
||||
};
|
||||
makefu = {
|
||||
origin = {
|
||||
url = http://gum.krebsco.de/stockholm;
|
||||
};
|
||||
mirror = {
|
||||
url = "git@internal:stockholm-mirror" ;
|
||||
};
|
||||
};
|
||||
"@latest" = {
|
||||
mirror = {
|
||||
url = "git@internal:stockholm-mirror";
|
||||
ref = "heads/master";
|
||||
};
|
||||
latest = {
|
||||
url = "git@internal:stockholm-mirror";
|
||||
ref = "heads/master";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -127,15 +154,16 @@ let
|
|||
nameValuePair "repo-sync-${name}" {
|
||||
description = "repo-sync timer";
|
||||
wantedBy = [ "timers.target" ];
|
||||
|
||||
timerConfig = cfg.timerConfig;
|
||||
timerConfig = repo.timerConfig;
|
||||
}
|
||||
) cfg.repos;
|
||||
|
||||
systemd.services = mapAttrs' (name: repo:
|
||||
let
|
||||
repo-sync-config = pkgs.writeText "repo-sync-config-${name}.json"
|
||||
(builtins.toJSON repo);
|
||||
repo-sync-config = pkgs.writeJSON "repo-sync-config-${name}.json"
|
||||
(repo.branches // optionalAttrs (repo.latest != null) {
|
||||
"@latest".mirror = repo.latest;
|
||||
});
|
||||
in nameValuePair "repo-sync-${name}" {
|
||||
description = "repo-sync";
|
||||
after = [ "network.target" "secret.service" ];
|
||||
|
|
|
@ -85,7 +85,7 @@ with import <stockholm/lib>;
|
|||
};
|
||||
nets = {
|
||||
internet = {
|
||||
ip4.addr = "64.137.177.226";
|
||||
ip4.addr = "45.62.237.203";
|
||||
aliases = [
|
||||
"cd.i"
|
||||
"cd.krebsco.de"
|
||||
|
|
|
@ -2,6 +2,32 @@
|
|||
with import <stockholm/lib>;
|
||||
{
|
||||
nixpkgs.config.packageOverrides = _: {
|
||||
|
||||
# Combine a list of derivations using symlinks. Paths in later derivations
|
||||
# take precedence over earlier ones.
|
||||
#
|
||||
# Example: create wrapper but retain all other files (man pages etc.)
|
||||
#
|
||||
# {
|
||||
# nixpkgs.config.packageOverrides = super: {
|
||||
# hello = pkgs.concat "hello" [
|
||||
# super.hello
|
||||
# (pkgs.writeDashBin "hello" ''
|
||||
# echo OMG
|
||||
# echo exec ${super.hello}/bin/hello "$@"
|
||||
# '')
|
||||
# ];
|
||||
# };
|
||||
# }
|
||||
#
|
||||
concat = name: xs: pkgs.runCommand name {} ''
|
||||
mkdir $out
|
||||
${flip concatMapStrings xs (x: ''
|
||||
cp --remove-destination -vrs ${x}/* $out
|
||||
find $out -type d -exec chmod -v u+rwx {} +
|
||||
'')}
|
||||
'';
|
||||
|
||||
execve = name: { filename, argv ? null, envp ? {}, destination ? "" }: let
|
||||
in pkgs.writeC name { inherit destination; } /* c */ ''
|
||||
#include <unistd.h>
|
||||
|
@ -96,7 +122,7 @@ with import <stockholm/lib>;
|
|||
assert types.package.check link;
|
||||
{
|
||||
install = /* sh */ ''
|
||||
${optionalString (dirOf path != "/") /* sh */ ''
|
||||
${optionalString (path != "") /* sh */ ''
|
||||
${pkgs.coreutils}/bin/mkdir -p $out${dirOf path}
|
||||
''}
|
||||
${pkgs.coreutils}/bin/ln -s ${link} $out${path}
|
||||
|
|
|
@ -24,6 +24,7 @@ with import <stockholm/lib>;
|
|||
../2configs/krebs-pass.nix
|
||||
../2configs/repo-sync.nix
|
||||
../2configs/ircd.nix
|
||||
../2configs/logf.nix
|
||||
{
|
||||
#risk of rain port
|
||||
krebs.iptables.tables.filter.INPUT.rules = [
|
||||
|
@ -192,7 +193,6 @@ with import <stockholm/lib>;
|
|||
remmina
|
||||
thunderbird
|
||||
|
||||
logf
|
||||
iodine
|
||||
|
||||
macchanger
|
||||
|
|
|
@ -215,8 +215,13 @@ in {
|
|||
}
|
||||
{
|
||||
krebs.repo-sync.timerConfig = {
|
||||
OnBootSec = "15min";
|
||||
OnUnitInactiveSec = "90min";
|
||||
RandomizedDelaySec = "30min";
|
||||
};
|
||||
krebs.repo-sync.repos.stockholm.timerConfig = {
|
||||
OnBootSec = "5min";
|
||||
OnUnitInactiveSec = "3min";
|
||||
OnUnitInactiveSec = "2min";
|
||||
RandomizedDelaySec = "2min";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -15,6 +15,8 @@ in {
|
|||
enable = true;
|
||||
systemWide = true;
|
||||
};
|
||||
security.rtkit.enable = true;
|
||||
sound.enableOSSEmulation = false;
|
||||
}
|
||||
{
|
||||
krebs.per-user.lass.packages = [
|
||||
|
|
|
@ -9,6 +9,7 @@ with import <stockholm/lib>;
|
|||
../2configs/nixpkgs.nix
|
||||
../2configs/vim.nix
|
||||
../2configs/monitoring/client.nix
|
||||
./htop.nix
|
||||
./backups.nix
|
||||
./security-workarounds.nix
|
||||
{
|
||||
|
|
40
lass/2configs/htop.nix
Normal file
40
lass/2configs/htop.nix
Normal file
|
@ -0,0 +1,40 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
with import <stockholm/lib>;
|
||||
|
||||
{
|
||||
nixpkgs.config.packageOverrides = super: {
|
||||
htop = pkgs.concat "htop" [
|
||||
super.htop
|
||||
(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=1
|
||||
detailed_cpu_time=0
|
||||
cpu_count_from_zero=0
|
||||
update_process_names=0
|
||||
account_guest_in_cpu_meter=1
|
||||
color_scheme=6
|
||||
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 "$@"
|
||||
'')
|
||||
];
|
||||
};
|
||||
}
|
21
lass/2configs/logf.nix
Normal file
21
lass/2configs/logf.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{ config, pkgs, ... }:
|
||||
with import <stockholm/lib>;
|
||||
let
|
||||
host-colors = {
|
||||
mors = "131";
|
||||
prism = "95";
|
||||
uriel = "61";
|
||||
shodan = "51";
|
||||
icarus = "53";
|
||||
echelon = "197";
|
||||
helios = "199";
|
||||
cloudkrebs = "119";
|
||||
};
|
||||
in {
|
||||
environment.systemPackages = [
|
||||
(pkgs.writeDashBin "logf" ''
|
||||
export LOGF_HOST_COLORS=${pkgs.writeJSON "host-colors" host-colors}
|
||||
${pkgs.logf}/bin/logf ${concatMapStringsSep " " (name: "root@${name}") (attrNames config.lass.hosts)}
|
||||
'')
|
||||
];
|
||||
}
|
|
@ -322,13 +322,19 @@ let
|
|||
|
||||
in {
|
||||
environment.systemPackages = [
|
||||
(pkgs.lib.overrideDerivation pkgs.mc (original : {
|
||||
postInstall = ''
|
||||
rm -f $out/etc/mc/mc.ext
|
||||
ln -s ${mcExt} $out/etc/mc/mc.ext
|
||||
cp $out/share/mc/skins/nicedark.ini $out/share/mc/skins/default.ini
|
||||
'';
|
||||
}))
|
||||
(pkgs.concat "mc" [
|
||||
pkgs.mc
|
||||
(pkgs.writeDashBin "mc" ''
|
||||
export MC_DATADIR=${pkgs.concat "mc-datadir" [
|
||||
(pkgs.writeOut "mc-ext" {
|
||||
"/mc.ext".link = mcExt;
|
||||
"/sfs.ini".text = "";
|
||||
})
|
||||
]}
|
||||
export TERM=xterm-256color
|
||||
exec ${pkgs.mc}/bin/mc -S xoria256 "$@"
|
||||
'')
|
||||
])
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
{
|
||||
krebs.build.source.nixpkgs.git = {
|
||||
url = https://github.com/nixos/nixpkgs;
|
||||
ref = "5b0c9d4";
|
||||
url = https://cgit.lassul.us/nixpkgs;
|
||||
ref = "c0ecd31";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
pavucontrol
|
||||
pv
|
||||
pwgen
|
||||
python34Packages.livestreamer
|
||||
remmina
|
||||
silver-searcher
|
||||
wget
|
||||
|
|
|
@ -36,25 +36,27 @@ let
|
|||
sync-retiolum = name:
|
||||
{
|
||||
krebs.repo-sync.repos.${name} = {
|
||||
makefu = {
|
||||
origin.url = "http://cgit.gum/${name}";
|
||||
mirror.url = "${mirror}${name}";
|
||||
branches = {
|
||||
makefu = {
|
||||
origin.url = "http://cgit.gum/${name}";
|
||||
mirror.url = "${mirror}${name}";
|
||||
};
|
||||
tv = {
|
||||
origin.url = "http://cgit.ni.r/${name}";
|
||||
mirror.url = "${mirror}${name}";
|
||||
};
|
||||
nin = {
|
||||
origin.url = "http://cgit.onondaga.r/${name}";
|
||||
mirror.url = "${mirror}${name}";
|
||||
};
|
||||
lassulus = {
|
||||
origin.url = "http://cgit.lassul.us/${name}";
|
||||
mirror.url = "${mirror}${name}";
|
||||
};
|
||||
};
|
||||
tv = {
|
||||
origin.url = "http://cgit.ni.r/${name}";
|
||||
mirror.url = "${mirror}${name}";
|
||||
};
|
||||
nin = {
|
||||
origin.url = "http://cgit.onondaga.r/${name}";
|
||||
mirror.url = "${mirror}${name}";
|
||||
};
|
||||
lassulus = {
|
||||
origin.url = "http://cgit.lassul.us/${name}";
|
||||
mirror.url = "${mirror}${name}";
|
||||
};
|
||||
"@latest" = {
|
||||
mirror.url = "${mirror}${name}";
|
||||
mirror.ref = "heads/newest";
|
||||
latest = {
|
||||
url = "${mirror}${name}";
|
||||
ref = "heads/newest";
|
||||
};
|
||||
};
|
||||
krebs.git = defineRepo name (config.networking.hostName == "prism");
|
||||
|
@ -63,9 +65,11 @@ let
|
|||
sync-remote = name: url:
|
||||
{
|
||||
krebs.repo-sync.repos.${name} = {
|
||||
remote = {
|
||||
origin.url = url;
|
||||
mirror.url = "${mirror}${name}";
|
||||
branches = {
|
||||
remote = {
|
||||
origin.url = url;
|
||||
mirror.url = "${mirror}${name}";
|
||||
};
|
||||
};
|
||||
};
|
||||
krebs.git = defineRepo name (config.networking.hostName == "prism");
|
||||
|
@ -74,9 +78,11 @@ let
|
|||
sync-remote-silent = name: url:
|
||||
{
|
||||
krebs.repo-sync.repos.${name} = {
|
||||
remote = {
|
||||
origin.url = url;
|
||||
mirror.url = "${mirror}${name}";
|
||||
branches = {
|
||||
remote = {
|
||||
origin.url = url;
|
||||
mirror.url = "${mirror}${name}";
|
||||
};
|
||||
};
|
||||
};
|
||||
krebs.git = defineRepo name false;
|
||||
|
@ -109,4 +115,3 @@ in {
|
|||
(sync-retiolum "xmonad-stockholm")
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -207,11 +207,14 @@ let
|
|||
alldirs = attrValues dirs ++ map dirOf (attrValues files);
|
||||
in unique (sort lessThan alldirs);
|
||||
|
||||
vim = pkgs.writeDashBin "vim" ''
|
||||
set -efu
|
||||
(umask 0077; exec ${pkgs.coreutils}/bin/mkdir -p ${toString mkdirs})
|
||||
exec ${pkgs.vim}/bin/vim "$@"
|
||||
'';
|
||||
vim = pkgs.concat "vim" [
|
||||
pkgs.vim
|
||||
(pkgs.writeDashBin "vim" ''
|
||||
set -efu
|
||||
(umask 0077; exec ${pkgs.coreutils}/bin/mkdir -p ${toString mkdirs})
|
||||
exec ${pkgs.vim}/bin/vim "$@"
|
||||
'')
|
||||
];
|
||||
|
||||
hs.vim = pkgs.writeText "hs.vim" ''
|
||||
syn region String start=+\[[[:alnum:]]*|+ end=+|]+
|
||||
|
|
|
@ -25,15 +25,10 @@ in {
|
|||
imports = [
|
||||
./sqlBackup.nix
|
||||
(servePage [ "reich-gebaeudereinigung.de" "www.reich-gebaeudereinigung.de" ])
|
||||
|
||||
(servePage [ "karlaskop.de" "www.karlaskop.de" ])
|
||||
|
||||
(servePage [ "makeup.apanowicz.de" "www.makeup.apanowicz.de" ])
|
||||
|
||||
(servePage [ "pixelpocket.de" ])
|
||||
|
||||
(serveOwncloud [ "o.ubikmedia.de" ])
|
||||
|
||||
(serveWordpress [
|
||||
"ubikmedia.de"
|
||||
"apanowicz.de"
|
||||
|
|
|
@ -95,7 +95,7 @@ displaySomeException = displayException
|
|||
|
||||
myKeyMap :: [([Char], X ())]
|
||||
myKeyMap =
|
||||
[ ("M4-<F11>", spawn "${pkgs.i3lock}/bin/i3lock -i $HOME/wallpaper -f")
|
||||
[ ("M4-<F11>", spawn "${pkgs.i3lock}/bin/i3lock -i $HOME/wallpaper/wallpaper -f")
|
||||
, ("M4-C-p", spawn "${pkgs.scrot}/bin/scrot ~/public_html/scrot.png")
|
||||
, ("M4-p", spawn "${pkgs.pass}/bin/passmenu --type")
|
||||
, ("<XF86AudioRaiseVolume>", spawn "${pkgs.pulseaudioLight.out}/bin/pactl -- set-sink-volume @DEFAULT_SINK@ +4%")
|
||||
|
|
|
@ -10,8 +10,11 @@ with lib;
|
|||
imports = [
|
||||
../.
|
||||
<nixpkgs/nixos/modules/installer/scan/not-detected.nix>
|
||||
../2configs/retiolum.nix
|
||||
../2configs/copyq.nix
|
||||
../2configs/games.nix
|
||||
../2configs/git.nix
|
||||
../2configs/retiolum.nix
|
||||
../2configs/termite.nix
|
||||
];
|
||||
|
||||
krebs.build.host = config.krebs.hosts.hiawatha;
|
||||
|
|
38
nin/2configs/copyq.nix
Normal file
38
nin/2configs/copyq.nix
Normal file
|
@ -0,0 +1,38 @@
|
|||
{ config, pkgs, ... }:
|
||||
with import <stockholm/lib>;
|
||||
let
|
||||
copyqConfig = pkgs.writeDash "copyq-config" ''
|
||||
${pkgs.copyq}/bin/copyq config check_clipboard true
|
||||
${pkgs.copyq}/bin/copyq config check_selection true
|
||||
${pkgs.copyq}/bin/copyq config copy_clipboard true
|
||||
${pkgs.copyq}/bin/copyq config copy_selection true
|
||||
|
||||
${pkgs.copyq}/bin/copyq config activate_closes true
|
||||
${pkgs.copyq}/bin/copyq config clipboard_notification_lines 0
|
||||
${pkgs.copyq}/bin/copyq config clipboard_tab clipboard
|
||||
${pkgs.copyq}/bin/copyq config disable_tray true
|
||||
${pkgs.copyq}/bin/copyq config hide_tabs true
|
||||
${pkgs.copyq}/bin/copyq config hide_toolbar true
|
||||
${pkgs.copyq}/bin/copyq config item_popup_interval true
|
||||
${pkgs.copyq}/bin/copyq config maxitems 1000
|
||||
${pkgs.copyq}/bin/copyq config move true
|
||||
${pkgs.copyq}/bin/copyq config text_wrap true
|
||||
'';
|
||||
in {
|
||||
systemd.user.services.copyq = {
|
||||
after = [ "graphical.target" ];
|
||||
wants = [ "graphical.target" ];
|
||||
wantedBy = [ "default.target" ];
|
||||
environment = {
|
||||
DISPLAY = ":0";
|
||||
};
|
||||
serviceConfig = {
|
||||
SyslogIdentifier = "copyq";
|
||||
ExecStart = "${pkgs.copyq}/bin/copyq";
|
||||
ExecStartPost = copyqConfig;
|
||||
Restart = "always";
|
||||
RestartSec = "2s";
|
||||
StartLimitBurst = 0;
|
||||
};
|
||||
};
|
||||
}
|
70
nin/2configs/games.nix
Normal file
70
nin/2configs/games.nix
Normal file
|
@ -0,0 +1,70 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
mainUser = config.users.extraUsers.mainUser;
|
||||
vdoom = pkgs.writeDash "vdoom" ''
|
||||
${pkgs.zandronum-bin}/bin/zandronum \
|
||||
-fov 120 \
|
||||
"$@"
|
||||
'';
|
||||
doom = pkgs.writeDash "doom" ''
|
||||
DOOM_DIR=''${DOOM_DIR:-~/doom/}
|
||||
${vdoom} \
|
||||
-file $DOOM_DIR/lib/brutalv20.pk3 \
|
||||
"$@"
|
||||
'';
|
||||
doom1 = pkgs.writeDashBin "doom1" ''
|
||||
DOOM_DIR=''${DOOM_DIR:-~/doom/}
|
||||
${doom} -iwad $DOOM_DIR/wads/stock/doom.wad "$@"
|
||||
'';
|
||||
doom2 = pkgs.writeDashBin "doom2" ''
|
||||
DOOM_DIR=''${DOOM_DIR:-~/doom/}
|
||||
${doom} -iwad $DOOM_DIR/wads/stock/doom2.wad "$@"
|
||||
'';
|
||||
vdoom1 = pkgs.writeDashBin "vdoom1" ''
|
||||
DOOM_DIR=''${DOOM_DIR:-~/doom/}
|
||||
${vdoom} -iwad $DOOM_DIR/wads/stock/doom.wad "$@"
|
||||
'';
|
||||
vdoom2 = pkgs.writeDashBin "vdoom2" ''
|
||||
DOOM_DIR=''${DOOM_DIR:-~/doom/}
|
||||
${vdoom} -iwad $DOOM_DIR/wads/stock/doom2.wad "$@"
|
||||
'';
|
||||
|
||||
doomservercfg = pkgs.writeText "doomserver.cfg" ''
|
||||
skill 7
|
||||
#survival true
|
||||
#sv_maxlives 4
|
||||
#sv_norespawn true
|
||||
#sv_weapondrop true
|
||||
no_jump true
|
||||
#sv_noweaponspawn true
|
||||
sv_sharekeys true
|
||||
sv_survivalcountdowntime 1
|
||||
sv_noteamselect true
|
||||
sv_updatemaster false
|
||||
#sv_coop_loseinventory true
|
||||
#cl_startasspectator false
|
||||
#lms_spectatorview false
|
||||
'';
|
||||
|
||||
vdoomserver = pkgs.writeDashBin "vdoomserver" ''
|
||||
DOOM_DIR=''${DOOM_DIR:-~/doom/}
|
||||
|
||||
${pkgs.zandronum-bin}/bin/zandronum-server \
|
||||
+exec ${doomservercfg} \
|
||||
"$@"
|
||||
'';
|
||||
|
||||
in {
|
||||
environment.systemPackages = with pkgs; [
|
||||
dwarf_fortress
|
||||
doom1
|
||||
doom2
|
||||
vdoom1
|
||||
vdoom2
|
||||
vdoomserver
|
||||
];
|
||||
|
||||
hardware.pulseaudio.support32Bit = true;
|
||||
|
||||
}
|
|
@ -5,6 +5,7 @@ with import <stockholm/lib>;
|
|||
let
|
||||
|
||||
out = {
|
||||
services.nginx.enable = true;
|
||||
krebs.git = {
|
||||
enable = true;
|
||||
cgit = {
|
||||
|
|
|
@ -3,6 +3,6 @@
|
|||
{
|
||||
krebs.build.source.nixpkgs.git = {
|
||||
url = https://github.com/nixos/nixpkgs;
|
||||
ref = "6651c72";
|
||||
ref = "5b0c9d4";
|
||||
};
|
||||
}
|
||||
|
|
22
nin/2configs/termite.nix
Normal file
22
nin/2configs/termite.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = [
|
||||
pkgs.termite
|
||||
];
|
||||
|
||||
krebs.per-user.nin.packages = let
|
||||
termitecfg = pkgs.writeTextFile {
|
||||
name = "termite-config";
|
||||
destination = "/etc/xdg/termite/config";
|
||||
text = ''
|
||||
[colors]
|
||||
foreground = #d0d7d0
|
||||
background = #000000
|
||||
'';
|
||||
};
|
||||
in [
|
||||
termitecfg
|
||||
];
|
||||
|
||||
}
|
|
@ -8,19 +8,21 @@ with lib;
|
|||
in {
|
||||
enable = true;
|
||||
repos.stockholm = {
|
||||
makefu = {
|
||||
origin.url = http://cgit.gum/stockholm ;
|
||||
mirror.url = mirror;
|
||||
branches = {
|
||||
makefu = {
|
||||
origin.url = http://cgit.gum/stockholm ;
|
||||
mirror.url = mirror;
|
||||
};
|
||||
tv = {
|
||||
origin.url = http://cgit.ni.r/stockholm;
|
||||
mirror.url = mirror;
|
||||
};
|
||||
lassulus = {
|
||||
origin.url = http://cgit.prism/stockholm ;
|
||||
mirror.url = mirror;
|
||||
};
|
||||
};
|
||||
tv = {
|
||||
origin.url = http://cgit.ni.r/stockholm;
|
||||
mirror.url = mirror;
|
||||
};
|
||||
lassulus = {
|
||||
origin.url = http://cgit.prism/stockholm ;
|
||||
mirror.url = mirror;
|
||||
};
|
||||
"@latest" = {
|
||||
latest = {
|
||||
mirror.url = mirror;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -16,11 +16,11 @@ with import <stockholm/lib>;
|
|||
networking = {
|
||||
interfaces.enp2s1.ip4 = singleton {
|
||||
address = let
|
||||
addr = "64.137.177.226";
|
||||
addr = "45.62.237.203";
|
||||
in assert config.krebs.build.host.nets.internet.ip4.addr == addr; addr;
|
||||
prefixLength = 24;
|
||||
};
|
||||
defaultGateway = "64.137.177.1";
|
||||
defaultGateway = "45.62.237.1";
|
||||
nameservers = ["8.8.8.8"];
|
||||
};
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@ with import <stockholm/lib>;
|
|||
./audit.nix
|
||||
./backup.nix
|
||||
./bash.nix
|
||||
./htop.nix
|
||||
./nginx
|
||||
./ssh.nix
|
||||
./sshd.nix
|
||||
|
|
40
tv/2configs/htop.nix
Normal file
40
tv/2configs/htop.nix
Normal file
|
@ -0,0 +1,40 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
with import <stockholm/lib>;
|
||||
|
||||
{
|
||||
nixpkgs.config.packageOverrides = super: {
|
||||
htop = pkgs.concat "htop" [
|
||||
super.htop
|
||||
(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=1
|
||||
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 "$@"
|
||||
'')
|
||||
];
|
||||
};
|
||||
}
|
|
@ -76,6 +76,9 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
# TODO assert that pulse is the only user with "audio" in group/extraGroups
|
||||
# otherwise the audio device can be hijacked while the pulse service restarts
|
||||
# (e.g. when mpv is running) and then the service will fail.
|
||||
users = {
|
||||
groups.pulse.gid = config.users.users.pulse.uid;
|
||||
users.pulse = {
|
||||
|
|
|
@ -1,7 +1,19 @@
|
|||
{ pkgs, ... }:
|
||||
with import <stockholm/lib>;
|
||||
let
|
||||
q-cal = let
|
||||
# XXX 23 is the longest line of cal's output
|
||||
|
||||
# Maximum width of cal's output.
|
||||
calwidth = 23;
|
||||
|
||||
# Number of space characters between two calendars.
|
||||
hspace = 2;
|
||||
|
||||
# Return number of columns required to print n calenders side by side.
|
||||
need_width = n:
|
||||
assert n >= 1;
|
||||
n * calwidth + (n - 1) * hspace;
|
||||
|
||||
pad = ''{
|
||||
${pkgs.gnused}/bin/sed '
|
||||
# rtrim
|
||||
|
@ -10,7 +22,7 @@ let
|
|||
# delete last empty line
|
||||
''${/^$/d}
|
||||
' \
|
||||
| ${pkgs.gawk}/bin/awk '{printf "%-23s\n", $0}' \
|
||||
| ${pkgs.gawk}/bin/awk '{printf "%-${toString calwidth}s\n", $0}' \
|
||||
| ${pkgs.gnused}/bin/sed '
|
||||
# colorize header
|
||||
1,2s/.*/[38;5;238;1m&[39;22m/
|
||||
|
@ -20,23 +32,31 @@ let
|
|||
'
|
||||
}'';
|
||||
in ''
|
||||
cols=$(${pkgs.ncurses}/bin/tput cols)
|
||||
${pkgs.coreutils}/bin/paste \
|
||||
<(${pkgs.utillinux}/bin/cal -mw \
|
||||
<(if test $cols -ge ${toString (need_width 3)}; then
|
||||
${pkgs.utillinux}/bin/cal -mw \
|
||||
$(${pkgs.coreutils}/bin/date +'%m %Y' -d 'last month') \
|
||||
| ${pad}
|
||||
) \
|
||||
<(${pkgs.utillinux}/bin/cal -mw \
|
||||
fi) \
|
||||
<(if test $cols -ge ${toString (need_width 1)}; then
|
||||
${pkgs.utillinux}/bin/cal -mw \
|
||||
| ${pkgs.gnused}/bin/sed '
|
||||
# colorize day of month
|
||||
s/\(^\| \)'"$(${pkgs.coreutils}/bin/date +%e)"'\>/[31;1m&[39;22m/
|
||||
' \
|
||||
| ${pad}
|
||||
) \
|
||||
<(${pkgs.utillinux}/bin/cal -mw \
|
||||
fi) \
|
||||
<(if test $cols -ge ${toString (need_width 2)}; then
|
||||
${pkgs.utillinux}/bin/cal -mw \
|
||||
$(${pkgs.coreutils}/bin/date +'%m %Y' -d 'next month') \
|
||||
| ${pad}
|
||||
) \
|
||||
| ${pkgs.gnused}/bin/sed 's/\t/ /g'
|
||||
fi) \
|
||||
| ${pkgs.gnused}/bin/sed '
|
||||
s/^\t//
|
||||
s/\t$//
|
||||
s/\t/${lpad hspace " " ""}/g
|
||||
'
|
||||
'';
|
||||
|
||||
q-isodate = ''
|
||||
|
|
Loading…
Reference in a new issue