diff --git a/config/mypy/config b/config/mypy/config deleted file mode 100644 index 8352875..0000000 --- a/config/mypy/config +++ /dev/null @@ -1,7 +0,0 @@ -[mypy] -cache_dir = ~/.cache/mypy -ignore_missing_imports = True -disallow_untyped_defs = True -disallow_untyped_calls = True -disallow_incomplete_defs = True -disallow_untyped_decorators = True diff --git a/config/nix/hm/common.nix b/config/nix/hm/common.nix index 7269f79..af472d5 100644 --- a/config/nix/hm/common.nix +++ b/config/nix/hm/common.nix @@ -324,7 +324,6 @@ in }; xdg = { configFile = { - # TODO Should be xdg.configFile "ccache.conf" = { text = "ccache_dir = ${config.xdg.cacheHome}/ccache"; }; @@ -346,6 +345,9 @@ in log-scale: yes ''; }; + "pythonstartup.py" = { + text = (builtins.readFile ./pythonstartup.py); + }; }; }; home = { diff --git a/config/nix/hm/desktop.nix b/config/nix/hm/desktop.nix index f377623..8e4b5b7 100644 --- a/config/nix/hm/desktop.nix +++ b/config/nix/hm/desktop.nix @@ -422,6 +422,27 @@ XDG_SCREENSHOTS_DIR = "${config.home.homeDirectory}/Screenshots"; }; }; + configFile = { + "pulse/client.conf" = { + text = ''cookie-file = .config/pulse/pulse-cookie''; + }; + "xinitrc" = + let + nixgl = import + (builtins.fetchGit { + url = "https://github.com/nix-community/nixGL"; + rev = "489d6b095ab9d289fe11af0219a9ff00fe87c7c5"; + }) + { }; + in + { + # TODO Configurable + source = pkgs.writeShellScript "xinitrc" '' + ${pkgs.xorg.xrdb}/bin/xrdb ${config.xresources.path} + ${nixgl.nixVulkanIntel}/bin/nixVulkanIntel ${nixgl.nixGLIntel}/bin/nixGLIntel ${config.xsession.windowManager.command} + ''; + }; + }; }; services = { unclutter.enable = true; @@ -477,24 +498,6 @@ }; home = { - file = # TODO Should be a xdg.something instead of file in configHome - let - nixgl = import - (builtins.fetchGit { - url = "https://github.com/nix-community/nixGL"; - rev = "489d6b095ab9d289fe11af0219a9ff00fe87c7c5"; - }) - { }; - in - { - "${config.xdg.configHome}/xinitrc" = { - # TODO Configurable - source = pkgs.writeShellScript "xinitrc" '' - ${pkgs.xorg.xrdb}/bin/xrdb ${config.xresources.path} - ${nixgl.nixVulkanIntel}/bin/nixVulkanIntel ${nixgl.nixGLIntel}/bin/nixGLIntel ${config.xsession.windowManager.command} - ''; - }; - }; packages = with pkgs; [ # remote tigervnc diff --git a/config/pythonstartup.py b/config/nix/hm/pythonstartup.py similarity index 96% rename from config/pythonstartup.py rename to config/nix/hm/pythonstartup.py index b2837ad..61f068c 100644 --- a/config/pythonstartup.py +++ b/config/nix/hm/pythonstartup.py @@ -1,10 +1,11 @@ -import rlcompleter +#!/usr/bin/env python3 + import sys import os # From https://github.com/python/cpython/blob/v3.7.0b5/Lib/site.py#L436 # Changing the history file -def register_readline(): +def register_readline() -> None: import atexit try: import readline diff --git a/config/nix/hm/vim.nix b/config/nix/hm/vim.nix index 89ce9e3..76bcb44 100644 --- a/config/nix/hm/vim.nix +++ b/config/nix/hm/vim.nix @@ -1,4 +1,4 @@ -{ pkgs, lib, ... }: +{ pkgs, lib, config, ... }: let nixvim = import (builtins.fetchGit { url = "https://github.com/nix-community/nixvim"; @@ -178,10 +178,23 @@ in }; isort.enabled = true; mccabe.enabled = true; - pycodestyle.enabled = true; + pycodestyle = { + enabled = true; + maxLineLength = 88; # Compatibility with Black + }; pyflakes.enabled = true; pylint.enabled = true; - pylsp_mypy.enabled = true; + pylsp_mypy = { + enabled = true; + overrides = [ + "--cache-dir=${config.xdg.cacheHome}/mypy" + "--ignore-missing-imports" + "--disallow-untyped-defs" + "--disallow-untyped-calls" + "--disallow-incomplete-defs" + "--disallow-untyped-decorators" + ]; + }; # FIXME Somehow no warning is shown # TODO Could add some, could also remove some }; diff --git a/config/offlineimap.py b/config/nix/unprocessed/config/offlineimap.py similarity index 100% rename from config/offlineimap.py rename to config/nix/unprocessed/config/offlineimap.py diff --git a/config/optiSvgo.yml b/config/nix/unprocessed/config/optiSvgo.yml similarity index 100% rename from config/optiSvgo.yml rename to config/nix/unprocessed/config/optiSvgo.yml diff --git a/config/pulse/.dfrecur b/config/pulse/.dfrecur deleted file mode 100644 index e69de29..0000000 diff --git a/config/pulse/client.conf b/config/pulse/client.conf deleted file mode 100644 index 199bd83..0000000 --- a/config/pulse/client.conf +++ /dev/null @@ -1 +0,0 @@ -cookie-file = .config/pulse/pulse-cookie diff --git a/config/pycodestyle b/config/pycodestyle deleted file mode 100644 index c89fb1c..0000000 --- a/config/pycodestyle +++ /dev/null @@ -1,3 +0,0 @@ -[pycodestyle] -# Compatibility with Black -max-line-length = 88 diff --git a/config/scripts/optimize b/config/scripts/optimize index c2ef705..2113bd2 100755 --- a/config/scripts/optimize +++ b/config/scripts/optimize @@ -1,5 +1,6 @@ #!/usr/bin/env bash + # Optimizes everything the script can find in a folder, # meaning it will compress files as much as possible, # without losing any data (verification will be done @@ -8,6 +9,7 @@ # TODO Run in parallel # TODO Lots of dupplicated code there +# TODO Maybe replace part with https://github.com/toy/image_optim? dir=${1:-$PWD} total=$(mktemp)