diff --git a/dev_shells.nix b/dev_shells.nix index 1577068..25a5928 100644 --- a/dev_shells.nix +++ b/dev_shells.nix @@ -6,7 +6,8 @@ stdenv, darwin, livebook, -}: { +}: +{ livebook = pkgs.mkShell { packages = [ livebook @@ -15,7 +16,8 @@ LIVEBOOK_TOKEN_ENABLED = "false"; }; - erlang = with beam.packages.erlang; + erlang = + with beam.packages.erlang; mkShell { packages = [ erlang @@ -23,12 +25,12 @@ ]; }; - elixir = with beam.packages.erlang; + elixir = + with beam.packages.erlang; mkShell { - packages = - [ - elixir - ]; + packages = [ + elixir + ]; }; rust = mkShell { diff --git a/flake.nix b/flake.nix index 00e3d6d..7fa6394 100644 --- a/flake.nix +++ b/flake.nix @@ -44,23 +44,20 @@ ]; }; - outputs = { - self, - flake-parts, - ... - } @ inputs: - flake-parts.lib.mkFlake {inherit inputs;} { + outputs = + { + self, + flake-parts, + ... + }@inputs: + flake-parts.lib.mkFlake { inherit inputs; } { flake = { lib = import ./lib.nix inputs; # TODO: Automatically discover and build that - darwinConfigurations."Niuniobook" = - (import ./hosts/niuniobook.nix {inherit inputs;}) - .system; + darwinConfigurations."Niuniobook" = (import ./hosts/niuniobook.nix { inherit inputs; }).system; - darwinConfigurations."Supadupa" = - (import ./hosts/supadupa.nix {inherit inputs;}) - .system; + darwinConfigurations."Supadupa" = (import ./hosts/supadupa.nix { inherit inputs; }).system; templates = { elixir = { @@ -70,49 +67,55 @@ }; }; - systems = ["x86_64-darwin" "aarch64-darwin"]; + systems = [ + "x86_64-darwin" + "aarch64-darwin" + ]; - perSystem = { - self', - pkgs, - inputs', - ... - }: { - formatter = pkgs.alejandra; + perSystem = + { + self', + pkgs, + inputs', + ... + }: + { + formatter = pkgs.nixfmt-tree; - legacyPackages = inputs'.darwin-stable.legacyPackages.callPackage ./pkgs {}; + legacyPackages = inputs'.darwin-stable.legacyPackages.callPackage ./pkgs { }; - packages = - (pkgs.callPackage ./pkgs {}) - // { + packages = (pkgs.callPackage ./pkgs { }) // { default = pkgs.writeScriptBin "activate" '' #!/bin/sh ${pkgs.lib.getExe self'.packages.system} switch ''; - system = let - builder = - if pkgs.stdenv.isDarwin - then pkgs.lib.getExe' inputs'.darwin.packages.darwin-rebuild "darwin-rebuild" - else pkgs.lib.getExe pkgs.nixos-rebuild; - in + system = + let + builder = + if pkgs.stdenv.isDarwin then + pkgs.lib.getExe' inputs'.darwin.packages.darwin-rebuild "darwin-rebuild" + else + pkgs.lib.getExe pkgs.nixos-rebuild; + in pkgs.writeScriptBin "activate-system" '' #!/bin/sh exec ${builder} --flake "${self}" "$@" ''; }; - devShells = let - globalShells = pkgs.callPackage ./dev_shells.nix {}; - default = pkgs.mkShell { - packages = [ - pkgs.fnlfmt - # TODO: Remove it and manage all configuration from Nix - pkgs.stow - ]; - }; - in - globalShells // {inherit default;}; - }; + devShells = + let + globalShells = pkgs.callPackage ./dev_shells.nix { }; + default = pkgs.mkShell { + packages = [ + pkgs.fnlfmt + # TODO: Remove it and manage all configuration from Nix + pkgs.stow + ]; + }; + in + globalShells // { inherit default; }; + }; }; } diff --git a/hosts/modules/builders.nix b/hosts/modules/builders.nix index 2211a75..6eb62de 100644 --- a/hosts/modules/builders.nix +++ b/hosts/modules/builders.nix @@ -2,9 +2,11 @@ pkgs, inputs, ... -}: let +}: +let pkgs-stable = inputs.darwin-stable.legacyPackages.${pkgs.stdenv.hostPlatform.system}; -in { +in +{ nix.linux-builder = { enable = false; package = pkgs-stable.darwin.linux-builder; diff --git a/hosts/modules/environment.nix b/hosts/modules/environment.nix index d94a533..509abc2 100644 --- a/hosts/modules/environment.nix +++ b/hosts/modules/environment.nix @@ -2,7 +2,8 @@ config, pkgs, ... -}: { +}: +{ # List packages installed in system profile. To search by name, run: # $ nix search nixpkgs wget environment.systemPackages = with pkgs; [ @@ -25,7 +26,10 @@ ripgrep ]; - environment.shells = [pkgs.fish pkgs.zsh]; + environment.shells = [ + pkgs.fish + pkgs.zsh + ]; programs.nix-index.enable = true; programs.fish.enable = true; diff --git a/hosts/niuniobook.nix b/hosts/niuniobook.nix index 0f7a664..d912a2d 100644 --- a/hosts/niuniobook.nix +++ b/hosts/niuniobook.nix @@ -1,4 +1,5 @@ -{inputs, ...}: { +{ inputs, ... }: +{ type = "darwin"; hostname = "NiunioBook"; @@ -26,7 +27,7 @@ users.users.hauleth.home = "/Users/hauleth"; home-manager.useUserPackages = true; home-manager.users.hauleth = import ../users/hauleth.nix; - home-manager.extraSpecialArgs = {inherit inputs;}; + home-manager.extraSpecialArgs = { inherit inputs; }; } ]; diff --git a/hosts/supadupa.nix b/hosts/supadupa.nix index 945d277..4990358 100644 --- a/hosts/supadupa.nix +++ b/hosts/supadupa.nix @@ -1,4 +1,5 @@ -{inputs, ...}: { +{ inputs, ... }: +{ type = "darwin"; hostname = "Supadupa"; diff --git a/lib.nix b/lib.nix index cdf193d..64ea856 100644 --- a/lib.nix +++ b/lib.nix @@ -1,13 +1,17 @@ -{nixpkgs, ...}: let +{ nixpkgs, ... }: +let inherit (nixpkgs) lib; - readFileWithComments = path: let - content = lib.strings.fileContents path; - notComment = line: !lib.strings.hasPrefix "#" line; - in + readFileWithComments = + path: + let + content = lib.strings.fileContents path; + notComment = line: !lib.strings.hasPrefix "#" line; + in builtins.filter notComment (lib.strings.splitString "\n" content); - dontCheck = drv: drv.overrideAttrs {doCheck = false;}; -in { + dontCheck = drv: drv.overrideAttrs { doCheck = false; }; +in +{ inherit readFileWithComments dontCheck; } diff --git a/modules/ai.nix b/modules/ai.nix index efa04d7..6e85751 100644 --- a/modules/ai.nix +++ b/modules/ai.nix @@ -1,7 +1,10 @@ -{ pkgs, ... }: { - home.packages = let - llm = pkgs.llm.withPlugins { - llm-ollama = true; - }; - in [ llm ]; +{ pkgs, ... }: +{ + home.packages = + let + llm = pkgs.llm.withPlugins { + llm-ollama = true; + }; + in + [ llm ]; } diff --git a/modules/common.nix b/modules/common.nix index 74ab2ce..895baf3 100644 --- a/modules/common.nix +++ b/modules/common.nix @@ -2,7 +2,8 @@ pkgs, inputs, ... -}: { +}: +{ # nixpkgs.config.allowUnfree = true; nix.enable = true; @@ -18,7 +19,7 @@ }; nix.nixPath = [ - {nixpkgs = inputs.nixpkgs;} + { nixpkgs = inputs.nixpkgs; } ]; nix.settings = { diff --git a/modules/ctags.nix b/modules/ctags.nix index 8206817..46c1b31 100644 --- a/modules/ctags.nix +++ b/modules/ctags.nix @@ -3,12 +3,16 @@ lib, pkgs, ... -}: let +}: +let toArg = k: v: "--${k}=${v}"; listToArgs = k: vs: map (toArg k) vs; - attrsetToArgs = attr: lib.strings.concatStringsSep "\n" (lib.lists.flatten (lib.attrsets.mapAttrsToList listToArgs attr)); + attrsetToArgs = + attr: + lib.strings.concatStringsSep "\n" (lib.lists.flatten (lib.attrsets.mapAttrsToList listToArgs attr)); cfg = config.programs.ctags; -in { +in +{ options.programs.ctags = { enable = lib.mkEnableOption "ctags"; @@ -21,7 +25,7 @@ in { flags = lib.mkOption { type = lib.types.attrsOf lib.types.anything; - default = {}; + default = { }; }; }; @@ -64,7 +68,7 @@ in { }; }; - home.packages = [cfg.package]; + home.packages = [ cfg.package ]; xdg.configFile.ctags = { target = "ctags/config.ctags"; diff --git a/modules/curl.nix b/modules/curl.nix index 01dac92..7572630 100644 --- a/modules/curl.nix +++ b/modules/curl.nix @@ -1,4 +1,5 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ home.packages = [ pkgs.curl pkgs.curlie diff --git a/modules/darwin.nix b/modules/darwin.nix index ad7fa8e..442f690 100644 --- a/modules/darwin.nix +++ b/modules/darwin.nix @@ -2,7 +2,8 @@ pkgs, inputs, ... -}: { +}: +{ nix.settings.extra-sandbox-paths = [ "/System/Library/Frameworks" "/System/Library/PrivateFrameworks" @@ -12,7 +13,11 @@ "/usr/bin/env" ]; - nix.settings.allowed-users = ["@admin" "@builder" "hauleth"]; + nix.settings.allowed-users = [ + "@admin" + "@builder" + "hauleth" + ]; # Simulate the systemd-resolved .localhost resolution services.dnsmasq = { diff --git a/modules/direnv.nix b/modules/direnv.nix index 2804825..8c7d203 100644 --- a/modules/direnv.nix +++ b/modules/direnv.nix @@ -1,4 +1,5 @@ -{...}: { +{ ... }: +{ programs.direnv = { enable = true; diff --git a/modules/email.nix b/modules/email.nix index 1b39212..6a1edb5 100644 --- a/modules/email.nix +++ b/modules/email.nix @@ -3,7 +3,8 @@ config, lib, ... -}: { +}: +{ targets.darwin.defaults = { # Remember the fallen "com.apple.mail" = { @@ -52,10 +53,12 @@ default = "INBOX"; copy-to = "INBOX"; folders-sort = "INBOX,Draft"; - signature-file = toString (pkgs.writeTextFile { - name = "hauleth-signature"; - text = config.accounts.email.accounts.hauleth.signature.text; - }); + signature-file = toString ( + pkgs.writeTextFile { + name = "hauleth-signature"; + text = config.accounts.email.accounts.hauleth.signature.text; + } + ); }; }; himalaya = { diff --git a/modules/fish.nix b/modules/fish.nix index 9d7d5c9..9bc8f86 100644 --- a/modules/fish.nix +++ b/modules/fish.nix @@ -3,14 +3,15 @@ pkgs, inputs, ... -}: { +}: +{ home.packages = [ pkgs.eza ]; programs.atuin = { enable = true; - flags = ["--disable-up-arrow"]; + flags = [ "--disable-up-arrow" ]; settings = { style = "compact"; inline_height = 15; diff --git a/modules/fonts.nix b/modules/fonts.nix index e23338e..30c8ca9 100644 --- a/modules/fonts.nix +++ b/modules/fonts.nix @@ -2,9 +2,11 @@ pkgs, inputs, ... -}: let +}: +let pkgs-self = inputs.self.legacyPackages.${pkgs.stdenv.hostPlatform.system}; -in { +in +{ fonts = { packages = [ pkgs.lato diff --git a/modules/ghostty.nix b/modules/ghostty.nix index 06ce78b..eddb3c7 100644 --- a/modules/ghostty.nix +++ b/modules/ghostty.nix @@ -3,8 +3,10 @@ lib, pkgs, ... -}: let -in { +}: +let +in +{ programs.ghostty = { enable = true; package = null; @@ -15,7 +17,10 @@ in { font-family = "Hosevka Term"; window-title-font-family = "Hosevka Term"; font-size = 14; - font-feature = ["-dlig" "-liga"]; + font-feature = [ + "-dlig" + "-liga" + ]; working-directory = "home"; window-inherit-working-directory = false; @@ -41,16 +46,16 @@ in { foreground = "#c1c9d4"; palette = [ - "0=#384254" - "1=#bc284f" - "2=#7caca5" - "3=#fcffcd" - "4=#5c8097" - "5=#7d6ba3" - "6=#008097" - "7=#8c98a7" - "8=#4a5265" - "9=#d43760" + "0=#384254" + "1=#bc284f" + "2=#7caca5" + "3=#fcffcd" + "4=#5c8097" + "5=#7d6ba3" + "6=#008097" + "7=#8c98a7" + "8=#4a5265" + "9=#d43760" "10=#88b4ad" "11=#fdffe1" "12=#a2b8c6" diff --git a/modules/git.nix b/modules/git.nix index 6430dce..0a459fd 100644 --- a/modules/git.nix +++ b/modules/git.nix @@ -3,7 +3,8 @@ inputs, config, ... -}: { +}: +{ programs.gh = { enable = true; @@ -144,7 +145,11 @@ sort = "version:refname"; }; - versionsort.suffix = ["" "-rc" "-pre"]; + versionsort.suffix = [ + "" + "-rc" + "-pre" + ]; push = { default = "simple"; @@ -164,7 +169,10 @@ updateRefs = true; }; - url."git@github.com:".pushInsteadOf = ["https://github.com/" "git://github.com/"]; + url."git@github.com:".pushInsteadOf = [ + "https://github.com/" + "git://github.com/" + ]; sendemail = { smtpserver = "${config.programs.msmtp.package}/bin/msmtp"; diff --git a/modules/irc.nix b/modules/irc.nix index 8d35d7e..12d730b 100644 --- a/modules/irc.nix +++ b/modules/irc.nix @@ -1,7 +1,8 @@ { pkgs, ... -}: { +}: +{ programs.halloy = { enable = true; # Managed externally diff --git a/modules/jj.nix b/modules/jj.nix index cd5701a..bbc1a3f 100644 --- a/modules/jj.nix +++ b/modules/jj.nix @@ -1,4 +1,5 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ programs.jujutsu = { enable = true; @@ -7,11 +8,18 @@ user.name = "Ɓukasz Niemier"; ui = { - default-command = ["log" "--template=log_compact"]; + default-command = [ + "log" + "--template=log_compact" + ]; conflict-marker-style = "git"; - pager = ["sh" "-c" "${pkgs.diff-so-fancy}/bin/diff-so-fancy | less '--tabs=4' -RFX"]; + pager = [ + "sh" + "-c" + "${pkgs.diff-so-fancy}/bin/diff-so-fancy | less '--tabs=4' -RFX" + ]; diff-formatter = ":git"; }; @@ -35,20 +43,44 @@ fix.tools = { mix-format = { - command = ["mix" "format" "--stdin-filename" "$path"]; - patterns = ["glob:**/*.ex" "glob:**/*.exs"]; + command = [ + "mix" + "format" + "--stdin-filename" + "$path" + ]; + patterns = [ + "glob:**/*.ex" + "glob:**/*.exs" + ]; }; nix-fmt = { - command = ["nix" "fmt"]; - patterns = ["glob:**/*.nix"]; + command = [ + "nix" + "fmt" + ]; + patterns = [ "glob:**/*.nix" ]; }; }; aliases = { - tug = ["bookmark" "move" "--from" "closest_bookmark(@-)" "--to" "@-"]; - pull = ["git" "fetch"]; - push = ["git" "push"]; + tug = [ + "bookmark" + "move" + "--from" + "closest_bookmark(@-)" + "--to" + "@-" + ]; + pull = [ + "git" + "fetch" + ]; + push = [ + "git" + "push" + ]; sync = [ "rebase" "--source" @@ -59,15 +91,32 @@ # Put changes from `@` into another change # Inverse of `extract` - inject = ["squash" "--from" "@" "--into"]; + inject = [ + "squash" + "--from" + "@" + "--into" + ]; # Fetch changes from change into `@` # Inverse of `inject` - extract = ["squash" "--into" "@" "--form"]; + extract = [ + "squash" + "--into" + "@" + "--form" + ]; # 'jj sandwich xyz' to move xyz into the megamerge in parallel to everything # else. See notes on 'megamerge()' above for how it's resolved. - sandwich = ["rebase" "-B" "megamerge()" "-A" "trunk()" "-r"]; + sandwich = [ + "rebase" + "-B" + "megamerge()" + "-A" + "trunk()" + "-r" + ]; }; revset-aliases = { diff --git a/modules/nvim.nix b/modules/nvim.nix index 2d9bfa1..7933496 100644 --- a/modules/nvim.nix +++ b/modules/nvim.nix @@ -3,49 +3,55 @@ pkgs, inputs, ... -}: let +}: +let nvim = pkgs.neovim.override { configure = { # Add Fennel to Lua path and require basic implementation # # runtimepath editing is not yet perfect, but works good enough so far - customRC = let - expert = inputs.expert.packages.${pkgs.stdenv.hostPlatform.system}.expert; - in '' - set runtimepath+=${./nvim}/after - set runtimepath^=${./nvim} - lua << EOF - vim.g.lsp_paths = { - ['rust_analyzer'] = "${pkgs.rust-analyzer}/bin/rust-analyzer", - ['expert'] = "${expert}/bin/expert", - ['elp'] = "${pkgs.erlang-language-platform}/bin/elp", - ['typos_lsp'] = "${pkgs.typos-lsp}/bin/typos-lsp" - } - package.path = package.path .. ";${pkgs.luajitPackages.fennel}/share/lua/5.1/?.lua" - require('basic') - EOF - ''; - packages.global = let - plugins = pkgs.vimPlugins; - in { - start = [ - plugins.packer-nvim - plugins.vim-nickel - # plugins.lua-utils-nvim - # plugins.neorg - # plugins.neorg-telescope - plugins.nvim-treesitter.withAllGrammars - ]; + customRC = + let + expert = inputs.expert.packages.${pkgs.stdenv.hostPlatform.system}.expert; + in + '' + set runtimepath+=${./nvim}/after + set runtimepath^=${./nvim} + lua << EOF + vim.g.lsp_paths = { + ['rust_analyzer'] = "${pkgs.rust-analyzer}/bin/rust-analyzer", + ['expert'] = "${expert}/bin/expert", + ['elp'] = "${pkgs.erlang-language-platform}/bin/elp", + ['typos_lsp'] = "${pkgs.typos-lsp}/bin/typos-lsp" + } + package.path = package.path .. ";${pkgs.luajitPackages.fennel}/share/lua/5.1/?.lua" + require('basic') + EOF + ''; + packages.global = + let + plugins = pkgs.vimPlugins; + in + { + start = [ + plugins.packer-nvim + plugins.vim-nickel + # plugins.lua-utils-nvim + # plugins.neorg + # plugins.neorg-telescope + plugins.nvim-treesitter.withAllGrammars + ]; - opt = []; - }; + opt = [ ]; + }; }; }; -in { +in +{ nixpkgs.overlays = [ # inputs.neorg-overlay.overlays.default ]; home.sessionVariables.EDITOR = "nvim"; - home.packages = [nvim]; + home.packages = [ nvim ]; } diff --git a/modules/pijul.nix b/modules/pijul.nix index f33e23d..c6e2832 100644 --- a/modules/pijul.nix +++ b/modules/pijul.nix @@ -1,3 +1,4 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ # home.packages = [pkgs.pijul]; } diff --git a/modules/plan.nix b/modules/plan.nix index 96e1028..f1e2f94 100644 --- a/modules/plan.nix +++ b/modules/plan.nix @@ -1,4 +1,5 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ launchd.agents.plan-sync = { enable = pkgs.stdenv.isDarwin; config = { diff --git a/modules/swiftbar.nix b/modules/swiftbar.nix index 357dc22..3fc5180 100644 --- a/modules/swiftbar.nix +++ b/modules/swiftbar.nix @@ -2,33 +2,38 @@ pkgs, lib, ... -}: { +}: +{ # WIP - options.swiftbar = let - inherit (lib) mkOption types; - in { - enable = lib.mkEnableOption "swiftbar"; + options.swiftbar = + let + inherit (lib) mkOption types; + in + { + enable = lib.mkEnableOption "swiftbar"; - package = lib.mkPackageOption pkgs "swiftbar" {}; + package = lib.mkPackageOption pkgs "swiftbar" { }; - plugins = mkOption { - type = types.attrsOf (types.submodule { - enable = lib.mkEnableOption "current SwiftBar plugin"; + plugins = mkOption { + type = types.attrsOf ( + types.submodule { + enable = lib.mkEnableOption "current SwiftBar plugin"; - frequency = mkOption { - type = types.string; - example = "1m"; - description = '' - How often should SwiftBar run script in the background. - ''; - }; + frequency = mkOption { + type = types.string; + example = "1m"; + description = '' + How often should SwiftBar run script in the background. + ''; + }; - script = mkOption { - type = types.string; - }; - }); + script = mkOption { + type = types.string; + }; + } + ); + }; }; - }; config = { home.packages = [ diff --git a/modules/tools.nix b/modules/tools.nix index 30d8d36..469ee97 100644 --- a/modules/tools.nix +++ b/modules/tools.nix @@ -2,13 +2,15 @@ pkgs, inputs, ... -}: let +}: +let pkgs-self = inputs.self.packages.${pkgs.stdenv.hostPlatform.system}; - jaq-as-jq = pkgs.runCommand "jaq-as-jq" {} '' + jaq-as-jq = pkgs.runCommand "jaq-as-jq" { } '' mkdir -p $out/bin ln -s ${pkgs.jaq}/bin/jaq $out/bin/jq ''; -in { +in +{ home.packages = [ # bfs # pkgs-self.ubin-client diff --git a/overlays/fix-curl.nix b/overlays/fix-curl.nix index 49d0372..3d0911a 100644 --- a/overlays/fix-curl.nix +++ b/overlays/fix-curl.nix @@ -1,23 +1,23 @@ # Hot fix for curl in nix breaking with netrc # https://github.com/NixOS/nixpkgs/pull/356133 -final: prev: let +final: prev: +let patched-curl = prev.curl.overrideAttrs (oldAttrs: { - patches = - (oldAttrs.patches or []) - ++ [ - # https://github.com/curl/curl/issues/15496 - (prev.fetchpatch { - url = "https://github.com/curl/curl/commit/f5c616930b5cf148b1b2632da4f5963ff48bdf88.patch"; - hash = "sha256-FlsAlBxAzCmHBSP+opJVrZG8XxWJ+VP2ro4RAl3g0pQ="; - }) - # https://github.com/curl/curl/issues/15513 - (prev.fetchpatch { - url = "https://github.com/curl/curl/commit/0cdde0fdfbeb8c35420f6d03fa4b77ed73497694.patch"; - hash = "sha256-WP0zahMQIx9PtLmIDyNSJICeIJvN60VzJGN2IhiEYv0="; - }) - ]; + patches = (oldAttrs.patches or [ ]) ++ [ + # https://github.com/curl/curl/issues/15496 + (prev.fetchpatch { + url = "https://github.com/curl/curl/commit/f5c616930b5cf148b1b2632da4f5963ff48bdf88.patch"; + hash = "sha256-FlsAlBxAzCmHBSP+opJVrZG8XxWJ+VP2ro4RAl3g0pQ="; + }) + # https://github.com/curl/curl/issues/15513 + (prev.fetchpatch { + url = "https://github.com/curl/curl/commit/0cdde0fdfbeb8c35420f6d03fa4b77ed73497694.patch"; + hash = "sha256-WP0zahMQIx9PtLmIDyNSJICeIJvN60VzJGN2IhiEYv0="; + }) + ]; }); -in { +in +{ nix = prev.nix.override (old: { curl = patched-curl; }); diff --git a/pkgs/default.nix b/pkgs/default.nix index 2d80cca..88252ac 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -3,16 +3,20 @@ entr, ripgrep, writeShellApplication, -}: { - imbox = callPackage ./imbox.nix {}; - ubin-client = callPackage ./ubin-client.nix {}; - hosevka = callPackage ./hosevka.nix {}; - mac-mole = callPackage ./mac-mole.nix {}; +}: +{ + imbox = callPackage ./imbox.nix { }; + ubin-client = callPackage ./ubin-client.nix { }; + hosevka = callPackage ./hosevka.nix { }; + mac-mole = callPackage ./mac-mole.nix { }; fswatch = writeShellApplication { name = "fswatch"; - runtimeInputs = [entr ripgrep]; + runtimeInputs = [ + entr + ripgrep + ]; text = '' rg -l -t "$1" "" | entr -p echo /_ diff --git a/pkgs/hosevka.nix b/pkgs/hosevka.nix index 82f4818..461d5ae 100644 --- a/pkgs/hosevka.nix +++ b/pkgs/hosevka.nix @@ -1,4 +1,5 @@ -{iosevka, ...}: let +{ iosevka, ... }: +let variants = { design = { i = "hooky"; @@ -14,8 +15,17 @@ }; ligations = { inherits = "default-calt"; - enables = ["center-ops" "brst"]; - disables = ["minus-minus" "eqeq" "exeq" "tildeeq" "slasheq"]; + enables = [ + "center-ops" + "brst" + ]; + disables = [ + "minus-minus" + "eqeq" + "exeq" + "tildeeq" + "slasheq" + ]; }; weights = { extralight = { @@ -51,12 +61,17 @@ }; buildIosevka = iosevka.override; in - buildIosevka { - set = "ss09-term"; - privateBuildPlan = { - family = "Hosevka Term"; - spacing = "term"; +buildIosevka { + set = "ss09-term"; + privateBuildPlan = { + family = "Hosevka Term"; + spacing = "term"; - inherit variants weights slopes ligations; - }; - } + inherit + variants + weights + slopes + ligations + ; + }; +} diff --git a/pkgs/imbox.nix b/pkgs/imbox.nix index 3e92393..2ab9304 100644 --- a/pkgs/imbox.nix +++ b/pkgs/imbox.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation (self: { hash = "sha256-y5GCH3miimOWSCvS+Kh/nOpNrIEpcoc9p8jlQqYuh7Q="; }; - nativeBuildInputs = [pkg-config]; + nativeBuildInputs = [ pkg-config ]; - buildInputs = [libressl]; + buildInputs = [ libressl ]; }) diff --git a/pkgs/mac-mole.nix b/pkgs/mac-mole.nix index a112e75..9b03d86 100644 --- a/pkgs/mac-mole.nix +++ b/pkgs/mac-mole.nix @@ -19,35 +19,40 @@ let inherit version src; ldflags = [ - "-s" "-w" - "-X main.Version=${version}" + "-s" + "-w" + "-X main.Version=${version}" ]; - subPackages = [ "cmd/analyze" "cmd/status" ]; + subPackages = [ + "cmd/analyze" + "cmd/status" + ]; vendorHash = "sha256-oepnMZcaTB9u3h6S0jcP4W0pqNkDDgETVqDdCL0jarM="; }; -in stdenv.mkDerivation (self: { +in +stdenv.mkDerivation (self: { pname = "mac-mole"; inherit version src; buildPhase = '' - script_dir="$out/libexec" + script_dir="$out/libexec" - mkdir -p $out/bin $script_dir + mkdir -p $out/bin $script_dir - cp -r ./bin $script_dir - cp -r ./lib $script_dir + cp -r ./bin $script_dir + cp -r ./lib $script_dir - ln -s ${goComponents}/bin/analyze $script_dir/bin/analyze-go - ln -s ${goComponents}/bin/status $script_dir/bin/status-go + ln -s ${goComponents}/bin/analyze $script_dir/bin/analyze-go + ln -s ${goComponents}/bin/status $script_dir/bin/status-go - cp mole $out/bin - ln -s $out/bin/mole $out/bin/mo + cp mole $out/bin + ln -s $out/bin/mole $out/bin/mo - substituteInPlace $out/bin/mole \ - --replace 'SCRIPT_DIR="$(cd "$(dirname "''${BASH_SOURCE[0]}")" && pwd)"' "SCRIPT_DIR='$script_dir'" + substituteInPlace $out/bin/mole \ + --replace 'SCRIPT_DIR="$(cd "$(dirname "''${BASH_SOURCE[0]}")" && pwd)"' "SCRIPT_DIR='$script_dir'" ''; meta = { diff --git a/pkgs/ubin-client.nix b/pkgs/ubin-client.nix index 9a79dae..97a0c83 100644 --- a/pkgs/ubin-client.nix +++ b/pkgs/ubin-client.nix @@ -5,7 +5,7 @@ writeShellApplication { name = "ubin"; - runtimeInputs = [curl]; + runtimeInputs = [ curl ]; text = '' URL="https://bin.hauleth.dev/" diff --git a/templates/elixir/flake.nix b/templates/elixir/flake.nix index 9af8bfd..0fc2d29 100644 --- a/templates/elixir/flake.nix +++ b/templates/elixir/flake.nix @@ -9,12 +9,13 @@ inputs.nixpkgs.follows = "nixpkgs"; }; - outputs = { - self, - flake-parts, - ... - } @ inputs: - flake-parts.lib.mkFlake {inherit inputs;} { + outputs = + { + self, + flake-parts, + ... + }@inputs: + flake-parts.lib.mkFlake { inherit inputs; } { imports = [ inputs.devenv.flakeModule ]; @@ -26,15 +27,17 @@ "aarch64-darwin" ]; - perSystem = { - self', - inputs', - pkgs, - ... - }: { - devenv.shells.default = { - language.elixir.enable = true; + perSystem = + { + self', + inputs', + pkgs, + ... + }: + { + devenv.shells.default = { + language.elixir.enable = true; + }; }; - }; }; } diff --git a/users/hauleth.nix b/users/hauleth.nix index 41ae900..a626def 100644 --- a/users/hauleth.nix +++ b/users/hauleth.nix @@ -1,4 +1,5 @@ -{inputs, ...}: { +{ inputs, ... }: +{ imports = [ ../modules/fish.nix ../modules/direnv.nix @@ -16,6 +17,6 @@ ../modules/jj.nix ../modules/ai.nix ./modules/dircolors.nix - {home.stateVersion = "24.11";} + { home.stateVersion = "24.11"; } ]; } diff --git a/users/modules/dircolors.nix b/users/modules/dircolors.nix index fe46ae3..620d3f6 100644 --- a/users/modules/dircolors.nix +++ b/users/modules/dircolors.nix @@ -1,4 +1,5 @@ -{...}: { +{ ... }: +{ programs.dircolors = { enable = true;