diff options
Diffstat (limited to 'modules/home')
-rw-r--r-- | modules/home/default.nix | 57 | ||||
-rw-r--r-- | modules/home/mu.nix | 66 | ||||
-rw-r--r-- | modules/home/zen.nix | 29 |
3 files changed, 152 insertions, 0 deletions
diff --git a/modules/home/default.nix b/modules/home/default.nix new file mode 100644 index 0000000..cfa68c2 --- /dev/null +++ b/modules/home/default.nix @@ -0,0 +1,57 @@ +{ config, lib, inputs, pkgs, ...}: with lib; let + cfg = config.santi-modules; +in { + imports = [ + inputs.home-manager.nixosModules.home-manager + ./mu.nix + ./zen.nix + ]; + config = mkIf cfg.default-user.enable { + home-manager = { + backupFileExtension = "backup"; + useGlobalPkgs = true; + useUserPackages = true; + users.leonardo = { + home = { + stateVersion = "23.05"; + homeDirectory = "/home/leonardo"; + packages = lib.optionals cfg.desktop-environment.enable (with pkgs; [ + legcord + slack + whatsapp-for-linux + telegram-desktop + ]); + }; + programs = { + bash = { + enable = true; + enableCompletion = true; + initExtra = '' + shopt -s -q autocd + shopt -s no_empty_cmd_completion + ''; + }; + fzf = { + enable = true; + enableBashIntegration = true; + }; + git = { + enable = true; + lfs.enable = true; + diff-so-fancy.enable = true; + extraConfig = { + user = { + name = "Leonardo Santiago"; + email = "[email protected]"; + signingkey = "~/.ssh/id_ed25519"; + }; + color.ui = true; + gpg.format = "ssh"; + commit.gpgsign = true; + }; + }; + }; + }; + }; + }; +} diff --git a/modules/home/mu.nix b/modules/home/mu.nix new file mode 100644 index 0000000..1a22963 --- /dev/null +++ b/modules/home/mu.nix @@ -0,0 +1,66 @@ +{ config, lib, ...}: with lib; let + cfg = config.santi-modules; +in { + options.santi-modules.mu.enable = mkEnableOption "Enables mu, mbsync and msmtp"; + config = mkIf cfg.mu.enable { + home-manager.users.leonardo = { + programs = { + mu.enable = true; + msmtp.enable = true; + mbsync.enable = true; + }; + services.mbsync = { + enable = true; + frequency = "*:0/5"; + }; + accounts.email.accounts = { + personal = { + address = "[email protected]"; + userName = "[email protected]"; + imap.host = "imap.gmail.com"; + smtp.host = "smtp.gmail.com"; + primary = true; + realName = "Leonardo Ribeiro Santiago"; + mbsync = { + enable = true; + create = "both"; + expunge = "both"; + }; + msmtp.enable = true; + mu.enable = true; + passwordCommand = "cat ${config.age.secrets.personal-mail.path}"; + }; + university = { + address = "[email protected]"; + userName = "[email protected]"; + imap.host = "imap.gmail.com"; + smtp.host = "smtp.gmail.com"; + realName = "Leonardo Ribeiro Santiago"; + mbsync = { + enable = true; + create = "both"; + expunge = "both"; + }; + msmtp.enable = true; + mu.enable = true; + passwordCommand = "cat ${config.age.secrets.university-mail.path}"; + }; + work = { + address = "[email protected]"; + userName = "[email protected]"; + imap.host = "imap.gmail.com"; + smtp.host = "smtp.gmail.com"; + realName = "Leonardo Ribeiro Santiago"; + mbsync = { + enable = true; + create = "both"; + expunge = "both"; + }; + msmtp.enable = true; + mu.enable = true; + passwordCommand = "cat ${config.age.secrets.work-mail.path}"; + }; + }; + }; + }; +} diff --git a/modules/home/zen.nix b/modules/home/zen.nix new file mode 100644 index 0000000..f7535dc --- /dev/null +++ b/modules/home/zen.nix @@ -0,0 +1,29 @@ +{ config, lib, inputs, ...}: with lib; let + cfg = config.santi-modules; +in { + options.santi-modules.zen-browser = mkEnableOption "Enable zen browser from flake"; + config = mkIf cfg.default-user.enable { + home-manager = { + users.leonardo = { + imports = [ + inputs.zen-browser.homeModules.default + ]; + programs.zen-browser = { + enable = true; + policies = { + AutofillAddressEnabled = true; + AutofillCreditCardEnabled = false; + DisableAppUpdate = true; + DisableFeedbackCommands = true; + DisableFirefoxStudies = true; + DisablePocket = true; # save webs for later reading + DisableTelemetry = true; + DontCheckDefaultBrowser = true; + NoDefaultBookmarks = true; + OfferToSaveLogins = false; + }; + }; + }; + }; + }; +} |