aboutsummaryrefslogtreecommitdiff
path: root/nix/modules/home
diff options
context:
space:
mode:
Diffstat (limited to 'nix/modules/home')
-rw-r--r--nix/modules/home/emacs.nix85
-rw-r--r--nix/modules/home/firefox.nix260
-rw-r--r--nix/modules/home/gammastep.nix18
-rw-r--r--nix/modules/home/git.nix22
-rw-r--r--nix/modules/home/home.nix15
-rw-r--r--nix/modules/home/hyprland.nix132
-rw-r--r--nix/modules/home/kitty.nix51
-rw-r--r--nix/modules/home/mako.nix13
-rw-r--r--nix/modules/home/mbsync.nix31
-rw-r--r--nix/modules/home/mpd.nix27
-rw-r--r--nix/modules/home/msmtp.nix25
-rw-r--r--nix/modules/home/secrets.nix29
-rw-r--r--nix/modules/home/user.nix127
-rw-r--r--nix/modules/home/waybar.nix272
-rw-r--r--nix/modules/home/wofi.nix186
-rw-r--r--nix/modules/home/yt-dlp.nix11
-rw-r--r--nix/modules/home/zsh.nix41
17 files changed, 1330 insertions, 15 deletions
diff --git a/nix/modules/home/emacs.nix b/nix/modules/home/emacs.nix
new file mode 100644
index 0000000..f269c01
--- /dev/null
+++ b/nix/modules/home/emacs.nix
@@ -0,0 +1,85 @@
+{ lib, config, pkgs, ... }:
+{
+ enable = lib.mkDefault config.monorepo.profiles.home.enable;
+ package = pkgs.emacs29-pgtk;
+ extraConfig = ''
+ (setq debug-on-error t)
+ (org-babel-load-file
+ (expand-file-name "~/monorepo/config/emacs.org"))'';
+ extraPackages = epkgs: [
+ epkgs.all-the-icons
+ epkgs.auctex
+ epkgs.catppuccin-theme
+ epkgs.chatgpt-shell
+ epkgs.company
+ epkgs.company-solidity
+ epkgs.counsel
+ epkgs.dashboard
+ epkgs.doom-modeline
+ epkgs.elfeed
+ epkgs.elfeed-org
+ epkgs.elfeed-tube
+ epkgs.elfeed-tube-mpv
+ epkgs.ellama
+ epkgs.elpher
+ epkgs.ement
+ epkgs.emmet-mode
+ epkgs.emms
+ epkgs.enwc
+ epkgs.evil
+ epkgs.evil-collection
+ epkgs.evil-commentary
+ epkgs.evil-org
+ epkgs.f
+ epkgs.flycheck
+ epkgs.general
+ epkgs.gptel
+ epkgs.gruvbox-theme
+ epkgs.htmlize
+ epkgs.irony-eldoc
+ epkgs.ivy
+ epkgs.ivy-pass
+ epkgs.latex-preview-pane
+ epkgs.lsp-ivy
+ epkgs.lsp-mode
+ epkgs.lyrics-fetcher
+ epkgs.magit
+ epkgs.magit-delta
+ epkgs.mu4e
+ epkgs.nix-mode
+ epkgs.org-fragtog
+ epkgs.org-journal
+ epkgs.org-roam
+ epkgs.org-roam-ui
+ epkgs.org-superstar
+ epkgs.page-break-lines
+ epkgs.password-store
+ epkgs.pdf-tools
+ epkgs.pinentry
+ epkgs.platformio-mode
+ epkgs.projectile
+ epkgs.rustic
+ epkgs.scad-mode
+ epkgs.simple-httpd
+ epkgs.solidity-flycheck
+ epkgs.solidity-mode
+ epkgs.sudo-edit
+ epkgs.treemacs
+ epkgs.treemacs-evil
+ epkgs.treemacs-magit
+ epkgs.treemacs-projectile
+ epkgs.treesit-auto
+ epkgs.typescript-mode
+ epkgs.unicode-fonts
+ epkgs.use-package
+ epkgs.vterm
+ epkgs.web-mode
+ epkgs.websocket
+ epkgs.which-key
+ epkgs.writegood-mode
+ epkgs.writeroom-mode
+ epkgs.yaml-mode
+ epkgs.yasnippet
+ epkgs.yasnippet-snippets
+ ];
+}
diff --git a/nix/modules/home/firefox.nix b/nix/modules/home/firefox.nix
new file mode 100644
index 0000000..ea239c0
--- /dev/null
+++ b/nix/modules/home/firefox.nix
@@ -0,0 +1,260 @@
+{ lib, config, pkgs, ... }:
+{
+ enable = lib.mkDefault config.monorepo.profiles.home.enable;
+ policies = {
+ EnableTrackingProtection = true;
+ OfferToSaveLogins = false;
+ };
+ package = pkgs.firefox-wayland;
+ profiles = {
+ default = {
+ id = 0;
+ name = "default";
+ isDefault = true;
+
+ extensions = with pkgs.nur.repos.rycee.firefox-addons; [
+ ublock-origin
+ tree-style-tab
+ firefox-color
+ vimium
+ ]
+ ++ (lib.optional
+ config.monorepo.profiles.home.crypto.enable pkgs.nur.repos.rycee.firefox-addons.metamask);
+
+ settings = {
+ media = {
+ memory_cache_max_size = 65536;
+ cache_readahead_limit = 7200;
+ cache_resume_threshold = 3600;
+ peerconnection.ice = {
+ proxy_only_if_behind_proxy = true;
+ default_address_only = true;
+ };
+ };
+
+ gfx = {
+ content.skia-font-cache-size = 20;
+ canvas.accelerated = {
+ cache-items = 4096;
+ cache-size = 512;
+ };
+ };
+
+ network = {
+ http = {
+ max-connections = 1800;
+ max-persistent-connections-per-server = 10;
+ max-urgent-start-excessive-connections-per-host = 5;
+ referer.XOriginTrimmingPolicy = 2;
+ };
+
+ buffer.cache = {
+ size = 262144;
+ count = 128;
+ };
+
+ dns = {
+ max_high_priority_threads = 8;
+ disablePrefetch = true;
+ };
+
+ pacing.requests.enabled = false;
+ dnsCacheExpiration = 3600;
+ ssl_tokens_cache_capacity = 10240;
+ prefetch-next = false;
+ predictor.enabled = false;
+ cookie.sameSite.noneRequiresSecure = true;
+ IDN_show_punycode = true;
+ auth.subresource-http-auth-allow = 1;
+ captive-portal-service.enabled = false;
+ connectivity-service.enabled = false;
+ };
+
+ browser = {
+ download = {
+ always_ask_before_handling_new_types = true;
+ manager.addToRecentDocs = false;
+ open_pdf_attachments_inline = true;
+ start_downloads_in_tmp_dir = true;
+ };
+
+ urlbar = {
+ suggest.quicksuggest.sponsored = false;
+ suggest.quicksuggest.nonsponsored = false;
+ suggest.calculator = true;
+ update2.engineAliasRefresh = true;
+ unitConversion.enabled = true;
+ trending.featureGate = false;
+ };
+
+ search = {
+ separatePrivateDefault.ui.enabled = true;
+ suggest.enabled = false;
+ };
+
+ newtabpage.activity-stream = {
+ feeds = {
+ topsites = false;
+ section.topstories = false;
+ telemetry = false;
+ };
+ asrouter.userprefs.cfr = {
+ addons = false;
+ features = false;
+ };
+ telemetry = false;
+ };
+
+ privatebrowsing = {
+ vpnpromourl = "";
+ forceMediaMemoryCache = true;
+ };
+
+ display = {
+ focus_ring_on_anything = true;
+ focus_ring_style = 0;
+ focus_ring_width = 0;
+ };
+
+ cache.jsbc_compression_level = 3;
+ helperApps.deleteTempFileOnExit = true;
+ uitour.enabled = false;
+ sessionstore.interval = 60000;
+ formfill.enable = false;
+ xul.error_pages.expert_bad_cert = true;
+ contentblocking.category = "strict";
+ ping-centre.telemetry = false;
+ discovery.enabled = false;
+ shell.checkDefaultBrowser = false;
+ preferences.moreFromMozilla = false;
+ tabs.tabmanager.enabled = false;
+ aboutConfig.showWarning = false;
+ aboutwelcome.enabled = false;
+ bookmarks.openInTabClosesMenu = false;
+ menu.showViewImageInfo = true;
+ compactmode.show = true;
+ safebrowsing.downloads.remote.enabled = false;
+ tabs.crashReporting.sendReport = false;
+ crashReports.unsubmittedCheck.autoSubmit2 = false;
+ privateWindowSeparation.enabled = false;
+ };
+
+ security = {
+ mixed_content = {
+ block_display_content = true;
+ upgrade_display_content = true;
+ };
+ insecure_connection_text = {
+ enabled = true;
+ pbmode.enabled = true;
+ };
+ OCSP.enabled = 0;
+ remote_settings.crlite_filters.enabled = true;
+ pki.crlite_mode = 2;
+ ssl.treat_unsafe_negotiation_as_broken = true;
+ tls.enable_0rtt_data = false;
+ };
+
+ toolkit = {
+ telemetry = {
+ unified = false;
+ enabled = false;
+ server = "data:,";
+ archive.enabled = false;
+ newProfilePing.enabled = false;
+ shutdownPingSender.enabled = false;
+ updatePing.enabled = false;
+ bhrPing.enabled = false;
+ firstShutdownPing.enabled = false;
+ coverage.opt-out = true;
+ };
+ coverage = {
+ opt-out = true;
+ endpoint.base = "";
+ };
+ legacyUserProfileCustomizations.stylesheets = true;
+ };
+
+ dom = {
+ security = {
+ https_first = true;
+ https_first_schemeless = true;
+ sanitizer.enabled = true;
+ };
+ enable_web_task_scheduling = true;
+ };
+
+ layout = {
+ css = {
+ grid-template-masonry-value.enabled = true;
+ has-selector.enabled = true;
+ prefers-color-scheme.content-override = 2;
+ };
+ word_select.eat_space_to_next_word = false;
+ };
+
+ urlclassifier = {
+ trackingSkipURLs = "*.reddit.com, *.twitter.com, *.twimg.com, *.tiktok.com";
+ features.socialtracking.skipURLs = "*.instagram.com, *.twitter.com, *.twimg.com";
+ };
+
+ privacy = {
+ globalprivacycontrol.enabled = true;
+ history.custom = true;
+ userContext.ui.enabled = true;
+ };
+
+ full-screen-api = {
+ transition-duration = {
+ enter = "0 0";
+ leave = "0 0";
+ };
+ warning = {
+ delay = -1;
+ timeout = 0;
+ };
+ };
+
+ permissions.default = {
+ desktop-notification = 2;
+ geo = 2;
+ };
+
+ signon = {
+ formlessCapture.enabled = false;
+ privateBrowsingCapture.enabled = false;
+ };
+
+ datareporting = {
+ policy.dataSubmissionEnabled = false;
+ healthreport.uploadEnabled = false;
+ };
+
+ extensions = {
+ pocket.enabled = false;
+ getAddons.showPane = false;
+ htmlaboutaddons.recommendations.enabled = false;
+ postDownloadThirdPartyPrompt = false;
+ };
+
+ app = {
+ shield.optoutstudies.enabled = false;
+ normandy.enabled = false;
+ normandy.api_url = "";
+ };
+
+ image.mem.decode_bytes_at_a_time = 32768;
+ editor.truncate_user_pastes = false;
+ pdfjs.enableScripting = false;
+ geo.provider.network.url = "https://location.services.mozilla.com/v1/geolocate?key=%MOZILLA_API_KEY%";
+ permissions.manager.defaultsUrl = "";
+ webchannel.allowObject.urlWhitelist = "";
+ breakpad.reportURL = "";
+ captivedetect.canonicalURL = "";
+ cookiebanners.service.mode = 1;
+ findbar.highlightAll = true;
+ content.notify.interval = 100000;
+ };
+ };
+ };
+}
diff --git a/nix/modules/home/gammastep.nix b/nix/modules/home/gammastep.nix
new file mode 100644
index 0000000..97f7660
--- /dev/null
+++ b/nix/modules/home/gammastep.nix
@@ -0,0 +1,18 @@
+{ lib, config, ... }:
+{
+ enable = lib.mkDefault config.monorepo.profiles.home.enable;
+ provider = "manual";
+ latitude = 49.282730;
+ longitude = -123.120735;
+
+ temperature = {
+ day = 5000;
+ night = 3000;
+ };
+
+ settings = {
+ general = {
+ adjustment-method = "wayland";
+ };
+ };
+}
diff --git a/nix/modules/home/git.nix b/nix/modules/home/git.nix
new file mode 100644
index 0000000..84f3b0f
--- /dev/null
+++ b/nix/modules/home/git.nix
@@ -0,0 +1,22 @@
+{ lib, config, ... }:
+{
+ enable = lib.mkDefault config.monorepo.profiles.home.enable;
+ userName = config.vars.fullName;
+ userEmail = config.vars.email;
+ signing = {
+ key = config.vars.gpgKey;
+ signByDefault = true;
+ };
+
+ extraConfig = {
+ init.defaultBranch = "main";
+ };
+
+ aliases = {
+ co = "checkout";
+ c = "commit";
+ a = "add";
+ s = "switch";
+ b = "branch";
+ };
+}
diff --git a/nix/modules/home/home.nix b/nix/modules/home/home.nix
new file mode 100644
index 0000000..d82445a
--- /dev/null
+++ b/nix/modules/home/home.nix
@@ -0,0 +1,15 @@
+{ config, sops-nix, ... }:
+{
+ imports = [
+ ../default.nix
+ ];
+
+ home-manager = {
+ sharedModules = [
+ sops-nix.homeManagerModules.sops
+ ];
+ useGlobalPkgs = true;
+ useUserPackages = true;
+ users."${config.monorepo.vars.userName}" = import ./user.nix;
+ };
+}
diff --git a/nix/modules/home/hyprland.nix b/nix/modules/home/hyprland.nix
new file mode 100644
index 0000000..69eedce
--- /dev/null
+++ b/nix/modules/home/hyprland.nix
@@ -0,0 +1,132 @@
+{ lib, config, wallpapers, pkgs, scripts, ... }:
+{
+ enable = lib.mkDefault config.monorepo.profiles.home.hyprland.enable;
+ package = pkgs.hyprland;
+ xwayland.enable = true;
+ systemd.enable = true;
+ settings = {
+ "$mod" = "SUPER";
+ exec-once = [
+ "waybar"
+ "swww-daemon --format xrgb"
+ "swww img ${wallpapers}/imagination.png"
+ "fcitx5-remote -r"
+ "fcitx5 -d --replace"
+ "fcitx5-remote -r"
+ "emacs"
+ "firefox"
+ ];
+ env = [
+ "LIBVA_DRIVER_NAME,nvidia"
+ "XDG_SESSION_TYPE,wayland"
+ "GBM_BACKEND,nvidia-drm"
+ "__GLX_VENDOR_LIBRARY_NAME,nvidia"
+ "ELECTRON_OZONE_PLATFORM_HINT,auto"
+ ];
+ blurls = [
+ "waybar"
+ ];
+ monitor = [
+ "Unknown-1,disable"
+ ];
+ windowrule = [
+ "workspace 1, ^(.*emacs.*)$"
+ "workspace 2, ^(.*firefox.*)$"
+ "workspace 2, ^(.*Tor Browser.*)$"
+ "workspace 2, ^(.*Chromium-browser.*)$"
+ "workspace 2, ^(.*chromium.*)$"
+ "workspace 3, ^(.*discord.*)$"
+ "workspace 3, ^(.*vesktop.*)$"
+ "workspace 3, ^(.*fluffychat.*)$"
+ "workspace 3, ^(.*element-desktop.*)$"
+ "workspace 4, ^(.*qpwgraph.*)$"
+ "workspace 4, ^(.*mpv.*)$"
+ "workspace 5, ^(.*Monero.*)$"
+ "workspace 5, ^(.*org\.bitcoin\..*)$"
+ "workspace 5, ^(.*Bitcoin Core - preston.*)$"
+ "workspace 5, ^(.*org\.getmonero\..*)$"
+ "workspace 5, ^(.*Monero - preston.*)$"
+ "workspace 5, ^(.*electrum.*)$"
+ "pseudo,fcitx"
+ ];
+ bind = [
+ "$mod, F, exec, firefox"
+ "$mod, T, exec, tor-browser"
+ "$mod, Return, exec, kitty"
+ "$mod, E, exec, emacs"
+ "$mod, B, exec, bitcoin-qt"
+ "$mod, M, exec, monero-wallet-gui"
+ "$mod, V, exec, vesktop"
+ "$mod, D, exec, wofi --show run"
+ "$mod, P, exec, bash ${scripts}/powermenu.sh"
+ "$mod, Q, killactive"
+ "$mod SHIFT, H, movewindow, l"
+ "$mod SHIFT, L, movewindow, r"
+ "$mod SHIFT, K, movewindow, u"
+ "$mod SHIFT, J, movewindow, d"
+ "$mod, H, movefocus, l"
+ "$mod, L, movefocus, r"
+ "$mod, K, movefocus, u"
+ "$mod, J, movefocus, d"
+ ", XF86AudioPlay, exec, mpc toggle"
+ ", Print, exec, grim"
+ ]
+ ++ (
+ builtins.concatLists (builtins.genList
+ (
+ x:
+ let
+ ws =
+ let
+ c = (x + 1) / 10;
+ in
+ builtins.toString (x + 1 - (c * 10));
+ in
+ [
+ "$mod, ${ws}, workspace, ${toString (x + 1)}"
+ "$mod SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}"
+ ]
+ )
+ 10)
+ );
+ bindm = [
+ "$mod, mouse:272, movewindow"
+ "$mod, mouse:273, resizewindow"
+ "$mod ALT, mouse:272, resizewindow"
+ ];
+ binde = [
+ ", XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+"
+ ", XF86AudioLowerVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%-"
+ ", XF86AudioNext, exec, mpc next"
+ ", XF86AudioPrev, exec, mpc prev"
+ ", XF86MonBrightnessUp , exec, xbacklight -inc 10"
+ ", XF86MonBrightnessDown, exec, xbacklight -dec 10"
+ ];
+ decoration = {
+ blur = {
+ enabled = true;
+ size = 5;
+ passes = 2;
+ };
+ rounding = 5;
+ };
+ input = {
+ kb_options = "caps:swapescape";
+ repeat_delay = 300;
+ repeat_rate = 50;
+ natural_scroll = true;
+ touchpad = {
+ natural_scroll = true;
+ disable_while_typing = true;
+ tap-to-click = true;
+ };
+ };
+ cursor = {
+ no_hardware_cursors = true;
+ };
+ misc = {
+ force_default_wallpaper = 0;
+ disable_hyprland_logo = true;
+ };
+ };
+}
diff --git a/nix/modules/home/kitty.nix b/nix/modules/home/kitty.nix
new file mode 100644
index 0000000..c716bef
--- /dev/null
+++ b/nix/modules/home/kitty.nix
@@ -0,0 +1,51 @@
+{ lib, config, ... }:
+{
+ enable = lib.mkDefault config.monorepo.profiles.home.hyprland.enable;
+ settings = {
+ enable_audio_bell = false;
+ font_family = "Iosevka Nerd Font";
+ font_size = 14;
+ confirm_os_window_close = 0;
+ background_opacity = "0.9";
+ # Catppuccin theme
+ foreground = "#cdd6f4";
+ background = "#1e1e2e";
+ selection_foreground = "#1e1e2e";
+ selection_background = "#f5e0dc";
+ cursor = "#f5e0dc";
+ cursor_text_color = "#1e1e2e";
+ url_color = "#f5e0dc";
+ active_border_color = "#B4BEFE";
+ inactive_border_color = "#6C7086";
+ bell_border_color = "#F9E2AF";
+ wayland_titlebar_color = "#1E1E2E";
+ macos_titlebar_color = "#1E1E2E";
+ active_tab_foreground = "#11111B";
+ active_tab_background = "#CBA6F7";
+ inactive_tab_foreground = "#CDD6F4";
+ inactive_tab_background = "#181825";
+ tab_bar_background = "#11111B";
+ mark1_foreground = "#1E1E2E";
+ mark1_background = "#B4BEFE";
+ mark2_foreground = "#1E1E2E";
+ mark2_background = "#CBA6F7";
+ mark3_foreground = "#1E1E2E";
+ mark3_background = "#74C7EC";
+ color0 = "#45475A";
+ color8 = "#585B70";
+ color1 = "#F38BA8";
+ color9 = "#F38BA8";
+ color2 = "#A6E3A1";
+ color10 = "#A6E3A1";
+ color3 = "#F9E2AF";
+ color11 = "#F9E2AF";
+ color4 = "#89B4FA";
+ color12 = "#89B4FA";
+ color5 = "#F5C2E7";
+ color13 = "#F5C2E7";
+ color6 = "#94E2D5";
+ color14 = "#94E2D5";
+ color7 = "#BAC2DE";
+ color15 = "#A6ADC8";
+ };
+}
diff --git a/nix/modules/home/mako.nix b/nix/modules/home/mako.nix
new file mode 100644
index 0000000..3b7db8d
--- /dev/null
+++ b/nix/modules/home/mako.nix
@@ -0,0 +1,13 @@
+{ lib, config, ... }:
+{
+ enable = lib.mkDefault config.monorepo.profiles.home.enable;
+ backgroundColor = "#11111bf8";
+ textColor = "#cdd6f4";
+ borderColor = "#89b4faff";
+ borderRadius = 1;
+ font = "Fira Code 10";
+ defaultTimeout = 3000;
+ extraConfig = ''
+on-notify=exec mpv /home/${config.monorepo.vars.userName}/sounds/notification.wav --no-config --no-video
+'';
+}
diff --git a/nix/modules/home/mbsync.nix b/nix/modules/home/mbsync.nix
new file mode 100644
index 0000000..e509c27
--- /dev/null
+++ b/nix/modules/home/mbsync.nix
@@ -0,0 +1,31 @@
+{ lib, config, ... }:
+{
+ enable = lib.mkDefault config.profiles.home.email.enable;
+ extraConfig = ''
+ IMAPAccount ret2pop
+ Host ${config.profiles.home.email.imapsServer}
+ User ${config.profiles.email.email}
+ PassCmd "cat ${config.sops.secrets.mail.path}"
+ Port 993
+ TLSType IMAPS
+ AuthMechs *
+ CertificateFile /etc/ssl/certs/ca-certificates.crt
+
+ IMAPStore ret2pop-remote
+ Account ret2pop
+
+ MaildirStore ret2pop-local
+ Path ~/email/ret2pop/
+ Inbox ~/email/ret2pop/INBOX
+ SubFolders Verbatim
+
+ Channel ret2pop
+ Far :ret2pop-remote:
+ Near :ret2pop-local:
+ Patterns *
+ Create Near
+ Sync All
+ Expunge None
+ SyncState *
+ '';
+}
diff --git a/nix/modules/home/mpd.nix b/nix/modules/home/mpd.nix
new file mode 100644
index 0000000..eee23b3
--- /dev/null
+++ b/nix/modules/home/mpd.nix
@@ -0,0 +1,27 @@
+{ lib, config, ... }:
+{
+ enable = lib.mkDefault config.monorepo.profiles.home.music.enable;
+ dbFile = "/home/${config.vars.userName}/.config/mpd/db";
+ dataDir = "/home/${config.vars.userName}/.config/mpd/";
+ network.port = 6600;
+ musicDirectory = "/home/${config.vars.userName}/music";
+ playlistDirectory = "/home/${config.vars.userName}/.config/mpd/playlists";
+ network.listenAddress = "0.0.0.0";
+ extraConfig = ''
+ audio_output {
+ type "pipewire"
+ name "pipewire output"
+ }
+ audio_output {
+ type "httpd"
+ name "My HTTP Stream"
+ encoder "opus" # optional
+ port "8000"
+ # quality "5.0" # do not define if bitrate is defined
+ bitrate "128000" # do not define if quality is defined
+ format "48000:16:1"
+ always_on "yes" # prevent MPD from disconnecting all listeners when playback is stopped.
+ tags "yes" # httpd supports sending tags to listening streams.
+ }
+ '';
+}
diff --git a/nix/modules/home/msmtp.nix b/nix/modules/home/msmtp.nix
new file mode 100644
index 0000000..d965c18
--- /dev/null
+++ b/nix/modules/home/msmtp.nix
@@ -0,0 +1,25 @@
+{ lib, config, ... }:
+{
+ enable = lib.mkDefault config.monorepo.profiles.home.email.enable;
+ extraConfig = ''
+ # Set default values for all following accounts.
+ defaults
+ auth on
+ tls on
+ tls_trust_file /etc/ssl/certs/ca-certificates.crt
+ tls_certcheck off
+ logfile ~/.msmtp.log
+
+ # Gmail
+ account ${config.monorepo.vars.userName}
+ host ${config.monorepo.profiles.home.email.smtpsServer}
+ port 587
+ from ${config.monorepo.profiles.home.email.email}
+ user ${config.monorepo.profiles.home.email.email}
+ passwordeval "cat ${config.sops.secrets.mail.path}"
+
+
+ # Set a default account
+ account default : ${config.monorepo.vars.userName}
+ '';
+}
diff --git a/nix/modules/home/secrets.nix b/nix/modules/home/secrets.nix
index 64eab73..d24129c 100644
--- a/nix/modules/home/secrets.nix
+++ b/nix/modules/home/secrets.nix
@@ -1,19 +1,18 @@
-{ lib, config, pkgs, inputs, ... }:
+{ config, ... }:
{
- imports = [
- ../vars.nix
- ];
-
- options = {
- secrets.enable = lib.mkEnableOption "enables encrypted secrets on system";
+ defaultSopsFile = ../../secrets/secrets.yaml;
+ age = {
+ keyFile = "/home/${config.vars.userName}/.ssh/keys.txt";
};
-
- config = lib.mkIf config.secrets.enable {
- home-manager = {
- sharedModules = [
- inputs.sops-nix.homeManagerModules.sops
- ];
- users."${user.user}" = {};
- };
+ secrets.mail = {
+ format = "yaml";
+ path = "${config.sops.defaultSymlinkPath}/mail";
};
+ secrets.digikey = {
+ format = "yaml";
+ path = "${config.sops.defaultSymlinkPath}/digikey";
+ };
+
+ defaultSymlinkPath = "/run/user/1000/secrets";
+ defaultSecretsMountPoint = "/run/user/1000/secrets.d";
}
diff --git a/nix/modules/home/user.nix b/nix/modules/home/user.nix
new file mode 100644
index 0000000..597eb16
--- /dev/null
+++ b/nix/modules/home/user.nix
@@ -0,0 +1,127 @@
+{ lib, config, pkgs, ... }:
+{
+ sops = import ./sops.nix;
+ home = {
+ activation.startup-files = lib.hm.dag.entryAfter [ "installPackages" ] ''
+ if [ ! -d "/home/${config.monorepo.vars.userName}/email/ret2pop/" ]; then
+ mkdir -p /home/${config.monorepo.vars.userName}/email/ret2pop/
+ fi
+ if [ ! -d "/home/${config.monorepo.vars.userName}/music" ]; then
+ mkdir -p /home/${config.monorepo.vars.userName}/music
+ fi
+ if [ ! -d "/home/${config.monorepo.vars.userName}/sounds" ]; then
+ mkdir -p /home/${config.monorepo.vars.userName}/sounds
+ fi
+ touch /home/${config.monorepo.vars.userName}/org/agenda.org
+ touch /home/${config.monorepo.vars.userName}/org/notes.org
+ touch /home/${config.monorepo.vars.userName}/.monorepo
+ '';
+
+ enableNixpkgsReleaseCheck = false;
+ username = config.monorepo.vars.userName;
+ homeDirectory = "/home/${config.monorepo.vars.userName}";
+ stateVersion = "24.11";
+
+ packages = with pkgs; [
+ # passwords
+ age sops
+
+ # formatting
+ ghostscript texliveFull pandoc
+
+ # Emacs Deps
+ graphviz jq
+
+ # Apps
+ octaveFull vesktop grim swww
+
+ # Sound/media
+ pavucontrol alsa-utils imagemagick ffmpeg vim
+
+ # Net
+ curl rsync git
+
+ # fonts
+ noto-fonts
+ noto-fonts-cjk-sans
+ noto-fonts-emoji
+ fira-code
+ font-awesome_6
+ (aspellWithDicts
+ (dicts: with dicts; [ en en-computers en-science ]))
+ (nerdfonts.override { fonts = [ "Iosevka" ]; })
+
+ # Misc.
+ pinentry
+ x11_ssh_askpass
+ xdg-utils
+ acpilight
+ pfetch
+ libnotify
+
+ # Shell script
+ (writeShellScriptBin "post-install" ''
+cd $HOME
+ping -q -c1 google.com &>/dev/null && echo "online! Proceeding with the post-install..." || nmtui
+sudo chown -R "$(whoami)":users ./monorepo
+
+sudo nixos-rebuild switch --flake ./monorepo/nix#continuity
+echo "Post install done! Now install your ssh and gpg keys. Log in again."
+sleep 3
+exit
+'')
+ ];
+ };
+
+ services = {
+ mako = import ./mako.nix;
+ gpg-agent = {
+ pinentryPackage = pkgs.pinentry-emacs;
+ enable = true;
+ extraConfig = ''
+ allow-emacs-pinentry
+ allow-loopback-pinentry
+ '';
+ };
+ gammastep = import ./gammastep.nix;
+ mpd = import ./mpd.nix;
+ };
+
+ programs = {
+ mpv = import ./mpv.nix;
+ yt-dlp = import ./yt-dlp.nix;
+ wofi = import ./wofi.nix;
+ kitty = import ./kitty.nix;
+ firefox = import ./firefox.nix;
+ waybar = import ./waybar.nix;
+ zsh = import ./zsh.nix;
+ emacs = import ./emacs.nix;
+ mbsync = import ./mbsync.nix;
+ msmtp = import ./msmtp.nix;
+ bash.enable = true;
+ git = import ./git.nix;
+ home-manager.enable = lib.mkDefault config.monorepo.profiles.home.enable;
+ };
+
+ wayland.windowManager.hyprland = import ./hyprland.nix;
+
+ gtk = {
+ enable = true;
+ theme = null;
+ iconTheme = null;
+ };
+
+ i18n.inputMethod = {
+ enabled = "fcitx5";
+ fcitx5.addons = with pkgs; [
+ fcitx5-gtk
+ fcitx5-chinese-addons
+ fcitx5-configtool
+ fcitx5-mozc
+ fcitx5-rime
+ ];
+ };
+
+ fonts.fontconfig.enable = true;
+ nixpkgs.config.cudaSupport = false;
+}
diff --git a/nix/modules/home/waybar.nix b/nix/modules/home/waybar.nix
new file mode 100644
index 0000000..3ef81e8
--- /dev/null
+++ b/nix/modules/home/waybar.nix
@@ -0,0 +1,272 @@
+{ lib, config, ... }:
+{
+ enable = lib.mkDefault config.monorepo.profiles.hyprland.enable;
+ style = ''
+ * {
+ border: none;
+ border-radius: 0px;
+ font-family: Iosevka Nerd Font, FontAwesome, Noto Sans CJK;
+ font-size: 14px;
+ font-style: normal;
+ min-height: 0;
+ }
+
+ window#waybar {
+ background: rgba(30, 30, 46, 0.5);
+ border-bottom: 1px solid #45475a;
+ color: #cdd6f4;
+ }
+
+ #workspaces {
+ background: #45475a;
+ margin: 5px 5px 5px 5px;
+ padding: 0px 5px 0px 5px;
+ border-radius: 16px;
+ border: solid 0px #f4d9e1;
+ font-weight: normal;
+ font-style: normal;
+ }
+ #workspaces button {
+ padding: 0px 5px;
+ border-radius: 16px;
+ color: #a6adc8;
+ }
+
+ #workspaces button.active {
+ color: #f4d9e1;
+ background-color: transparent;
+ border-radius: 16px;
+ }
+
+ #workspaces button:hover {
+ background-color: #cdd6f4;
+ color: black;
+ border-radius: 16px;
+ }
+
+ #custom-date, #clock, #battery, #pulseaudio, #network, #custom-randwall, #custom-launcher {
+ background: transparent;
+ padding: 5px 5px 5px 5px;
+ margin: 5px 5px 5px 5px;
+ border-radius: 8px;
+ border: solid 0px #f4d9e1;
+ }
+
+ #custom-date {
+ color: #D3869B;
+ }
+
+ #custom-power {
+ color: #24283b;
+ background-color: #db4b4b;
+ border-radius: 5px;
+ margin-right: 10px;
+ margin-top: 5px;
+ margin-bottom: 5px;
+ margin-left: 0px;
+ padding: 5px 10px;
+ }
+
+ #tray {
+ background: #45475a;
+ margin: 5px 5px 5px 5px;
+ border-radius: 16px;
+ padding: 0px 5px;
+ /*border-right: solid 1px #282738;*/
+ }
+
+ #clock {
+ color: #cdd6f4;
+ background-color: #45475a;
+ border-radius: 0px 0px 0px 24px;
+ padding-left: 13px;
+ padding-right: 15px;
+ margin-right: 0px;
+ margin-left: 10px;
+ margin-top: 0px;
+ margin-bottom: 0px;
+ font-weight: bold;
+ /*border-left: solid 1px #282738;*/
+ }
+
+ #battery {
+ color: #89b4fa;
+ }
+
+ #battery.charging {
+ color: #a6e3a1;
+ }
+
+ #battery.warning:not(.charging) {
+ background-color: #f7768e;
+ color: #f38ba8;
+ border-radius: 5px 5px 5px 5px;
+ }
+
+ #backlight {
+ background-color: #24283b;
+ color: #db4b4b;
+ border-radius: 0px 0px 0px 0px;
+ margin: 5px;
+ margin-left: 0px;
+ margin-right: 0px;
+ padding: 0px 0px;
+ }
+
+ #network {
+ color: #f4d9e1;