nix #11

Manually merged
geoffrey merged 113 commits from nix into main 2023-12-09 21:43:01 +01:00
11 changed files with 45 additions and 35 deletions
Showing only changes of commit fe1303ccc9 - Show all commits

View file

@ -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

View file

@ -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 = {

View file

@ -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

View file

@ -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

View file

@ -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
};

View file

View file

@ -1 +0,0 @@
cookie-file = .config/pulse/pulse-cookie

View file

@ -1,3 +0,0 @@
[pycodestyle]
# Compatibility with Black
max-line-length = 88

View file

@ -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)