aboutsummaryrefslogtreecommitdiff
path: root/nix/modules
diff options
context:
space:
mode:
Diffstat (limited to 'nix/modules')
-rw-r--r--nix/modules/configuration.nix300
-rw-r--r--nix/modules/default.nix182
-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
-rw-r--r--nix/modules/pipewire.nix30
-rw-r--r--nix/modules/sda-simple.nix36
-rw-r--r--nix/modules/secure-boot.nix20
-rw-r--r--nix/modules/ssh.nix10
-rw-r--r--nix/modules/tor.nix18
-rw-r--r--nix/modules/vars.nix82
-rw-r--r--nix/modules/xserver.nix26
26 files changed, 1973 insertions, 76 deletions
diff --git a/nix/modules/configuration.nix b/nix/modules/configuration.nix
new file mode 100644
index 0000000..46deabb
--- /dev/null
+++ b/nix/modules/configuration.nix
@@ -0,0 +1,300 @@
+{ config, pkgs, lib, ... }:
+{
+ imports = [];
+
+ documentation = {
+ enable = lib.mkDefault config.monorepo.profiles.documentation.enable;
+ man.enable = lib.mkDefault config.monorepo.profiles.documentation.enable;
+ dev.enable = lib.mkDefault config.monorepo.profiles.documentation.enable;
+ };
+
+ environment = {
+ etc = {
+ securetty.text = ''
+ # /etc/securetty: list of terminals on which root is allowed to login.
+ # See securetty(5) and login(1).
+ '';
+ };
+ };
+
+ systemd = {
+ coredump.enable = false;
+ network.config.networkConfig.IPv6PrivacyExtensions = "kernel";
+ tmpfiles.settings = {
+ "restricthome"."/home/*".Z.mode = "~0700";
+
+ "restrictetcnixos"."/etc/nixos/*".Z = {
+ mode = "0000";
+ user = "root";
+ group = "root";
+ };
+ };
+ };
+
+
+ boot = {
+ extraModulePackages = [ ];
+
+ initrd = {
+ availableKernelModules = [
+ "xhci_pci"
+ "ahci"
+ "usb_storage"
+ "sd_mod"
+ "nvme"
+ "sd_mod"
+ "ehci_pci"
+ "rtsx_pci_sdmmc"
+ "usbhid"
+ ];
+
+ kernelModules = [ ];
+ };
+
+ lanzaboote = {
+ enable = config.monorepo.profiles.secureBoot.enable;
+ pkiBundle = "/etc/secureboot";
+ };
+
+ loader = {
+ systemd-boot.enable = lib.mkForce (! config.monorepo.profiles.secureBoot.enable);
+ efi.canTouchEfiVariables = true;
+ };
+
+ kernelModules = [
+ "snd-seq"
+ "snd-rawmidi"
+ "xhci_hcd"
+ "kvm_intel"
+ ];
+
+ kernelParams = [
+ "debugfs=off"
+ "page_alloc.shuffle=1"
+ "slab_nomerge"
+ "page_poison=1"
+
+ # madaidan
+ "pti=on"
+ "randomize_kstack_offset=on"
+ "vsyscall=none"
+ "module.sig_enforce=1"
+ "lockdown=confidentiality"
+
+ # cpu
+ "spectre_v2=on"
+ "spec_store_bypass_disable=on"
+ "tsx=off"
+ "tsx_async_abort=full,nosmt"
+ "mds=full,nosmt"
+ "l1tf=full,force"
+ "nosmt=force"
+ "kvm.nx_huge_pages=force"
+
+ # hardened
+ "extra_latent_entropy"
+
+ # mineral
+ "init_on_alloc=1"
+ "random.trust_cpu=off"
+ "random.trust_bootloader=off"
+ "intel_iommu=on"
+ "amd_iommu=force_isolation"
+ "iommu=force"
+ "iommu.strict=1"
+ "init_on_free=1"
+ "quiet"
+ "loglevel=0"
+ ];
+
+ blacklistedKernelModules = [
+ "netrom"
+ "rose"
+
+ "adfs"
+ "affs"
+ "bfs"
+ "befs"
+ "cramfs"
+ "efs"
+ "erofs"
+ "exofs"
+ "freevxfs"
+ "f2fs"
+ "hfs"
+ "hpfs"
+ "jfs"
+ "minix"
+ "nilfs2"
+ "ntfs"
+ "omfs"
+ "qnx4"
+ "qnx6"
+ "sysv"
+ "ufs"
+ ];
+
+ kernel.sysctl = {
+ "kernel.ftrace_enabled" = false;
+ "net.core.bpf_jit_enable" = false;
+ "kernel.kptr_restrict" = 2;
+
+ # madaidan
+ "vm.swappiness" = 1;
+ "vm.unprivileged_userfaultfd" = 0;
+ "dev.tty.ldisc_autoload" = 0;
+ "kernel.kexec_load_disabled" = 1;
+ "kernel.sysrq" = 4;
+ "kernel.perf_event_paranoid" = 3;
+
+ # net
+ "net.ipv4.icmp_echo_ignore_broadcasts" = true;
+
+ "net.ipv4.conf.all.accept_redirects" = false;
+ "net.ipv4.conf.all.secure_redirects" = false;
+ "net.ipv4.conf.default.accept_redirects" = false;
+ "net.ipv4.conf.default.secure_redirects" = false;
+ "net.ipv6.conf.all.accept_redirects" = false;
+ "net.ipv6.conf.default.accept_redirects" = false;
+ };
+ };
+
+ networking = {
+ useDHCP = lib.mkDefault true;
+ hostName = config.monorepo.vars.hostName;
+ networkmanager = {
+ enable = true;
+ # wifi.macAddress = "";
+ };
+ firewall = {
+ allowedTCPPorts = [ ];
+ allowedUDPPorts = [ ];
+ };
+ };
+
+ hardware = {
+ enableAllFirmware = true;
+ cpu.intel.updateMicrocode = true;
+ graphics.enable = true;
+ pulseaudio.enable = ! config.monorepo.profiles.pipewire.enable;
+
+ bluetooth = {
+ enable = true;
+ powerOnBoot = true;
+ };
+ };
+
+ services = {
+ chrony = {
+ enable = true;
+ enableNTS = true;
+ servers = [ "time.cloudflare.com" "ptbtime1.ptb.de" "ptbtime2.ptb.de" ];
+ };
+
+ jitterentropy-rngd.enable = true;
+ resolved.dnssec = true;
+ # usbguard.enable = true;
+ usbguard.enable = false;
+ dbus.apparmor = "enabled";
+
+ tor = import ./tor.nix;
+ xserver = import ./xserver.nix;
+ pipewire = import ./pipewire.nix;
+ openssh = import ./ssh.nix;
+ kanata.enable = true;
+
+ # Misc.
+ udev = {
+ extraRules = '''';
+ packages = with pkgs; [
+ platformio-core
+ platformio-core.udev
+ openocd
+ ];
+ };
+
+ printing.enable = true;
+ udisks2.enable = true;
+ };
+
+ programs = {
+ nix-ld.enable = true;
+ zsh.enable = true;
+ light.enable = true;
+ ssh.enableAskPassword = false;
+ };
+
+ nixpkgs = {
+ hostPlatform = lib.mkDefault "x86_64-linux";
+ config = {
+ allowUnfree = true;
+ cudaSupport = lib.mkDefault false;
+ };
+ };
+
+ security = {
+ apparmor = {
+ enable = true;
+ killUnconfinedConfinables = true;
+ };
+
+ pam.loginLimits = [
+ { domain = "*"; item = "nofile"; type = "-"; value = "32768"; }
+ { domain = "*"; item = "memlock"; type = "-"; value = "32768"; }
+ ];
+ rtkit.enable = true;
+
+ lockKernelModules = true;
+ protectKernelImage = true;
+ allowSimultaneousMultithreading = false;
+ forcePageTableIsolation = true;
+
+ tpm2 = {
+ enable = true;
+ pkcs11.enable = true;
+ tctiEnvironment.enable = true;
+ };
+
+ auditd.enable = true;
+ audit.enable = true;
+ chromiumSuidSandbox.enable = true;
+ sudo.enable = true;
+ };
+
+ xdg.portal = {
+ enable = true;
+ wlr.enable = true;
+ extraPortals = with pkgs; [
+ xdg-desktop-portal-gtk
+ xdg-desktop-portal
+ xdg-desktop-portal-hyprland
+ ];
+ config.common.default = "*";
+ };
+
+ environment.systemPackages = with pkgs; [
+ tree
+ restic
+ sbctl
+ ];
+
+ users.users = {
+ root.openssh.authorizedKeys.keys = [
+ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINSshvS1N/42pH9Unp3Zj4gjqs9BXoin99oaFWYHXZDJ preston@preston-arch"
+ ];
+
+ "${config.monorepo.vars.userName}" = {
+ initialPassword = "${config.monorepo.vars.userName}";
+ isNormalUser = true;
+ description = config.monorepo.vars.fullName;
+ extraGroups = [ "networkmanager" "wheel" "video" "docker" "jackaudio" "tss" "dialout" ];
+ shell = pkgs.zsh;
+ packages = [];
+ };
+ };
+
+ nix.settings.experimental-features = "nix-command flakes";
+ time.timeZone = config.monorepo.vars.timeZone;
+ i18n.defaultLocale = "en_CA.UTF-8";
+ system.stateVersion = "24.11";
+}
diff --git a/nix/modules/default.nix b/nix/modules/default.nix
index b03d632..db5f82e 100644
--- a/nix/modules/default.nix
+++ b/nix/modules/default.nix
@@ -1,6 +1,186 @@
{ lib, config, pkgs, ... }:
{
imports = [
- ./home/secrets.nix
+ ./configuration.nix
];
+
+ options = {
+ monorepo = {
+ vars = import ./vars.nix;
+
+ profiles = {
+ documentation.enable = lib.mkEnableOption "Enables documentation on system.";
+ secureBoot.enable = lib.mkEnableOption "Enables secure boot. See sbctl.";
+ pipewire.enable = lib.mkEnableOption "Enables pipewire low latency audio setup";
+ tor.enable = lib.mkEnableOption "Enables tor along with torsocks";
+
+
+ home = {
+ enable = lib.mkEnableOption "Enables home manager desktop configuration";
+ # Programs
+ lang-c.enable = lib.mkEnableOption "Enables C language support";
+ lang-shell.enable = lib.mkEnableOption "Enables sh language support";
+ lang-rust.enable = lib.mkEnableOption "Enables Rust language support";
+ lang-python.enable = lib.mkEnableOption "Enables python language support";
+ lang-sol.enable = lib.mkEnableOption "Enables solidity language support";
+ lang-openscad.enable = lib.mkEnableOption "Enables openscad language support";
+ lang-js.enable = lib.mkEnableOption "Enables javascript language support";
+ lang-nix.enable = lib.mkEnableOption "Enables nix language support";
+
+ crypto.enable = lib.mkEnableOption "Enables various cryptocurrency wallets";
+ art.enable = lib.mkEnableOption "Enables various art programs";
+ music.enable = lib.mkEnableOption "Enables mpd";
+
+ hyprland = {
+ enable = lib.mkEnableOption "Enables hyprland";
+ monitors = lib.mkOption {
+ type = lib.types.listOf lib.types.str;
+ default = [
+ "HDMI-A-1"
+ "eDP-1"
+ "DP-2"
+ "DP-3"
+ "LVDS-1"
+ ];
+ example = [];
+ description = "Hyprland monitors";
+ };
+ };
+ email = {
+ email = lib.mkOption {
+ type = lib.types.str;
+ default = "ret2pop@gmail.com";
+ example = "john@example.com";
+ description = "Email address and imaps/smtps account";
+ };
+ imapsServer = lib.mkOption {
+ type = lib.types.str;
+ default = "imap.gmail.com";
+ example = "imap.example.com";
+ description = "imaps server address";
+ };
+ smtpsServer = lib.mkOption {
+ type = lib.types.str;
+ default = "smtp.gmail.com";
+ example = "smtp.example.com";
+ description = "smtp server address";
+ };
+ enable = lib.mkEnableOption "Enables email";
+ };
+ };
+ };
+ };
+ };
+
+ config = {
+ environment.systemPackages = lib.mkIf config.monorepo.profiles.documentation.enable (with pkgs; [
+ linux-manual
+ man-pages
+ man-pages-posix
+ ]);
+
+ home-manager.users."${config.monorepo.vars.userName}".home.packages = lib.flatten [
+ (lib.mkIf config.monorepo.home.email.enable [ pkgs.mu ])
+ (lib.mkIf config.monorepo.home.lang-c.enable (with pkgs; [
+ autobuild
+ clang
+ gdb
+ gnumake
+ bear
+ clang-tools
+ ]))
+
+ (lib.mkIf config.monorepo.home.lang-js.enable (with pkgs; [
+ nodejs
+ bun
+ yarn
+ typescript
+ vscode-langservers-extracted
+ ]))
+
+ (lib.mkIf config.monorepo.home.lang-rust.enable (with pkgs; [
+ cargo
+ rust-analyzer
+ rustfmt
+ ]))
+
+ (lib.mkIf config.monorepo.home.lang-python.enable (with pkgs; [
+ poetry
+ python3
+ python312Packages.jedi
+ ]))
+
+ (lib.mkIf config.monorepo.home.lang-sol.enable (with pkgs; [
+ solc
+ ]))
+
+ (lib.mkIf config.monorepo.home.lang-openscad.enable (with pkgs; [
+ openscad
+ openscad-lsp
+ ]))
+
+ (lib.mkIf config.monorepo.home.lang-sh.enable (with pkgs; [
+ bash-language-server
+ ]))
+
+ (lib.mkIf config.monorepo.home.lang-nix.enable (with pkgs; [
+ nil
+ nixd
+ nixfmt-rfc-style
+ ]))
+
+ (lib.mkIf config.monorepo.home.crypto.enable (with pkgs; [
+ bitcoin
+ electrum
+ monero-cli
+ monero-gui
+ ]))
+
+ (lib.mkIf config.monorepo.home.art.enable (with pkgs; [
+ inkscape
+ krita
+ ]))
+
+ (lib.mkIf config.monorepo.home.music.enable (with pkgs; [
+ mpc-cli
+ sox
+ ]))
+
+ (lib.mkIf config.monorepo.tor.enable (with pkgs; [
+ tor-browser
+ torsocks
+ ]))
+
+ (lib.mkIf config.monorepo.pipewire.enable (with pkgs; [
+ helvum
+ ]))
+ ];
+
+ monorepo = {
+ profiles = {
+ documentation.enable = lib.mkDefault true;
+ pipewire.enable = lib.mkDefault true;
+ tor.enable = lib.mkDefault true;
+ home = {
+ enable = lib.mkDefault true;
+ music.enable = lib.mkDefault config.monorepo.profiles.pipewire.enable;
+ hyprland.enable = lib.mkDefault true;
+ email.enable = lib.mkDefault true;
+
+ # Programming
+ lang-c.enable = lib.mkDefault true;
+ lang-rust.enable = lib.mkDefault true;
+ lang-python.enable = lib.mkDefault true;
+ lang-sol.enable = lib.mkDefault true;
+ lang-sh.enable = lib.mkDefault true;
+ lang-openscad.enable = lib.mkDefault true;
+ lang-js.enable = lib.mkDefault true;
+ lang-nix.enable = lib.mkDefault true;
+
+ crypto.enable = lib.mkDefault true;
+ art.enable = lib.mkDefault true;
+ };
+ };
+ };
+ };
}
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\..*)$"