Replies: 2 comments 3 replies
-
Here is a proposed change for the nix section in the installation guide so that users can make use of #78: NixWith FlakesUsing the overlayHere is a template NixOS configuration with Hyprland: {
description = "My flake using hyprland";
inputs = {
nixpkgs-flake.url = "nixpkgs/nixos-unstable";
hyprland-flake.url = "github:vaxerski/Hyprland";
};
outputs = inputs @ { self, nixpkgs-flake, hyprland-flake, ... }:
let
system = "x86_64-linux"; # "aarch64-linux" should also work
pkgs = import nixpkgs-flake {
inherit system;
overlays = [ hyprland-flake.overlay ];
};
in {
nixosConfigurations.the-hostname-that-you-want = nixpkgs-flake.lib.nixosSystem {
inherit system;
modules = [
{ nixpkgs = { inherit pkgs; }; }
({ config, pkgs, lib, ... }: { # the following config can be instead in a seperate nix file
environment = {
systemPackages = [ pkgs.hyprland ];
};
# additional useful configuration
security.pam.services.swaylock = {};
hardware.opengl.enable = lib.mkDefault true;
fonts.enableDefaultFonts = lib.mkDefault true;
programs.dconf.enable = lib.mkDefault true;
# To make an Hyprland session available if a display manager like SDDM is enabled:
services.xserver.displayManager.sessionPackages = [ pkgs.hyprland ];
programs.xwayland.enable = lib.mkDefault true;
# For screen sharing (this option only has an effect with xdg.portal.enable):
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-wlr ];
xdg.portal.enable = lib.mkDefault true;
})
#./configuration.nix # here is how to import a nix file
];
};
};
} Using the package{ inputs, ... }:
let
hyprland = inputs.hyprland.defaultPackage.x86_64-linux;
in {
home.packages = [
hyprland
# hyprland.override { enableXWayland = false; }) Use this if you don't want xwayland
];
} Without FlakesUsing the overlay{ config, pkgs, lib, ... }: {
nixpkgs.overlays = [ (builtins.getFlake "github:vaxerski/Hyprland").overlay ];
environment = {
systemPackages = [ pkgs.hyprland ];
};
# additional useful configuration
security.pam.services.swaylock = {};
hardware.opengl.enable = lib.mkDefault true;
fonts.enableDefaultFonts = lib.mkDefault true;
programs.dconf.enable = lib.mkDefault true;
# To make an Hyprland session available if a display manager like SDDM is enabled:
services.xserver.displayManager.sessionPackages = [ pkgs.hyprland ];
programs.xwayland.enable = lib.mkDefault true;
# For screen sharing (this option only has an effect with xdg.portal.enable):
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-wlr ];
xdg.portal.enable = lib.mkDefault true;
} Using the package{ ... }:
let
hyprland = (builtins.getFlake "github:vaxerski/Hyprland").defaultPackage.x86_64-linux;
in {
home.packages = [
hyprland
# hyprland.override { enableXWayland = false; }) Use this if you don't want xwayland
];
} |
Beta Was this translation helpful? Give feedback.
2 replies
-
https://github.com/hyprwm/Hyprland/wiki/Advanced-config#submaps
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Please report all the issues / request changes with the Hyprland Wiki pages.
The wiki can be found at github.com/vaxerski/Hyprland/wiki
Beta Was this translation helpful? Give feedback.
All reactions