style: reformat with alejandra

This commit is contained in:
winston 2023-02-10 07:46:37 +01:00
parent 4d30be6fe5
commit ce3fed7148
Signed by: winston
GPG key ID: 3786770EDBC2B481
44 changed files with 812 additions and 468 deletions

View file

@ -1,11 +1,14 @@
{ config, lib, options, pkgs, ... }: {
config,
lib,
options,
pkgs,
...
}:
with lib; let with lib; let
global = config.catppuccin; global = config.catppuccin;
cfg = config.catppuccin.bat; cfg = config.catppuccin.bat;
in in {
{
options.catppuccin.bat = { options.catppuccin.bat = {
enable = mkEnableOption { enable = mkEnableOption {
type = types.bool; type = types.bool;
@ -35,14 +38,15 @@ in
theme = "Catppuccin-${cfg.theme}"; theme = "Catppuccin-${cfg.theme}";
}; };
themes = let themes = let
getTheme = flavour: builtins.readFile (pkgs.fetchFromGitHub { getTheme = flavour:
builtins.readFile (pkgs.fetchFromGitHub {
owner = "catppuccin"; owner = "catppuccin";
repo = "bat"; repo = "bat";
rev = "ba4d16880d63e656acced2b7d4e034e4a93f74b1"; rev = "ba4d16880d63e656acced2b7d4e034e4a93f74b1";
sha256 = "sha256-6WVKQErGdaqb++oaXnY3i6/GuH2FhTgK0v4TN4Y0Wbw="; sha256 = "sha256-6WVKQErGdaqb++oaXnY3i6/GuH2FhTgK0v4TN4Y0Wbw=";
} + "/Catppuccin-${flavour}.tmTheme"); }
in + "/Catppuccin-${flavour}.tmTheme");
{ in {
Catppuccin-mocha = getTheme "mocha"; Catppuccin-mocha = getTheme "mocha";
Catppuccin-macchiato = getTheme "macchiato"; Catppuccin-macchiato = getTheme "macchiato";
Catppuccin-frappe = getTheme "frappe"; Catppuccin-frappe = getTheme "frappe";

View file

@ -1,11 +1,14 @@
{ config, lib, options, pkgs, ... }: {
config,
lib,
options,
pkgs,
...
}:
with lib; let with lib; let
global = config.catppuccin; global = config.catppuccin;
cfg = config.catppuccin.btop; cfg = config.catppuccin.btop;
in in {
{
options.catppuccin.btop = { options.catppuccin.btop = {
enable = mkEnableOption { enable = mkEnableOption {
type = types.bool; type = types.bool;
@ -30,7 +33,8 @@ in
repo = "btop"; repo = "btop";
rev = "ecb8562bb6181bb9f2285c360bbafeb383249ec3"; rev = "ecb8562bb6181bb9f2285c360bbafeb383249ec3";
sha256 = "sha256-ovVtupO5jWUw6cwA3xEzRe1juUB8ykfarMRVTglx3mk="; sha256 = "sha256-ovVtupO5jWUw6cwA3xEzRe1juUB8ykfarMRVTglx3mk=";
} + "/catppuccin_${cfg.theme}.theme"); }
+ "/catppuccin_${cfg.theme}.theme");
}; };
}; };
} }

View file

@ -1,10 +1,7 @@
{lib, ...}: {lib, ...}:
with lib; let with lib; let
cfg = config.catppuccin; cfg = config.catppuccin;
in in {
{
imports = [ imports = [
./bat ./bat
./btop ./btop

View file

@ -1,15 +1,25 @@
{ config, lib, options, pkgs, ... }: {
config,
lib,
options,
pkgs,
...
}:
with lib; let with lib; let
global = config.catppuccin; global = config.catppuccin;
cfg = config.catppuccin.dircolors; cfg = config.catppuccin.dircolors;
# generated via vivid@HEAD - ./generate.sh # generated via vivid@HEAD - ./generate.sh
theme = flavour: trueColor: builtins.fromJSON ( theme = flavour: trueColor:
builtins.readFile ./catppuccin-${flavour + (if trueColor then "" else "-8bit")}.json builtins.fromJSON (
builtins.readFile
./catppuccin-${flavour
+ (
if trueColor
then ""
else "-8bit"
)}.json
); );
in in {
{
options.catppuccin = { options.catppuccin = {
dircolors = { dircolors = {
enable = mkEnableOption { enable = mkEnableOption {

View file

@ -1,5 +1,9 @@
{ fetchFromGitHub, lib, pkgs, rustPlatform }: {
fetchFromGitHub,
lib,
pkgs,
rustPlatform,
}:
rustPlatform.buildRustPackage rec { rustPlatform.buildRustPackage rec {
pname = "vivid"; pname = "vivid";
version = "9299aa4c843bb7ed757b47bb2449abbba3aed793"; version = "9299aa4c843bb7ed757b47bb2449abbba3aed793";

View file

@ -1,17 +1,20 @@
{ config, lib, options, pkgs, ... }: {
config,
lib,
options,
pkgs,
...
}:
with lib; let with lib; let
global = config.catppuccin; global = config.catppuccin;
cfg = config.catppuccin.btop; cfg = config.catppuccin.btop;
fromINI = f: let fromINI = f: let
iniFile = iniFile = pkgs.runCommand "in.ini" {
pkgs.runCommand "in.ini" {
nativeBuildInputs = [pkgs.jc]; nativeBuildInputs = [pkgs.jc];
} ''jc --ini < ${f} > "$out" ''; } ''jc --ini < ${f} > "$out" '';
in builtins.fromJSON(builtins.readFile iniFile);
in in
builtins.fromJSON (builtins.readFile iniFile);
{ in {
options.catppuccin.dunst = { options.catppuccin.dunst = {
enable = mkEnableOption { enable = mkEnableOption {
type = types.bool; type = types.bool;
@ -33,7 +36,8 @@ in
repo = "dunst"; repo = "dunst";
rev = "a72991e56338289a9fce941b5df9f0509d2cba09"; rev = "a72991e56338289a9fce941b5df9f0509d2cba09";
sha256 = "sha256-1LeSKuZcuWr9z6mKnyt1ojFOnIiTupwspGrOw/ts8Yk="; sha256 = "sha256-1LeSKuZcuWr9z6mKnyt1ojFOnIiTupwspGrOw/ts8Yk=";
} + "/src/mocha.conf"); }
+ "/src/mocha.conf");
}; };
}; };
} }

View file

@ -1,11 +1,16 @@
{ config, lib, options, pkgs, ... }: {
config,
lib,
options,
pkgs,
...
}:
with lib; let with lib; let
global = config.catppuccin; global = config.catppuccin;
cfg = config.catppuccin.k9s; cfg = config.catppuccin.k9s;
fromYAML = f: fromYAML = f: let
let jsonFile =
jsonFile = pkgs.runCommand "in.json" pkgs.runCommand "in.json"
{ {
nativeBuildInputs = [pkgs.gojq]; nativeBuildInputs = [pkgs.gojq];
} '' } ''
@ -13,9 +18,7 @@ with lib; let
''; '';
in in
builtins.fromJSON (builtins.readFile jsonFile); builtins.fromJSON (builtins.readFile jsonFile);
in in {
{
options.catppuccin.k9s = { options.catppuccin.k9s = {
enable = mkEnableOption { enable = mkEnableOption {
type = types.bool; type = types.bool;
@ -37,7 +40,8 @@ in
repo = "k9s"; repo = "k9s";
rev = "322598e19a4270298b08dc2765f74795e23a1615"; rev = "322598e19a4270298b08dc2765f74795e23a1615";
sha256 = "sha256-GrRCOwCgM8BFhY8TzO3/WDTUnGtqkhvlDWE//ox2GxI="; sha256 = "sha256-GrRCOwCgM8BFhY8TzO3/WDTUnGtqkhvlDWE//ox2GxI=";
} + /dist/${cfg.theme}.yml); }
+ /dist/${cfg.theme}.yml);
}; };
}; };
} }

View file

@ -1,11 +1,14 @@
{ config, lib, options, pkgs, ... }: {
config,
lib,
options,
pkgs,
...
}:
with lib; let with lib; let
global = config.catppuccin; global = config.catppuccin;
cfg = config.catppuccin.btop; cfg = config.catppuccin.btop;
in in {
{
options.catppuccin.lsd = { options.catppuccin.lsd = {
enable = mkEnableOption { enable = mkEnableOption {
type = types.bool; type = types.bool;

View file

@ -1,5 +1,8 @@
{ lib, vscode-utils, ... }: {
lib,
vscode-utils,
...
}:
vscode-utils.buildVscodeMarketplaceExtension { vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = { mktplcRef = {
name = "catppuccin-vsc"; name = "catppuccin-vsc";

View file

@ -1,11 +1,15 @@
{ config, lib, options, pkgs, vscode-utils, ... }: {
config,
lib,
options,
pkgs,
vscode-utils,
...
}:
with lib; let with lib; let
global = config.catppuccin; global = config.catppuccin;
cfg = config.catppuccin.vscode; cfg = config.catppuccin.vscode;
in in {
{
options.catppuccin = { options.catppuccin = {
vscode = { vscode = {
enable = mkEnableOption { enable = mkEnableOption {

View file

@ -1,9 +1,11 @@
{ config, pkgs, ... }: {
config,
let pkgs,
...
}: let
mainUser = "winston"; mainUser = "winston";
plymouthPkg = (pkgs.stdenv.mkDerivation { plymouthPkg = pkgs.stdenv.mkDerivation {
name = "plymouth-theme-catppuccin"; name = "plymouth-theme-catppuccin";
src = pkgs.fetchFromGitHub { src = pkgs.fetchFromGitHub {
@ -21,10 +23,8 @@ let
cat "themes/catppuccin-''${dir}/catppuccin-''${dir}.plymouth" | sed "s@\/usr\/@''${out}\/@" > "''${out}/share/plymouth/themes/catppuccin-''${dir}/catppuccin-''${dir}.plymouth" cat "themes/catppuccin-''${dir}/catppuccin-''${dir}.plymouth" | sed "s@\/usr\/@''${out}\/@" > "''${out}/share/plymouth/themes/catppuccin-''${dir}/catppuccin-''${dir}.plymouth"
done done
''; '';
}); };
in in {
{
nix.settings.experimental-features = ["nix-command" "flakes"]; nix.settings.experimental-features = ["nix-command" "flakes"];
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
programs.nix-ld.enable = true; programs.nix-ld.enable = true;

View file

@ -1,6 +1,9 @@
{ config, lib, pkgs, ... }:
{ {
config,
lib,
pkgs,
...
}: {
# Auto upgrade nix package and the daemon service. # Auto upgrade nix package and the daemon service.
services.nix-daemon.enable = true; services.nix-daemon.enable = true;
nix = { nix = {

View file

@ -27,8 +27,7 @@
nur, nur,
sops, sops,
... ...
}: }: let
let
overlay-unstable = final: prev: { overlay-unstable = final: prev: {
unstable = import nixpkgs-unstable { unstable = import nixpkgs-unstable {
system = prev.system; system = prev.system;

View file

@ -1,12 +1,17 @@
{ config, lib, nur, pkgs, sops, machine, ... }: {
config,
let lib,
nur,
pkgs,
sops,
machine,
...
}: let
inherit (pkgs.stdenv.hostPlatform) isLinux; inherit (pkgs.stdenv.hostPlatform) isLinux;
inherit (pkgs.stdenv.hostPlatform) isDarwin; inherit (pkgs.stdenv.hostPlatform) isDarwin;
in in {
imports =
{ [
imports = [
nur nur
sops sops
./catppuccin ./catppuccin
@ -23,7 +28,8 @@ in
./modules/vscode.nix ./modules/vscode.nix
./modules/wezterm.nix ./modules/wezterm.nix
./modules/zsh.nix ./modules/zsh.nix
] ++ lib.optionals (builtins.pathExists ./modules/secrets.nix) [ ]
++ lib.optionals (builtins.pathExists ./modules/secrets.nix) [
# hotfix: use fucking git-secret, this is atrocious beyond belief # hotfix: use fucking git-secret, this is atrocious beyond belief
./modules/secrets.nix ./modules/secrets.nix
]; ];
@ -41,28 +47,40 @@ in
home = { home = {
packages = with pkgs; ([ packages = with pkgs; ([
zsh zsh
fd ffmpeg file imagemagick mdcat ranger ripgrep fd
ffmpeg
file
imagemagick
mdcat
ranger
ripgrep
git-secret git-secret
cargo unstable.deno rustc cargo
unstable.deno
rustc
(callPackage ./packages/org-stats {}) (callPackage ./packages/org-stats {})
(callPackage ./packages/python3.catppuccin-catwalk {}) (callPackage ./packages/python3.catppuccin-catwalk {})
(nerdfonts.override {fonts = ["NerdFontsSymbolsOnly"];}) (nerdfonts.override {fonts = ["NerdFontsSymbolsOnly"];})
unstable.wezterm unstable.wezterm
(callPackage ./packages/helm-ls {}) (callPackage ./packages/helm-ls {})
] ++ lib.optionals isDarwin [ ]
++ lib.optionals isDarwin [
iina iina
] ++ lib.optionals isLinux [ ]
++ lib.optionals isLinux [
_1password-gui _1password-gui
insomnia insomnia
mattermost-desktop mattermost-desktop
] ++ lib.optionals (isLinux && machine.personal) [ ]
++ lib.optionals (isLinux && machine.personal) [
(callPackage ./packages/python3.discover-overlay {}) (callPackage ./packages/python3.discover-overlay {})
unstable.discord unstable.discord
lutris lutris
]); ]);
sessionVariables = { sessionVariables =
{
TERMINAL = "wezterm"; TERMINAL = "wezterm";
LESSHISTFILE = "-"; LESSHISTFILE = "-";
@ -70,11 +88,16 @@ in
NPM_CONFIG_USERCONFIG = "${config.xdg.configHome}/npm/npmrc"; NPM_CONFIG_USERCONFIG = "${config.xdg.configHome}/npm/npmrc";
RUSTUP_HOME = "${config.xdg.dataHome}/rustup"; RUSTUP_HOME = "${config.xdg.dataHome}/rustup";
PATH = "$PATH:${config.xdg.dataHome}/krew/bin:$GOPATH/bin"; PATH = "$PATH:${config.xdg.dataHome}/krew/bin:$GOPATH/bin";
} // (if isDarwin then { }
// (
if isDarwin
then {
# https://github.com/NixOS/nix/issues/2033 # 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}"; 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"; SSH_AUTH_SOCK = "${config.xdg.configHome}/gnupg/S.gpg-agent.ssh";
} else {}); }
else {}
);
stateVersion = "22.11"; stateVersion = "22.11";
}; };

View file

@ -1,9 +1,7 @@
{pkgs, ...}: {pkgs, ...}:
with lib; let with lib; let
cfg = config.catppuccin; cfg = config.catppuccin;
in in {
{
programs.btop = { programs.btop = {
enable = true; enable = true;
settings = { settings = {

View file

@ -1,16 +1,21 @@
{ config, lib, nur, pkgs, ... }: {
config,
let lib,
nur,
pkgs,
...
}: let
inherit (pkgs.stdenv.hostPlatform) isLinux; inherit (pkgs.stdenv.hostPlatform) isLinux;
inherit (pkgs.stdenv.hostPlatform) isDarwin; inherit (pkgs.stdenv.hostPlatform) isDarwin;
in in {
{
programs.firefox = { programs.firefox = {
enable = true; enable = true;
# since I'm using firefox from brew on darwin, I need to build a dummy package # since I'm using firefox from brew on darwin, I need to build a dummy package
# to still manage it via home-manager # 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 = { profiles.default = {
search.default = "DuckDuckGo"; search.default = "DuckDuckGo";
search.force = true; search.force = true;

View file

@ -1,6 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
programs.git = { programs.git = {
enable = true; enable = true;
userName = "winston"; userName = "winston";

View file

@ -1,11 +1,11 @@
{ config, pkgs, ... }: {
config,
let pkgs,
...
}: let
inherit (pkgs.stdenv.hostPlatform) isLinux; inherit (pkgs.stdenv.hostPlatform) isLinux;
key = "0x0B89BC45007EE9CC"; key = "0x0B89BC45007EE9CC";
in in {
{
home.packages = with pkgs; [ home.packages = with pkgs; [
git-credential-gopass git-credential-gopass
gnupg-pkcs11-scd gnupg-pkcs11-scd

View file

@ -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 { home = lib.mkIf isLinux {
packages = with pkgs; [ packages = with pkgs; [
blueberry blueberry
@ -13,7 +15,8 @@ in
]; ];
}; };
nixpkgs.overlays = [(self: super: { nixpkgs.overlays = [
(self: super: {
picom = super.picom.overrideAttrs (old: { picom = super.picom.overrideAttrs (old: {
src = pkgs.fetchFromGitHub { src = pkgs.fetchFromGitHub {
owner = "FT-Labs"; owner = "FT-Labs";
@ -23,7 +26,8 @@ in
}; };
nativeBuildInputs = old.nativeBuildInputs ++ [pkgs.pcre2]; nativeBuildInputs = old.nativeBuildInputs ++ [pkgs.pcre2];
}); });
})]; })
];
gtk = lib.mkIf isLinux { gtk = lib.mkIf isLinux {
enable = true; enable = true;
@ -114,7 +118,6 @@ in
}; };
}; };
services = lib.mkIf isLinux { services = lib.mkIf isLinux {
dunst.enable = true; dunst.enable = true;
flameshot = { flameshot = {

View file

@ -1,6 +1,8 @@
{ config, pkgs, ...}:
{ {
config,
pkgs,
...
}: {
home.packages = with pkgs; [ home.packages = with pkgs; [
dyff dyff
gojq gojq

View file

@ -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.maildirBasePath = "${config.xdg.dataHome}/mail";
accounts.email.accounts = { accounts.email.accounts = {
@ -64,46 +65,202 @@ in
mailcap_path = "$HOME/.config/neomutt/mailcap:$mailcap_path"; mailcap_path = "$HOME/.config/neomutt/mailcap:$mailcap_path";
}; };
binds = [ binds = [
{ map = [ "index" "pager" ]; key = "i"; action = "noop"; } {
{ map = [ "index" "pager" ]; key = "g"; action = "noop"; } map = ["index" "pager"];
{ map = [ "index" ]; key = "\\Cf"; action = "noop"; } key = "i";
{ map = [ "index" "pager" ]; key = "M"; action = "noop"; } 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" "pager"];
{ map = [ "index" ]; key = "k"; action = "previous-entry"; } key = "g";
{ map = [ "attach" ]; key = "<return>"; action = "view-mailcap"; } action = "noop";
{ map = [ "attach" ]; key = "l"; action = "view-mailcap"; } }
{ map = [ "editor" ]; key = "<space>"; action = "noop"; } {
{ map = [ "index" ]; key = "G"; action = "last-entry"; } map = ["index"];
{ map = [ "index" ]; key = "gg"; action = "first-entry"; } key = "\\Cf";
{ map = [ "pager" "attach" ]; key = "h"; action = "exit"; } action = "noop";
{ map = [ "pager" ]; key = "j"; action = "next-line"; } }
{ map = [ "pager" ]; key = "k"; action = "previous-line"; } {
{ map = [ "pager" ]; key = "l"; action = "view-attachments"; } map = ["index" "pager"];
{ map = [ "index" ]; key = "D"; action = "delete-message"; } key = "M";
{ map = [ "index" ]; key = "U"; action = "undelete-message"; } action = "noop";
{ map = [ "index" ]; key = "L"; action = "limit"; } }
{ map = [ "index" ]; key = "h"; action = "noop"; } {
{ map = [ "index" ]; key = "l"; action = "display-message"; } map = ["index" "pager"];
{ map = [ "index" "query" ]; key = "<space>"; action = "tag-entry"; } key = "C";
{ map = [ "browser" ]; key = "h"; action = "goto-parent"; } 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 = "<return>";
action = "view-mailcap";
}
{
map = ["attach"];
key = "l";
action = "view-mailcap";
}
{
map = ["editor"];
key = "<space>";
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 = "<space>";
action = "tag-entry";
}
{
map = ["browser"];
key = "h";
action = "goto-parent";
}
# { map = [ "browser" ]; key = "h"; action = "'<change-dir><kill-line>..<enter>' \"Go to parent folder\""; } # { map = [ "browser" ]; key = "h"; action = "'<change-dir><kill-line>..<enter>' \"Go to parent folder\""; }
{ map = [ "index" "pager" ]; key = "H"; action = "view-raw-message"; } {
{ map = [ "browser" ]; key = "l"; action = "select-entry"; } map = ["index" "pager"];
{ map = [ "browser" ]; key = "gg"; action = "top-page"; } key = "H";
{ map = [ "browser" ]; key = "G"; action = "bottom-page"; } action = "view-raw-message";
{ map = [ "pager" ]; key = "gg"; action = "top"; } }
{ map = [ "pager" ]; key = "G"; action = "bottom"; } {
{ map = [ "index" "pager" "browser" ]; key = "d"; action = "half-down"; } map = ["browser"];
{ map = [ "index" "pager" "browser" ]; key = "u"; action = "half-up"; } key = "l";
{ map = [ "index" "pager" ]; key = "S"; action = "sync-mailbox"; } action = "select-entry";
{ map = [ "index" "pager" ]; key = "R"; action = "group-reply"; } }
{ map = [ "index" ]; key = "\\031"; action = "previous-undeleted"; } {
{ map = [ "index" ]; key = "\\005"; action = "next-undeleted"; } map = ["browser"];
{ map = [ "pager" ]; key = "\\031"; action = "previous-line"; } key = "gg";
{ map = [ "pager" ]; key = "\\005"; action = "next-line"; } action = "top-page";
{ map = [ "editor" ]; key = "<Tab>"; action = "complete-query"; } }
{
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 = "<Tab>";
action = "complete-query";
}
]; ];
}; };
notmuch.enable = true; notmuch.enable = true;

View file

@ -1,29 +1,72 @@
{ config, lib, pkgs, ... }: {
config,
let lib,
pkgs,
...
}: let
inherit (pkgs.stdenv.hostPlatform) isDarwin; inherit (pkgs.stdenv.hostPlatform) isDarwin;
inherit (pkgs.stdenv.hostPlatform) isLinux; inherit (pkgs.stdenv.hostPlatform) isLinux;
darp = pkgs.callPackage ../packages/discord-applemusic-rich-presence {}; darp = pkgs.callPackage ../packages/discord-applemusic-rich-presence {};
in in {
{
programs.ncmpcpp = { programs.ncmpcpp = {
enable = isLinux; enable = isLinux;
bindings = [ bindings = [
{ key = "j"; command = "scroll_down"; } {
{ key = "k"; command = "scroll_up"; } key = "j";
{ key = "J"; command = [ "select_item" "scroll_down" ]; } command = "scroll_down";
{ key = "K"; command = [ "select_item" "scroll_up" ]; } }
{ key = "h"; command = "previous_column"; } {
{ key = "l"; command = "next_column"; } key = "k";
{ key = "ctrl-b"; command = "page_up"; } command = "scroll_up";
{ key = "ctrl-u"; command = "page_up"; } }
{ key = "ctrl-f"; command = "page_down"; } {
{ key = "ctrl-d"; command = "page_down"; } key = "J";
{ key = "g"; command = "move_home"; } command = ["select_item" "scroll_down"];
{ key = "G"; command = "move_end"; } }
{ key = "n"; command = "next_found_item"; } {
{ key = "N"; command = "previous_found_item"; } 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";
}
]; ];
}; };

View file

@ -1,6 +1,9 @@
{ config, pkgs, flakePath, ... }:
{ {
config,
pkgs,
flakePath,
...
}: {
programs.neovim = { programs.neovim = {
enable = true; enable = true;
defaultEditor = true; defaultEditor = true;

View file

@ -1,6 +1,4 @@
{ config, ... }: {config, ...}: {
{
programs.newsboat = { programs.newsboat = {
enable = true; enable = true;
autoReload = true; autoReload = true;

View file

@ -1,6 +1,8 @@
{ config, lib, ... }:
{ {
config,
lib,
...
}: {
home = lib.mkIf isDarwin { home = lib.mkIf isDarwin {
packages = [pkgs.unstable.sketchybar]; packages = [pkgs.unstable.sketchybar];
}; };

View file

@ -1,6 +1,8 @@
{ config, lib, ... }:
{ {
config,
lib,
...
}: {
# TODO: enable after sops supports nix-darwin # TODO: enable after sops supports nix-darwin
sops = { sops = {
gnupg.home = "${config.xdg.configHome}/gnupg"; gnupg.home = "${config.xdg.configHome}/gnupg";

View file

@ -1,11 +1,13 @@
{ config, flakePath, lib, pkgs, ... }: {
config,
let flakePath,
lib,
pkgs,
...
}: let
inherit (pkgs.stdenv.hostPlatform) isLinux; inherit (pkgs.stdenv.hostPlatform) isLinux;
inherit (pkgs.stdenv.hostPlatform) isDarwin; inherit (pkgs.stdenv.hostPlatform) isDarwin;
in in {
{
programs.vscode = { programs.vscode = {
enable = true; enable = true;
extensions = with pkgs.vscode-extensions; [ extensions = with pkgs.vscode-extensions; [

View file

@ -1,6 +1,8 @@
{ config, flakePath, ... }:
{ {
config,
flakePath,
...
}: {
xdg.configFile = { xdg.configFile = {
"wezterm" = { "wezterm" = {
source = config.lib.file.mkOutOfStoreSymlink "${flakePath}/modules/wezterm"; source = config.lib.file.mkOutOfStoreSymlink "${flakePath}/modules/wezterm";

View file

@ -1,6 +1,10 @@
{ config, flakePath, lib, pkgs, ... }:
{ {
config,
flakePath,
lib,
pkgs,
...
}: {
programs = { programs = {
direnv.enable = true; direnv.enable = true;
direnv.nix-direnv.enable = true; direnv.nix-direnv.enable = true;
@ -34,8 +38,7 @@
initExtra = let initExtra = let
functionsDir = "${config.home.homeDirectory}/${config.programs.zsh.dotDir}/functions"; functionsDir = "${config.home.homeDirectory}/${config.programs.zsh.dotDir}/functions";
in in ''
''
for conf in "${functionsDir}"/**/*.zsh; do for conf in "${functionsDir}"/**/*.zsh; do
source "$conf" source "$conf"
done done

View file

@ -1,5 +1,8 @@
{ fetchzip, lib, stdenv }: {
fetchzip,
lib,
stdenv,
}:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "AppleMusicDiscordRPC"; pname = "AppleMusicDiscordRPC";
version = "1.3.0"; version = "1.3.0";

View file

@ -1,6 +1,9 @@
{ fetchzip, lib, pkgs, stdenv }: {
fetchzip,
let lib,
pkgs,
stdenv,
}: let
flavour = "Mocha"; flavour = "Mocha";
accent = "Pink"; accent = "Pink";
in in

View file

@ -1,5 +1,9 @@
{ appimageTools, fetchurl, lib, pkgs }: {
appimageTools,
fetchurl,
lib,
pkgs,
}:
appimageTools.wrapType1 rec { appimageTools.wrapType1 rec {
name = "cura"; name = "cura";
version = "5.2.1"; version = "5.2.1";

View file

@ -1,13 +1,19 @@
{ buildGoModule, fetchFromGitHub, lib, pkgs, ... }: {
buildGoModule,
let fetchFromGitHub,
lib,
pkgs,
...
}: let
inherit (pkgs.stdenv.hostPlatform) system; inherit (pkgs.stdenv.hostPlatform) system;
target = { target =
{
"aarch64-darwin" = "arm64"; "aarch64-darwin" = "arm64";
"x86_64-darwin" = "x86"; "x86_64-darwin" = "x86";
}.${system} or (throw "Unsupported system: ${system}"); }
.${system}
or (throw "Unsupported system: ${system}");
in in
buildGoModule rec { buildGoModule rec {
pname = "discord-applemusic-rich-presence"; pname = "discord-applemusic-rich-presence";
version = "0.5.0"; version = "0.5.0";

View file

@ -1,5 +1,9 @@
{ buildNpmPackage, lib, pkgs, ... }: {
buildNpmPackage,
lib,
pkgs,
...
}:
buildNpmPackage { buildNpmPackage {
pname = "nodePackages.emmet-ls"; pname = "nodePackages.emmet-ls";
version = "0.3.1"; version = "0.3.1";

View file

@ -1,5 +1,10 @@
{ buildGoModule, fetchFromGitHub, lib, pkgs, ... }: {
buildGoModule,
fetchFromGitHub,
lib,
pkgs,
...
}:
buildGoModule rec { buildGoModule rec {
pname = "helm-ls"; pname = "helm-ls";
version = "20220912"; version = "20220912";

View file

@ -1,5 +1,10 @@
{ buildGoModule, fetchFromGitHub, lib, pkgs, ... }: {
buildGoModule,
fetchFromGitHub,
lib,
pkgs,
...
}:
buildGoModule rec { buildGoModule rec {
pname = "jq-lsp"; pname = "jq-lsp";
version = "20221220"; version = "20221220";

View file

@ -1,5 +1,9 @@
{ stdenv, fetchurl, lib, undmg }: {
stdenv,
fetchurl,
lib,
undmg,
}:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "librewolf"; name = "librewolf";
version = "109.0-1"; version = "109.0-1";

View file

@ -1,5 +1,9 @@
{ lib, python3Packages, mopidy, mopidy-podcast }: {
lib,
python3Packages,
mopidy,
mopidy-podcast,
}:
python3Packages.buildPythonApplication rec { python3Packages.buildPythonApplication rec {
pname = "mopidy-podcast-itunes"; pname = "mopidy-podcast-itunes";
version = "3.0.1"; version = "3.0.1";

View file

@ -1,5 +1,10 @@
{ buildGoModule, fetchFromGitHub, lib, pkgs, ... }: {
buildGoModule,
fetchFromGitHub,
lib,
pkgs,
...
}:
buildGoModule rec { buildGoModule rec {
pname = "discord-applemusic-rich-presence"; pname = "discord-applemusic-rich-presence";
version = "1.11.2"; version = "1.11.2";

View file

@ -1,12 +1,22 @@
{ stdenvNoCC, lib, fetchFromGitHub, papirus-icon-theme, gtk3, bash, getent, flavor ? "mocha", accent ? "blue", ... }: {
let 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"]; validAccents = ["blue" "flamingo" "green" "lavender" "maroon" "mauve" "peach" "pink" "red" "rosewater" "sapphire" "sky" "teal" "yellow"];
validFlavors = ["latte" "frappe" "macchiato" "mocha"]; validFlavors = ["latte" "frappe" "macchiato" "mocha"];
pname = "catppuccin-papirus-folders"; pname = "catppuccin-papirus-folders";
in in
lib.checkListOfEnum "${pname}: accent color" validAccents [accent] lib.checkListOfEnum "${pname}: accent color" validAccents [accent]
lib.checkListOfEnum "${pname}: flavor" validFlavors [flavor] lib.checkListOfEnum "${pname}: flavor"
validFlavors [flavor]
stdenvNoCC.mkDerivation rec { stdenvNoCC.mkDerivation rec {
inherit pname; inherit pname;
version = "unstable-2022-12-04"; version = "unstable-2022-12-04";

View file

@ -1,5 +1,7 @@
{ lib, python3Packages }: {
lib,
python3Packages,
}:
python3Packages.buildPythonApplication rec { python3Packages.buildPythonApplication rec {
pname = "catppuccin_catwalk"; pname = "catppuccin_catwalk";
version = "0.4.0"; version = "0.4.0";

View file

@ -1,5 +1,10 @@
{ gobject-introspection, gtk3, lib, python3Packages, wrapGAppsHook }: {
gobject-introspection,
gtk3,
lib,
python3Packages,
wrapGAppsHook,
}:
python3Packages.buildPythonApplication rec { python3Packages.buildPythonApplication rec {
pname = "discover-overlay"; pname = "discover-overlay";
version = "0.6.3"; version = "0.6.3";

View file

@ -1,5 +1,8 @@
{ lib, vscode-utils, ... }: {
lib,
vscode-utils,
...
}:
vscode-utils.buildVscodeMarketplaceExtension { vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = { mktplcRef = {
name = "vscode-kubernetes-tools"; name = "vscode-kubernetes-tools";

View file

@ -1,5 +1,6 @@
let pkgs = import <nixpkgs> {}; in let
pkgs = import <nixpkgs> {};
in
pkgs.mkShell { pkgs.mkShell {
buildInputs = with pkgs; [ buildInputs = with pkgs; [
git git