add hyprland init

This commit is contained in:
crurak 2023-08-05 14:06:29 +02:00
parent a020c863f9
commit 4a62dec178
10 changed files with 142 additions and 8 deletions

105
flake.lock generated
View File

@ -21,7 +21,65 @@
"type": "github"
}
},
"hyprland": {
"inputs": {
"hyprland-protocols": "hyprland-protocols",
"nixpkgs": "nixpkgs",
"wlroots": "wlroots",
"xdph": "xdph"
},
"locked": {
"lastModified": 1691161096,
"narHash": "sha256-yJaIvoenNoGxTI0bOHPflvJObTnyXZhsjaOFJMIbDps=",
"owner": "hyprwm",
"repo": "Hyprland",
"rev": "46cf4eb837c39255f24fa32b5a740c28ce1a324f",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "Hyprland",
"type": "github"
}
},
"hyprland-protocols": {
"inputs": {
"nixpkgs": [
"hyprland",
"nixpkgs"
]
},
"locked": {
"lastModified": 1684265364,
"narHash": "sha256-AxNnWbthsuNx73HDQr0eBxrcE3+yfl/WsaXZqUFmkpQ=",
"owner": "hyprwm",
"repo": "hyprland-protocols",
"rev": "8c279b9fb0f2b031427dc5ef4eab53f2ed835530",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprland-protocols",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1690179384,
"narHash": "sha256-+arbgqFTAtoeKtepW9wCnA0njCOyoiDFyl0Q0SBSOtE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "b12803b6d90e2e583429bb79b859ca53c348b39a",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1690927903,
"narHash": "sha256-D5gCaCROnjEKDOel//8TO/pOP87pAEtT0uT8X+0Bj/U=",
@ -40,7 +98,52 @@
"root": {
"inputs": {
"home-manager": "home-manager",
"nixpkgs": "nixpkgs"
"hyprland": "hyprland",
"nixpkgs": "nixpkgs_2"
}
},
"wlroots": {
"flake": false,
"locked": {
"host": "gitlab.freedesktop.org",
"lastModified": 1691073628,
"narHash": "sha256-LlxE3o3UzRY7APYVLGNKM30DBMcDifCRIQiMVSbYLIc=",
"owner": "wlroots",
"repo": "wlroots",
"rev": "c74f89d4f84bfed0284d3908aee5d207698c70c5",
"type": "gitlab"
},
"original": {
"host": "gitlab.freedesktop.org",
"owner": "wlroots",
"repo": "wlroots",
"rev": "c74f89d4f84bfed0284d3908aee5d207698c70c5",
"type": "gitlab"
}
},
"xdph": {
"inputs": {
"hyprland-protocols": [
"hyprland",
"hyprland-protocols"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
]
},
"locked": {
"lastModified": 1685385764,
"narHash": "sha256-r+XMyOoRXq+hlfjayb+fyi9kq2JK48TrwuNIAXqlj7U=",
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"rev": "4d9ff0c17716936e0b5ca577a39e263633901ed1",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"type": "github"
}
}
},

View File

@ -2,17 +2,17 @@
description = "NixOS configuration";
inputs = { # All flake references
# Nixpkgs
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05"; # Default stable nix packages
# Home manager
home-manager = { # User package management
url = "github:nix-community/home-manager/release-23.05";
inputs.nixpkgs.follows = "nixpkgs";
};
hyprland.url = "github:hyprwm/Hyprland"; # packages hyprland
};
outputs = attrs @ { self, nixpkgs, home-manager, ... }: {
outputs = attrs @ { self, nixpkgs, home-manager, hyprland, ... }: {
nixosConfigurations = { # NixOS Configuration
merkur = nixpkgs.lib.nixosSystem { # Flake "merkur" (Notebook)
system = "x85_64-linux";

View File

@ -2,7 +2,10 @@
home-manager.sharedModules = [
./bash.nix
./bat.nix
./dunst.nix
./git.nix
./hyprland.nix
./kitty.nix
./neovim.nix
];
}

10
home/dunst.nix Normal file
View File

@ -0,0 +1,10 @@
{ pkgs, ... }: {
home.packages = with pkgs; [ libnotify ];
service.dunst = {
enable = true;
iconTheme = {
package = pkgs.papirus-icon-theme;
name = "Papirus";
};
};
}

8
home/hyprland.nix Normal file
View File

@ -0,0 +1,8 @@
{ pkgs, config, lib, ... }: let
modifier = "SUPER";
in {
xdg.configFile."hypr/hyprland.conf".text = ''
$SUPER = ${modifier};
bind = $SUPER, Q, exec, kitty
'';
}

5
home/kitty.nix Normal file
View File

@ -0,0 +1,5 @@
{
programs.kitty = {
enable = true;
};
}

View File

@ -1,4 +1,4 @@
{ home-manager, ... }: {
{ home-manager, hyprland, ... }: {
imports = [
home-manager.nixosModules.home-manager
./hardware/merkur.nix

View File

@ -3,6 +3,7 @@
./boot.nix
./home-manager.nix
./locale.nix
./hyprland.nix
./networking.nix
./nix.nix
./packages.nix

View File

@ -1,5 +1,7 @@
{ pkgs, ... }: {
programs.hyprland.enable = true;
{ inputs, pkgs, ... }: {
programs.hyprland = {
enable = true;
};
services.xserver = {
enable = true;

View File

@ -1,5 +1,7 @@
{
nix.settings = {
experimental-features = "nix-command flakes";
experimental-features = "nix-command flakes"; # enable flakes
substituters = [ "https://hyprland.cachix.org" ]; # pre compiled hyprland packages
trusted-public-keys = [ "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" ];
};
}