Compare commits
No commits in common. "b3f1d95634098dd1b1b37df6a9a0400c01b7a5b4" and "c7c2c89f15ba78fc6e169933ee21303249a09cdc" have entirely different histories.
b3f1d95634
...
c7c2c89f15
|
@ -1,8 +1,5 @@
|
||||||
{ pkgs, config, lib, ... }:
|
{ pkgs, config, lib, ... }:
|
||||||
{
|
{
|
||||||
frogeye.hooks.lock = ''
|
|
||||||
${pkgs.coreutils}/bin/rm -rf "/tmp/cached_pass_$UID"
|
|
||||||
'';
|
|
||||||
programs = {
|
programs = {
|
||||||
home-manager.enable = true;
|
home-manager.enable = true;
|
||||||
bat = {
|
bat = {
|
||||||
|
@ -190,16 +187,6 @@
|
||||||
# toolbox
|
# toolbox
|
||||||
imagemagick
|
imagemagick
|
||||||
numbat
|
numbat
|
||||||
|
|
||||||
# Locker
|
|
||||||
(pkgs.writeShellApplication {
|
|
||||||
name = "lock";
|
|
||||||
text = ''
|
|
||||||
${config.frogeye.hooks.lock}
|
|
||||||
|
|
||||||
${pkgs.vlock}/bin/vlock --all
|
|
||||||
'';
|
|
||||||
})
|
|
||||||
];
|
];
|
||||||
sessionVariables = {
|
sessionVariables = {
|
||||||
# Favourite commands
|
# Favourite commands
|
||||||
|
@ -218,5 +205,6 @@
|
||||||
"${config.home.homeDirectory}/.config/dotfiles/hm/scripts" # Not Nix path otherwise it gets converted into store,
|
"${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...
|
# 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+c" = "reload";
|
||||||
"${mod}+Shift+r" = "restart";
|
"${mod}+Shift+r" = "restart";
|
||||||
"${mod}+Shift+e" = "exit";
|
"${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: {
|
// lib.attrsets.mergeAttrsList (forEachCardinal (c: {
|
||||||
# change focus
|
# change focus
|
||||||
"${mod}+${c.vi}" = "focus ${c.container}; ${focus}";
|
"${mod}+${c.vi}" = "focus ${c.container}; ${focus}";
|
||||||
|
@ -202,7 +202,7 @@ in
|
||||||
default = { };
|
default = { };
|
||||||
};
|
};
|
||||||
enter = lib.mkOption {
|
enter = lib.mkOption {
|
||||||
type = lib.types.nullOr lib.types.str;
|
type = lib.types.str;
|
||||||
default = "${mod}+${config.mod_enter}";
|
default = "${mod}+${config.mod_enter}";
|
||||||
};
|
};
|
||||||
mod_enter = lib.mkOption {
|
mod_enter = lib.mkOption {
|
||||||
|
|
|
@ -18,8 +18,15 @@ in
|
||||||
(pkgs.writeShellApplication {
|
(pkgs.writeShellApplication {
|
||||||
name = "xlock";
|
name = "xlock";
|
||||||
text = ''
|
text = ''
|
||||||
${config.frogeye.hooks.lock}
|
# Remove SSH and GPG keys from keystores
|
||||||
# TODO Reevaluate whether we want this or not
|
${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
|
if ! ${pkgs.lightdm}/bin/dm-tool lock
|
||||||
then
|
then
|
||||||
if [ -d ${config.xdg.cacheHome}/lockpatterns ]
|
if [ -d ${config.xdg.cacheHome}/lockpatterns ]
|
||||||
|
@ -42,14 +49,15 @@ in
|
||||||
xsession.windowManager.i3.config = {
|
xsession.windowManager.i3.config = {
|
||||||
keybindings = {
|
keybindings = {
|
||||||
# Screen off commands
|
# 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}+F4" = "exec --no-startup-id ${pkgs.xautolock}/bin/xautolock -disable";
|
||||||
"${mod}+F5" = "exec --no-startup-id ${pkgs.xautolock}/bin/xautolock -enable";
|
"${mod}+F5" = "exec --no-startup-id ${pkgs.xautolock}/bin/xautolock -enable";
|
||||||
};
|
};
|
||||||
startup = [
|
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"; }
|
{ 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;
|
return_bindings = false;
|
||||||
};
|
};
|
||||||
"${mode_pres_sec}" = {
|
"${mode_pres_sec}" = {
|
||||||
enter = null;
|
mod_enter = "Shift+p+2"; # Bogus, just so I don't have to implement no binding
|
||||||
bindings = {
|
bindings = {
|
||||||
"b" = "workspace 1, workspace 2, mode ${mode_pres_main}";
|
"b" = "workspace 1, workspace 2, mode ${mode_pres_main}";
|
||||||
"q" = "mode default";
|
"q" = "mode default";
|
||||||
|
|
|
@ -10,7 +10,8 @@ in
|
||||||
xsession.windowManager.i3.config.keybindings = {
|
xsession.windowManager.i3.config.keybindings = {
|
||||||
"Print" = "exec ${scrot} --focused";
|
"Print" = "exec ${scrot} --focused";
|
||||||
"${mod}+Print" = "exec ${scrot}";
|
"${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, ... }:
|
{ pkgs, lib, config, ... }:
|
||||||
{
|
{
|
||||||
config = lib.mkIf config.programs.gpg.enable {
|
config = lib.mkIf config.programs.gpg.enable {
|
||||||
frogeye.hooks.lock = ''
|
|
||||||
echo RELOADAGENT | ${pkgs.gnupg}/bin/gpg-connect-agent
|
|
||||||
'';
|
|
||||||
programs.gpg = {
|
programs.gpg = {
|
||||||
homedir = "${config.xdg.stateHome}/gnupg";
|
homedir = "${config.xdg.stateHome}/gnupg";
|
||||||
settings = {
|
settings = {
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
{ pkgs, lib, config, ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
config = {
|
config = {
|
||||||
frogeye.hooks.lock = ''
|
|
||||||
${pkgs.openssh}/bin/ssh-add -D
|
|
||||||
'';
|
|
||||||
programs.ssh = {
|
programs.ssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
controlMaster = "auto";
|
controlMaster = "auto";
|
||||||
|
|
|
@ -103,6 +103,7 @@ echo "{
|
||||||
|
|
||||||
# Install NixOS! Or create a new generation.
|
# 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}"
|
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
|
set +x
|
||||||
|
|
||||||
|
|
|
@ -43,11 +43,6 @@
|
||||||
prose = lib.mkEnableOption "Writing stuff";
|
prose = lib.mkEnableOption "Writing stuff";
|
||||||
python = lib.mkEnableOption "Python dev 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 = {
|
config = {
|
||||||
|
|
Loading…
Reference in a new issue