diff --git a/flake.nix b/flake.nix index 29227be..8baf3e0 100644 --- a/flake.nix +++ b/flake.nix @@ -15,6 +15,14 @@ inputs.nixpkgs.follows = "os"; inputs.darwin.follows = "os-darwin"; inputs.smfh.follows = ""; + inputs.ndg.follows = ""; + }; + inputs.home-modules = { + url = "github:snugnug/hjem-rum"; + inputs.nixpkgs.follows = "os"; + inputs.hjem.follows = "home"; + inputs.ndg.follows = ""; + inputs.treefmt-nix.follows = ""; }; inputs.parts = { diff --git a/modules/bat.mod.nix b/modules/bat.mod.nix new file mode 100644 index 0000000..2feafe2 --- /dev/null +++ b/modules/bat.mod.nix @@ -0,0 +1,37 @@ +{ + homeModules.bat = + { + config, + lib, + pkgs, + ... + }: + let + inherit (lib.meta) getExe; + + package = getExe pkgs.bat; + theme = "base16"; + in + { + environment.sessionVariables = { + MANPAGER = "${package} --plain"; + PAGER = "${package} --plain"; + }; + + programs.nushell.aliases = { + cat = package; + less = "${package} --plain"; + }; + + packages = [ + pkgs.bat + ]; + + xdg.config.file."bat/config".text = '' + --theme=${theme} + --pager="${getExe pkgs.less} --quit-if-one-screen --RAW-CONTROL-CHARS" + ''; + + xdg.config.file."bat/themes/${theme}.tmTheme".text = config.theme.tmTheme; + }; +} diff --git a/modules/btop.mod.nix b/modules/btop.mod.nix new file mode 100644 index 0000000..57f56e3 --- /dev/null +++ b/modules/btop.mod.nix @@ -0,0 +1,22 @@ +{ + homeModules.btop = + { config, lib, pkgs, ... }: + let + inherit (lib.generators) toKeyValue; + + color_theme = "base16"; + in + { + packages = [ + pkgs.btop + ]; + + xdg.config.file."btop/themes/${color_theme}.theme".text = config.theme.btopTheme; + + xdg.config.file."btop/btop.conf".generator = toKeyValue { }; + xdg.config.file."btop/btop.conf".value = { + inherit color_theme; + rounded_corners = config.theme.cornerRadius > 0; + }; + }; +} diff --git a/modules/cinny-desktop.mod.nix b/modules/cinny-desktop.mod.nix new file mode 100644 index 0000000..12bdb80 --- /dev/null +++ b/modules/cinny-desktop.mod.nix @@ -0,0 +1,9 @@ +{ + homeModules.cinny-desktop = + { pkgs, ... }: + { + packages = [ + pkgs.cinny-desktop + ]; + }; +} diff --git a/modules/claude-code.mod.nix b/modules/claude-code.mod.nix new file mode 100644 index 0000000..44cd4a8 --- /dev/null +++ b/modules/claude-code.mod.nix @@ -0,0 +1,9 @@ +{ + homeModules.claude-code = + { pkgs, ... }: + { + packages = [ + pkgs.claude-code + ]; + }; +} diff --git a/modules/default-packages.mod.nix b/modules/default-packages.mod.nix deleted file mode 100644 index c1ccc03..0000000 --- a/modules/default-packages.mod.nix +++ /dev/null @@ -1,9 +0,0 @@ -let - commonModule = { - environment.defaultPackages = [ ]; - }; -in -{ - nixosModules.default-packages = commonModule; - darwinModules.default-packages = commonModule; -} diff --git a/modules/direnv.mod.nix b/modules/direnv.mod.nix new file mode 100644 index 0000000..e502614 --- /dev/null +++ b/modules/direnv.mod.nix @@ -0,0 +1,17 @@ +{ + homeModules.direnv = + { pkgs, ... }: + { + packages = [ + pkgs.direnv + pkgs.nix-direnv + ]; + + programs.direnv = { + enable = true; + + integrations.nix-direnv.enable = true; + integrations.nushell.enable = true; + }; + }; +} diff --git a/modules/discord.mod.nix b/modules/discord.mod.nix index ad2ba74..3d8e23d 100644 --- a/modules/discord.mod.nix +++ b/modules/discord.mod.nix @@ -1,5 +1,5 @@ -let - commonModule = +{ + homeModules.discord = { config, lib, @@ -10,15 +10,12 @@ let inherit (lib.lists) singleton; in { - home.extraModules = singleton { - xdg.config.files."Vencord/settings/quickCss.css".text = config.theme.discordCss; - }; - - environment.systemPackages = singleton ( - (pkgs.discord.override { - withOpenASAR = true; - withVencord = true; - }).overrideAttrs + packages = + singleton + (pkgs.discord.override { + withOpenASAR = true; + withVencord = true; + }).overrideAttrs (old: { nativeBuildInputs = old.nativeBuildInputs ++ [ pkgs.makeWrapper ]; @@ -27,11 +24,8 @@ let --set ELECTRON_OZONE_PLATFORM_HINT "auto" \ --add-flags "--enable-features=UseOzonePlatform --ozone-platform=wayland" ''; - }) - ); + }); + + xdg.config.files."Vencord/settings/quickCss.css".text = config.theme.discordCss; }; -in -{ - nixosModules.discord = commonModule; - darwinModules.discord = commonModule; } diff --git a/modules/fonts.mod.nix b/modules/fonts.mod.nix new file mode 100644 index 0000000..c5622ac --- /dev/null +++ b/modules/fonts.mod.nix @@ -0,0 +1,25 @@ +{ + nixosModules.fonts = + { config, pkgs, ... }: + { + console = { + earlySetup = true; + font = "Lat2-Terminus16"; + packages = [ pkgs.terminus_font ]; + }; + + fonts.packages = [ + config.theme.font.sans.package + config.theme.font.mono.package + + pkgs.noto-fonts + pkgs.noto-fonts-cjk-sans + pkgs.noto-fonts-lgc-plus + pkgs.noto-fonts-emoji + ]; + }; + + nixosModules.fonts-disable = { + fonts.fontconfig.enable = false; + }; +} diff --git a/modules/ghostty.mod.nix b/modules/ghostty.mod.nix new file mode 100644 index 0000000..a63d6de --- /dev/null +++ b/modules/ghostty.mod.nix @@ -0,0 +1,93 @@ +{ + homeModules.ghostty = + { + config, + lib, + pkgs, + ... + }: + let + inherit (lib.attrsets) mapAttrsToList; + inherit (lib.generators) toKeyValue; + inherit (lib.modules) mkIf; + in + { + environment.sessionVariables = { + TERMINAL = mkIf config.nixpkgs.system.isLinux "ghostty"; + TERM_PROGRAM = mkIf config.nixpkgs.system.isDarwin "ghostty"; + }; + + packages = mkIf config.nixpkgs.system.isLinux [ + pkgs.ghostty + ]; + + xdg.config.file."ghostty/config".generator = toKeyValue { }; + xdg.config.file."ghostty/config".value = { + font-size = config.theme.font.size.normal; + font-family = config.theme.font.mono.name; + + window-padding-x = config.theme.padding; + window-padding-y = config.theme.padding; + + # 100 MiB + scrollback-limit = 100 * 1024 * 1024; + + mouse-hide-while-typing = true; + + confirm-close-surface = false; + quit-after-last-window-closed = true; + + window-decoration = config.nixpkgs.system.isDarwin; + macos-titlebar-style = mkIf config.nixpkgs.system.isDarwin "tabs"; + + macos-option-as-alt = mkIf config.nixpkgs.system.isDarwin "left"; + + config-file = pkgs.writeText "base16-config" config.theme.ghosttyConfig; + + keybind = + mapAttrsToList (name: value: "ctrl+shift+${name}=${value}") { + c = "copy_to_clipboard"; + v = "paste_from_clipboard"; + + z = "jump_to_prompt:-2"; + x = "jump_to_prompt:2"; + + h = "write_scrollback_file:paste"; + i = "inspector:toggle"; + + page_down = "scroll_page_fractional:0.33"; + down = "scroll_page_lines:1"; + j = "scroll_page_lines:1"; + + page_up = "scroll_page_fractional:-0.33"; + up = "scroll_page_lines:-1"; + k = "scroll_page_lines:-1"; + + home = "scroll_to_top"; + end = "scroll_to_bottom"; + + enter = "reset_font_size"; + plus = "increase_font_size:1"; + minus = "decrease_font_size:1"; + + t = "new_tab"; + q = "close_surface"; + + "one" = "goto_tab:1"; + "two" = "goto_tab:2"; + "three" = "goto_tab:3"; + "four" = "goto_tab:4"; + "five" = "goto_tab:5"; + "six" = "goto_tab:6"; + "seven" = "goto_tab:7"; + "eight" = "goto_tab:8"; + "nine" = "goto_tab:9"; + "zero" = "goto_tab:10"; + } + ++ mapAttrsToList (name: value: "ctrl+${name}=${value}") { + "tab" = "next_tab"; + "shift+tab" = "previous_tab"; + }; + }; + }; +} diff --git a/modules/git.mod.nix b/modules/git.mod.nix new file mode 100644 index 0000000..21cc51d --- /dev/null +++ b/modules/git.mod.nix @@ -0,0 +1,168 @@ +{ self, ... }: +{ + homeModules.gh = + { lib, pkgs, ... }: + let + inherit (lib.generators) toYAML; + inherit (lib.meta) getExe; + + package = getExe pkgs.gh; + in + { + programs.nushell.aliases = { + "??" = "${package} copilot suggest --target shell --"; + "gh?" = "${package} copilot suggest --target gh --"; + "git?" = "${package} copilot suggest --target git --"; + }; + + packages = [ + pkgs.gh + ]; + + xdg.config.file."gh/config.yml".generator = toYAML { }; + xdg.config.file."gh/config.yml".value = { + git_protocol = "ssh"; + }; + }; + + homeModules.git = + { lib, pkgs, ... }: + let + inherit (lib.meta) getExe; + inherit (lib.generators) toINI; + + package = getExe pkgs.git; + in + { + programs.nushell.aliases = { + g = package; + + ga = "${package} add"; + gaa = "${package} add ./"; + + gab = "${package} absorb"; + gabr = "${package} absorb --and-rebase"; + + gb = "${package} branch"; + gbv = "${package} branch --verbose"; + + gc = "${package} commit"; + gca = "${package} commit --amend --no-edit"; + gcm = "${package} commit --message"; + gcam = "${package} commit --amend --message"; + + gcl = "${package} clone"; + + gd = "${package} diff"; + gds = "${package} diff --staged"; + + gp = "${package} push"; + gpf = "${package} push --force-with-lease"; + + gl = "${package} log"; + glo = "${package} log --oneline --graph"; + glp = "${package} log --patch --ext-diff"; + + gpl = "${package} pull"; + gplr = "${package} pull --rebase"; + gplff = "${package} pull --ff-only"; + + gr = "${package} recent"; + + grb = "${package} rebase"; + grba = "${package} rebase --abort"; + grbc = "${package} rebase --continue"; + grbi = "${package} rebase --interactive"; + grbm = "${package} rebase master"; + + grl = "${package} reflog"; + + grm = "${package} remote"; + grma = "${package} remote add"; + grmv = "${package} remote --verbose"; + grmsu = "${package} remote set-url"; + + grs = "${package} reset"; + grsh = "${package} reset --hard"; + + gs = "${package} stash"; + gsp = "${package} stash pop"; + + gsw = "${package} switch"; + gswm = "${package} switch master"; + + gsh = "${package} show --ext-diff"; + + gst = "${package} status"; + }; + + packages = [ + package + pkgs.difftastic + ]; + + xdg.config.file."git/config".generator = toINI { }; + xdg.config.file."git/config".value = { + user.name = "RGBCube"; + user.email = "git@rgbcu.be"; + + init.defaultBranch = "master"; + + commit.verbose = true; + + log.date = "iso"; + column.ui = "auto"; + + branch.sort = "-committerdate"; + tag.sort = "version:refname"; + + diff.algorithm = "histogram"; + diff.colorMoved = "default"; + + diff.external = getExe pkgs.difftastic; + diff.tool = "difftastic"; + difftool.difftastic.cmd = # sh + ''${getExe pkgs.difftastic} "$LOCAL" "$REMOTE"''; + + pull.rebase = true; + push.autoSetupRemote = true; + + merge.conflictStyle = "zdiff3"; + + rebase.autoSquash = true; + rebase.autoStash = true; + rebase.updateRefs = true; + + rerere.enabled = true; + + fetch.fsckObjects = true; + receive.fsckObjects = true; + transfer.fsckobjects = true; + + alias.recent = # sh + ''! ${package} branch --sort=-committerdate --format="%(committerdate:relative)%09%(refname:short)" | head -10''; + }; + }; + + homeModules.git-sign = + { config, lib, ... }: + let + inherit (lib.generators) toINI; + in + { + imports = [ self.homeModules.git ]; + + xdg.config.file."git/config".generator = toINI { }; + xdg.config.file."git/config".value = { + core.sshCommand = "ssh -i ${config.directory}/.ssh/id"; + + url."ssh://git@github.com/".insteadOf = "https://github.com/"; + + commit.gpgSign = true; + tag.gpgSign = true; + + gpg.format = "ssh"; + user.signingKey = "~/.ssh/id"; + }; + }; +} diff --git a/modules/hardware.mod.nix b/modules/hardware.mod.nix index 9aa0d0f..7f3fcab 100644 --- a/modules/hardware.mod.nix +++ b/modules/hardware.mod.nix @@ -1,4 +1,3 @@ -# Abstraction module for hardware configuration. { nixosModules.hardware-report = { inputs, lib, ... }: diff --git a/modules/home-modules.mod.nix b/modules/home-modules.mod.nix new file mode 100644 index 0000000..8d4a4a8 --- /dev/null +++ b/modules/home-modules.mod.nix @@ -0,0 +1,6 @@ +{ inputs, ... }: +{ + homeModules.home-modules = { + imports = [ inputs.home-modules.hjemModules.hjem-rum ]; + }; +} diff --git a/modules/home.mod.nix b/modules/home.mod.nix index d7f2b77..eb13a5f 100644 --- a/modules/home.mod.nix +++ b/modules/home.mod.nix @@ -1,66 +1,76 @@ -let - commonModule = - { lib, pkgs, ... }: +{ self, ... }: +{ + homeModules.home = + { + config, + lib, + pkgs, + ... + }: + let inherit (lib.modules) mkAliasOptionModule; in { - imports = [ (mkAliasOptionModule [ "home" ] [ "hjem" ]) ]; + imports = [ + (mkAliasOptionModule [ "programs" ] [ "rum" "programs" ]) + ]; - home = - { config, lib, ... }: + # Temporary hack to make sure hjem sees the defaults are + # changed and thus sets the appropriate XDG variables. + # Remove after hjem gets proper Darwin support. + options = + let + inherit (lib.lists) range; + inherit (lib.modules) mkForce; + inherit (lib.strings) concatStrings; + inherit (lib.trivial) const; + + hasToBeChanged = range 0 (4096 / 2) |> map (const "No") |> concatStrings; + in { - # Temporary hack to make sure hjem sees the defaults are - # changed and thus sets the appropriate XDG variables. - # Remove after hjem gets proper Darwin support. - options = - let - inherit (lib.lists) range; - inherit (lib.modules) mkForce; - inherit (lib.strings) concatStrings; - inherit (lib.trivial) const; - - hasToBeChanged = range 0 (4096 / 2) - |> map (const "No") - |> concatStrings; - in - { - xdg.cache.directory.default = mkForce hasToBeChanged; - xdg.config.directory.default = mkForce hasToBeChanged; - xdg.data.directory.default = mkForce hasToBeChanged; - xdg.state.directory.default = mkForce hasToBeChanged; - }; - - config = { - linker = pkgs.smfh; - - # These are already the default on Linux, but on Darwin they differ. - xdg.cache.directory = "${config.directory}/.cache"; - xdg.config.directory = "${config.directory}/.config"; - xdg.data.directory = "${config.directory}/.local/share"; - xdg.state.directory = "${config.directory}/.local/state"; - }; + xdg.cache.directory.default = mkForce hasToBeChanged; + xdg.config.directory.default = mkForce hasToBeChanged; + xdg.data.directory.default = mkForce hasToBeChanged; + xdg.state.directory.default = mkForce hasToBeChanged; }; + + config = { + linker = pkgs.smfh; + + # These are already the default on Linux, but on Darwin they differ. + xdg.cache.directory = "${config.directory}/.cache"; + xdg.config.directory = "${config.directory}/.config"; + xdg.data.directory = "${config.directory}/.local/share"; + xdg.state.directory = "${config.directory}/.local/state"; + }; }; -in -{ + nixosModules.home = - { inputs, ... }: + { inputs, lib, ... }: + let + inherit (lib.modules) mkAliasOptionModule; + in { imports = [ inputs.home.nixosModules.hjem + (mkAliasOptionModule [ "home" ] [ "hjem" ]) - commonModule + { home.extraModules = [ self.homeModules.home ]; } ]; }; darwinModules.home = - { inputs, ... }: + { inputs, lib, ... }: + let + inherit (lib.modules) mkAliasOptionModule; + in { imports = [ inputs.home.darwinModules.hjem + (mkAliasOptionModule [ "home" ] [ "hjem" ]) - commonModule + { home.extraModules = [ self.homeModules.home ]; } ]; }; } diff --git a/modules/hostname.mod.nix b/modules/hostname.mod.nix new file mode 100644 index 0000000..0b4b953 --- /dev/null +++ b/modules/hostname.mod.nix @@ -0,0 +1,10 @@ +{ + darwinModules.hostname = + { config, ... }: + { + system.defaults.smb = { + NetBIOSName = config.networking.hostName; + ServerDescription = config.networking.hostName; + }; + }; +} diff --git a/modules/jujutsu.mod.nix b/modules/jujutsu.mod.nix index 17a87b5..badd8a8 100644 --- a/modules/jujutsu.mod.nix +++ b/modules/jujutsu.mod.nix @@ -1,5 +1,5 @@ -let - commonModule = +{ + homeModules.jujutsu = { config, lib, @@ -7,193 +7,185 @@ let ... }: let - inherit (lib.lists) singleton; inherit (lib.meta) getExe; inherit (lib.generators) toTOML; - in { - environment.systemPackages = [ + packages = [ pkgs.difftastic pkgs.jujutsu pkgs.mergiraf pkgs.radicle-node ]; - home.extraModules = singleton { - xdg.config.file."jj/config.toml".generator = toTOML; - xdg.config.file."jj/config.toml".value = { - user.name = "RGBCube"; - user.email = "git@rgbcu.be"; + xdg.config.file."jj/config.toml".generator = toTOML; + xdg.config.file."jj/config.toml".value = { + user.name = "RGBCube"; + user.email = "git@rgbcu.be"; - aliases.".." = [ - "edit" - "@-" - ]; - aliases.",," = [ - "edit" - "@+" - ]; + aliases.".." = [ + "edit" + "@-" + ]; + aliases.",," = [ + "edit" + "@+" + ]; - aliases.f = [ "fetch" ]; - aliases.fetch = [ - "git" - "fetch" - ]; + aliases.f = [ "fetch" ]; + aliases.fetch = [ + "git" + "fetch" + ]; - aliases.p = [ "push" ]; - aliases.push = [ - "git" - "push" - ]; + aliases.p = [ "push" ]; + aliases.push = [ + "git" + "push" + ]; - aliases.cl = [ "clone" ]; - aliases.clone = [ - "git" - "clone" - "--colocate" - ]; + aliases.cl = [ "clone" ]; + aliases.clone = [ + "git" + "clone" + "--colocate" + ]; - aliases.i = [ "init" ]; - aliases.init = [ - "git" - "init" - "--colocate" - ]; + aliases.i = [ "init" ]; + aliases.init = [ + "git" + "init" + "--colocate" + ]; - aliases.a = [ "abandon" ]; + aliases.a = [ "abandon" ]; - aliases.c = [ "commit" ]; - aliases.ci = [ - "commit" - "--interactive" - ]; + aliases.c = [ "commit" ]; + aliases.ci = [ + "commit" + "--interactive" + ]; - aliases.d = [ "diff" ]; + aliases.d = [ "diff" ]; - aliases.e = [ "edit" ]; + aliases.e = [ "edit" ]; - aliases.l = [ "log" ]; - aliases.la = [ - "log" - "--revisions" - "::" - ]; - aliases.ls = [ - "log" - "--summary" - ]; - aliases.lsa = [ - "log" - "--summary" - "--revisions" - "::" - ]; - aliases.lp = [ - "log" - "--patch" - ]; - aliases.lpa = [ - "log" - "--patch" - "--revisions" - "::" - ]; + aliases.l = [ "log" ]; + aliases.la = [ + "log" + "--revisions" + "::" + ]; + aliases.ls = [ + "log" + "--summary" + ]; + aliases.lsa = [ + "log" + "--summary" + "--revisions" + "::" + ]; + aliases.lp = [ + "log" + "--patch" + ]; + aliases.lpa = [ + "log" + "--patch" + "--revisions" + "::" + ]; - aliases.r = [ "rebase" ]; + aliases.r = [ "rebase" ]; - aliases.res = [ "resolve" ]; + aliases.res = [ "resolve" ]; - aliases.resa = [ "resolve-ast" ]; - aliases.resolve-ast = [ - "resolve" - "--tool" - "${getExe pkgs.mergiraf}" - ]; + aliases.resa = [ "resolve-ast" ]; + aliases.resolve-ast = [ + "resolve" + "--tool" + "${getExe pkgs.mergiraf}" + ]; - aliases.s = [ "squash" ]; - aliases.si = [ - "squash" - "--interactive" - ]; + aliases.s = [ "squash" ]; + aliases.si = [ + "squash" + "--interactive" + ]; - aliases.sh = [ "show" ]; + aliases.sh = [ "show" ]; - aliases.t = [ "tug" ]; - aliases.tug = [ - "bookmark" - "move" - "--from" - "closest(@-)" - "--to" - "closest_pushable(@)" - ]; + aliases.t = [ "tug" ]; + aliases.tug = [ + "bookmark" + "move" + "--from" + "closest(@-)" + "--to" + "closest_pushable(@)" + ]; - aliases.u = [ "undo" ]; + aliases.u = [ "undo" ]; - revset-aliases."closest(to)" = # python - '' - heads(::to & bookmarks()) - ''; - revset-aliases."closest_pushable(to)" = # python - '' - heads(::to & ~description(exact:"") & (~empty() | merges())) - ''; + revset-aliases."closest(to)" = # python + '' + heads(::to & bookmarks()) + ''; + revset-aliases."closest_pushable(to)" = # python + '' + heads(::to & ~description(exact:"") & (~empty() | merges())) + ''; - revsets.log = # python - '' - present(@) | present(trunk()) | ancestors(remote_bookmarks().. | @.., 8) - ''; + revsets.log = # python + '' + present(@) | present(trunk()) | ancestors(remote_bookmarks().. | @.., 8) + ''; - ui.default-command = "ls"; + ui.default-command = "ls"; - ui.diff-editor = ":builtin"; - ui.diff-formatter = [ - "${getExe pkgs.difftastic}" - "--color" - "always" - "$left" - "$right" - ]; + ui.diff-editor = ":builtin"; + ui.diff-formatter = [ + "${getExe pkgs.difftastic}" + "--color" + "always" + "$left" + "$right" + ]; - ui.conflict-marker-style = "snapshot"; - ui.graph.style = if config.theme.cornerRadius > 0 then "curved" else "square"; + ui.conflict-marker-style = "snapshot"; + ui.graph.style = if config.theme.cornerRadius > 0 then "curved" else "square"; - templates.draft_commit_description = # python - '' - concat( - coalesce(description, "\n"), - surround( - "\nJJ: This commit contains the following changes:\n", "", - indent("JJ: ", diff.stat(72)), - ), - "\nJJ: ignore-rest\n", - diff.git(), - ) - ''; + templates.draft_commit_description = # python + '' + concat( + coalesce(description, "\n"), + surround( + "\nJJ: This commit contains the following changes:\n", "", + indent("JJ: ", diff.stat(72)), + ), + "\nJJ: ignore-rest\n", + diff.git(), + ) + ''; - templates.git_push_bookmark = # python - '' - "change-rgbcube-" ++ change_id.short() - ''; + templates.git_push_bookmark = # python + '' + "change-rgbcube-" ++ change_id.short() + ''; - git.auto-local-bookmark = true; + git.auto-local-bookmark = true; - git.fetch = [ - "origin" - "upstream" - "rad" - ]; - git.push = "origin"; + git.fetch = [ + "origin" + "upstream" + "rad" + ]; + git.push = "origin"; - signing.backend = "ssh"; - signing.behavior = "own"; - signing.key = "~/.ssh/id"; - }; + signing.backend = "ssh"; + signing.behavior = "own"; + signing.key = "~/.ssh/id"; }; }; -in -{ - nixosModules.jujutsu = commonModule; - darwinModules.jujutsu = commonModule; } diff --git a/modules/krita.mod.nix b/modules/krita.mod.nix new file mode 100644 index 0000000..a5dc5ae --- /dev/null +++ b/modules/krita.mod.nix @@ -0,0 +1,9 @@ +{ + homeModules.krita = + { pkgs, ... }: + { + packages = [ + pkgs.krita + ]; + }; +} diff --git a/modules/localisation.mod.nix b/modules/localisation.mod.nix new file mode 100644 index 0000000..0e44078 --- /dev/null +++ b/modules/localisation.mod.nix @@ -0,0 +1,44 @@ +{ + darwinModules.localisation = { + system.defaults.NSGlobalDomain = { + AppleICUForce24HourTime = true; + + AppleMeasurementUnits = "Centimeters"; + AppleMetricUnits = 1; + AppleTemperatureUnit = "Celsius"; + }; + }; + + nixosModules.localisation = + { pkgs, ... }: + { + console.keyMap = + pkgs.writeText "trq-swapped-i.map" # hs + '' + include "${pkgs.kbd}/share/keymaps/i386/qwerty/trq.map" + + keycode 23 = i + altgr keycode 23 = +icircumflex + altgr shift keycode 23 = +Icircumflex + + keycode 40 = +dotlessi +Idotabove + ''; + + i18n.defaultLocale = "C.UTF-8"; + }; + + homeModules.localisation-linux = { + xdg.config.file."xkb/symbols/tr-swapped-i".text = # rs + '' + default partial + xkb_symbols "basic" { + include "tr(basic)" + + name[Group1]="Turkish (i and ı swapped)"; + + key { type[group1] = "FOUR_LEVEL_SEMIALPHABETIC", [ idotless, Iabovedot, paragraph , none ]}; + key { type[group1] = "FOUR_LEVEL_SEMIALPHABETIC", [ i , I , apostrophe, dead_caron ]}; + }; + ''; + }; +} diff --git a/modules/network-tools.mod.nix b/modules/network-tools.mod.nix new file mode 100644 index 0000000..7791197 --- /dev/null +++ b/modules/network-tools.mod.nix @@ -0,0 +1,41 @@ +{ + homeModules.network-tools = + { pkgs, ... }: + { + packages = [ + (pkgs.curl.override { + gnutlsSupport = false; + opensslSupport = false; + wolfsslSupport = false; + rustlsSupport = true; + + brotliSupport = true; + zlibSupport = true; + zstdSupport = true; + + c-aresSupport = true; + + http2Support = true; + http3Support = true; + + gsaslSupport = true; + + idnSupport = true; + ldapSupport = true; + pslSupport = true; + rtmpSupport = true; + scpSupport = true; + websocketSupport = true; + }) + + (pkgs.xh.override { + wihtNativeTls = false; # Use rustls. + }) + + pkgs.dig + pkgs.doggo + + pkgs.dublin-traceroute + ]; + }; +} diff --git a/modules/nix.mod.nix b/modules/nix.mod.nix index 013412f..3cfed8e 100644 --- a/modules/nix.mod.nix +++ b/modules/nix.mod.nix @@ -9,25 +9,20 @@ let ... }: let - inherit (lib) + inherit (lib.attrsets) attrsToList - concatStringsSep - const filterAttrs - flip - id - isType mapAttrs mapAttrsToList - mkAfter optionalAttrs - optionals ; + inherit (lib.lists) filter optionals singleton; + inherit (lib.modules) mkMerge; + inherit (lib.strings) concatStringsSep toJSON; + inherit (lib.trivial) const flip id; + inherit (lib.types) isType; - inherit (lib.lists) filter singleton; - inherit (lib.strings) toJSON; - - registryMap = inputs |> filterAttrs (const <| isType "flake"); + registryMap = filterAttrs (const <| isType "flake") inputs; in { environment.systemPackages = [ @@ -38,6 +33,7 @@ let # We don't want inputs to be garbage collected away because if # that happens rebuilds need to re-fetch everything. + # TODO: Don't do this on servers. environment.etc.".system-inputs.json".text = toJSON registryMap; nix.distributedBuilds = true; @@ -70,7 +66,7 @@ let options = "--delete-older-than 3d"; } - (optionalAttrs config.isLinux { + (optionalAttrs config.nixpkgs.system.isLinux { dates = "weekly"; persistent = true; }) @@ -79,37 +75,38 @@ let nix.nixPath = registryMap |> mapAttrsToList (name: value: "${name}=${value}") - |> (if config.isDarwin then concatStringsSep ":" else id); + |> (if config.nixpkgs.system.isDarwin then concatStringsSep ":" else id); nix.registry = registryMap // { default = inputs.nixpkgs; } |> mapAttrs (_: flake: { inherit flake; }); nix.settings = (import <| self + /flake.nix).nixConfig - |> flip removeAttrs (optionals config.isDarwin [ "use-cgroups" ]); + |> flip removeAttrs (optionals config.nixpkgs.system.isDarwin [ "use-cgroups" ]); nix.optimise.automatic = true; home.extraModules = singleton { - xdg.config.file."nushell/config.nu".text = mkAfter '' - def --wrapped * [program: string = "", ...arguments] { - if ($program | str contains "#") or ($program | str contains ":") { - nix run $program -- ...$arguments - } else { - nix run ("default#" + $program) -- ...$arguments - } - } - - def --wrapped > [...programs] { - nix shell ...($programs | each { - if ($in | str contains "#") or ($in | str contains ":") { - $in + programs.nushell.extraConfig = # nu + '' + def --wrapped * [program: string = "", ...arguments] { + if ($program | str contains "#") or ($program | str contains ":") { + nix run $program -- ...$arguments } else { - "default#" + $in + nix run ("default#" + $program) -- ...$arguments } - }) - } - ''; + } + + def --wrapped > [...programs] { + nix shell ...($programs | each { + if ($in | str contains "#") or ($in | str contains ":") { + $in + } else { + "default#" + $in + } + }) + } + ''; }; }; in diff --git a/modules/read-only.mod.nix b/modules/nixpkgs-read-only.mod.nix similarity index 50% rename from modules/read-only.mod.nix rename to modules/nixpkgs-read-only.mod.nix index f551703..2f18e43 100644 --- a/modules/read-only.mod.nix +++ b/modules/nixpkgs-read-only.mod.nix @@ -2,6 +2,6 @@ let commonModule = { inputs, ... }: inputs.os + /nixos/modules/misc/nixpkgs/read-only.nix; in { - nixosModules.read-only = commonModule; - darwinModules.read-only = commonModule; + nixosModules.nixpkgs-read-only = commonModule; + darwinModules.nixpkgs-read-only = commonModule; } diff --git a/modules/nuke-default-packages.mod.nix b/modules/nuke-default-packages.mod.nix new file mode 100644 index 0000000..b17f629 --- /dev/null +++ b/modules/nuke-default-packages.mod.nix @@ -0,0 +1,9 @@ +let + commonModule = { + environment.defaultPackages = [ ]; + }; +in +{ + nixosModules.nuke-default-packages = commonModule; + darwinModules.nuke-default-packages = commonModule; +} diff --git a/modules/obs-studio.mod.nix b/modules/obs-studio.mod.nix new file mode 100644 index 0000000..c90e7be --- /dev/null +++ b/modules/obs-studio.mod.nix @@ -0,0 +1,9 @@ +{ + homeModules.obs-studio = + { pkgs, ... }: + { + packages = [ + pkgs.obs-studio + ]; + }; +} diff --git a/modules/python.mod.nix b/modules/python.mod.nix index 8de0387..74641e9 100644 --- a/modules/python.mod.nix +++ b/modules/python.mod.nix @@ -1,22 +1,18 @@ -let - commonModule = +{ + homeModules.python = { pkgs, ... }: let package = pkgs.python314; in { - environment.variables = { + environment.sessionVariables = { UV_PYTHON_PREFERENCE = "system"; UV_PYTHON = "${package}"; }; - environment.systemPackages = [ + packages = [ package pkgs.uv ]; }; -in -{ - nixosModules.python = commonModule; - darwinModules.python = commonModule; } diff --git a/modules/qbittorrent-client.mod.nix b/modules/qbittorrent-client.mod.nix new file mode 100644 index 0000000..edd6355 --- /dev/null +++ b/modules/qbittorrent-client.mod.nix @@ -0,0 +1,9 @@ +{ + homeModules.qbittorrent-client = + { pkgs, ... }: + { + packages = [ + pkgs.qbittorrent + ]; + }; +} diff --git a/modules/ripgrep.mod.nix b/modules/ripgrep.mod.nix index bdf54e6..fa50cfa 100644 --- a/modules/ripgrep.mod.nix +++ b/modules/ripgrep.mod.nix @@ -1,27 +1,23 @@ -let - commonModule = +{ + homeModules.ripgrep = { lib, pkgs, ... }: let - inherit (lib.lists) singleton; + inherit (lib.meta) getExe; inherit (lib.strings) concatLines; + + package = pkgs.ripgrep; in { - environment.systemPackages = [ - pkgs.ripgrep + package = [ + package ]; - environment.shellAliases.todo = # sh - ''rg "todo|fixme" --colors match:fg:yellow --colors match:style:bold''; + programs.nushell.aliases.todo = # sh + ''${getExe package} "todo|fixme" --colors match:fg:yellow --colors match:style:bold''; - home.sharedModules = singleton { - xdg.config."ripgrep/ripgreprc".text = concatLines [ - "--line-number" - "--smart-case" - ]; - }; + xdg.config."ripgrep/ripgreprc".text = concatLines [ + "--line-number" + "--smart-case" + ]; }; -in -{ - nixosModules.ripgrep = commonModule; - darwinModules.ripgrep = commonModule; } diff --git a/modules/rust.mod.nix b/modules/rust.mod.nix new file mode 100644 index 0000000..da80089 --- /dev/null +++ b/modules/rust.mod.nix @@ -0,0 +1,39 @@ +{ + homeModules.rust = + { + config, + lib, + pkgs, + ... + }: + let + inherit (lib.modules) mkIf; + inherit (lib.strings) makeLibraryPath; + in + { + environment.sessionVariables = { + CARGO_NET_GIT_FETCH_WITH_CLI = "true"; + + LIBRARY_PATH = mkIf config.nixpkgs.system.isDarwin <| makeLibraryPath [ pkgs.libiconv ]; + }; + + packages = [ + pkgs.cargo-deny + pkgs.cargo-expand + pkgs.cargo-fuzz + pkgs.cargo-nextest + + pkgs.evcxr + + pkgs.taplo + + (pkgs.fenix.complete.withComponents [ + "cargo" + "clippy" + "rust-src" + "rustc" + "rustfmt" + ]) + ]; + }; +} diff --git a/modules/secrets-manager.mod.nix b/modules/secrets-manager.mod.nix index 4e85c46..6dc8b7e 100644 --- a/modules/secrets-manager.mod.nix +++ b/modules/secrets-manager.mod.nix @@ -1,5 +1,5 @@ -let - commonModule = +{ + homeModules.secrets-manager = { config, lib, @@ -13,14 +13,11 @@ let package = pkgs.ragenix; in { - environment.systemPackages = [ + programs.nushell.aliases = # sh + ''${getExe package} --identity ${head config.age.identityPaths}''; + + packages = [ package ]; - - environment.shellAliases.ragenix = "${getExe package} --identity ${head config.age.identityPaths}"; }; -in -{ - nixosModules.secrets-manager = commonModule; - darwinModules.secrets-manager = commonModule; } diff --git a/modules/secrets.mod.nix b/modules/secrets.mod.nix index f754f28..873bd00 100644 --- a/modules/secrets.mod.nix +++ b/modules/secrets.mod.nix @@ -4,7 +4,11 @@ let let inherit (lib.modules) mkAliasOptionModule; in - mkAliasOptionModule [ "secrets" ] [ "age" "secrets" ]; + { + imports = [ (mkAliasOptionModule [ "secrets" ] [ "age" "secrets" ]) ]; + + age.identityPaths = [ "/etc/age/id" ]; + }; in { nixosModules.secrets = @@ -15,8 +19,6 @@ in commonModule ]; - - age.identityPaths = [ "/etc/age/id" ]; }; darwinModules.secrets = @@ -27,7 +29,5 @@ in commonModule ]; - - age.identityPaths = [ "/etc/age/id" ]; }; } diff --git a/modules/shell-utils.mod.nix b/modules/shell-utils.mod.nix new file mode 100644 index 0000000..c6b65a7 --- /dev/null +++ b/modules/shell-utils.mod.nix @@ -0,0 +1,9 @@ +{ + homeModules.shell-utils = { pkgs, ...}: { + packages = [ + pkgs.moreutils + pkgs.jc + pkgs.tokei + ]; + }; +} diff --git a/modules/sudo.mod.nix b/modules/sudo.mod.nix new file mode 100644 index 0000000..5338d4d --- /dev/null +++ b/modules/sudo.mod.nix @@ -0,0 +1,41 @@ +let + extraConfig = # sudoers + '' + Defaults lecture = never + Defaults pwfeedback + Defaults env_keep += "DISPLAY EDITOR PATH" + ''; +in +{ self, ... }: +{ + nixosModules.sudo = { + security.sudo.enable = false; + + security.sudo-rs = { + enable = true; + + execWheelOnly = true; + inherit extraConfig; + }; + }; + + nixosModules.sudo-server = { + imports = [ self.nixosModules.sudo ]; + + security.sudo.extraConfig = # sudoers + '' + Defaults timestamp_timeout = 0 + ''; + }; + + darwinModules.sudo = { + security.pam.services.sudo_local = { + enable = true; + touchIdAuth = true; + }; + + security.sudo = { + inherit extraConfig; + }; + }; +} diff --git a/modules/tailscale.mod.nix b/modules/tailscale.mod.nix new file mode 100644 index 0000000..b1af2c9 --- /dev/null +++ b/modules/tailscale.mod.nix @@ -0,0 +1,35 @@ +{ + homeModules.tailscale-linux = + { lib, pkgs, ... }: + let + inherit (lib.meta) getExe; + + package = getExe pkgs.tailscale; + in + { + programs.nushell.aliases = { + ts = "sudo ${package}"; + }; + + packages = [ + package + ]; + }; + + homeModules.tailscale-darwin = + { lib, pkgs, ... }: + let + inherit (lib.meta) getExe; + + package = getExe pkgs.tailscale; + in + { + programs.nushell.aliases = { + ts = package; + }; + + packages = [ + package + ]; + }; +} diff --git a/modules/termbin.mod.nix b/modules/termbin.mod.nix index 8c0526e..fc7947b 100644 --- a/modules/termbin.mod.nix +++ b/modules/termbin.mod.nix @@ -1,5 +1,5 @@ -let - commonModule = +{ + homeModules.termbin = { lib, pkgs, ... }: let inherit (lib.attrsets) genAttrs; @@ -7,15 +7,14 @@ let inherit (lib.trivial) const; in { - environment.shellAliases = + programs.nushell.aliases = genAttrs [ "termbin" "tb" ] - <| const "${getExe pkgs.netcat} termbin.com 9999"; + <| + const + # sh + ''${getExe pkgs.netcat} termbin.com 9999''; }; -in -{ - nixosModules.termbin = commonModule; - darwinModules.termbin = commonModule; } diff --git a/modules/theme.mod.nix b/modules/theme.mod.nix new file mode 100644 index 0000000..5a1f2f2 --- /dev/null +++ b/modules/theme.mod.nix @@ -0,0 +1,40 @@ +let + commonModule = + { lib, pkgs, themes, ... }: + let + inherit (lib.modules) mkOption mkDefault; + inherit (lib.types) attrs; + in + { + options.theme = mkOption { + type = attrs; + description = "Theme configuration for the system"; + default = { }; + }; + + config.theme = mkDefault (themes.custom (themes.raw.gruvbox-dark-hard // { + cornerRadius = 4; + borderWidth = 2; + + margin = 0; + padding = 8; + + font.size.normal = 16; + font.size.big = 20; + + font.sans.name = "Lexend"; + font.sans.package = pkgs.lexend; + + font.mono.name = "JetBrainsMono Nerd Font"; + font.mono.package = pkgs.nerd-fonts.jetbrains-mono; + + icons.name = "Gruvbox-Plus-Dark"; + icons.package = pkgs.gruvbox-plus-icons; + })); + }; +in +{ + nixosModules.theme = commonModule; + darwinModules.theme = commonModule; + homeModules.theme = commonModule; +} \ No newline at end of file diff --git a/modules/thunderbird.mod.nix b/modules/thunderbird.mod.nix new file mode 100644 index 0000000..ed8ff8b --- /dev/null +++ b/modules/thunderbird.mod.nix @@ -0,0 +1,9 @@ +{ + homeModules.thunderbird = + { pkgs, ... }: + { + packages = [ + pkgs.thunderbird + ]; + }; +} diff --git a/modules/torrent-client.mod.nix b/modules/torrent-client.mod.nix new file mode 100644 index 0000000..f2cb37a --- /dev/null +++ b/modules/torrent-client.mod.nix @@ -0,0 +1,9 @@ +{ + homeModules.torrent-client = { pkgs, ... }: { + # TODO: xdg.mime + + packages = [ + pkgs.qbittorrent + ]; + }; +} diff --git a/modules/unfree.mod.nix b/modules/unfree.mod.nix new file mode 100644 index 0000000..b1ea1c3 --- /dev/null +++ b/modules/unfree.mod.nix @@ -0,0 +1,24 @@ +let + commonModule = + { config, lib, ... }: + let + inherit (lib.modules) mkOption; + inherit (lib.types) listOf str; + inherit (lib.lists) elem; + in + { + options.nixpkgs.config.allowedUnfreePackageNames = mkOption { + type = listOf str; + default = [ ]; + description = "List of unfree package names to allow"; + example = [ "discord" "vscode" ]; + }; + + config.nixpkgs.config.allowUnfreePredicate = package: + elem package.pname config.nixpkgs.config.allowedUnfreePackageNames; + }; +in +{ + nixosModules.unfree = commonModule; + darwinModules.unfree = commonModule; +} \ No newline at end of file diff --git a/modules/video-player.mod.nix b/modules/video-player.mod.nix new file mode 100644 index 0000000..9619a62 --- /dev/null +++ b/modules/video-player.mod.nix @@ -0,0 +1,24 @@ +{ + homeModules.video-player = + { + config, + lib, + pkgs, + ... + }: + let + inherit (lib.modules) optionals; + in + { + # TODO: xdg-mime + + packages = [ + ] + ++ optionals config.nixpkgs.system.isLinux [ + pkgs.haruna + ] + ++ optionals config.nixpkgs.system.isDarwin [ + pkgs.iina + ]; + }; +} diff --git a/modules/vivid.mod.nix b/modules/vivid.mod.nix new file mode 100644 index 0000000..dbc9dcb --- /dev/null +++ b/modules/vivid.mod.nix @@ -0,0 +1,20 @@ +{ + homeModules.vivid = + { lib, pkgs, ... }: + let + inherit (lib.meta) getExe; + inherit (lib.strings) readFile; + in + { + packages = [ + pkgs.vivid + ]; + + # Yes, IFD. Deal with it. + environment.sessionVariables.LS_COLORS = + readFile + <| pkgs.runCommand "ls_colors.txt" { } '' + ${getExe pkgs.vivid} generate gruvbox-dark-hard > $out + ''; + }; +} diff --git a/modules/w3m-ddg.mod.nix b/modules/w3m-ddg.mod.nix new file mode 100644 index 0000000..1b7c597 --- /dev/null +++ b/modules/w3m-ddg.mod.nix @@ -0,0 +1,17 @@ +{ + homeModules.w3m-ddg = + { lib, pkgs, ... }: + let + inherit (lib.meta) getExe; + + package = pkgs.w3m; + in + { + programs.nushell.aliases.ddg = # sh + ''${getExe package} lite.duckduckgo.com''; + + packages = [ + package + ]; + }; +} diff --git a/modules/web.mod.nix b/modules/web.mod.nix deleted file mode 100644 index a851258..0000000 --- a/modules/web.mod.nix +++ /dev/null @@ -1,23 +0,0 @@ -let - commonModule = - { lib, pkgs, ... }: - let - inherit (lib.meta) getExe; - - package = pkgs.w3m; - in - { - environment.systemPackages = [ - package - ]; - - environment.shellAliases = { - ddg = "${getExe package} lite.duckduckgo.com"; - web = "${getExe package}"; - }; - }; -in -{ - nixosModules.web = commonModule; - darwinModules.web = commonModule; -} diff --git a/modules/whatsapp.mod.nix b/modules/whatsapp.mod.nix new file mode 100644 index 0000000..402c34b --- /dev/null +++ b/modules/whatsapp.mod.nix @@ -0,0 +1,9 @@ +{ + homeModules.whatsapp = + { pkgs, ... }: + { + packages = [ + pkgs.whatsapp-for-linux + ]; + }; +} diff --git a/modules/zen-browser.mod.nix b/modules/zen-browser.mod.nix new file mode 100644 index 0000000..9904064 --- /dev/null +++ b/modules/zen-browser.mod.nix @@ -0,0 +1,180 @@ +{ + homeModules.zen-browser = + { + config, + lib, + pkgs, + ... + }: + let + inherit (lib.modules) mkIf; + + lockedAs = + Value: attrs: + attrs + // { + inherit Value; + Locked = true; + }; + + locked = attrs: attrs // { Locked = true; }; + + policies = { + AutofillAddressEnabled = false; + AutofillCreditCardEnabled = false; + + DisableAppUpdate = true; + AppAutoUpdate = false; + BackgroundAppUpdate = false; + + DisableFeedbackCommands = true; + DisableFirefoxStudies = true; + DisablePocket = true; + DisableTelemetry = true; + DisableProfileImport = true; + DisableProfileRefresh = true; + + BlockAboutConfig = false; + BlockAboutProfiles = true; + BlockAboutSupport = true; + + # We want it to be the default browser. + DontCheckDefaultBrowser = false; + + NoDefaultBookmarks = true; + + # I accept the terms of use. + SkipTermsOfUse = true; + + PictureInPicture = lockedAs false { }; + + Homepage = locked { StartPage = "previous-session"; }; + + EnableTrackingProtection = lockedAs true { + Cryptomining = true; + EmailTracking = true; + Fingerprinting = true; + }; + + UserMessaging = locked { + ExtensionRecommendations = false; + FeatureRecommendations = false; + FirefoxLabs = false; + MoreFromMozilla = false; + SkipOnboarding = true; + }; + + FirefoxSuggest = locked { + ImproveSuggest = false; + SponsoredSuggestions = false; + WebSuggestions = false; + }; + + SearchEngines = { + Default = "Kagi"; + + PreventInstalls = true; + + Remove = [ + "Google" + "Bing" + "DuckDuckGo" + "Wikipedia (en)" + ]; + + Add = [ + { + Name = "Kagi"; + Alias = "kk"; + Method = "GET"; + URLTemplate = "https://kagi.com/search?q={searchTerms}"; + SuggestURLTemplate = "https://kagi.com/api/autosuggest?q={searchTerms}"; + } + { + Name = "Google"; + Alias = "gg"; + Method = "GET"; + URLTemplate = "https://google.com/search?q={searchTerms}"; + SuggestURLTemplate = "https://google.com/complete/search?client=firefox&q={searchTerms}"; + } + { + Name = "Yandex"; + Alias = "yy"; + Method = "GET"; + URLTemplate = "https://yandex.com/search?text={searchTerms}"; + SuggestURLTemplate = "https://suggest.yandex.com/suggest-ff.cgi?part={searchTerms}"; + } + + { + Name = "Wikipedia"; + Alias = "ww"; + Method = "GET"; + URLTemplate = "https://en.wikipedia.org/w/index.php?title=Special:Search&search={searchTerms}"; + } + { + Name = "YouTube"; + Alias = "yt"; + Method = "GET"; + URLTemplate = "https://youtube.com/results?search_query={searchTerms}"; + } + + { + Name = "Sourcegraph"; + Alias = "sg"; + Method = "GET"; + URLTemplate = "https://sourcegraph.com/search?q=context:global+{searchTerms}"; + } + { + Name = "GitHub"; + Alias = "gh"; + Method = "GET"; + URLTemplate = "https://github.com/search?type=repositories&q={searchTerms}"; + } + { + Name = "Lib.rs"; + Alias = "rs"; + Method = "GET"; + URLTemplate = "https://lib.rs/search?q={searchTerms}"; + } + + { + Name = "Seachix"; + Alias = "sx"; + Method = "GET"; + URLTemplate = "https://searchix.ovh/?query={searchTerms}"; + } + { + Name = "NixOS Packages"; + Alias = "np"; + Method = "GET"; + URLTemplate = "https://search.nixos.org/packages?channel=unstable&sort=relevance&type=packages&query={searchTerms}"; + } + { + Name = "NixOS Options"; + Alias = "no"; + Method = "GET"; + URLTemplate = "https://search.nixos.org/options?channel=unstable&sort=relevance&type=options&query={searchTerms}"; + } + { + Name = "Home Manager Options"; + Alias = "ho"; + Method = "GET"; + URLTemplate = "https://home-manager-options.extranix.com/?release=master&query={searchTerms}"; + } + { + Name = "Nix Darwin Options"; + Alias = "do"; + Method = "GET"; + URLTemplate = "https://options.nix-darwin.uz/?release=master&query={searchTerms}"; + } + ]; + }; + }; + in + { + packages = mkIf config.nixpkgs.system.isLinux [ + # TODO + pkgs.zen-browser + ]; + }; +} diff --git a/modules/zulip.mod.nix b/modules/zulip.mod.nix new file mode 100644 index 0000000..2547afd --- /dev/null +++ b/modules/zulip.mod.nix @@ -0,0 +1,9 @@ +{ + homeModules.zulip = + { pkgs, ... }: + { + packages = [ + pkgs.zulip + ]; + }; +}