1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 10:11:08 +01:00

xautolock: fick locker script

This commit is contained in:
Kierán Meinhardt
2019-06-17 19:10:42 +02:00
parent 8f7953e598
commit da297039cd
4 changed files with 18 additions and 8 deletions

View File

@@ -1,4 +1,4 @@
{ pkgs, ... }: { pkgs, config, ... }:
let let
sshPort = 22022; sshPort = 22022;
sshKey = { sshKey = {
@@ -17,6 +17,8 @@ in {
passwordAuthentication = false; passwordAuthentication = false;
}; };
users.motd = "Welcome to ${config.networking.hostName}!";
users.users.root.openssh.authorizedKeys.keys = [ users.users.root.openssh.authorizedKeys.keys = [
sshKey.homeros sshKey.homeros
sshKey.scardanelli sshKey.scardanelli

View File

@@ -1,15 +1,14 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }:
let let
xlockModes = lib.concatStringsSep "\\n" [ xlockModes = lib.concatStringsSep "\\n" [
"braid" # "braid"
"galaxy" "galaxy"
"lightning" "lightning"
"matrix" # "matrix"
"pyro2" "pyro2"
"space" "space"
"star"
]; ];
my-xlock = pkgs.unstable.writers.writeDash "xlock" '' my-xlock = pkgs.unstable.writers.writeDashBin "xlock" ''
MODE=$(printf "${xlockModes}" | shuf -n 1) MODE=$(printf "${xlockModes}" | shuf -n 1)
${pkgs.xlockmore}/bin/xlock \ ${pkgs.xlockmore}/bin/xlock \

View File

@@ -62,7 +62,7 @@
bindkey -M vicmd 'k' history-substring-search-up bindkey -M vicmd 'k' history-substring-search-up
bindkey -M vicmd 'j' history-substring-search-down bindkey -M vicmd 'j' history-substring-search-down
''; '';
promptInit = '' promptInit = with config.niveum; ''
autoload -Uz vcs_info autoload -Uz vcs_info
zstyle ':vcs_info:*' enable git zstyle ':vcs_info:*' enable git
zstyle ':vcs_info:*' check-for-changes true zstyle ':vcs_info:*' check-for-changes true
@@ -76,9 +76,9 @@
vcs_info vcs_info
RPROMPT="$vcs_info_msg_0_" RPROMPT="$vcs_info_msg_0_"
if [[ -n $IN_NIX_SHELL ]]; then if [[ -n $IN_NIX_SHELL ]]; then
PROMPT='%B%~%b %(?.%F{green}.%F{red})λ%f ' PROMPT='%B%~%b %(?.%F{${promptColours.success}}.%F{${promptColours.failure}})λ%f '
else else
PROMPT='%B%~%b %(?.%F{green}.%F{red})%#%f ' PROMPT='%B%~%b %(?.%F{${promptColours.success}}.%F{${promptColours.failure}})%#%f '
fi fi
} }

View File

@@ -70,6 +70,15 @@ in {
]; ];
}; };
networkInterfaces.wireless = mkOption { type = types.str; };
promptColours =
let colours16 = types.enum [ "black" "red" "green" "yellow" "blue" "magenta" "cyan" "white" ];
in {
success = mkOption { type = colours16; default = "green"; };
failure = mkOption { type = colours16; default = "red"; };
};
fonts = { fonts = {
terminal = mkOption { type = my-types.font; }; terminal = mkOption { type = my-types.font; };
ui = mkOption { type = my-types.font; }; ui = mkOption { type = my-types.font; };