2022-12-18 14:20:19 +01:00
|
|
|
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
|
2023-02-14 14:30:40 +01:00
|
|
|
|
2022-12-18 14:20:19 +01:00
|
|
|
{
|
|
|
|
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;}
|
|
|
|
# ...
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
2022-12-28 16:31:43 +01:00
|
|
|
}
|
2022-12-18 14:20:19 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
Don't forget to replace `user@hostname` with your username and hostname!
|
|
|
|
|
|
|
|
## Without flakes
|
|
|
|
|
|
|
|
```nix
|
|
|
|
# home config
|
2023-02-14 14:30:40 +01:00
|
|
|
|
|
|
|
{pkgs, ...}: let
|
2022-12-18 14:20:19 +01:00
|
|
|
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
|
|
|
|
];
|
|
|
|
|
2023-02-14 14:30:40 +01:00
|
|
|
wayland.windowManager.hyprland = {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
extraConfig = ''
|
|
|
|
bind = SUPER, Return, exec, kitty
|
|
|
|
# ...
|
|
|
|
'';
|
|
|
|
};
|
2022-12-18 14:20:19 +01:00
|
|
|
}
|
|
|
|
```
|