mirror of
https://github.com/ItsDrike/nixdots
synced 2025-06-29 14:00:45 +00:00
Run alejandra
This commit is contained in:
parent
286920def4
commit
c00134da1c
152 changed files with 827 additions and 721 deletions
|
@ -9,6 +9,6 @@
|
|||
cfg = osConfig.myOptions.home-manager.programs.coding.python;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [ python312Packages.ipython ];
|
||||
home.packages = with pkgs; [python312Packages.ipython];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -9,6 +9,6 @@
|
|||
cfg = osConfig.myOptions.home-manager.programs.coding.python;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [ python312Packages.mypy ];
|
||||
home.packages = with pkgs; [python312Packages.mypy];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -9,6 +9,6 @@
|
|||
cfg = osConfig.myOptions.home-manager.programs.coding.python;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [ pyright ];
|
||||
home.packages = with pkgs; [pyright];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -15,52 +15,52 @@ in {
|
|||
line-length = 119;
|
||||
lint = {
|
||||
select = [
|
||||
"F" # Pyflakes
|
||||
"E" # Pycodestyle (errors)
|
||||
"W" # Pycodestyle (warnigns)
|
||||
"N" # pep8-naming
|
||||
"D" # pydocstyle
|
||||
"UP" # pyupgrade
|
||||
"YTT" # flake8-2020
|
||||
"ANN" # flake8-annotations
|
||||
"F" # Pyflakes
|
||||
"E" # Pycodestyle (errors)
|
||||
"W" # Pycodestyle (warnigns)
|
||||
"N" # pep8-naming
|
||||
"D" # pydocstyle
|
||||
"UP" # pyupgrade
|
||||
"YTT" # flake8-2020
|
||||
"ANN" # flake8-annotations
|
||||
"ASYNC" # flake8-async
|
||||
"S" # flake8-bandit
|
||||
"BLE" # flake8-blind-except
|
||||
"B" # flake8-bugbear
|
||||
"A" # flake8-builtins
|
||||
"COM" # flake8-commas
|
||||
"C4" # flake8-comprehensions
|
||||
"DTZ" # flake8-datetimez
|
||||
"T10" # flake8-debugger
|
||||
"EM" # flake8-errmsg
|
||||
"EXE" # flake8-executable
|
||||
"FA" # flake8-future-annotations
|
||||
"ISC" # flake8-implicit-str-concat
|
||||
"ICN" # flake8-import-conventions
|
||||
"LOG" # flake8-logging
|
||||
"G" # flake8-logging-format
|
||||
"INP" # flake8-no-pep420
|
||||
"PIE" # flake8-pie
|
||||
"T20" # flake8-print
|
||||
"PYI" # flake8-pyi
|
||||
"PT" # flake8-pytest-style
|
||||
"Q" # flake8-quotes
|
||||
"RSE" # flake8-raise
|
||||
"RET" # flake8-return
|
||||
"SLOT" # flake8-slots
|
||||
"SIM" # flake8-simplify
|
||||
"TID" # flake8-tidy-imports
|
||||
"TCH" # flake8-type-checking
|
||||
"INT" # flake8-gettext
|
||||
"PTH" # flake8-use-pathlib
|
||||
"TD" # flake8-todos
|
||||
"ERA" # flake8-eradicate
|
||||
"PGH" # pygrep-hooks
|
||||
"PL" # pylint
|
||||
"TRY" # tryceratops
|
||||
"FLY" # flynt
|
||||
"PERF" # perflint
|
||||
"RUF" # ruff-specific rules
|
||||
"S" # flake8-bandit
|
||||
"BLE" # flake8-blind-except
|
||||
"B" # flake8-bugbear
|
||||
"A" # flake8-builtins
|
||||
"COM" # flake8-commas
|
||||
"C4" # flake8-comprehensions
|
||||
"DTZ" # flake8-datetimez
|
||||
"T10" # flake8-debugger
|
||||
"EM" # flake8-errmsg
|
||||
"EXE" # flake8-executable
|
||||
"FA" # flake8-future-annotations
|
||||
"ISC" # flake8-implicit-str-concat
|
||||
"ICN" # flake8-import-conventions
|
||||
"LOG" # flake8-logging
|
||||
"G" # flake8-logging-format
|
||||
"INP" # flake8-no-pep420
|
||||
"PIE" # flake8-pie
|
||||
"T20" # flake8-print
|
||||
"PYI" # flake8-pyi
|
||||
"PT" # flake8-pytest-style
|
||||
"Q" # flake8-quotes
|
||||
"RSE" # flake8-raise
|
||||
"RET" # flake8-return
|
||||
"SLOT" # flake8-slots
|
||||
"SIM" # flake8-simplify
|
||||
"TID" # flake8-tidy-imports
|
||||
"TCH" # flake8-type-checking
|
||||
"INT" # flake8-gettext
|
||||
"PTH" # flake8-use-pathlib
|
||||
"TD" # flake8-todos
|
||||
"ERA" # flake8-eradicate
|
||||
"PGH" # pygrep-hooks
|
||||
"PL" # pylint
|
||||
"TRY" # tryceratops
|
||||
"FLY" # flynt
|
||||
"PERF" # perflint
|
||||
"RUF" # ruff-specific rules
|
||||
];
|
||||
ignore = [
|
||||
"D100" # Missing docstring in public module
|
||||
|
@ -100,25 +100,25 @@ in {
|
|||
"TD002" # Missing author in TODO
|
||||
"TD003" # Missing issue link on the line following this TODO
|
||||
|
||||
"PT011" # pytest.raises without match parameter is too broad # TODO: Unignore this
|
||||
"TRY003" # No f-strings in raise statements
|
||||
"EM101" # No string literals in exception init
|
||||
"EM102" # No f-strings in exception init
|
||||
"UP024" # Using errors that alias OSError
|
||||
"PT011" # pytest.raises without match parameter is too broad # TODO: Unignore this
|
||||
"TRY003" # No f-strings in raise statements
|
||||
"EM101" # No string literals in exception init
|
||||
"EM102" # No f-strings in exception init
|
||||
"UP024" # Using errors that alias OSError
|
||||
"PLR2004" # Using unnamed numerical constants
|
||||
"PGH003" # Using specific rule codes in type ignores
|
||||
"E731" # Don't asign a lambda expression, use a def
|
||||
"PGH003" # Using specific rule codes in type ignores
|
||||
"E731" # Don't asign a lambda expression, use a def
|
||||
|
||||
# Redundant rules with ruff-format:
|
||||
"E111" # Indentation of a non-multiple of 4 spaces
|
||||
"E114" # Comment with indentation of a non-multiple of 4 spaces
|
||||
"E117" # Cheks for over-indented code
|
||||
"D206" # Checks for docstrings indented with tabs
|
||||
"D300" # Checks for docstring that use ''' instead of """
|
||||
"Q000" # Checks of inline strings that use wrong quotes (' instead of ")
|
||||
"Q001" # Multiline string that use wrong quotes (''' instead of """)
|
||||
"Q002" # Checks for docstrings that use wrong quotes (''' instead of """)
|
||||
"Q003" # Checks for avoidable escaped quotes ("\"" -> '"')
|
||||
"E111" # Indentation of a non-multiple of 4 spaces
|
||||
"E114" # Comment with indentation of a non-multiple of 4 spaces
|
||||
"E117" # Cheks for over-indented code
|
||||
"D206" # Checks for docstrings indented with tabs
|
||||
"D300" # Checks for docstring that use ''' instead of """
|
||||
"Q000" # Checks of inline strings that use wrong quotes (' instead of ")
|
||||
"Q001" # Multiline string that use wrong quotes (''' instead of """)
|
||||
"Q002" # Checks for docstrings that use wrong quotes (''' instead of """)
|
||||
"Q003" # Checks for avoidable escaped quotes ("\"" -> '"')
|
||||
"COM812" # Missing trailing comma (in multi-line lists/tuples/...)
|
||||
"COM819" # Prohibited trailing comma (in single-line lists/tuples/...)
|
||||
"ISC001" # Single line implicit string concatenation ("hi" "hey" -> "hihey")
|
||||
|
@ -126,7 +126,7 @@ in {
|
|||
];
|
||||
extend-per-file-ignores = {
|
||||
"tests/*" = [
|
||||
"ANN" # flake8-annotations
|
||||
"ANN" # flake8-annotations
|
||||
"S101" # Use of assert
|
||||
];
|
||||
"docs/conf.py" = [
|
||||
|
@ -139,10 +139,10 @@ in {
|
|||
combine-as-imports = true;
|
||||
|
||||
# Redundant rules with ruff-format
|
||||
force-single-line = false; # forces all imports to appear on their own line
|
||||
force-wrap-aliases = false; # Split imports with multiple members and at least one alias
|
||||
lines-after-imports = -1; # The number of blank lines to place after imports
|
||||
lines-between-types = 0; # Number of lines to place between "direct" and import from imports
|
||||
force-single-line = false; # forces all imports to appear on their own line
|
||||
force-wrap-aliases = false; # Split imports with multiple members and at least one alias
|
||||
lines-after-imports = -1; # The number of blank lines to place after imports
|
||||
lines-between-types = 0; # Number of lines to place between "direct" and import from imports
|
||||
split-on-trailing-comma = false; # if last member of multiline import has a comma, don't fold it to single line
|
||||
};
|
||||
pylint = {
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
in {
|
||||
config = mkIf cfg.enable {
|
||||
home = {
|
||||
packages = with pkgs; [ rye ];
|
||||
packages = with pkgs; [rye];
|
||||
|
||||
sessionVariables = {
|
||||
RYE_HOME = "${config.xdg.configHome}/rye";
|
||||
|
@ -32,7 +32,7 @@ in {
|
|||
# see: <https://rye.astral.sh/guide/config/#config-file>
|
||||
xdg.configFile."rye/config.toml".source = toTOML "config.toml" {
|
||||
default.license = "GPL-3.0-or-later";
|
||||
behavior.global-python=true;
|
||||
behavior.global-python = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Note: Pretty much all of these configurations were copied from
|
||||
# Note: Pretty much all of these configurations were copied from
|
||||
# https://git.notashelf.dev/NotAShelf/nyx, there may be some small
|
||||
# adjustments made to them but the majority of the credit goes to
|
||||
# notashelf.
|
||||
|
@ -8,5 +8,3 @@ _: {
|
|||
./kitty.nix
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
{
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [
|
||||
libsixel # for displaying images
|
||||
];
|
||||
|
@ -62,4 +59,3 @@
|
|||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -92,4 +92,3 @@ in {
|
|||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Note: Pretty much all of these configurations were copied from
|
||||
# Note: Pretty much all of these configurations were copied from
|
||||
# https://git.notashelf.dev/NotAShelf/nyx, there may be some small
|
||||
# adjustments made to them but the majority of the credit goes to
|
||||
# notashelf.
|
||||
|
@ -9,4 +9,3 @@ _: {
|
|||
./ranger.nix
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -16,4 +16,3 @@ in {
|
|||
${(optionalString config.programs.kitty.enable "set preview_images_method kitty")}
|
||||
'';
|
||||
}
|
||||
|
||||
|
|
|
@ -49,4 +49,3 @@
|
|||
}
|
||||
'';
|
||||
}
|
||||
|
||||
|
|
|
@ -12,4 +12,3 @@ pkgs: {
|
|||
hash = "sha256-k/yre9SYNPYBM2W1DPpL6Ypt3w3EMO9dznHwa+fw/n0=";
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -38,4 +38,3 @@
|
|||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -144,4 +144,3 @@
|
|||
"*.pkg" = "";
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -61,4 +61,3 @@
|
|||
syntect_theme = "";
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -43,4 +43,3 @@
|
|||
permissions_s = {fg = "darkgray";};
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
nr = "${pkgs.nixos-rebuild}/bin/nixos-rebuild";
|
||||
in
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
nr = "${pkgs.nixos-rebuild}/bin/nixos-rebuild";
|
||||
in {
|
||||
programs.zsh.shellAliases = {
|
||||
# I'm not the greatest typist
|
||||
sl = "ls";
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
{ config, pkgs, ... }: {
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./plugins.nix
|
||||
./aliases.nix
|
||||
|
|
|
@ -1,12 +1,9 @@
|
|||
_:
|
||||
let
|
||||
_: let
|
||||
inherit (builtins) readFile;
|
||||
in
|
||||
{
|
||||
|
||||
# I prefer having the rc files split across multiple files in my system rather
|
||||
in {
|
||||
# I prefer having the rc files split across multiple files in my system rather
|
||||
# than just using readFile and putting them all into the generated zshrc
|
||||
# this also allows me to source them individually if I need to
|
||||
# this also allows me to source them individually if I need to
|
||||
# (like in the anonymize function with my prompt)
|
||||
home.file = {
|
||||
# TODO: Load these dynamically, by going over all files in ./rc
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
{ config, pkgs, ... }:
|
||||
let
|
||||
inherit (pkgs) fetchFromGitHub;
|
||||
in
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (pkgs) fetchFromGitHub;
|
||||
in {
|
||||
programs.zsh.plugins = [
|
||||
{
|
||||
name = "zsh-nix-shell";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{pkgs, ...}: {
|
||||
home.sessionVariables = {
|
||||
DIRENV_LOG_FORMAT="";
|
||||
DIRENV_LOG_FORMAT = "";
|
||||
};
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
|
|
|
@ -11,4 +11,3 @@ in {
|
|||
programs.fastfetch.enable = true;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
{
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
|
||||
scriptPkgs = (import ./bin {inherit pkgs;});
|
||||
{pkgs, ...}: let
|
||||
scriptPkgs = import ./bin {inherit pkgs;};
|
||||
in {
|
||||
programs.git = {
|
||||
aliases = {
|
||||
|
@ -70,6 +66,8 @@ in {
|
|||
|
||||
set-upstream = "!git branch --set-upstream-to=origin/`git symbolic-ref --short HEAD`";
|
||||
|
||||
fixup-picker = "!git log -n 50 --pretty=format:'%h %s' --no-merges | fzf | cut -c -7 | xargs -o git commit --fixup";
|
||||
|
||||
staash = "stash --all";
|
||||
stash-staged = "!sh -c 'git stash --keep-index; git stash push -m \"staged\" --keep-index; git stash pop stash@{1}'";
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{pkgs, ...}:
|
||||
pkgs.writeShellScriptBin "better-git-branch" ''
|
||||
${builtins.readFile ./better-git-branch.sh}
|
||||
''
|
||||
pkgs.writeShellScriptBin "better-git-branch" ''
|
||||
${builtins.readFile ./better-git-branch.sh}
|
||||
''
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
{
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
{pkgs, ...}: let
|
||||
packages = {
|
||||
better-git-branch = pkgs.callPackage ./better-git-branch {};
|
||||
};
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
{ osConfig, pkgs, ... }:
|
||||
let
|
||||
myGitConf = osConfig.myOptions.home-manager.git;
|
||||
in
|
||||
{
|
||||
osConfig,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
myGitConf = osConfig.myOptions.home-manager.git;
|
||||
in {
|
||||
imports = [
|
||||
./gh.nix
|
||||
./ignores.nix
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, ... }: {
|
||||
{pkgs, ...}: {
|
||||
programs.gh = {
|
||||
enable = true;
|
||||
gitCredentialHelper.enable = false;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, ... }: {
|
||||
{config, ...}: {
|
||||
programs = {
|
||||
gpg = {
|
||||
enable = true;
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
cfg = osConfig.myOptions.home-manager.programs.applications.iamb;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [ iamb ];
|
||||
home.packages = with pkgs; [iamb];
|
||||
|
||||
xdg.configFile."iamb/config.json".text = builtins.toJSON {
|
||||
settings = {
|
||||
|
@ -33,10 +33,12 @@ in {
|
|||
};
|
||||
|
||||
default_profile = cfg.defaultProfile;
|
||||
profiles = lib.mapAttrs (name: profile: {
|
||||
user_id = profile.userId;
|
||||
url = profile.homeServer;
|
||||
}) cfg.profiles;
|
||||
profiles =
|
||||
lib.mapAttrs (name: profile: {
|
||||
user_id = profile.userId;
|
||||
url = profile.homeServer;
|
||||
})
|
||||
cfg.profiles;
|
||||
|
||||
dirs = {
|
||||
cache = "${config.xdg.cacheHome}/iamb/";
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
# Config copied from https://git.notashelf.dev/NotAShelf/nyx
|
||||
{ pkgs, lib, ... }: let
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) getExe;
|
||||
|
||||
mpv = "${getExe pkgs.mpv}";
|
||||
|
@ -69,5 +73,5 @@ in {
|
|||
macro v set browser "${mpv} %u" ; open-in-browser ; set browser "firefox %u" -- "Open video on mpv"
|
||||
macro , open-in-browser
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -57,4 +57,3 @@
|
|||
{url = "https://kiszamolo.hu/feed";}
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, ... }: {
|
||||
{config, ...}: {
|
||||
programs = {
|
||||
# nix-index is a file database for nixpkgs
|
||||
# this provides `nix-locate` command.
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
{
|
||||
programs = {
|
||||
ssh = {
|
||||
|
||||
# TODO: Enable this after figuring out how to add protected/encrypted blocks here.
|
||||
# I don't like the idea of expising IPs/hostnames in the config.
|
||||
# For now, I just persist the .ssh directory, managing stuff manually.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue