Compare commits
No commits in common. "b3f1d95634098dd1b1b37df6a9a0400c01b7a5b4" and "c7c2c89f15ba78fc6e169933ee21303249a09cdc" have entirely different histories.
b3f1d95634
...
c7c2c89f15
|
@ -1,8 +1,5 @@
|
|||
{ pkgs, config, lib, ... }:
|
||||
{
|
||||
frogeye.hooks.lock = ''
|
||||
${pkgs.coreutils}/bin/rm -rf "/tmp/cached_pass_$UID"
|
||||
'';
|
||||
programs = {
|
||||
home-manager.enable = true;
|
||||
bat = {
|
||||
|
@ -190,16 +187,6 @@
|
|||
# toolbox
|
||||
imagemagick
|
||||
numbat
|
||||
|
||||
# Locker
|
||||
(pkgs.writeShellApplication {
|
||||
name = "lock";
|
||||
text = ''
|
||||
${config.frogeye.hooks.lock}
|
||||
|
||||
${pkgs.vlock}/bin/vlock --all
|
||||
'';
|
||||
})
|
||||
];
|
||||
sessionVariables = {
|
||||
# Favourite commands
|
||||
|
@ -218,5 +205,6 @@
|
|||
"${config.home.homeDirectory}/.config/dotfiles/hm/scripts" # Not Nix path otherwise it gets converted into store,
|
||||
# and then every time you want to modify a script you have to rebuild and re-login...
|
||||
];
|
||||
# TODO Way to automatically setup an home-manager install
|
||||
};
|
||||
}
|
||||
|
|
|
@ -108,7 +108,7 @@ in
|
|||
"${mod}+Shift+c" = "reload";
|
||||
"${mod}+Shift+r" = "restart";
|
||||
"${mod}+Shift+e" = "exit";
|
||||
} // lib.mapAttrs' (k: v: lib.nameValuePair v.enter "mode ${v.name}") (lib.filterAttrs (k: v: v.enter != null) modes)
|
||||
} // lib.mapAttrs' (k: v: lib.nameValuePair v.enter "mode ${v.name}") modes
|
||||
// lib.attrsets.mergeAttrsList (forEachCardinal (c: {
|
||||
# change focus
|
||||
"${mod}+${c.vi}" = "focus ${c.container}; ${focus}";
|
||||
|
@ -202,7 +202,7 @@ in
|
|||
default = { };
|
||||
};
|
||||
enter = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
type = lib.types.str;
|
||||
default = "${mod}+${config.mod_enter}";
|
||||
};
|
||||
mod_enter = lib.mkOption {
|
||||
|
|
|
@ -18,8 +18,15 @@ in
|
|||
(pkgs.writeShellApplication {
|
||||
name = "xlock";
|
||||
text = ''
|
||||
${config.frogeye.hooks.lock}
|
||||
# TODO Reevaluate whether we want this or not
|
||||
# Remove SSH and GPG keys from keystores
|
||||
${pkgs.openssh}/bin/ssh-add -D
|
||||
echo RELOADAGENT | ${pkgs.gnupg}/bin/gpg-connect-agent
|
||||
${pkgs.coreutils}/bin/rm -rf "/tmp/cached_pass_$UID"
|
||||
# TODO Should probably be an option and defined where relevant?
|
||||
# TODO Maybe we could have a terminal lock? With vlock.
|
||||
|
||||
# TODO Does that work for all DMs?
|
||||
# TODO Might want to use i3lock on NixOS configs still?
|
||||
if ! ${pkgs.lightdm}/bin/dm-tool lock
|
||||
then
|
||||
if [ -d ${config.xdg.cacheHome}/lockpatterns ]
|
||||
|
@ -42,14 +49,15 @@ in
|
|||
xsession.windowManager.i3.config = {
|
||||
keybindings = {
|
||||
# Screen off commands
|
||||
"${mod}+F1" = "--release exec --no-startup-id ${pkgs.xorg.xset}/bin/xset dpms force off";
|
||||
"${mod}+F1" = "exec --no-startup-id ${pkgs.bash}/bin/sh -c \"${pkgs.coreutils}/bin/sleep .25 && ${pkgs.xorg.xset}/bin/xset dpms force off\"";
|
||||
# TODO --release?
|
||||
"${mod}+F4" = "exec --no-startup-id ${pkgs.xautolock}/bin/xautolock -disable";
|
||||
"${mod}+F5" = "exec --no-startup-id ${pkgs.xautolock}/bin/xautolock -enable";
|
||||
};
|
||||
startup = [
|
||||
# Stop screen after 10 minutes, 1 minutes after lock it
|
||||
# Lock screen after 10 minutes
|
||||
{ notification = false; command = "${pkgs.xautolock}/bin/xautolock -time 10 -locker '${pkgs.xorg.xset}/bin/xset dpms force standby' -killtime 1 -killer xlock"; }
|
||||
# services.screen-locker.xautolock is hardcoded to use systemd for -locker (doesn't even work...)
|
||||
# TODO There's a services.screen-locker.xautolock but not sure it can match the above command
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
|
@ -20,7 +20,7 @@ in
|
|||
return_bindings = false;
|
||||
};
|
||||
"${mode_pres_sec}" = {
|
||||
enter = null;
|
||||
mod_enter = "Shift+p+2"; # Bogus, just so I don't have to implement no binding
|
||||
bindings = {
|
||||
"b" = "workspace 1, workspace 2, mode ${mode_pres_main}";
|
||||
"q" = "mode default";
|
||||
|
|
|
@ -10,7 +10,8 @@ in
|
|||
xsession.windowManager.i3.config.keybindings = {
|
||||
"Print" = "exec ${scrot} --focused";
|
||||
"${mod}+Print" = "exec ${scrot}";
|
||||
"Ctrl+Print" = "--release exec ${scrot} --select";
|
||||
"Ctrl+Print" = "exec ${pkgs.coreutils}/bin/sleep 1 && ${scrot} --select";
|
||||
# TODO Try using bindsym --release instead of sleep
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
{
|
||||
config = lib.mkIf config.programs.gpg.enable {
|
||||
frogeye.hooks.lock = ''
|
||||
echo RELOADAGENT | ${pkgs.gnupg}/bin/gpg-connect-agent
|
||||
'';
|
||||
programs.gpg = {
|
||||
homedir = "${config.xdg.stateHome}/gnupg";
|
||||
settings = {
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
{ ... }:
|
||||
{
|
||||
config = {
|
||||
frogeye.hooks.lock = ''
|
||||
${pkgs.openssh}/bin/ssh-add -D
|
||||
'';
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
controlMaster = "auto";
|
||||
|
|
|
@ -103,6 +103,7 @@ echo "{
|
|||
|
||||
# Install NixOS! Or create a new generation.
|
||||
sudo nix --extra-experimental-features "nix-command flakes" run "${SCRIPT_DIR}#nixos-install" -- --no-root-password --root "$mountpoint" --flake "${mountpoint}/etc/nixos#${name}"
|
||||
# TODO Add this? --flake "$flake"
|
||||
|
||||
set +x
|
||||
|
||||
|
|
|
@ -43,11 +43,6 @@
|
|||
prose = lib.mkEnableOption "Writing stuff";
|
||||
python = lib.mkEnableOption "Python dev stuff";
|
||||
};
|
||||
hooks.lock = lib.mkOption {
|
||||
type = lib.types.lines;
|
||||
default = "";
|
||||
description = "Bash commands to execute on locking the session.";
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
|
|
Loading…
Reference in a new issue