diff --git a/flake.lock b/flake.lock index 3204e58..45ed273 100644 --- a/flake.lock +++ b/flake.lock @@ -117,6 +117,48 @@ "type": "github" } }, + "hyprland": { + "inputs": { + "hyprland-protocols": "hyprland-protocols", + "nixpkgs": "nixpkgs_2", + "wlroots": "wlroots", + "xdph": "xdph" + }, + "locked": { + "lastModified": 1681814936, + "narHash": "sha256-UTNojO9MRW4hQvv8QuSerUE/6KnjCYh9p45SRYQbov4=", + "owner": "hyprwm", + "repo": "Hyprland", + "rev": "a4330fe3787a97fe5b55eb787ce5746cea46ad14", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "Hyprland", + "type": "github" + } + }, + "hyprland-protocols": { + "inputs": { + "nixpkgs": [ + "hyprland", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1681065697, + "narHash": "sha256-QPzwwlGKX95tl6ZEshboZbEwwAXww6lNLdVYd6T9Mrc=", + "owner": "hyprwm", + "repo": "hyprland-protocols", + "rev": "4d29e48433270a2af06b8bc711ca1fe5109746cd", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprland-protocols", + "type": "github" + } + }, "lowdown-src": { "flake": false, "locked": { @@ -238,6 +280,22 @@ } }, "nixpkgs_2": { + "locked": { + "lastModified": 1681557730, + "narHash": "sha256-j2E3639kS3Qop2jQPyqWCdenZNaqIdxfoTvAHnGuAGI=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "85b081528b937df4bfcaee80c3541b58f397df8b", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { "locked": { "lastModified": 1680122840, "narHash": "sha256-zCQ/9iFHzCW5JMYkkHMwgK1/1/kTMgCMHq4THPINpAU=", @@ -253,7 +311,7 @@ "type": "github" } }, - "nixpkgs_3": { + "nixpkgs_4": { "locked": { "lastModified": 1679734080, "narHash": "sha256-z846xfGLlon6t9lqUzlNtBOmsgQLQIZvR6Lt2dImk1M=", @@ -302,14 +360,15 @@ "devenv": "devenv", "disko": "disko", "home-manager": "home-manager", + "hyprland": "hyprland", "nixos-hardware": "nixos-hardware", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs_3", "sops-nix": "sops-nix" } }, "sops-nix": { "inputs": { - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_4", "nixpkgs-stable": "nixpkgs-stable_2" }, "locked": { @@ -340,6 +399,49 @@ "repo": "flake-utils", "type": "github" } + }, + "wlroots": { + "flake": false, + "locked": { + "host": "gitlab.freedesktop.org", + "lastModified": 1680810405, + "narHash": "sha256-LmI/4Yp/pOOoI4RxLRx9I90NBsiqdRLVOfbATKlgpkg=", + "owner": "wlroots", + "repo": "wlroots", + "rev": "7abda952d0000b72d240fe1d41457b9288f0b6e5", + "type": "gitlab" + }, + "original": { + "host": "gitlab.freedesktop.org", + "owner": "wlroots", + "repo": "wlroots", + "type": "gitlab" + } + }, + "xdph": { + "inputs": { + "hyprland-protocols": [ + "hyprland", + "hyprland-protocols" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1681127512, + "narHash": "sha256-vklOOhBj5W8fii6yN4L2WY5ZeifBmsq3+mJ2wC1Pk9U=", + "owner": "hyprwm", + "repo": "xdg-desktop-portal-hyprland", + "rev": "04f579377a32781ce57c9cf4ba2a5bcb7f53fa97", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "xdg-desktop-portal-hyprland", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index f3a95a5..f2bd16e 100644 --- a/flake.nix +++ b/flake.nix @@ -2,28 +2,22 @@ description = "respec's nixos configs"; inputs = { - # For NixOS # nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.11"; - # NixOS Hardware Configuration for framework # nixos-hardware.url = "github:NixOS/nixos-hardware/master"; - # For Home Manager # + sops-nix.url = github:Mic92/sops-nix; + devenv.url = "github:cachix/devenv/latest"; + hyprland.url = "github:hyprwm/Hyprland"; home-manager = { url = "github:nix-community/home-manager/release-22.11"; inputs.nixpkgs.follows = "nixpkgs"; }; - # For Disko Disk Provisioning # disko = { url = "github:nix-community/disko"; inputs.nixpkgs.follows = "nixpkgs"; }; - # For Secrets Management # - sops-nix.url = github:Mic92/sops-nix; - - # For Dev Env https://devenv.sh # - devenv.url = "github:cachix/devenv/latest"; }; - outputs = { self, home-manager, nixos-hardware, disko, nixpkgs, sops-nix, devenv, ... }@inputs: + outputs = { self, home-manager, nixos-hardware, disko, nixpkgs, sops-nix, devenv, hyprland, ... }@inputs: let system = "x86_64-linux"; pkgs = import nixpkgs { @@ -80,15 +74,20 @@ [ nixos-hardware.nixosModules.framework-12th-gen-intel disko.nixosModules.disko + hyprland.nixosModules.default + {programs.hyprland.enable = true;} ./hosts/creatorforge/creatorforge.nix ./hosts/creatorforge/networkd.nix ./hosts/creatorforge/system-pkgs.nix ./modules/system/services/docker.nix ./modules/system/services/openssh.nix ./modules/system/desktop-environments/gnome.nix + ./modules/system/desktop-environments/hyprland.nix ] #extra modules to load [ + hyprland.homeManagerModules.default + ./modules/home-manager/hyprland.nix ./modules/home-manager/helix.nix ./modules/home-manager/alacritty.nix ./modules/home-manager/vscode.nix diff --git a/modules/home-manager/hyprland.nix b/modules/home-manager/hyprland.nix new file mode 100644 index 0000000..ca11341 --- /dev/null +++ b/modules/home-manager/hyprland.nix @@ -0,0 +1,9 @@ +{ pkgs, config, lib, ...}: +{ + wayland.windowManager.hyprland = { + enable = true; + extraConfig = '' + bind = SUPER, Return, exec, alacritty + ''; + }; +} diff --git a/modules/system/desktop-environments/hyprland.nix b/modules/system/desktop-environments/hyprland.nix new file mode 100644 index 0000000..07bd827 --- /dev/null +++ b/modules/system/desktop-environments/hyprland.nix @@ -0,0 +1,9 @@ +{ config, pkgs, lib, ... }: +{ + environment.systemPackages = with pkgs; [ + libsForQt5.polkit-kde-agent + libsForQt5.qt5.qtwayland + qt6.qtwayland + eww-wayland + ]; +} \ No newline at end of file diff --git a/modules/system/services/pipewire.nix b/modules/system/services/pipewire.nix index 2918735..3db68cc 100644 --- a/modules/system/services/pipewire.nix +++ b/modules/system/services/pipewire.nix @@ -1,6 +1,10 @@ # https://nixos.wiki/wiki/PipeWire { config, pkgs, lib, ... }: { + environment.systemPackages = with pkgs; [ + pipewire + wireplumber + ]; # rtkit is optional but recommended security.rtkit.enable = true; services.pipewire = {