Compare commits

..

No commits in common. "ea59147fcd1e25a3845d10065f592a7a7399d49b" and "b0c16a0c4172b1848287263549935ad1ab53d9e7" have entirely different histories.

7 changed files with 29 additions and 76 deletions

View File

@ -75,9 +75,11 @@ with lib; {
git.signing = true;
gpg.enable = true;
hub.enable = true;
kitty.enable = true;
ledger.enable = true;
logseq.enable = true;
python.versions."311".enable = true;
python.enable = true;
rofi.enable = true;
ssh = {
enable = true;
includeSecrets = [ ../../secrets/ssh-home.age ];

View File

@ -18,12 +18,10 @@
./gpg.nix
./helix.nix
./hub.nix
./hyprland
./kakoune.nix
./kitty.nix
./ledger
./logseq.nix
./miracast.nix
./python.nix
./rofi
./spotify.nix
@ -34,5 +32,6 @@
./xmonad
./zathura.nix
./zsh.nix
./hyprland
];
}

View File

@ -141,8 +141,6 @@ in
# Fullscreen Applications
# ${mkRules ["opaque" "noblur" "noborder" "noshadow" "forceinput"] ["fullscreen:1"]}
${mkRules ["opaque" "noblur" "noshadow"] ["class:^jetbrains-pycharm$"]}
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
$mainMod = SUPER
$windowMod = ALT

View File

@ -28,13 +28,6 @@ in
};
config = mkIf cfg.enable {
my = {
programs = {
kitty.enable = true;
rofi.enable = true;
};
services.dunst.enable = true;
};
# enable nix module
programs.hyprland = {
@ -42,7 +35,6 @@ in
package = null; # because we use the home-manager module
};
# enable home-manager module
home-manager.users.moritz = {
# import home-manager module
@ -177,6 +169,7 @@ in
} // (optionalAttrs cfg.nvidiaSupport
{
LIBVA_DRIVER_NAME = "nvidia";
XDG_SESSION_TYPE = "wayland";
GBM_BACKEND = "nvidia-drm";
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
WLR_NO_HARDWARE_CURSORS = "1";

View File

@ -1,23 +0,0 @@
{ config
, lib
, pkgs
, ...
}:
with lib;
let
cfg = config.my.programs.miracast;
in
{
options.my.programs.miracast.enable = mkEnableOption "miracast";
config = mkIf cfg.enable {
networking.firewall = {
allowedTCPPorts = [ 7236 7250 ];
allowedUDPPorts = [ 7236 5353 ];
};
users.users.moritz.packages = with pkgs; [
gnome-network-displays
];
};
}

View File

@ -8,55 +8,40 @@ with lib;
let
cfg = config.my.programs.python;
pythonVersions = map (version: "3${toString version}") (range 8 11);
enabledVersions = filterAttrs (name: value: value.enable) cfg.versions;
mkPython = packages: version: pkgs.${version}.withPackages (ps: map (flip getAttr ps) packages);
pythonPackages = version: attrNames pkgs."python${version}Packages";
pythonVersions = [
"python311"
"python310"
"python39"
"python38"
];
commonPackages =
let
packageLists = map pythonPackages (attrNames enabledVersions);
in
foldl' intersectLists (head packageLists) (tail packageLists);
packageLists = map (version: attrNames pkgs."${version}Packages") cfg.versions;
versionOpts = version: {
enable = mkEnableOption (toString version);
pythonPackages = mkOption {
default = [ ];
type = with types; listOf (enum (pythonPackages version));
};
};
commonPackages = foldl' intersectLists (head packageLists) (tail packageLists);
in
{
options.my.programs.python = {
versions = genAttrs pythonVersions versionOpts;
defaultPackages = mkOption {
default = [ ];
type = with types; listOf (enum commonPackages);
enable = mkEnableOption "python";
versions = mkOption {
default = [ "python310" ];
type = with types; nonEmptyListOf (enum pythonVersions);
example = [ "python39" ];
};
extraPackages = mkOption {
default = with pkgs; [
poetry
ruff
python310Packages.python-lsp-server
packages = mkOption {
default = [
"flake8"
"isort"
"mypy"
"pytest"
];
type = with types; listOf package;
type = with types; listOf (enum commonPackages);
};
};
config = {
users.users.moritz.packages =
(
let
mkPython = version:
let
package = pkgs."python${version}";
finalPythonPackages = cfg.versions.${version}.pythonPackages ++ cfg.defaultPackages;
getPythonPackages = ps: map (flip getAttr ps) finalPythonPackages;
in
package.withPackages getPythonPackages;
in
map mkPython (attrNames enabledVersions)
) ++ cfg.extraPackages;
config = mkIf cfg.enable {
users.users.moritz.packages = map (mkPython cfg.packages) cfg.versions
++ [ pkgs.poetry pkgs.nodePackages.pyright ];
};
}

View File

@ -15,7 +15,6 @@ in
virtualisation.podman = {
enable = true;
dockerCompat = true;
defaultNetwork.settings.dns_enabled = true;
};
};
}