mirror of
https://github.com/hyprwm/hyprland-wiki.git
synced 2024-12-23 10:09:49 +01:00
56 lines
1.3 KiB
Markdown
56 lines
1.3 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
|
||
|
{config, pkgs, inputs, ...}: 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;
|
||
|
# ...
|
||
|
}
|
||
|
```
|