diff --git a/catppuccin/bat/default.nix b/catppuccin/bat/default.nix index edf1920..ca7255e 100644 --- a/catppuccin/bat/default.nix +++ b/catppuccin/bat/default.nix @@ -1,11 +1,14 @@ -{ config, lib, options, pkgs, ... }: - +{ + config, + lib, + options, + pkgs, + ... +}: with lib; let global = config.catppuccin; cfg = config.catppuccin.bat; -in - -{ +in { options.catppuccin.bat = { enable = mkEnableOption { type = types.bool; @@ -13,7 +16,7 @@ in description = "Enable catppuccin bat theme"; }; theme = mkOption { - type = types.enum [ "mocha" "macchiato" "frappe" "latte" ]; + type = types.enum ["mocha" "macchiato" "frappe" "latte"]; default = global.defaultTheme; description = "Choose a catppuccin bat theme"; }; @@ -35,14 +38,15 @@ in theme = "Catppuccin-${cfg.theme}"; }; themes = let - getTheme = flavour: builtins.readFile (pkgs.fetchFromGitHub { - owner = "catppuccin"; - repo = "bat"; - rev = "ba4d16880d63e656acced2b7d4e034e4a93f74b1"; - sha256 = "sha256-6WVKQErGdaqb++oaXnY3i6/GuH2FhTgK0v4TN4Y0Wbw="; - } + "/Catppuccin-${flavour}.tmTheme"); - in - { + getTheme = flavour: + builtins.readFile (pkgs.fetchFromGitHub { + owner = "catppuccin"; + repo = "bat"; + rev = "ba4d16880d63e656acced2b7d4e034e4a93f74b1"; + sha256 = "sha256-6WVKQErGdaqb++oaXnY3i6/GuH2FhTgK0v4TN4Y0Wbw="; + } + + "/Catppuccin-${flavour}.tmTheme"); + in { Catppuccin-mocha = getTheme "mocha"; Catppuccin-macchiato = getTheme "macchiato"; Catppuccin-frappe = getTheme "frappe"; diff --git a/catppuccin/btop/default.nix b/catppuccin/btop/default.nix index a64d782..11ed29b 100644 --- a/catppuccin/btop/default.nix +++ b/catppuccin/btop/default.nix @@ -1,11 +1,14 @@ -{ config, lib, options, pkgs, ... }: - +{ + config, + lib, + options, + pkgs, + ... +}: with lib; let global = config.catppuccin; cfg = config.catppuccin.btop; -in - -{ +in { options.catppuccin.btop = { enable = mkEnableOption { type = types.bool; @@ -13,7 +16,7 @@ in description = "Enable catppuccin btop theme"; }; theme = mkOption { - type = types.enum [ "mocha" "macchiato" "frappe" "latte" ]; + type = types.enum ["mocha" "macchiato" "frappe" "latte"]; default = global.defaultTheme; description = "Choose a catppuccin btop theme"; }; @@ -26,11 +29,12 @@ in }; xdg.configFile."btop/themes/catppuccin_${cfg.theme}.theme" = { text = builtins.readFile (pkgs.fetchFromGitHub { - owner = "catppuccin"; - repo = "btop"; - rev = "ecb8562bb6181bb9f2285c360bbafeb383249ec3"; - sha256 = "sha256-ovVtupO5jWUw6cwA3xEzRe1juUB8ykfarMRVTglx3mk="; - } + "/catppuccin_${cfg.theme}.theme"); + owner = "catppuccin"; + repo = "btop"; + rev = "ecb8562bb6181bb9f2285c360bbafeb383249ec3"; + sha256 = "sha256-ovVtupO5jWUw6cwA3xEzRe1juUB8ykfarMRVTglx3mk="; + } + + "/catppuccin_${cfg.theme}.theme"); }; }; } diff --git a/catppuccin/default.nix b/catppuccin/default.nix index f60fdf3..b48dbfb 100644 --- a/catppuccin/default.nix +++ b/catppuccin/default.nix @@ -1,10 +1,7 @@ -{ lib, ... }: - +{lib, ...}: with lib; let cfg = config.catppuccin; -in - -{ +in { imports = [ ./bat ./btop @@ -17,7 +14,7 @@ in options.catppuccin = { defaultTheme = mkOption { - type = types.enum [ "mocha" "macchiato" "frappe" "latte" ]; + type = types.enum ["mocha" "macchiato" "frappe" "latte"]; default = "mocha"; description = "Choose a catppuccin bat theme"; }; diff --git a/catppuccin/dircolors/default.nix b/catppuccin/dircolors/default.nix index 1eeb1c5..be8bfb9 100644 --- a/catppuccin/dircolors/default.nix +++ b/catppuccin/dircolors/default.nix @@ -1,15 +1,25 @@ -{ config, lib, options, pkgs, ... }: - +{ + config, + lib, + options, + pkgs, + ... +}: with lib; let global = config.catppuccin; cfg = config.catppuccin.dircolors; # generated via vivid@HEAD - ./generate.sh - theme = flavour: trueColor: builtins.fromJSON ( - builtins.readFile ./catppuccin-${flavour + (if trueColor then "" else "-8bit")}.json - ); -in - -{ + theme = flavour: trueColor: + builtins.fromJSON ( + builtins.readFile + ./catppuccin-${flavour + + ( + if trueColor + then "" + else "-8bit" + )}.json + ); +in { options.catppuccin = { dircolors = { enable = mkEnableOption { @@ -18,7 +28,7 @@ in description = "Enable catppuccin for dircolors / lscolors"; }; theme = mkOption { - type = types.enum [ "mocha" "macchiato" "frappe" "latte" ]; + type = types.enum ["mocha" "macchiato" "frappe" "latte"]; default = global.defaultTheme; description = "Choose a flavour for dircolors"; }; diff --git a/catppuccin/dircolors/vivid.nix b/catppuccin/dircolors/vivid.nix index 1818b4c..0208861 100644 --- a/catppuccin/dircolors/vivid.nix +++ b/catppuccin/dircolors/vivid.nix @@ -1,5 +1,9 @@ -{ fetchFromGitHub, lib, pkgs, rustPlatform }: - +{ + fetchFromGitHub, + lib, + pkgs, + rustPlatform, +}: rustPlatform.buildRustPackage rec { pname = "vivid"; version = "9299aa4c843bb7ed757b47bb2449abbba3aed793"; @@ -17,6 +21,6 @@ rustPlatform.buildRustPackage rec { description = "A themeable LS_COLORS generator with a rich filetype datebase"; homepage = "https://github.com/sharkdp/vivid"; license = licenses.asl20; - maintainers = [ maintainers.nekowinston ]; + maintainers = [maintainers.nekowinston]; }; } diff --git a/catppuccin/dunst/default.nix b/catppuccin/dunst/default.nix index 5a48919..1912ed5 100644 --- a/catppuccin/dunst/default.nix +++ b/catppuccin/dunst/default.nix @@ -1,17 +1,20 @@ -{ config, lib, options, pkgs, ... }: - +{ + config, + lib, + options, + pkgs, + ... +}: with lib; let global = config.catppuccin; cfg = config.catppuccin.btop; fromINI = f: let - iniFile = - pkgs.runCommand "in.ini" { - nativeBuildInputs = [pkgs.jc]; - } '' jc --ini < ${f} > "$out" ''; - in builtins.fromJSON(builtins.readFile iniFile); -in - -{ + iniFile = pkgs.runCommand "in.ini" { + nativeBuildInputs = [pkgs.jc]; + } ''jc --ini < ${f} > "$out" ''; + in + builtins.fromJSON (builtins.readFile iniFile); +in { options.catppuccin.dunst = { enable = mkEnableOption { type = types.bool; @@ -19,7 +22,7 @@ in description = "Enable catppuccin dunst theme"; }; theme = mkOption { - type = types.enum [ "mocha" "macchiato" "frappe" "latte" ]; + type = types.enum ["mocha" "macchiato" "frappe" "latte"]; default = global.defaultTheme; description = "Choose a catppuccin dunst theme"; }; @@ -28,12 +31,13 @@ in config = mkIf cfg.enable { services.dunst = { enable = true; - settings = fromINI (pkgs.fetchFromGitHub{ - owner = "catppuccin"; - repo = "dunst"; - rev = "a72991e56338289a9fce941b5df9f0509d2cba09"; - sha256 = "sha256-1LeSKuZcuWr9z6mKnyt1ojFOnIiTupwspGrOw/ts8Yk="; - } + "/src/mocha.conf"); + settings = fromINI (pkgs.fetchFromGitHub { + owner = "catppuccin"; + repo = "dunst"; + rev = "a72991e56338289a9fce941b5df9f0509d2cba09"; + sha256 = "sha256-1LeSKuZcuWr9z6mKnyt1ojFOnIiTupwspGrOw/ts8Yk="; + } + + "/src/mocha.conf"); }; }; } diff --git a/catppuccin/k9s/default.nix b/catppuccin/k9s/default.nix index 751f11b..ecb756b 100644 --- a/catppuccin/k9s/default.nix +++ b/catppuccin/k9s/default.nix @@ -1,21 +1,24 @@ -{ config, lib, options, pkgs, ... }: - +{ + config, + lib, + options, + pkgs, + ... +}: with lib; let global = config.catppuccin; cfg = config.catppuccin.k9s; - fromYAML = f: - let - jsonFile = pkgs.runCommand "in.json" - { - nativeBuildInputs = [ pkgs.gojq ]; - } '' + fromYAML = f: let + jsonFile = + pkgs.runCommand "in.json" + { + nativeBuildInputs = [pkgs.gojq]; + } '' gojq --yaml-input < "${f}" > "$out" ''; - in + in builtins.fromJSON (builtins.readFile jsonFile); -in - -{ +in { options.catppuccin.k9s = { enable = mkEnableOption { type = types.bool; @@ -23,7 +26,7 @@ in description = "Enable catppuccin k9s theme"; }; theme = mkOption { - type = types.enum [ "mocha" "macchiato" "frappe" "latte" ]; + type = types.enum ["mocha" "macchiato" "frappe" "latte"]; default = global.defaultTheme; description = "Choose a catppuccin k9s theme"; }; @@ -33,11 +36,12 @@ in programs.k9s = { enable = true; skin = fromYAML (pkgs.fetchFromGitHub { - owner = "catppuccin"; - repo = "k9s"; - rev = "322598e19a4270298b08dc2765f74795e23a1615"; - sha256 = "sha256-GrRCOwCgM8BFhY8TzO3/WDTUnGtqkhvlDWE//ox2GxI="; - } + /dist/${cfg.theme}.yml); + owner = "catppuccin"; + repo = "k9s"; + rev = "322598e19a4270298b08dc2765f74795e23a1615"; + sha256 = "sha256-GrRCOwCgM8BFhY8TzO3/WDTUnGtqkhvlDWE//ox2GxI="; + } + + /dist/${cfg.theme}.yml); }; }; } diff --git a/catppuccin/lsd/default.nix b/catppuccin/lsd/default.nix index 472dc56..be7ea68 100644 --- a/catppuccin/lsd/default.nix +++ b/catppuccin/lsd/default.nix @@ -1,11 +1,14 @@ -{ config, lib, options, pkgs, ... }: - +{ + config, + lib, + options, + pkgs, + ... +}: with lib; let global = config.catppuccin; cfg = config.catppuccin.btop; -in - -{ +in { options.catppuccin.lsd = { enable = mkEnableOption { type = types.bool; @@ -13,7 +16,7 @@ in description = "Enable catppuccin btop theme"; }; theme = mkOption { - type = types.enum [ "mocha" "macchiato" "frappe" "latte" ]; + type = types.enum ["mocha" "macchiato" "frappe" "latte"]; default = global.defaultTheme; description = "Choose a catppuccin btop theme"; }; diff --git a/catppuccin/packages/vscode-extensions.catppuccin.catppuccin-vsc/default.nix b/catppuccin/packages/vscode-extensions.catppuccin.catppuccin-vsc/default.nix index 57f75b2..627436d 100644 --- a/catppuccin/packages/vscode-extensions.catppuccin.catppuccin-vsc/default.nix +++ b/catppuccin/packages/vscode-extensions.catppuccin.catppuccin-vsc/default.nix @@ -1,5 +1,8 @@ -{ lib, vscode-utils, ... }: - +{ + lib, + vscode-utils, + ... +}: vscode-utils.buildVscodeMarketplaceExtension { mktplcRef = { name = "catppuccin-vsc"; @@ -11,6 +14,6 @@ vscode-utils.buildVscodeMarketplaceExtension { description = "Soothing pastel theme for VSCode"; license = licenses.mit; downloadPage = "https://marketplace.visualstudio.com/items?itemName=Catppuccin.catppuccin-vsc"; - maintainers = with maintainers; [ nekowinston ]; + maintainers = with maintainers; [nekowinston]; }; } diff --git a/catppuccin/vscode/default.nix b/catppuccin/vscode/default.nix index 83e5733..e22aeab 100644 --- a/catppuccin/vscode/default.nix +++ b/catppuccin/vscode/default.nix @@ -1,11 +1,15 @@ -{ config, lib, options, pkgs, vscode-utils, ... }: - +{ + config, + lib, + options, + pkgs, + vscode-utils, + ... +}: with lib; let global = config.catppuccin; cfg = config.catppuccin.vscode; -in - -{ +in { options.catppuccin = { vscode = { enable = mkEnableOption { @@ -19,7 +23,7 @@ in config = mkIf cfg.enable { programs.vscode = { enable = true; - extensions = [ (pkgs.callPackage ../packages/vscode-extensions.catppuccin.catppuccin-vsc {}) ]; + extensions = [(pkgs.callPackage ../packages/vscode-extensions.catppuccin.catppuccin-vsc {})]; }; }; } diff --git a/configuration.nix b/configuration.nix index 4db301e..91986bc 100644 --- a/configuration.nix +++ b/configuration.nix @@ -1,9 +1,11 @@ -{ config, pkgs, ... }: - -let +{ + config, + pkgs, + ... +}: let mainUser = "winston"; - plymouthPkg = (pkgs.stdenv.mkDerivation { + plymouthPkg = pkgs.stdenv.mkDerivation { name = "plymouth-theme-catppuccin"; src = pkgs.fetchFromGitHub { @@ -21,15 +23,13 @@ let cat "themes/catppuccin-''${dir}/catppuccin-''${dir}.plymouth" | sed "s@\/usr\/@''${out}\/@" > "''${out}/share/plymouth/themes/catppuccin-''${dir}/catppuccin-''${dir}.plymouth" done ''; - }); -in - -{ - nix.settings.experimental-features = [ "nix-command" "flakes" ]; + }; +in { + nix.settings.experimental-features = ["nix-command" "flakes"]; nixpkgs.config.allowUnfree = true; programs.nix-ld.enable = true; - imports = [ ./hardware-configuration.nix ]; + imports = [./hardware-configuration.nix]; environment.systemPackages = []; boot = { @@ -44,9 +44,9 @@ in plymouth = { enable = true; theme = "catppuccin-mocha"; - themePackages = [ plymouthPkg ]; + themePackages = [plymouthPkg]; }; - kernelParams = [ "quiet" "splash" "vt.global_cursor_default=0" ]; + kernelParams = ["quiet" "splash" "vt.global_cursor_default=0"]; initrd.systemd.enable = true; }; @@ -73,9 +73,9 @@ in user.services.polkit-gnome-authentication-agent-1 = { unitConfig = { Description = "polkit-gnome-authentication-agent-1"; - Wants = [ "graphical-session.target" ]; - WantedBy = [ "graphical-session.target" ]; - After = [ "graphical-session.target" ]; + Wants = ["graphical-session.target"]; + WantedBy = ["graphical-session.target"]; + After = ["graphical-session.target"]; }; serviceConfig = { Type = "simple"; @@ -87,7 +87,7 @@ in }; }; - services= { + services = { # mounting gvfs.enable = true; udisks2.enable = true; @@ -126,10 +126,10 @@ in }; users.users."${mainUser}" = { - extraGroups = [ "wheel" ]; + extraGroups = ["wheel"]; isNormalUser = true; - openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILm0O46zW/XfVOSwz0okRWYeOAg+wCVkCtCAoVTpZsOh" ]; - packages = [ pkgs.zsh ]; + openssh.authorizedKeys.keys = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILm0O46zW/XfVOSwz0okRWYeOAg+wCVkCtCAoVTpZsOh"]; + packages = [pkgs.zsh]; shell = pkgs.zsh; }; diff --git a/darwin.nix b/darwin.nix index dbf6b48..dbd43bb 100644 --- a/darwin.nix +++ b/darwin.nix @@ -1,6 +1,9 @@ -{ config, lib, pkgs, ... }: - { + config, + lib, + pkgs, + ... +}: { # Auto upgrade nix package and the daemon service. services.nix-daemon.enable = true; nix = { @@ -8,7 +11,7 @@ gc.automatic = true; settings = { auto-optimise-store = true; - experimental-features = [ "flakes" "nix-command" ]; + experimental-features = ["flakes" "nix-command"]; }; }; @@ -87,8 +90,8 @@ package = pkgs.unstable.yabai; extraConfig = let rule = "yabai -m rule --add"; - ignored = app: builtins.concatStringsSep "\n" (map(e: ''${rule} app="${e}" manage=off sticky=off layer=above border=off'') app); - unmanaged = app: builtins.concatStringsSep "\n" (map(e: ''${rule} app="${e}" manage=off'') app); + ignored = app: builtins.concatStringsSep "\n" (map (e: ''${rule} app="${e}" manage=off sticky=off layer=above border=off'') app); + unmanaged = app: builtins.concatStringsSep "\n" (map (e: ''${rule} app="${e}" manage=off'') app); in '' # auto-inject scripting additions yabai -m signal --add event=dock_did_restart action="sudo yabai --load-sa" diff --git a/flake.nix b/flake.nix index 2613eb7..9b8afff 100644 --- a/flake.nix +++ b/flake.nix @@ -8,7 +8,7 @@ darwin = { url = "github:lnl7/nix-darwin/master"; inputs.nixpkgs.follows = "nixpkgs"; - }; + }; home-manager = { url = "github:nix-community/home-manager/master"; @@ -27,8 +27,7 @@ nur, sops, ... - }: - let + }: let overlay-unstable = final: prev: { unstable = import nixpkgs-unstable { system = prev.system; @@ -45,13 +44,13 @@ ./darwin.nix - ({ config, ... }: { + ({config, ...}: { config = { - nixpkgs.overlays = [ overlay-unstable ]; + nixpkgs.overlays = [overlay-unstable]; nixpkgs.config.allowUnfree = true; home-manager = { useGlobalPkgs = true; - users.winston.imports = [ ./home.nix ]; + users.winston.imports = [./home.nix]; extraSpecialArgs = { nur = nur.nixosModules.nur; sops = sops.homeManagerModules.sops; diff --git a/home.nix b/home.nix index 8904cdc..ceb6086 100644 --- a/home.nix +++ b/home.nix @@ -1,32 +1,38 @@ -{ config, lib, nur, pkgs, sops, machine, ... }: - -let +{ + config, + lib, + nur, + pkgs, + sops, + machine, + ... +}: let inherit (pkgs.stdenv.hostPlatform) isLinux; inherit (pkgs.stdenv.hostPlatform) isDarwin; -in - -{ - imports = [ - nur - sops - ./catppuccin - ./modules/firefox.nix - ./modules/git.nix - ./modules/gpg.nix - ./modules/i3.nix - ./modules/kubernetes.nix - ./modules/mail.nix - ./modules/music.nix - ./modules/neovim.nix - ./modules/newsboat.nix - ./modules/sops.nix - ./modules/vscode.nix - ./modules/wezterm.nix - ./modules/zsh.nix - ] ++ lib.optionals (builtins.pathExists ./modules/secrets.nix) [ - # hotfix: use fucking git-secret, this is atrocious beyond belief - ./modules/secrets.nix - ]; +in { + imports = + [ + nur + sops + ./catppuccin + ./modules/firefox.nix + ./modules/git.nix + ./modules/gpg.nix + ./modules/i3.nix + ./modules/kubernetes.nix + ./modules/mail.nix + ./modules/music.nix + ./modules/neovim.nix + ./modules/newsboat.nix + ./modules/sops.nix + ./modules/vscode.nix + ./modules/wezterm.nix + ./modules/zsh.nix + ] + ++ lib.optionals (builtins.pathExists ./modules/secrets.nix) [ + # hotfix: use fucking git-secret, this is atrocious beyond belief + ./modules/secrets.nix + ]; catppuccin = { defaultTheme = "frappe"; @@ -40,41 +46,58 @@ in home = { packages = with pkgs; ([ - zsh - fd ffmpeg file imagemagick mdcat ranger ripgrep - git-secret - cargo unstable.deno rustc + zsh + fd + ffmpeg + file + imagemagick + mdcat + ranger + ripgrep + git-secret + cargo + unstable.deno + rustc - (callPackage ./packages/org-stats {}) - (callPackage ./packages/python3.catppuccin-catwalk {}) - (nerdfonts.override { fonts = ["NerdFontsSymbolsOnly"]; }) - unstable.wezterm - (callPackage ./packages/helm-ls {}) - ] ++ lib.optionals isDarwin [ - iina - ] ++ lib.optionals isLinux [ - _1password-gui - insomnia - mattermost-desktop - ] ++ lib.optionals (isLinux && machine.personal) [ - (callPackage ./packages/python3.discover-overlay {}) - unstable.discord - lutris - ]); + (callPackage ./packages/org-stats {}) + (callPackage ./packages/python3.catppuccin-catwalk {}) + (nerdfonts.override {fonts = ["NerdFontsSymbolsOnly"];}) + unstable.wezterm + (callPackage ./packages/helm-ls {}) + ] + ++ lib.optionals isDarwin [ + iina + ] + ++ lib.optionals isLinux [ + _1password-gui + insomnia + mattermost-desktop + ] + ++ lib.optionals (isLinux && machine.personal) [ + (callPackage ./packages/python3.discover-overlay {}) + unstable.discord + lutris + ]); - sessionVariables = { - TERMINAL = "wezterm"; - LESSHISTFILE = "-"; + sessionVariables = + { + TERMINAL = "wezterm"; + LESSHISTFILE = "-"; - CARGO_HOME="${config.xdg.dataHome}/cargo"; - NPM_CONFIG_USERCONFIG="${config.xdg.configHome}/npm/npmrc"; - RUSTUP_HOME="${config.xdg.dataHome}/rustup"; - PATH="$PATH:${config.xdg.dataHome}/krew/bin:$GOPATH/bin"; - } // (if isDarwin then { - # https://github.com/NixOS/nix/issues/2033 - NIX_PATH = "$HOME/.nix-defexpr/channels:/nix/var/nix/profiles/per-user/root/channels\${NIX_PATH:+:$NIX_PATH}"; - SSH_AUTH_SOCK = "${config.xdg.configHome}/gnupg/S.gpg-agent.ssh"; - } else {}); + CARGO_HOME = "${config.xdg.dataHome}/cargo"; + NPM_CONFIG_USERCONFIG = "${config.xdg.configHome}/npm/npmrc"; + RUSTUP_HOME = "${config.xdg.dataHome}/rustup"; + PATH = "$PATH:${config.xdg.dataHome}/krew/bin:$GOPATH/bin"; + } + // ( + if isDarwin + then { + # https://github.com/NixOS/nix/issues/2033 + NIX_PATH = "$HOME/.nix-defexpr/channels:/nix/var/nix/profiles/per-user/root/channels\${NIX_PATH:+:$NIX_PATH}"; + SSH_AUTH_SOCK = "${config.xdg.configHome}/gnupg/S.gpg-agent.ssh"; + } + else {} + ); stateVersion = "22.11"; }; diff --git a/modules/btop.nix b/modules/btop.nix index beed91c..012f6bc 100644 --- a/modules/btop.nix +++ b/modules/btop.nix @@ -1,9 +1,7 @@ -{ pkgs, ... }: - +{pkgs, ...}: with lib; let cfg = config.catppuccin; -in -{ +in { programs.btop = { enable = true; settings = { diff --git a/modules/firefox.nix b/modules/firefox.nix index eee2db6..91993c9 100644 --- a/modules/firefox.nix +++ b/modules/firefox.nix @@ -1,16 +1,21 @@ -{ config, lib, nur, pkgs, ... }: - -let +{ + config, + lib, + nur, + pkgs, + ... +}: let inherit (pkgs.stdenv.hostPlatform) isLinux; inherit (pkgs.stdenv.hostPlatform) isDarwin; -in - -{ +in { programs.firefox = { enable = true; # since I'm using firefox from brew on darwin, I need to build a dummy package # to still manage it via home-manager - package = if isLinux then pkgs.firefox else (pkgs.writeScriptBin "__dummy-firefox" ""); + package = + if isLinux + then pkgs.firefox + else (pkgs.writeScriptBin "__dummy-firefox" ""); profiles.default = { search.default = "DuckDuckGo"; search.force = true; diff --git a/modules/git.nix b/modules/git.nix index a338296..b8d46f0 100644 --- a/modules/git.nix +++ b/modules/git.nix @@ -1,6 +1,4 @@ -{ pkgs, ... }: - -{ +{pkgs, ...}: { programs.git = { enable = true; userName = "winston"; @@ -29,7 +27,7 @@ ]; # disable the macOS keychain, only use gopass - package = pkgs.git.override { osxkeychainSupport = false; }; + package = pkgs.git.override {osxkeychainSupport = false;}; extraConfig = { credential.helper = "gopass"; diff --git a/modules/gpg.nix b/modules/gpg.nix index 0d5d82b..7a19d36 100644 --- a/modules/gpg.nix +++ b/modules/gpg.nix @@ -1,11 +1,11 @@ -{ config, pkgs, ... }: - -let +{ + config, + pkgs, + ... +}: let inherit (pkgs.stdenv.hostPlatform) isLinux; key = "0x0B89BC45007EE9CC"; -in - -{ +in { home.packages = with pkgs; [ git-credential-gopass gnupg-pkcs11-scd diff --git a/modules/i3.nix b/modules/i3.nix index db5104c..7d609fa 100644 --- a/modules/i3.nix +++ b/modules/i3.nix @@ -1,10 +1,12 @@ -{ config, lib, flakePath, pkgs, ... }: - -let - inherit (pkgs.stdenv.hostPlatform) isLinux; -in - { + config, + lib, + flakePath, + pkgs, + ... +}: let + inherit (pkgs.stdenv.hostPlatform) isLinux; +in { home = lib.mkIf isLinux { packages = with pkgs; [ blueberry @@ -13,17 +15,19 @@ in ]; }; - nixpkgs.overlays = [(self: super: { - picom = super.picom.overrideAttrs (old: { - src = pkgs.fetchFromGitHub { - owner = "FT-Labs"; - repo = "picom"; - sha256 = "sha256-MRCffxU0X5a368zJGwzcv25P2ZYyAI31EOBhgiyR71A="; - rev = "c9aee893d2ab0acc4e997dc4186e7b1ef344ac0f"; - }; - nativeBuildInputs = old.nativeBuildInputs ++ [pkgs.pcre2]; - }); - })]; + nixpkgs.overlays = [ + (self: super: { + picom = super.picom.overrideAttrs (old: { + src = pkgs.fetchFromGitHub { + owner = "FT-Labs"; + repo = "picom"; + sha256 = "sha256-MRCffxU0X5a368zJGwzcv25P2ZYyAI31EOBhgiyR71A="; + rev = "c9aee893d2ab0acc4e997dc4186e7b1ef344ac0f"; + }; + nativeBuildInputs = old.nativeBuildInputs ++ [pkgs.pcre2]; + }); + }) + ]; gtk = lib.mkIf isLinux { enable = true; @@ -92,12 +96,12 @@ in pomodoro_break = " "; }; theme.overrides = { - idle_fg = "#cdd6f4"; - info_fg = "#89b4fa"; - good_fg = "#a6e3a1"; - warning_fg = "#fab387"; - critical_fg = "#f38ba8"; - separator = " "; + idle_fg = "#cdd6f4"; + info_fg = "#89b4fa"; + good_fg = "#a6e3a1"; + warning_fg = "#fab387"; + critical_fg = "#f38ba8"; + separator = " "; separator_bg = "auto"; separator_fg = "auto"; }; @@ -114,7 +118,6 @@ in }; }; - services = lib.mkIf isLinux { dunst.enable = true; flameshot = { @@ -123,7 +126,7 @@ in }; gnome-keyring = { enable = true; - components = [ "secrets" ]; + components = ["secrets"]; }; picom = let riced = true; @@ -141,7 +144,7 @@ in }; redshift = { enable = true; - latitude = 48.2; + latitude = 48.2; longitude = 16.366667; }; screen-locker = { @@ -156,12 +159,12 @@ in systemd = lib.mkIf isLinux { user.targets.tray.Unit = { Description = "Home Manager System Tray"; - Requires = [ "graphical-session-pre.target" ]; + Requires = ["graphical-session-pre.target"]; }; user.services.autotiling = { Unit.Description = "Autotiling for i3"; Service.ExecStart = "${lib.getExe pkgs.autotiling}"; - Install.WantedBy = [ "default.target" ]; + Install.WantedBy = ["default.target"]; }; }; diff --git a/modules/kubernetes.nix b/modules/kubernetes.nix index 329115b..9b2560b 100644 --- a/modules/kubernetes.nix +++ b/modules/kubernetes.nix @@ -1,6 +1,8 @@ -{ config, pkgs, ...}: - { + config, + pkgs, + ... +}: { home.packages = with pkgs; [ dyff gojq @@ -12,9 +14,9 @@ popeye ]; home.sessionVariables = { - KREW_ROOT="${config.xdg.dataHome}/krew"; - KUBECACHEDIR="${config.xdg.cacheHome}/kube"; - KUBECONFIG="${config.xdg.configHome}/kube/config"; - MINIKUBE_HOME="${config.xdg.dataHome}/minikube"; + KREW_ROOT = "${config.xdg.dataHome}/krew"; + KUBECACHEDIR = "${config.xdg.cacheHome}/kube"; + KUBECONFIG = "${config.xdg.configHome}/kube/config"; + MINIKUBE_HOME = "${config.xdg.dataHome}/minikube"; }; } diff --git a/modules/mail.nix b/modules/mail.nix index e9b18e3..4142216 100644 --- a/modules/mail.nix +++ b/modules/mail.nix @@ -1,10 +1,11 @@ -{ config, lib, pkgs, ... }: - -let - inherit (pkgs.stdenv.hostPlatform) isLinux isDarwin; -in - { + config, + lib, + pkgs, + ... +}: let + inherit (pkgs.stdenv.hostPlatform) isLinux isDarwin; +in { accounts.email.maildirBasePath = "${config.xdg.dataHome}/mail"; accounts.email.accounts = { @@ -13,7 +14,7 @@ in passwordCommand = "${lib.getExe pkgs.gopass} -o mail/personal"; maildir.path = "personal"; - aliases = [ "hey@winston.sh" ]; + aliases = ["hey@winston.sh"]; imap = { host = "imap.fastmail.com"; @@ -47,7 +48,7 @@ in }; }; - home.packages = with pkgs; [ w3m ]; + home.packages = with pkgs; [w3m]; services.imapnotify.enable = isLinux; @@ -64,46 +65,202 @@ in mailcap_path = "$HOME/.config/neomutt/mailcap:$mailcap_path"; }; binds = [ - { map = [ "index" "pager" ]; key = "i"; action = "noop"; } - { map = [ "index" "pager" ]; key = "g"; action = "noop"; } - { map = [ "index" ]; key = "\\Cf"; action = "noop"; } - { map = [ "index" "pager" ]; key = "M"; action = "noop"; } - { map = [ "index" "pager" ]; key = "C"; action = "noop"; } - { map = [ "index" ]; key = "gg"; action = "first-entry"; } - { map = [ "index" ]; key = "j"; action = "next-entry"; } - { map = [ "index" ]; key = "k"; action = "previous-entry"; } - { map = [ "attach" ]; key = ""; action = "view-mailcap"; } - { map = [ "attach" ]; key = "l"; action = "view-mailcap"; } - { map = [ "editor" ]; key = ""; action = "noop"; } - { map = [ "index" ]; key = "G"; action = "last-entry"; } - { map = [ "index" ]; key = "gg"; action = "first-entry"; } - { map = [ "pager" "attach" ]; key = "h"; action = "exit"; } - { map = [ "pager" ]; key = "j"; action = "next-line"; } - { map = [ "pager" ]; key = "k"; action = "previous-line"; } - { map = [ "pager" ]; key = "l"; action = "view-attachments"; } - { map = [ "index" ]; key = "D"; action = "delete-message"; } - { map = [ "index" ]; key = "U"; action = "undelete-message"; } - { map = [ "index" ]; key = "L"; action = "limit"; } - { map = [ "index" ]; key = "h"; action = "noop"; } - { map = [ "index" ]; key = "l"; action = "display-message"; } - { map = [ "index" "query" ]; key = ""; action = "tag-entry"; } - { map = [ "browser" ]; key = "h"; action = "goto-parent"; } + { + map = ["index" "pager"]; + key = "i"; + action = "noop"; + } + { + map = ["index" "pager"]; + key = "g"; + action = "noop"; + } + { + map = ["index"]; + key = "\\Cf"; + action = "noop"; + } + { + map = ["index" "pager"]; + key = "M"; + action = "noop"; + } + { + map = ["index" "pager"]; + key = "C"; + action = "noop"; + } + { + map = ["index"]; + key = "gg"; + action = "first-entry"; + } + { + map = ["index"]; + key = "j"; + action = "next-entry"; + } + { + map = ["index"]; + key = "k"; + action = "previous-entry"; + } + { + map = ["attach"]; + key = ""; + action = "view-mailcap"; + } + { + map = ["attach"]; + key = "l"; + action = "view-mailcap"; + } + { + map = ["editor"]; + key = ""; + action = "noop"; + } + { + map = ["index"]; + key = "G"; + action = "last-entry"; + } + { + map = ["index"]; + key = "gg"; + action = "first-entry"; + } + { + map = ["pager" "attach"]; + key = "h"; + action = "exit"; + } + { + map = ["pager"]; + key = "j"; + action = "next-line"; + } + { + map = ["pager"]; + key = "k"; + action = "previous-line"; + } + { + map = ["pager"]; + key = "l"; + action = "view-attachments"; + } + { + map = ["index"]; + key = "D"; + action = "delete-message"; + } + { + map = ["index"]; + key = "U"; + action = "undelete-message"; + } + { + map = ["index"]; + key = "L"; + action = "limit"; + } + { + map = ["index"]; + key = "h"; + action = "noop"; + } + { + map = ["index"]; + key = "l"; + action = "display-message"; + } + { + map = ["index" "query"]; + key = ""; + action = "tag-entry"; + } + { + map = ["browser"]; + key = "h"; + action = "goto-parent"; + } # { map = [ "browser" ]; key = "h"; action = "'..' \"Go to parent folder\""; } - { map = [ "index" "pager" ]; key = "H"; action = "view-raw-message"; } - { map = [ "browser" ]; key = "l"; action = "select-entry"; } - { map = [ "browser" ]; key = "gg"; action = "top-page"; } - { map = [ "browser" ]; key = "G"; action = "bottom-page"; } - { map = [ "pager" ]; key = "gg"; action = "top"; } - { map = [ "pager" ]; key = "G"; action = "bottom"; } - { map = [ "index" "pager" "browser" ]; key = "d"; action = "half-down"; } - { map = [ "index" "pager" "browser" ]; key = "u"; action = "half-up"; } - { map = [ "index" "pager" ]; key = "S"; action = "sync-mailbox"; } - { map = [ "index" "pager" ]; key = "R"; action = "group-reply"; } - { map = [ "index" ]; key = "\\031"; action = "previous-undeleted"; } - { map = [ "index" ]; key = "\\005"; action = "next-undeleted"; } - { map = [ "pager" ]; key = "\\031"; action = "previous-line"; } - { map = [ "pager" ]; key = "\\005"; action = "next-line"; } - { map = [ "editor" ]; key = ""; action = "complete-query"; } + { + map = ["index" "pager"]; + key = "H"; + action = "view-raw-message"; + } + { + map = ["browser"]; + key = "l"; + action = "select-entry"; + } + { + map = ["browser"]; + key = "gg"; + action = "top-page"; + } + { + map = ["browser"]; + key = "G"; + action = "bottom-page"; + } + { + map = ["pager"]; + key = "gg"; + action = "top"; + } + { + map = ["pager"]; + key = "G"; + action = "bottom"; + } + { + map = ["index" "pager" "browser"]; + key = "d"; + action = "half-down"; + } + { + map = ["index" "pager" "browser"]; + key = "u"; + action = "half-up"; + } + { + map = ["index" "pager"]; + key = "S"; + action = "sync-mailbox"; + } + { + map = ["index" "pager"]; + key = "R"; + action = "group-reply"; + } + { + map = ["index"]; + key = "\\031"; + action = "previous-undeleted"; + } + { + map = ["index"]; + key = "\\005"; + action = "next-undeleted"; + } + { + map = ["pager"]; + key = "\\031"; + action = "previous-line"; + } + { + map = ["pager"]; + key = "\\005"; + action = "next-line"; + } + { + map = ["editor"]; + key = ""; + action = "complete-query"; + } ]; }; notmuch.enable = true; diff --git a/modules/music.nix b/modules/music.nix index 51df452..fc91ef7 100644 --- a/modules/music.nix +++ b/modules/music.nix @@ -1,29 +1,72 @@ -{ config, lib, pkgs, ... }: - -let +{ + config, + lib, + pkgs, + ... +}: let inherit (pkgs.stdenv.hostPlatform) isDarwin; inherit (pkgs.stdenv.hostPlatform) isLinux; darp = pkgs.callPackage ../packages/discord-applemusic-rich-presence {}; -in - -{ +in { programs.ncmpcpp = { enable = isLinux; bindings = [ - { key = "j"; command = "scroll_down"; } - { key = "k"; command = "scroll_up"; } - { key = "J"; command = [ "select_item" "scroll_down" ]; } - { key = "K"; command = [ "select_item" "scroll_up" ]; } - { key = "h"; command = "previous_column"; } - { key = "l"; command = "next_column"; } - { key = "ctrl-b"; command = "page_up"; } - { key = "ctrl-u"; command = "page_up"; } - { key = "ctrl-f"; command = "page_down"; } - { key = "ctrl-d"; command = "page_down"; } - { key = "g"; command = "move_home"; } - { key = "G"; command = "move_end"; } - { key = "n"; command = "next_found_item"; } - { key = "N"; command = "previous_found_item"; } + { + key = "j"; + command = "scroll_down"; + } + { + key = "k"; + command = "scroll_up"; + } + { + key = "J"; + command = ["select_item" "scroll_down"]; + } + { + key = "K"; + command = ["select_item" "scroll_up"]; + } + { + key = "h"; + command = "previous_column"; + } + { + key = "l"; + command = "next_column"; + } + { + key = "ctrl-b"; + command = "page_up"; + } + { + key = "ctrl-u"; + command = "page_up"; + } + { + key = "ctrl-f"; + command = "page_down"; + } + { + key = "ctrl-d"; + command = "page_down"; + } + { + key = "g"; + command = "move_home"; + } + { + key = "G"; + command = "move_end"; + } + { + key = "n"; + command = "next_found_item"; + } + { + key = "N"; + command = "previous_found_item"; + } ]; }; @@ -50,7 +93,7 @@ in launchd.agents.discord-applemusic-rich-presence = { enable = true; config = { - ProgramArguments = [ "${lib.getExe darp}" ]; + ProgramArguments = ["${lib.getExe darp}"]; KeepAlive = true; RunAtLoad = true; StandardErrorPath = "${config.home.homeDirectory}/.cache/discord-applemusic-rich-presence.log"; diff --git a/modules/neovim.nix b/modules/neovim.nix index 1b7ed40..681b70f 100644 --- a/modules/neovim.nix +++ b/modules/neovim.nix @@ -1,6 +1,9 @@ -{ config, pkgs, flakePath, ... }: - { + config, + pkgs, + flakePath, + ... +}: { programs.neovim = { enable = true; defaultEditor = true; diff --git a/modules/newsboat.nix b/modules/newsboat.nix index 7f3b5f8..1b458b4 100644 --- a/modules/newsboat.nix +++ b/modules/newsboat.nix @@ -1,13 +1,11 @@ -{ config, ... }: - -{ +{config, ...}: { programs.newsboat = { enable = true; autoReload = true; urls = [ - { url = "https://blog.gitea.io/index.xml"; } - { url = "https://neomutt.org/feed.xml"; } - { url = "https://this-week-in-neovim.org/rss"; } + {url = "https://blog.gitea.io/index.xml";} + {url = "https://neomutt.org/feed.xml";} + {url = "https://this-week-in-neovim.org/rss";} ]; }; } diff --git a/modules/sketchybar.nix b/modules/sketchybar.nix index 92660fc..0215222 100644 --- a/modules/sketchybar.nix +++ b/modules/sketchybar.nix @@ -1,14 +1,16 @@ -{ config, lib, ... }: - { + config, + lib, + ... +}: { home = lib.mkIf isDarwin { - packages = [ pkgs.unstable.sketchybar ]; + packages = [pkgs.unstable.sketchybar]; }; launchd = lib.mkIf isDarwin { agents.sketchybar = { enable = true; config = { - ProgramArguments = [ "${lib.getExe pkgs.unstable.sketchybar}" ]; + ProgramArguments = ["${lib.getExe pkgs.unstable.sketchybar}"]; KeepAlive = true; RunAtLoad = true; ProcessType = "Interactive"; diff --git a/modules/sops.nix b/modules/sops.nix index fc8a349..55b3f2b 100644 --- a/modules/sops.nix +++ b/modules/sops.nix @@ -1,6 +1,8 @@ -{ config, lib, ... }: - { + config, + lib, + ... +}: { # TODO: enable after sops supports nix-darwin sops = { gnupg.home = "${config.xdg.configHome}/gnupg"; diff --git a/modules/vscode.nix b/modules/vscode.nix index 2520a4a..f3ef334 100644 --- a/modules/vscode.nix +++ b/modules/vscode.nix @@ -1,11 +1,13 @@ -{ config, flakePath, lib, pkgs, ... }: - -let +{ + config, + flakePath, + lib, + pkgs, + ... +}: let inherit (pkgs.stdenv.hostPlatform) isLinux; inherit (pkgs.stdenv.hostPlatform) isDarwin; -in - -{ +in { programs.vscode = { enable = true; extensions = with pkgs.vscode-extensions; [ diff --git a/modules/wezterm.nix b/modules/wezterm.nix index 06eea16..2fa9ec5 100644 --- a/modules/wezterm.nix +++ b/modules/wezterm.nix @@ -1,6 +1,8 @@ -{ config, flakePath, ... }: - { + config, + flakePath, + ... +}: { xdg.configFile = { "wezterm" = { source = config.lib.file.mkOutOfStoreSymlink "${flakePath}/modules/wezterm"; diff --git a/modules/zsh.nix b/modules/zsh.nix index 299b7b5..5f9d093 100644 --- a/modules/zsh.nix +++ b/modules/zsh.nix @@ -1,6 +1,10 @@ -{ config, flakePath, lib, pkgs, ... }: - { + config, + flakePath, + lib, + pkgs, + ... +}: { programs = { direnv.enable = true; direnv.nix-direnv.enable = true; @@ -34,8 +38,7 @@ initExtra = let functionsDir = "${config.home.homeDirectory}/${config.programs.zsh.dotDir}/functions"; - in - '' + in '' for conf in "${functionsDir}"/**/*.zsh; do source "$conf" done @@ -77,7 +80,7 @@ shellAliases = { # switch between yubikeys for the same GPG key cat = "bat --theme=\$(defaults read -globalDomain AppleInterfaceStyle &> /dev/null && echo default || echo GitHub)"; - switch_yubikeys="gpg-connect-agent \"scd serialno\" \"learn --force\" /bye"; + switch_yubikeys = "gpg-connect-agent \"scd serialno\" \"learn --force\" /bye"; }; history = { path = "${config.xdg.configHome}/zsh/history"; diff --git a/packages/AppleMusicDiscordRPC/default.nix b/packages/AppleMusicDiscordRPC/default.nix index de47f26..1f05b90 100644 --- a/packages/AppleMusicDiscordRPC/default.nix +++ b/packages/AppleMusicDiscordRPC/default.nix @@ -1,5 +1,8 @@ -{ fetchzip, lib, stdenv }: - +{ + fetchzip, + lib, + stdenv, +}: stdenv.mkDerivation rec { pname = "AppleMusicDiscordRPC"; version = "1.3.0"; @@ -19,7 +22,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "The Firefox web browser"; homepage = "https://www.mozilla.org/en-GB/firefox"; - maintainers = [ maintainers.nekowinston ]; + maintainers = [maintainers.nekowinston]; platforms = platforms.darwin; }; } diff --git a/packages/catppuccin-gtk/default.nix b/packages/catppuccin-gtk/default.nix index 864ec41..4340375 100644 --- a/packages/catppuccin-gtk/default.nix +++ b/packages/catppuccin-gtk/default.nix @@ -1,34 +1,37 @@ -{ fetchzip, lib, pkgs, stdenv }: - -let +{ + fetchzip, + lib, + pkgs, + stdenv, +}: let flavour = "Mocha"; accent = "Pink"; in -stdenv.mkDerivation rec { - name = "catppuccin-gtk"; - version = "0.4.1"; + stdenv.mkDerivation rec { + name = "catppuccin-gtk"; + version = "0.4.1"; - src = fetchzip { - url = "https://github.com/catppuccin/gtk/releases/download/v${version}/Catppuccin-${flavour}-Standard-${accent}-Dark.zip"; - sha256 = "sha256-84OpiYgzX61HoLjpF2ffQnAuL3tS1DFuDx2dHbBIog8="; - stripRoot = false; - }; + src = fetchzip { + url = "https://github.com/catppuccin/gtk/releases/download/v${version}/Catppuccin-${flavour}-Standard-${accent}-Dark.zip"; + sha256 = "sha256-84OpiYgzX61HoLjpF2ffQnAuL3tS1DFuDx2dHbBIog8="; + stripRoot = false; + }; - propagatedUserEnvPkgs = with pkgs; [ - gnome.gnome-themes-extra - gtk-engine-murrine - ]; + propagatedUserEnvPkgs = with pkgs; [ + gnome.gnome-themes-extra + gtk-engine-murrine + ]; - installPhase = '' - mkdir -p "$out/share/themes" - cp -r "Catppuccin-${flavour}-Standard-${accent}-Dark" "$out/share/themes" - ''; + installPhase = '' + mkdir -p "$out/share/themes" + cp -r "Catppuccin-${flavour}-Standard-${accent}-Dark" "$out/share/themes" + ''; - meta = with lib; { - description = "Soothing pastel theme for GTK3"; - homepage = "https://github.com/catppuccin/gtk"; - license = licenses.gpl3Only; - platforms = platforms.unix; - maintainers = [ maintainers.nekowinston ]; - }; -} + meta = with lib; { + description = "Soothing pastel theme for GTK3"; + homepage = "https://github.com/catppuccin/gtk"; + license = licenses.gpl3Only; + platforms = platforms.unix; + maintainers = [maintainers.nekowinston]; + }; + } diff --git a/packages/cura/default.nix b/packages/cura/default.nix index 5053e40..dc7c9f9 100644 --- a/packages/cura/default.nix +++ b/packages/cura/default.nix @@ -1,5 +1,9 @@ -{ appimageTools, fetchurl, lib, pkgs }: - +{ + appimageTools, + fetchurl, + lib, + pkgs, +}: appimageTools.wrapType1 rec { name = "cura"; version = "5.2.1"; diff --git a/packages/discord-applemusic-rich-presence/default.nix b/packages/discord-applemusic-rich-presence/default.nix index fa2e5d8..a714663 100644 --- a/packages/discord-applemusic-rich-presence/default.nix +++ b/packages/discord-applemusic-rich-presence/default.nix @@ -1,31 +1,37 @@ -{ buildGoModule, fetchFromGitHub, lib, pkgs, ... }: - -let +{ + buildGoModule, + fetchFromGitHub, + lib, + pkgs, + ... +}: let inherit (pkgs.stdenv.hostPlatform) system; - target = { - "aarch64-darwin" = "arm64"; - "x86_64-darwin" = "x86"; - }.${system} or (throw "Unsupported system: ${system}"); + target = + { + "aarch64-darwin" = "arm64"; + "x86_64-darwin" = "x86"; + } + .${system} + or (throw "Unsupported system: ${system}"); in + buildGoModule rec { + pname = "discord-applemusic-rich-presence"; + version = "0.5.0"; -buildGoModule rec { - pname = "discord-applemusic-rich-presence"; - version = "0.5.0"; + src = fetchFromGitHub { + owner = "caarlos0"; + repo = "discord-applemusic-rich-presence"; + rev = "v${version}"; + sha256 = "sha256-PCA0Thzng1C08NwBTh3Hl4yW2qvYXra6EZHrJxoCgIU="; + }; - src = fetchFromGitHub { - owner = "caarlos0"; - repo = "discord-applemusic-rich-presence"; - rev = "v${version}"; - sha256 = "sha256-PCA0Thzng1C08NwBTh3Hl4yW2qvYXra6EZHrJxoCgIU="; - }; + vendorSha256 = "sha256-RFJTBfsfEyKn9OSvE2HLgjKiJC3Hs90+P9rm5GlIseo="; - vendorSha256 = "sha256-RFJTBfsfEyKn9OSvE2HLgjKiJC3Hs90+P9rm5GlIseo="; - - meta = with lib; { - description = "Discord's Rich Presence from Apple Music"; - homepage = "https://github.com/caarlos0/discord-applemusic-rich-presence"; - license = licenses.mit; - maintainers = [ maintainers.nekowinston ]; - platforms = platforms.darwin; - }; -} + meta = with lib; { + description = "Discord's Rich Presence from Apple Music"; + homepage = "https://github.com/caarlos0/discord-applemusic-rich-presence"; + license = licenses.mit; + maintainers = [maintainers.nekowinston]; + platforms = platforms.darwin; + }; + } diff --git a/packages/emmet-ls/default.nix b/packages/emmet-ls/default.nix index 66acccb..b7c3cc2 100644 --- a/packages/emmet-ls/default.nix +++ b/packages/emmet-ls/default.nix @@ -1,5 +1,9 @@ -{ buildNpmPackage, lib, pkgs, ... }: - +{ + buildNpmPackage, + lib, + pkgs, + ... +}: buildNpmPackage { pname = "nodePackages.emmet-ls"; version = "0.3.1"; @@ -15,6 +19,6 @@ buildNpmPackage { description = "Emmet language server"; homepage = "https://github.com/aca/emmet-ls"; license = licenses.mit; - maintainers = [ maintainers.nekowinston ]; + maintainers = [maintainers.nekowinston]; }; } diff --git a/packages/helm-ls/default.nix b/packages/helm-ls/default.nix index 275b922..24f5dd6 100644 --- a/packages/helm-ls/default.nix +++ b/packages/helm-ls/default.nix @@ -1,5 +1,10 @@ -{ buildGoModule, fetchFromGitHub, lib, pkgs, ... }: - +{ + buildGoModule, + fetchFromGitHub, + lib, + pkgs, + ... +}: buildGoModule rec { pname = "helm-ls"; version = "20220912"; @@ -17,6 +22,6 @@ buildGoModule rec { description = "helm language server"; homepage = "https://github.com/mrjosh/helm-ls"; license = licenses.mit; - maintainers = [ maintainers.nekowinston ]; + maintainers = [maintainers.nekowinston]; }; } diff --git a/packages/jq-lsp/default.nix b/packages/jq-lsp/default.nix index c5e4cc3..2b9f8d1 100644 --- a/packages/jq-lsp/default.nix +++ b/packages/jq-lsp/default.nix @@ -1,5 +1,10 @@ -{ buildGoModule, fetchFromGitHub, lib, pkgs, ... }: - +{ + buildGoModule, + fetchFromGitHub, + lib, + pkgs, + ... +}: buildGoModule rec { pname = "jq-lsp"; version = "20221220"; @@ -17,6 +22,6 @@ buildGoModule rec { description = "jq language server"; homepage = "https://github.com/wader/jq-lsp"; license = licenses.mit; - maintainers = [ maintainers.nekowinston ]; + maintainers = [maintainers.nekowinston]; }; } diff --git a/packages/librewolf/default.nix b/packages/librewolf/default.nix index 802c1f6..d45355a 100644 --- a/packages/librewolf/default.nix +++ b/packages/librewolf/default.nix @@ -1,19 +1,23 @@ -{ stdenv, fetchurl, lib, undmg }: - +{ + stdenv, + fetchurl, + lib, + undmg, +}: stdenv.mkDerivation rec { name = "librewolf"; version = "109.0-1"; url = "e0b46cbfb55504d33fd75b328ef3f5c7"; - + src = fetchurl { url = "https://gitlab.com/librewolf-community/browser/macos/uploads/${url}/librewolf-${version}.en-US.mac.aarch64.dmg"; sha256 = "5a60bc2b2d6fc6cbdfae8797178695b7139a0006869e5dbe214078a4d058f1f0"; }; - buildInputs = [ undmg ]; + buildInputs = [undmg]; sourceRoot = "."; - phases = [ "unpackPhase" "installPhase" ]; + phases = ["unpackPhase" "installPhase"]; installPhase = '' mkdir -p "$out/Applications" cp -r Librewolf.app "$out/Applications/Librewolf.app" @@ -22,7 +26,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "A custom version of Firefox, focused on privacy, security and freedom."; homepage = "https://librewolf.net/"; - maintainers = [ maintainers.nekowinston ]; + maintainers = [maintainers.nekowinston]; platforms = platforms.darwin; }; } diff --git a/packages/mopidy-podcast-itunes/default.nix b/packages/mopidy-podcast-itunes/default.nix index 2a6b432..724d4ce 100644 --- a/packages/mopidy-podcast-itunes/default.nix +++ b/packages/mopidy-podcast-itunes/default.nix @@ -1,5 +1,9 @@ -{ lib, python3Packages, mopidy, mopidy-podcast }: - +{ + lib, + python3Packages, + mopidy, + mopidy-podcast, +}: python3Packages.buildPythonApplication rec { pname = "mopidy-podcast-itunes"; version = "3.0.1"; @@ -26,6 +30,6 @@ python3Packages.buildPythonApplication rec { homepage = "https://github.com/tkem/mopidy-podcast-itunes"; description = "Mopidy extension for searching and browsing podcasts on the Apple iTunes Store."; license = licenses.asl20; - maintainers = [ maintainers.nekowinston ]; + maintainers = [maintainers.nekowinston]; }; } diff --git a/packages/org-stats/default.nix b/packages/org-stats/default.nix index d7a1a53..e3ae919 100644 --- a/packages/org-stats/default.nix +++ b/packages/org-stats/default.nix @@ -1,5 +1,10 @@ -{ buildGoModule, fetchFromGitHub, lib, pkgs, ... }: - +{ + buildGoModule, + fetchFromGitHub, + lib, + pkgs, + ... +}: buildGoModule rec { pname = "discord-applemusic-rich-presence"; version = "1.11.2"; @@ -17,6 +22,6 @@ buildGoModule rec { description = "Get the contributor stats summary from all repos of any given organization"; homepage = "https://github.com/caarlos0/org-stats"; license = licenses.mit; - maintainers = [ maintainers.nekowinston ]; + maintainers = [maintainers.nekowinston]; }; } diff --git a/packages/papirus-folders-catppuccin/default.nix b/packages/papirus-folders-catppuccin/default.nix index ac22f80..1e91e67 100644 --- a/packages/papirus-folders-catppuccin/default.nix +++ b/packages/papirus-folders-catppuccin/default.nix @@ -1,44 +1,54 @@ -{ stdenvNoCC, lib, fetchFromGitHub, papirus-icon-theme, gtk3, bash, getent, flavor ? "mocha", accent ? "blue", ... }: -let - validAccents = [ "blue" "flamingo" "green" "lavender" "maroon" "mauve" "peach" "pink" "red" "rosewater" "sapphire" "sky" "teal" "yellow" ]; - validFlavors = [ "latte" "frappe" "macchiato" "mocha" ]; +{ + stdenvNoCC, + lib, + fetchFromGitHub, + papirus-icon-theme, + gtk3, + bash, + getent, + flavor ? "mocha", + accent ? "blue", + ... +}: let + validAccents = ["blue" "flamingo" "green" "lavender" "maroon" "mauve" "peach" "pink" "red" "rosewater" "sapphire" "sky" "teal" "yellow"]; + validFlavors = ["latte" "frappe" "macchiato" "mocha"]; pname = "catppuccin-papirus-folders"; in + lib.checkListOfEnum "${pname}: accent color" validAccents [accent] + lib.checkListOfEnum "${pname}: flavor" + validFlavors [flavor] + stdenvNoCC.mkDerivation rec { + inherit pname; + version = "unstable-2022-12-04"; -lib.checkListOfEnum "${pname}: accent color" validAccents [accent] -lib.checkListOfEnum "${pname}: flavor" validFlavors [flavor] -stdenvNoCC.mkDerivation rec { - inherit pname; - version = "unstable-2022-12-04"; + src = fetchFromGitHub { + owner = "catppuccin"; + repo = "papirus-folders"; + rev = "1a367642df9cf340770bd7097fbe85b9cea65bcb"; + sha256 = "sha256-mFDfRVDA9WyriyFVzsI7iqmPopN56z54FvLkZDS2Dv8="; + }; - src = fetchFromGitHub { - owner = "catppuccin"; - repo = "papirus-folders"; - rev = "1a367642df9cf340770bd7097fbe85b9cea65bcb"; - sha256 = "sha256-mFDfRVDA9WyriyFVzsI7iqmPopN56z54FvLkZDS2Dv8="; - }; + buildInputs = [bash getent gtk3 papirus-icon-theme]; - buildInputs = [bash getent gtk3 papirus-icon-theme]; + patchPhase = '' + substituteInPlace ./papirus-folders --replace "getent" "${getent}/bin/getent" + ''; - patchPhase = '' - substituteInPlace ./papirus-folders --replace "getent" "${getent}/bin/getent" - ''; + installPhase = '' + mkdir -p $out/share/icons + cp -r ${papirus-icon-theme}/share/icons/Papirus* $out/share/icons + chmod -R u+rw $out + cp -r src/* $out/share/icons/Papirus + for theme in $out/share/icons/*; do + ${bash}/bin/bash ./papirus-folders -t $theme -o -C cat-${flavor}-${accent} + gtk-update-icon-cache --force $theme + done + ''; - installPhase = '' - mkdir -p $out/share/icons - cp -r ${papirus-icon-theme}/share/icons/Papirus* $out/share/icons - chmod -R u+rw $out - cp -r src/* $out/share/icons/Papirus - for theme in $out/share/icons/*; do - ${bash}/bin/bash ./papirus-folders -t $theme -o -C cat-${flavor}-${accent} - gtk-update-icon-cache --force $theme - done - ''; - - meta = with lib; { - description = "Soothing pastel theme for Papirus Icon Theme folders"; - homepage = "https://github.com/catppuccin/papirus-folders"; - license = licenses.mit; - maintainers = [ maintainers.nekowinston ]; - }; -} + meta = with lib; { + description = "Soothing pastel theme for Papirus Icon Theme folders"; + homepage = "https://github.com/catppuccin/papirus-folders"; + license = licenses.mit; + maintainers = [maintainers.nekowinston]; + }; + } diff --git a/packages/python3.catppuccin-catwalk/default.nix b/packages/python3.catppuccin-catwalk/default.nix index 55d6ba8..5cc21ae 100644 --- a/packages/python3.catppuccin-catwalk/default.nix +++ b/packages/python3.catppuccin-catwalk/default.nix @@ -1,5 +1,7 @@ -{ lib, python3Packages }: - +{ + lib, + python3Packages, +}: python3Packages.buildPythonApplication rec { pname = "catppuccin_catwalk"; version = "0.4.0"; @@ -19,6 +21,6 @@ python3Packages.buildPythonApplication rec { homepage = "https://github.com/catppuccin/toolbox"; description = "Part of catppuccin/toolbox, to generate preview a single composite screenshot for the four flavours"; license = licenses.mit; - maintainers = [ maintainers.nekowinston ]; + maintainers = [maintainers.nekowinston]; }; } diff --git a/packages/python3.discover-overlay/default.nix b/packages/python3.discover-overlay/default.nix index 1935b44..1461eb4 100644 --- a/packages/python3.discover-overlay/default.nix +++ b/packages/python3.discover-overlay/default.nix @@ -1,5 +1,10 @@ -{ gobject-introspection, gtk3, lib, python3Packages, wrapGAppsHook }: - +{ + gobject-introspection, + gtk3, + lib, + python3Packages, + wrapGAppsHook, +}: python3Packages.buildPythonApplication rec { pname = "discover-overlay"; version = "0.6.3"; @@ -9,8 +14,8 @@ python3Packages.buildPythonApplication rec { sha256 = "sha256-77oCS/MEPiHSVmoSNk1rFu0XLQLqLRSqJlj7ijQMC4A="; }; - nativeBuildInputs = [ wrapGAppsHook gobject-introspection ]; - propagatedBuildInputs = with python3Packages; [ gobject-introspection gtk3 pillow pygobject3 pyxdg requests setuptools websocket-client xlib ]; + nativeBuildInputs = [wrapGAppsHook gobject-introspection]; + propagatedBuildInputs = with python3Packages; [gobject-introspection gtk3 pillow pygobject3 pyxdg requests setuptools websocket-client xlib]; doCheck = false; @@ -18,6 +23,6 @@ python3Packages.buildPythonApplication rec { homepage = "https://github.com/trigg/Discover"; description = "Yet another discord overlay for linux"; license = licenses.gpl3; - maintainers = [ maintainers.nekowinston ]; + maintainers = [maintainers.nekowinston]; }; } diff --git a/packages/vscode-extensions.ms-kubernetes-tools.vscode-kubernetes-tools/default.nix b/packages/vscode-extensions.ms-kubernetes-tools.vscode-kubernetes-tools/default.nix index 5e411a2..bde30d7 100644 --- a/packages/vscode-extensions.ms-kubernetes-tools.vscode-kubernetes-tools/default.nix +++ b/packages/vscode-extensions.ms-kubernetes-tools.vscode-kubernetes-tools/default.nix @@ -1,5 +1,8 @@ -{ lib, vscode-utils, ... }: - +{ + lib, + vscode-utils, + ... +}: vscode-utils.buildVscodeMarketplaceExtension { mktplcRef = { name = "vscode-kubernetes-tools"; @@ -11,6 +14,6 @@ vscode-utils.buildVscodeMarketplaceExtension { description = "Develop, deploy and debug Kubernetes applications"; license = licenses.asl20; downloadPage = "https://marketplace.visualstudio.com/items?itemName=ms-kubernetes-tools.vscode-kubernetes-tools"; - maintainers = with maintainers; [ nekowinston ]; + maintainers = with maintainers; [nekowinston]; }; } diff --git a/shell.nix b/shell.nix index dc63edf..b63baf7 100644 --- a/shell.nix +++ b/shell.nix @@ -1,9 +1,10 @@ -let pkgs = import {}; in - -pkgs.mkShell { - buildInputs = with pkgs; [ - git - git-secret - just - ]; -} +let + pkgs = import {}; +in + pkgs.mkShell { + buildInputs = with pkgs; [ + git + git-secret + just + ]; + }