Compare commits
5 Commits
b0c16a0c41
...
ea59147fcd
Author | SHA1 | Date |
---|---|---|
Moritz Böhme | ea59147fcd | |
Moritz Böhme | 9f89c0d9a1 | |
Moritz Böhme | c78d9e9e24 | |
Moritz Böhme | eb101fbcf2 | |
Moritz Böhme | d1466bbba3 |
|
@ -75,11 +75,9 @@ with lib; {
|
||||||
git.signing = true;
|
git.signing = true;
|
||||||
gpg.enable = true;
|
gpg.enable = true;
|
||||||
hub.enable = true;
|
hub.enable = true;
|
||||||
kitty.enable = true;
|
|
||||||
ledger.enable = true;
|
ledger.enable = true;
|
||||||
logseq.enable = true;
|
logseq.enable = true;
|
||||||
python.enable = true;
|
python.versions."311".enable = true;
|
||||||
rofi.enable = true;
|
|
||||||
ssh = {
|
ssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
includeSecrets = [ ../../secrets/ssh-home.age ];
|
includeSecrets = [ ../../secrets/ssh-home.age ];
|
||||||
|
|
|
@ -18,10 +18,12 @@
|
||||||
./gpg.nix
|
./gpg.nix
|
||||||
./helix.nix
|
./helix.nix
|
||||||
./hub.nix
|
./hub.nix
|
||||||
|
./hyprland
|
||||||
./kakoune.nix
|
./kakoune.nix
|
||||||
./kitty.nix
|
./kitty.nix
|
||||||
./ledger
|
./ledger
|
||||||
./logseq.nix
|
./logseq.nix
|
||||||
|
./miracast.nix
|
||||||
./python.nix
|
./python.nix
|
||||||
./rofi
|
./rofi
|
||||||
./spotify.nix
|
./spotify.nix
|
||||||
|
@ -32,6 +34,5 @@
|
||||||
./xmonad
|
./xmonad
|
||||||
./zathura.nix
|
./zathura.nix
|
||||||
./zsh.nix
|
./zsh.nix
|
||||||
./hyprland
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -141,6 +141,8 @@ in
|
||||||
# Fullscreen Applications
|
# Fullscreen Applications
|
||||||
# ${mkRules ["opaque" "noblur" "noborder" "noshadow" "forceinput"] ["fullscreen:1"]}
|
# ${mkRules ["opaque" "noblur" "noborder" "noshadow" "forceinput"] ["fullscreen:1"]}
|
||||||
|
|
||||||
|
${mkRules ["opaque" "noblur" "noshadow"] ["class:^jetbrains-pycharm$"]}
|
||||||
|
|
||||||
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
|
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
|
||||||
$mainMod = SUPER
|
$mainMod = SUPER
|
||||||
$windowMod = ALT
|
$windowMod = ALT
|
||||||
|
|
|
@ -28,6 +28,13 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
my = {
|
||||||
|
programs = {
|
||||||
|
kitty.enable = true;
|
||||||
|
rofi.enable = true;
|
||||||
|
};
|
||||||
|
services.dunst.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
# enable nix module
|
# enable nix module
|
||||||
programs.hyprland = {
|
programs.hyprland = {
|
||||||
|
@ -35,6 +42,7 @@ in
|
||||||
package = null; # because we use the home-manager module
|
package = null; # because we use the home-manager module
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
# enable home-manager module
|
# enable home-manager module
|
||||||
home-manager.users.moritz = {
|
home-manager.users.moritz = {
|
||||||
# import home-manager module
|
# import home-manager module
|
||||||
|
@ -169,7 +177,6 @@ in
|
||||||
} // (optionalAttrs cfg.nvidiaSupport
|
} // (optionalAttrs cfg.nvidiaSupport
|
||||||
{
|
{
|
||||||
LIBVA_DRIVER_NAME = "nvidia";
|
LIBVA_DRIVER_NAME = "nvidia";
|
||||||
XDG_SESSION_TYPE = "wayland";
|
|
||||||
GBM_BACKEND = "nvidia-drm";
|
GBM_BACKEND = "nvidia-drm";
|
||||||
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
|
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
|
||||||
WLR_NO_HARDWARE_CURSORS = "1";
|
WLR_NO_HARDWARE_CURSORS = "1";
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
{ 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
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
|
@ -8,40 +8,55 @@ with lib;
|
||||||
let
|
let
|
||||||
cfg = config.my.programs.python;
|
cfg = config.my.programs.python;
|
||||||
|
|
||||||
mkPython = packages: version: pkgs.${version}.withPackages (ps: map (flip getAttr ps) packages);
|
pythonVersions = map (version: "3${toString version}") (range 8 11);
|
||||||
|
enabledVersions = filterAttrs (name: value: value.enable) cfg.versions;
|
||||||
|
|
||||||
pythonVersions = [
|
pythonPackages = version: attrNames pkgs."python${version}Packages";
|
||||||
"python311"
|
|
||||||
"python310"
|
|
||||||
"python39"
|
|
||||||
"python38"
|
|
||||||
];
|
|
||||||
|
|
||||||
packageLists = map (version: attrNames pkgs."${version}Packages") cfg.versions;
|
commonPackages =
|
||||||
|
let
|
||||||
|
packageLists = map pythonPackages (attrNames enabledVersions);
|
||||||
|
in
|
||||||
|
foldl' intersectLists (head packageLists) (tail packageLists);
|
||||||
|
|
||||||
commonPackages = foldl' intersectLists (head packageLists) (tail packageLists);
|
versionOpts = version: {
|
||||||
|
enable = mkEnableOption (toString version);
|
||||||
|
pythonPackages = mkOption {
|
||||||
|
default = [ ];
|
||||||
|
type = with types; listOf (enum (pythonPackages version));
|
||||||
|
};
|
||||||
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.my.programs.python = {
|
options.my.programs.python = {
|
||||||
enable = mkEnableOption "python";
|
versions = genAttrs pythonVersions versionOpts;
|
||||||
versions = mkOption {
|
defaultPackages = mkOption {
|
||||||
default = [ "python310" ];
|
default = [ ];
|
||||||
type = with types; nonEmptyListOf (enum pythonVersions);
|
|
||||||
example = [ "python39" ];
|
|
||||||
};
|
|
||||||
packages = mkOption {
|
|
||||||
default = [
|
|
||||||
"flake8"
|
|
||||||
"isort"
|
|
||||||
"mypy"
|
|
||||||
"pytest"
|
|
||||||
];
|
|
||||||
type = with types; listOf (enum commonPackages);
|
type = with types; listOf (enum commonPackages);
|
||||||
};
|
};
|
||||||
|
extraPackages = mkOption {
|
||||||
|
default = with pkgs; [
|
||||||
|
poetry
|
||||||
|
ruff
|
||||||
|
python310Packages.python-lsp-server
|
||||||
|
];
|
||||||
|
type = with types; listOf package;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = {
|
||||||
users.users.moritz.packages = map (mkPython cfg.packages) cfg.versions
|
users.users.moritz.packages =
|
||||||
++ [ pkgs.poetry pkgs.nodePackages.pyright ];
|
(
|
||||||
|
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;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,6 +15,7 @@ in
|
||||||
virtualisation.podman = {
|
virtualisation.podman = {
|
||||||
enable = true;
|
enable = true;
|
||||||
dockerCompat = true;
|
dockerCompat = true;
|
||||||
|
defaultNetwork.settings.dns_enabled = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue