From 95d2252b1ee178d2a0e823bb7a90651fa9f140d9 Mon Sep 17 00:00:00 2001 From: Grimmauld Date: Sat, 11 May 2024 11:37:59 +0200 Subject: [PATCH] update tooling --- common/hardware/laptop.nix | 4 +--- common/tooling/default.nix | 10 ++++++---- common/tooling/nix.nix | 4 +++- common/tooling/python.nix | 15 +++++++++++++-- fake_flake.nix | 10 +++++----- modules/auth.nix | 9 +++++---- modules/default.nix | 18 +++++++++++------- 7 files changed, 44 insertions(+), 26 deletions(-) diff --git a/common/hardware/laptop.nix b/common/hardware/laptop.nix index 2ff99ed..24ee498 100644 --- a/common/hardware/laptop.nix +++ b/common/hardware/laptop.nix @@ -67,9 +67,7 @@ in "sd_mod" ]; loader.systemd-boot.enable = true; - extraModulePackages = [ - config.boot.kernelPackages.ddcci-driver - ]; + extraModulePackages = [ config.boot.kernelPackages.ddcci-driver ]; kernelModules = [ "ddcci_backlight" "i2c-dev" diff --git a/common/tooling/default.nix b/common/tooling/default.nix index 060815f..2e94bdf 100644 --- a/common/tooling/default.nix +++ b/common/tooling/default.nix @@ -106,10 +106,12 @@ in services.dbus.implementation = "broker"; - grimmShared.tooling.nvim.plugins = with pkgs.vimPlugins; [ - vim-scala - fugitive - ]; + grimmShared.tooling.nvim = { + plugins = with pkgs.vimPlugins; [ + fugitive + nvim-lspconfig + ]; + }; boot.tmp.cleanOnBoot = true; zramSwap.enable = true; diff --git a/common/tooling/nix.nix b/common/tooling/nix.nix index b6ddda3..2b84dee 100644 --- a/common/tooling/nix.nix +++ b/common/tooling/nix.nix @@ -27,7 +27,9 @@ in environment.sessionVariables = lib.mkIf pkgs.config.allowUnfree { NIXPKGS_ALLOW_UNFREE = "1"; }; - grimmShared.tooling.nvim.plugins = with pkgs.vimPlugins; [ vim-nix ]; + grimmShared.tooling.nvim.extraLuaRC = lib.singleton '' + require'lspconfig'.nixd.setup{} + ''; nix.settings = { experimental-features = [ diff --git a/common/tooling/python.nix b/common/tooling/python.nix index e593156..3121dab 100644 --- a/common/tooling/python.nix +++ b/common/tooling/python.nix @@ -13,7 +13,18 @@ in lib.mkIf (enable && tooling.enable) { environment.systemPackages = with pkgs; - [ python3 ] ++ lib.optionals cfg.graphical [ jetbrains.pycharm-community ]; + [ + (python3.withPackages ( + python-pkgs: with python-pkgs; [ + requests + matplotlib + numpy + scipy + pygobject3 + ] + )) + ] + ++ lib.optionals cfg.graphical [ jetbrains.pycharm-community ]; programs.xonsh = { enable = true; @@ -22,7 +33,7 @@ in name: value: ''aliases["${name}"] = "${value}"'' ) config.environment.shellAliases ); - package = pkgs.xonsh.override { + package = pkgs.xonsh.wrapper.override { extraPackages = ps: with ps; [ requests diff --git a/fake_flake.nix b/fake_flake.nix index 0e09698..3c651a7 100644 --- a/fake_flake.nix +++ b/fake_flake.nix @@ -28,11 +28,11 @@ let }; nixpkgs_patches = [ -# { -# # tlpui -# url = "https://patch-diff.githubusercontent.com/raw/NixOS/nixpkgs/pull/305278.patch"; -# hash = "sha256-vmzj7gF8jwHdqxN+dQiJ4MRxKpHvBTzbrUvFgt1DK8I="; -# } + { + # xonsh update + url = "https://patch-diff.githubusercontent.com/raw/NixOS/nixpkgs/pull/305316.patch"; + hash = "sha256-oUjCyA18RvIChTUwPqkO4+v2skTqLBYf2DMd+ADiGE8="; + } ]; # enable ccache for lix if ccache is enabled diff --git a/modules/auth.nix b/modules/auth.nix index ba54704..6a7773b 100644 --- a/modules/auth.nix +++ b/modules/auth.nix @@ -1,8 +1,9 @@ -{config, ...}: let +{ config, ... }: +let inherit (config.serverConfig) ports vhosts; inherit (config.networking) domain; -in { - +in +{ services.authentik = { enable = true; @@ -30,6 +31,6 @@ in { }; disable_startup_analytics = true; avatars = "initials"; - }; + }; }; } diff --git a/modules/default.nix b/modules/default.nix index c72bd8b..1059472 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -51,15 +51,19 @@ in type = types.attrsOf ( types.submodule ( { config, ... }: - let + let type_lookup = { - proxy = { locations."/".proxyPass = "http://127.0.0.1:${builtins.toString config.port}"; }; - redirect = { locations."/".return = "307 https://${domain}"; }; - custom = {}; - none = {}; - }; + proxy = { + locations."/".proxyPass = "http://127.0.0.1:${builtins.toString config.port}"; + }; + redirect = { + locations."/".return = "307 https://${domain}"; + }; + custom = { }; + none = { }; + }; in - { + { options = { port = mkOption { type = types.int;