nix #11
|
@ -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
|
|
|
@ -324,7 +324,6 @@ in
|
||||||
};
|
};
|
||||||
xdg = {
|
xdg = {
|
||||||
configFile = {
|
configFile = {
|
||||||
# TODO Should be xdg.configFile
|
|
||||||
"ccache.conf" = {
|
"ccache.conf" = {
|
||||||
text = "ccache_dir = ${config.xdg.cacheHome}/ccache";
|
text = "ccache_dir = ${config.xdg.cacheHome}/ccache";
|
||||||
};
|
};
|
||||||
|
@ -346,6 +345,9 @@ in
|
||||||
log-scale: yes
|
log-scale: yes
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
"pythonstartup.py" = {
|
||||||
|
text = (builtins.readFile ./pythonstartup.py);
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
home = {
|
home = {
|
||||||
|
|
|
@ -422,6 +422,27 @@
|
||||||
XDG_SCREENSHOTS_DIR = "${config.home.homeDirectory}/Screenshots";
|
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 = {
|
services = {
|
||||||
unclutter.enable = true;
|
unclutter.enable = true;
|
||||||
|
@ -477,24 +498,6 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
home = {
|
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; [
|
packages = with pkgs; [
|
||||||
# remote
|
# remote
|
||||||
tigervnc
|
tigervnc
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
import rlcompleter
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
|
|
||||||
# From https://github.com/python/cpython/blob/v3.7.0b5/Lib/site.py#L436
|
# From https://github.com/python/cpython/blob/v3.7.0b5/Lib/site.py#L436
|
||||||
# Changing the history file
|
# Changing the history file
|
||||||
def register_readline():
|
def register_readline() -> None:
|
||||||
import atexit
|
import atexit
|
||||||
try:
|
try:
|
||||||
import readline
|
import readline
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, lib, ... }:
|
{ pkgs, lib, config, ... }:
|
||||||
let
|
let
|
||||||
nixvim = import (builtins.fetchGit {
|
nixvim = import (builtins.fetchGit {
|
||||||
url = "https://github.com/nix-community/nixvim";
|
url = "https://github.com/nix-community/nixvim";
|
||||||
|
@ -178,10 +178,23 @@ in
|
||||||
};
|
};
|
||||||
isort.enabled = true;
|
isort.enabled = true;
|
||||||
mccabe.enabled = true;
|
mccabe.enabled = true;
|
||||||
pycodestyle.enabled = true;
|
pycodestyle = {
|
||||||
|
enabled = true;
|
||||||
|
maxLineLength = 88; # Compatibility with Black
|
||||||
|
};
|
||||||
pyflakes.enabled = true;
|
pyflakes.enabled = true;
|
||||||
pylint.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
|
# FIXME Somehow no warning is shown
|
||||||
# TODO Could add some, could also remove some
|
# TODO Could add some, could also remove some
|
||||||
};
|
};
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
cookie-file = .config/pulse/pulse-cookie
|
|
|
@ -1,3 +0,0 @@
|
||||||
[pycodestyle]
|
|
||||||
# Compatibility with Black
|
|
||||||
max-line-length = 88
|
|
|
@ -1,5 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
|
||||||
# Optimizes everything the script can find in a folder,
|
# Optimizes everything the script can find in a folder,
|
||||||
# meaning it will compress files as much as possible,
|
# meaning it will compress files as much as possible,
|
||||||
# without losing any data (verification will be done
|
# without losing any data (verification will be done
|
||||||
|
@ -8,6 +9,7 @@
|
||||||
|
|
||||||
# TODO Run in parallel
|
# TODO Run in parallel
|
||||||
# TODO Lots of dupplicated code there
|
# TODO Lots of dupplicated code there
|
||||||
|
# TODO Maybe replace part with https://github.com/toy/image_optim?
|
||||||
|
|
||||||
dir=${1:-$PWD}
|
dir=${1:-$PWD}
|
||||||
total=$(mktemp)
|
total=$(mktemp)
|
||||||
|
|
Loading…
Reference in a new issue