From 7502fed2419f47b94af23c33f45452c7e44d367b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Thu, 1 Sep 2022 11:11:11 +0200 Subject: [PATCH 1/3] :feat: add python packages option --- modules/programs/python.nix | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/modules/programs/python.nix b/modules/programs/python.nix index 39fd7f2..7480cb5 100644 --- a/modules/programs/python.nix +++ b/modules/programs/python.nix @@ -7,19 +7,35 @@ with lib; let cfg = config.my.programs.python; + + mkPython = packages: version: pkgs.${version}.withPackages (ps: map (flip getAttr ps) packages); + + pythonVersions = [ + "python311" + "python310" + "python39" + "python38" + ]; + + packageLists = map (version: attrNames pkgs."${version}Packages") cfg.versions; + + commonPackages = foldl' intersectLists (head packageLists) (tail packageLists); in { options.my.programs.python = { enable = mkEnableOption "python"; versions = mkOption { default = [ "python310" ]; - type = with types; listOf str; + type = with types; nonEmptyListOf (enum pythonVersions); example = [ "python39" ]; - apply = builtins.map (version: pkgs.${version}.withPackages (packages: with packages; [ black pyflakes isort nose pytest python-lsp-server ])); + }; + packages = mkOption { + default = [ "isort" "pytest" "flake8" "python-lsp-server" ]; + type = with types; listOf (enum commonPackages); }; }; config = mkIf cfg.enable { - home-manager.users.moritz.home.packages = cfg.versions; + users.users.moritz.packages = map (mkPython cfg.packages) cfg.versions; }; } From 09f04cb163c10a3143d7d137c0b5f442782a2714 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Thu, 1 Sep 2022 11:11:58 +0200 Subject: [PATCH 2/3] :bug: fix libvirtd network error --- modules/virtualisation/virtualisation.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/virtualisation/virtualisation.nix b/modules/virtualisation/virtualisation.nix index 688ba71..3326a40 100644 --- a/modules/virtualisation/virtualisation.nix +++ b/modules/virtualisation/virtualisation.nix @@ -20,7 +20,7 @@ in config = mkIf cfg.enable { virtualisation.libvirtd = { enable = true; - package = pkgs.stable.libvirt; + package = pkgs.libvirt; }; home-manager.users.moritz.home.packages = with pkgs; [ virt-manager ]; users.users.moritz.extraGroups = [ "libvirtd" ]; From 513942976e41bed721744be2e110b5be3d60494a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Wed, 4 Jan 2023 13:23:21 +0100 Subject: [PATCH 3/3] update gnome settings --- modules/programs/gnome.nix | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/modules/programs/gnome.nix b/modules/programs/gnome.nix index f60df75..f5cba87 100644 --- a/modules/programs/gnome.nix +++ b/modules/programs/gnome.nix @@ -7,6 +7,13 @@ with lib; let cfg = config.my.programs.gnome; + + extensions = with pkgs.gnomeExtensions; [ + gsconnect + vitals + gtile + blur-my-shell + ]; in { options.my.programs.gnome.enable = mkEnableOption "gnome"; @@ -19,7 +26,6 @@ in }; pulseaudio.enable = false; }; - programs.xwayland.enable = true; services.xserver = { layout = "de"; displayManager = { @@ -32,6 +38,14 @@ in enable = true; desktopManager.gnome.enable = true; }; - environment.systemPackages = with pkgs.gnomeExtensions; [ tray-icons-reloaded gsconnect ]; + environment.systemPackages = extensions; + home-manager.users.moritz.dconf.settings = { + "org/gnome/shell" = { + disable-user-extensions = false; + enabled-extensions = map (p: p.extensionUuid or p.uuid) extensions; + }; + "org/gnome/desktop/interface".enable-hot-corners = false; + "org/gnome/desktop/wm/preferences".focus-mode = "sloppy"; + }; }; }