mirror of
https://github.com/hyprwm/hyprland-wiki.git
synced 2024-11-22 20:55:59 +01:00
64 lines
1.4 KiB
Markdown
64 lines
1.4 KiB
Markdown
You can use the Home Manager module by adding it to your configuration:
|
|
|
|
For a list of available options, check the
|
|
[module file](https://github.com/hyprwm/Hyprland/blob/main/nix/hm-module.nix).
|
|
|
|
## With flakes
|
|
|
|
```nix
|
|
# flake.nix
|
|
|
|
{
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
hyprland.url = "github:hyprwm/Hyprland";
|
|
};
|
|
|
|
outputs = {nixpkgs, home-manager, hyprland, ...}: {
|
|
homeConfigurations."user@hostname" = home-manager.lib.homeManagerConfiguration {
|
|
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
|
|
|
modules = [
|
|
hyprland.homeManagerModules.default
|
|
{wayland.windowManager.hyprland.enable = true;}
|
|
# ...
|
|
];
|
|
};
|
|
};
|
|
}
|
|
```
|
|
|
|
Don't forget to replace `user@hostname` with your username and hostname!
|
|
|
|
## Without flakes
|
|
|
|
```nix
|
|
# home config
|
|
|
|
{pkgs, ...}: let
|
|
flake-compat = builtins.fetchTarball "https://github.com/edolstra/flake-compat/archive/master.tar.gz";
|
|
|
|
hyprland = (import flake-compat {
|
|
src = builtins.fetchTarball "https://github.com/hyprwm/Hyprland/archive/master.tar.gz";
|
|
}).defaultNix;
|
|
in {
|
|
imports = [
|
|
hyprland.homeManagerModules.default
|
|
];
|
|
|
|
wayland.windowManager.hyprland = {
|
|
enable = true;
|
|
|
|
extraConfig = ''
|
|
bind = SUPER, Return, exec, kitty
|
|
# ...
|
|
'';
|
|
};
|
|
}
|
|
```
|