diff --git a/flake.nix b/flake.nix index 7f755bc..2375175 100644 --- a/flake.nix +++ b/flake.nix @@ -5,7 +5,12 @@ systems.url = "github:nix-systems/default"; # Nixpkgs nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05"; - # Terminal + # Hyprland + hyprland.url = "github:hyprwm/Hyprland"; + hyprland-plugins = { + url = "github:hyprwm/hyprland-plugins"; + inputs.hyprland.follows = "hyprland"; + }; # Flatpak nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=main"; # Home manager @@ -22,6 +27,8 @@ outputs = { self + , hyprland + , hyprland-plugins , nixos-hardware , nixpkgs , systems @@ -73,11 +80,14 @@ nix-flatpak ; specialArgs = { - inputs = { }; + inputs = { + inherit + hyprland hyprland-plugins; + }; }; }; # Libs - lib = (import modules/lib.nix ({ + lib = (importmodules/lib.nix ({ nixpkgs = nixpkgs; home-manager = home-manager; } // libConfig)); diff --git a/hosts/fwbook.nix b/hosts/fwbook.nix index 9ee5895..5baa743 100644 --- a/hosts/fwbook.nix +++ b/hosts/fwbook.nix @@ -32,6 +32,7 @@ in crypto.enable = true; gnome.enable = true; tiler.enable = true; + hyprland.enable = true; }; }; networkDrives = { @@ -51,10 +52,20 @@ in services.xserver.displayManager.gdm.wayland = true; services.displayManager.defaultSession = "gnome"; programs.niri.enable = true; + # home manager + home-manager.users.${user.name} = { + programs.hyprpanel = { + enable = true; + }; + # Add Functions + programs.zsh.initContent = '' + source ${zshFunctions} + ''; + }; # Sunshine services.sunshine = { - enable = true; + enable = false; autoStart = false; capSysAdmin = true; openFirewall = true; @@ -189,10 +200,7 @@ in [ "modesetting" "fbdev" ]; # Kernel boot.kernelPackages = pkgs.linuxPackages_zen; - # Add Functions - home-manager.users.${user.name}.programs.zsh.initContent = '' - source ${zshFunctions} - ''; + environment.localBinInPath = true; # Family Storage fileSystems."/mnt/EightTerra/FamilyStorage" = { diff --git a/hosts/scripts/fwbook/functions.sh b/hosts/scripts/fwbook/functions.sh index cc8b5c0..44d7b4a 100755 --- a/hosts/scripts/fwbook/functions.sh +++ b/hosts/scripts/fwbook/functions.sh @@ -1,13 +1,3 @@ - - -function restart-wifi { - echo "Removing mod for wifi module..." - sudo rmmod mt7921e - echo "Reloading mod for wifi module..." - sudo modprobe mt7921e -} - - function start-windows() { quickemu --vm /mnt/Data/vms/windows-11.conf --display spice --viewer remote-viewer } @@ -16,9 +6,9 @@ function start-windows-app() { google-chrome-stable --app=https://windows365.microsoft.com/webclient --new-window } -# function clean-file() { -# ${@} | grep -v '^\s*#' | grep -v '^$' -# } +function clean-file() { + grep -v '^\s*#' | grep -v '^$' +} function clean-k8s-install() { sudo rm -rf /var/lib/kubernetes/ /var/lib/etcd/ /var/lib/cfssl/ /var/lib/kubelet/ /etc/kube-flannel/ /etc/kubernetes/ @@ -27,13 +17,3 @@ function clean-k8s-install() { function fix-nix-store() { sudo nix-store --verify --check-contents --repair } - -function start-sibli-vpn() { - export BW_SESSION="$(bw unlock --raw)" - bw unlock --check - if [ "$?" -eq 1 ]; then - echo "Failed bw auth" - return 1 - fi - pritunl-client start ee73mkzn4i5ymbax -p $(bw get item "Pritunl (Sibli)" | jq -r '.fields[0].value')$(bw get totp "Pritunl (Sibli)") && watch -n1 "pritunl-client list" -} \ No newline at end of file diff --git a/modules/nixos/desktop/hyprland.nix b/modules/nixos/desktop/hyprland.nix new file mode 100644 index 0000000..367e4dc --- /dev/null +++ b/modules/nixos/desktop/hyprland.nix @@ -0,0 +1,29 @@ +{ config, lib, pkgs, ... }: +let + cfg = config.skyg.nixos.desktop.hyprland; + hyprPluginPkgs = inputs.hyprland-plugins.packages.${pkgs.system}; + hypr-plugin-dir = pkgs.symlinkJoin { + name = "hyrpland-plugins"; + paths = with hyprPluginPkgs; [ + hyprexpo + #...plugins + ]; + }; +in +{ + options = { + skyg.nixos.desktop.hyprland = { + enable = lib.mkEnableOption + "hyprland"; + }; + }; + config = lib.mkIf cfg.enable { + skyg.nixos.desktop.tiler.enable = true; + programs.hyprland = { + enable = true; + withUWSM = true; + }; + programs.uwsm.enable = true; + environment.sessionVariables = { HYPR_PLUGIN_DIR = hypr-plugin-dir; }; + }; +}