Last active
April 25, 2024 18:32
-
-
Save bashfulrobot/003503d63d5ec2d65f4eae721253aa9c to your computer and use it in GitHub Desktop.
merged home-manager in snowfall lib
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ 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"; | |
}; | |
}; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ 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