This commit is contained in:
Bryan Ramos 2024-01-27 15:34:21 -05:00
parent a9bd04ae6e
commit 81e9c24fb7
Signed by: bryan
GPG key ID: 6ABDCD144D6643C8
4 changed files with 11 additions and 8 deletions

View file

@ -2,12 +2,13 @@
with lib; with lib;
let cfg = config.modules.git; let cfg = config.modules.git;
isBryan = config.user.name == "bryan";
in in
{ options.modules.git = { enable = mkEnableOption "git"; }; { options.modules.git = { enable = mkEnableOption "git"; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
programs = { programs = {
git = import ./config/git.nix; git = if isBryan then import ./config/git.nix else { enable = true; };
gh = { gh = {
enable = true; enable = true;
settings.git_protocol = "ssh"; settings.git_protocol = "ssh";

View file

@ -1,19 +1,21 @@
{ lib, config, ... }: { lib, config, ... }:
with lib; with lib;
let cfg = config.modules.gpg; let
cfg = config.modules.gpg;
isBryan = config.user.name == "bryan";
in in
{ options.modules.gpg = { enable = mkEnableOption "gpg"; }; { options.modules.gpg = { enable = mkEnableOption "gpg"; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
programs.gpg = { programs.gpg = {
enable = true; enable = true;
publicKeys = [ publicKeys = if isBryan then [
{ {
text = import ./config/pubKey.nix; text = import ./config/pubKey.nix;
trust = 5; trust = 5;
} }
]; ] else [];
}; };
services.gpg-agent = { services.gpg-agent = {

View file

@ -1,10 +1,10 @@
{ pkgs, lib, config, ... }: { pkgs, lib, config, ... }:
with lib; with lib;
let let
cfg = config.modules.neovim; cfg = config.modules.neovim;
in in
{ options.modules.neovim = { enable = mkEnableOption "neovim"; }; { options.modules.neovim = { enable = mkEnableOption "neovim"; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
programs.neovim = { programs.neovim = {

View file

@ -8,7 +8,7 @@
extraOptions = "experimental-features = nix-command flakes"; extraOptions = "experimental-features = nix-command flakes";
settings = { settings = {
auto-optimise-store = true; auto-optimise-store = true;
trusted-users = [ "bryan" ]; trusted-users = [ "${config.user.name}" ];
}; };
gc = { gc = {
automatic = true; automatic = true;