From f6ffe0c7bbd424dd90a37908d7a3e20189194630 Mon Sep 17 00:00:00 2001 From: joy Date: Sat, 31 Aug 2024 17:37:21 +0200 Subject: [PATCH] virt --- modules/apps/zsh/default.nix | 2 ++ modules/hyprland/hyprland/default.nix | 34 ++++++++++++--------------- modules/services/default.nix | 1 + modules/services/virt/default.nix | 5 ++++ modules/system/default.nix | 6 ----- 5 files changed, 23 insertions(+), 25 deletions(-) create mode 100644 modules/services/virt/default.nix diff --git a/modules/apps/zsh/default.nix b/modules/apps/zsh/default.nix index 06152fe..31aed5b 100644 --- a/modules/apps/zsh/default.nix +++ b/modules/apps/zsh/default.nix @@ -25,4 +25,6 @@ history.size = 1000000; history.path = ".config/zsh/history"; }; + programs.zsh.enable = true; + users.defaultUserShell = pkgs.zsh; } diff --git a/modules/hyprland/hyprland/default.nix b/modules/hyprland/hyprland/default.nix index 9287012..aad62b1 100644 --- a/modules/hyprland/hyprland/default.nix +++ b/modules/hyprland/hyprland/default.nix @@ -1,4 +1,5 @@ {pkgs, ...}: { + programs.hyprland.enable = true; home-manager.users.joy.home.packages = with pkgs; [ rofi-wayland pwvucontrol @@ -20,12 +21,7 @@ settings = { "$mod" = "SUPER"; - "$scrPath" = "~/nix/modules/desktop/hyprland/scirpts"; - - dwindle = { - pseudotile = true; - preserve_split = true; - }; + "$sciPath" = "~/nix/modules/hyprland/hyprland/scripts"; cursor = { inactive_timeout = "3"; @@ -49,7 +45,7 @@ exec-once = [ "ags" - "sh ~/nix/modules/desktop/hyprland/scripts/hypridle.sh" + "sh $sciPath/hypridle.sh" ]; windowrule = [ @@ -79,11 +75,11 @@ "$mod, A, exec, rofi -show drun" "$mod, F, exec, freetube" "$mod, C, exec, hyprpicker -a" - "$mod+Shift, W, exec, sh ~/nix/modules/desktop/hyprland/scripts/vm.sh" + "$mod+Shift, W, exec, sh $sciPath/vm.sh" "$mod+Shift, Z, exec, grim - | swappy -f -" - "$mod, Z, exec, sh ~/nix/modules/desktop/hyprland/scripts/screen.sh" + "$mod, Z, exec, sh $sciPath/screen.sh" "$mod, V, exec, cliphist list | rofi -dmenu | cliphist decode | wl-copy" - "$mod, O, exec, sh ~/nix/modules/desktop/hyprland/scripts/mpv.sh" + "$mod, O, exec, sh $sciPath/mpv.sh" # controles "$mod, Q, killactive" @@ -91,14 +87,14 @@ "$mod, R, togglesplit" "$mod+shift, S, exec, systemctl suspend" "$mod+shift, M, exit, hyprland" - "$mod, G, exec, sh ~/nix/modules/desktop/hyprland/scripts/gamemode.sh" - "$mod+shift, B, exec, sh ~/nix/modules/desktop/hyprland/scripts/ags.sh" - "$mod, up, exec, sh ~/nix/modules/desktop/hyprland/scripts/volume.sh -i" - "$mod, down, exec, sh ~/nix/modules/desktop/hyprland/scripts/volume.sh -d" + "$mod, G, exec, sh $sciPath/gamemode.sh" + "$mod+shift, B, exec, sh $sciPath/ags.sh" + "$mod, up, exec, sh $sciPath/volume.sh -i" + "$mod, down, exec, sh $sciPath/volume.sh -d" "$mod, P, exec, hyprctl dispatch togglefloating && hyprctl dispatch pin" # cmus - "$mod, D, exec, sh ~/nix/modules/desktop/hyprland/scripts/cmus.sh" + "$mod, D, exec, sh $sciPath/cmus.sh" "$mod, space, exec, playerctl play-pause" "$mod, comma, exec, playerctl previous" "$mod, period, exec, playerctl next" @@ -157,10 +153,10 @@ bindl = [ ", XF86MonBrightnessUp, exec, brightnessctl set +10%" ", XF86MonBrightnessDown, exec, brightnessctl set 10%-" - ", XF86AudioRaiseVolume, exec, sh ~/nix/modules/desktop/hyprland/scripts/volume.sh -i" - ", XF86AudioLowerVolume, exec, sh ~/nix/modules/desktop/hyprland/scripts/volume.sh -d" - ", XF86AudioMute, exec, sh ~/nix/modules/desktop/hyprland/scripts/volume.sh -m" - ", XF86AudioMicMute, exec, sh ~/nix/modules/desktop/hyprland/scripts/volume.sh -t" + ", XF86AudioRaiseVolume, exec, sh $sciPath/volume.sh -i" + ", XF86AudioLowerVolume, exec, sh $sciPath/volume.sh -d" + ", XF86AudioMute, exec, sh $sciPath/volume.sh -m" + ", XF86AudioMicMute, exec, sh $sciPath/volume.sh -t" ]; general = { diff --git a/modules/services/default.nix b/modules/services/default.nix index 276ba83..dbb6ad5 100644 --- a/modules/services/default.nix +++ b/modules/services/default.nix @@ -4,5 +4,6 @@ ./gdm ./polkit ./syncthing + ./virt ]; } diff --git a/modules/services/virt/default.nix b/modules/services/virt/default.nix new file mode 100644 index 0000000..d267f72 --- /dev/null +++ b/modules/services/virt/default.nix @@ -0,0 +1,5 @@ +{...}: { + virtualisation.docker.rootless.enable = true; + virtualisation.docker.enable = true; + virtualisation.waydroid.enable = true; +} diff --git a/modules/system/default.nix b/modules/system/default.nix index 6478ee3..50be83d 100644 --- a/modules/system/default.nix +++ b/modules/system/default.nix @@ -10,12 +10,6 @@ (nerdfonts.override {fonts = ["FiraCode"];}) ]; - virtualisation.docker.rootless.enable = true; - virtualisation.docker.enable = true; - virtualisation.waydroid.enable = true; - programs.hyprland.enable = true; - programs.zsh.enable = true; - users.defaultUserShell = pkgs.zsh; nix.settings.experimental-features = ["nix-command" "flakes"]; programs.nix-ld.enable = true; services.printing.enable = true;