switch to hyprland from nixpkgs

This commit is contained in:
Adithya 2023-04-27 22:44:21 +05:30
parent e36d6e08c0
commit 1c881b385e
Signed by: adtya
GPG key ID: 48FC9915FFD326D0
5 changed files with 144 additions and 240 deletions

View file

@ -221,50 +221,6 @@
"type": "github" "type": "github"
} }
}, },
"hyprland": {
"inputs": {
"hyprland-protocols": "hyprland-protocols",
"nixpkgs": [
"nixpkgs"
],
"wlroots": "wlroots",
"xdph": "xdph"
},
"locked": {
"lastModified": 1681907187,
"narHash": "sha256-9SE7RAHSCq1nAT/oZiqhtZT4cQVcLt/dfOdPro4++5s=",
"owner": "hyprwm",
"repo": "Hyprland",
"rev": "6225591dbd77919beafc632e0795c6296e1da876",
"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"
}
},
"impermanence": { "impermanence": {
"locked": { "locked": {
"lastModified": 1682268411, "lastModified": 1682268411,
@ -477,7 +433,6 @@
"root": { "root": {
"inputs": { "inputs": {
"home-manager": "home-manager", "home-manager": "home-manager",
"hyprland": "hyprland",
"impermanence": "impermanence", "impermanence": "impermanence",
"lanzaboote": "lanzaboote", "lanzaboote": "lanzaboote",
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
@ -539,49 +494,6 @@
"repo": "flake-utils", "repo": "flake-utils",
"type": "github" "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", "root": "root",

View file

@ -11,11 +11,6 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
hyprland = {
url = "github:hyprwm/Hyprland";
inputs.nixpkgs.follows = "nixpkgs";
};
impermanence = { impermanence = {
url = "github:nix-community/impermanence"; url = "github:nix-community/impermanence";
}; };
@ -31,7 +26,7 @@
}; };
}; };
outputs = { self, nixpkgs, home-manager, hyprland, impermanence, lanzaboote, nixos-hardware, nixvim }@inputs: { outputs = { self, nixpkgs, home-manager, impermanence, lanzaboote, nixos-hardware, nixvim }@inputs: {
formatter."x86_64-linux" = nixpkgs.legacyPackages."x86_64-linux".nixpkgs-fmt; formatter."x86_64-linux" = nixpkgs.legacyPackages."x86_64-linux".nixpkgs-fmt;
nixosConfigurations = { nixosConfigurations = {
Skipper = nixpkgs.lib.nixosSystem { Skipper = nixpkgs.lib.nixosSystem {
@ -39,7 +34,7 @@
specialArgs = inputs; specialArgs = inputs;
modules = [ modules = [
{ {
nixpkgs.overlays = [ (import ./packages) hyprland.overlays.default ]; nixpkgs.overlays = [ (import ./packages) ];
nixpkgs.hostPlatform = nixpkgs.lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = nixpkgs.lib.mkDefault "x86_64-linux";
system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev; system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev;
} }

View file

@ -1,4 +1,4 @@
{ hyprland, impermanence, nixvim, pkgs, ... }: { impermanence, nixvim, pkgs, ... }:
let let
user = (import ../secrets.nix).users; user = (import ../secrets.nix).users;
in in
@ -11,7 +11,6 @@ in
imports = [ imports = [
impermanence.nixosModules.home-manager.impermanence impermanence.nixosModules.home-manager.impermanence
nixvim.homeManagerModules.nixvim nixvim.homeManagerModules.nixvim
hyprland.homeManagerModules.default
./gtk.nix ./gtk.nix
./persistence.nix ./persistence.nix

View file

@ -15,7 +15,7 @@
''; '';
profileExtra = '' profileExtra = ''
if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ] ; then if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ] ; then
exec ${config.wayland.windowManager.hyprland.package}/bin/Hyprland exec ${pkgs.hyprland}/bin/Hyprland
fi fi
''; '';
shellAliases = { shellAliases = {

View file

@ -2,7 +2,7 @@
let let
brightnessctl = "${pkgs.brightnessctl}/bin/brightnessctl"; brightnessctl = "${pkgs.brightnessctl}/bin/brightnessctl";
grim = "${pkgs.grim}/bin/grim"; grim = "${pkgs.grim}/bin/grim";
hyprctl = "${config.wayland.windowManager.hyprland.package}/bin/hyprctl"; hyprctl = "${pkgs.hyprland}/bin/hyprctl";
kitty = "${config.programs.kitty.package}/bin/kitty"; kitty = "${config.programs.kitty.package}/bin/kitty";
playerctl = "${pkgs.playerctl}/bin/playerctl"; playerctl = "${pkgs.playerctl}/bin/playerctl";
rofi = "${config.programs.rofi.package}/bin/rofi"; rofi = "${config.programs.rofi.package}/bin/rofi";
@ -14,11 +14,10 @@ let
change-wallpaper = "${pkgs.scripts}/bin/chpaper \${HOME}/Pictures/Wallpapers"; change-wallpaper = "${pkgs.scripts}/bin/chpaper \${HOME}/Pictures/Wallpapers";
in in
{ {
wayland.windowManager.hyprland = { home.packages = with pkgs; [
enable = true; hyprland
systemdIntegration = true; ];
recommendedEnvironment = true; xdg.configFile."hypr/hyprland.conf".text = ''
extraConfig = ''
monitor = eDP-1, 1920x1080, 0x0, 1 monitor = eDP-1, 1920x1080, 0x0, 1
monitor = , preferred, auto, 1 monitor = , preferred, auto, 1
@ -185,5 +184,4 @@ in
bind = ,XF86AudioNext, exec, ${playerctl} next bind = ,XF86AudioNext, exec, ${playerctl} next
bind = ,XF86AudioPrev, exec, ${playerctl} previous bind = ,XF86AudioPrev, exec, ${playerctl} previous
''; '';
};
} }