Skip to content

Instantly share code, notes, and snippets.

@bashfulrobot
Last active April 25, 2024 18:32
Show Gist options
  • Save bashfulrobot/003503d63d5ec2d65f4eae721253aa9c to your computer and use it in GitHub Desktop.
Save bashfulrobot/003503d63d5ec2d65f4eae721253aa9c to your computer and use it in GitHub Desktop.
merged home-manager in snowfall lib
{ config, pkgs, ... }:
let
username = if builtins.getEnv "SUDO_USER" != "" then
builtins.getEnv "SUDO_USER"
else
builtins.getEnv "USER";
in {
# Enable the 1Passsword GUI with myself as an authorized user for polkit
programs._1password-gui = {
enable = true;
polkitPolicyOwners = [ "${username}" ];
};
home-manager.users."${username}" = {
home.file."1password.desktop" = {
source = ./1password.desktop;
target = ".config/autostart/1password.desktop";
};
};
}
{ options, config, lib, pkgs, ... }:
with lib;
with lib.bashfulrobot;
let
cfg = config.bashfulrobot.cli.autojump;
username = if builtins.getEnv "SUDO_USER" != "" then
builtins.getEnv "SUDO_USER"
else
builtins.getEnv "USER";
in {
options.bashfulrobot.cli.autojump = with types; {
enable = mkBoolOpt false "Whether or not to enable autojump.";
};
config = mkIf cfg.enable {
###### Nix Config.
# environment.systemPackages = with pkgs; [ autojump ];
###### Home Manager Config.
snowfallorg.users."${username}".home.config = {
programs.autojump = {
enable = true;
enableFishIntegration = true;
enableBashIntegration = true;
};
};
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment