mirror of
https://github.com/hyprwm/hyprland-wiki.git
synced 2024-11-22 04:35:59 +01:00
Nix: add HM install info
This commit is contained in:
parent
85e8e93eba
commit
7545255f78
1 changed files with 42 additions and 2 deletions
|
@ -70,10 +70,50 @@ in {
|
|||
|
||||
You can use the Home Manager module by adding it to your configuration:
|
||||
|
||||
### With flakes
|
||||
|
||||
```nix
|
||||
{ config, pkgs, inputs, ... }: {
|
||||
# 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";
|
||||
# build with your own instance of nixpkgs
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, 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 = [
|
||||
inputs.hyprland.homeManagerModules.default
|
||||
hyprland.homeManagerModules.default
|
||||
];
|
||||
|
||||
wayland.windowManager.hyprland.enable = true;
|
||||
|
|
Loading…
Reference in a new issue