xlock: Add option
This commit is contained in:
parent
c7c2c89f15
commit
14f7199d65
|
@ -1,5 +1,8 @@
|
||||||
{ 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 = {
|
||||||
|
@ -205,6 +208,5 @@
|
||||||
"${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
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,11 +18,7 @@ in
|
||||||
(pkgs.writeShellApplication {
|
(pkgs.writeShellApplication {
|
||||||
name = "xlock";
|
name = "xlock";
|
||||||
text = ''
|
text = ''
|
||||||
# Remove SSH and GPG keys from keystores
|
${config.frogeye.hooks.lock}
|
||||||
${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 Maybe we could have a terminal lock? With vlock.
|
||||||
|
|
||||||
# TODO Does that work for all DMs?
|
# TODO Does that work for all DMs?
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
{ 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,6 +1,9 @@
|
||||||
{ ... }:
|
{ 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,7 +103,6 @@ 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,6 +43,11 @@
|
||||||
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