mirror of
https://github.com/eRgo35/nix-config.git
synced 2026-02-04 10:06:15 +01:00
hyprland initial config
This commit is contained in:
21
flake.nix
21
flake.nix
@@ -10,8 +10,10 @@
|
|||||||
# Also see the 'unstable-packages' overlay at 'overlays/default.nix'.
|
# Also see the 'unstable-packages' overlay at 'overlays/default.nix'.
|
||||||
|
|
||||||
# Home manager
|
# Home manager
|
||||||
home-manager.url = "github:nix-community/home-manager/release-23.11";
|
home-manager = {
|
||||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
url = "github:nix-community/home-manager/release-23.11";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
# TODO: Add any other flake you might need
|
# TODO: Add any other flake you might need
|
||||||
# hardware.url = "github:nixos/nixos-hardware";
|
# hardware.url = "github:nixos/nixos-hardware";
|
||||||
@@ -19,6 +21,21 @@
|
|||||||
# Shameless plug: looking for a way to nixify your themes and make
|
# Shameless plug: looking for a way to nixify your themes and make
|
||||||
# everything match nicely? Try nix-colors!
|
# everything match nicely? Try nix-colors!
|
||||||
# nix-colors.url = "github:misterio77/nix-colors";
|
# nix-colors.url = "github:misterio77/nix-colors";
|
||||||
|
|
||||||
|
hyprland = {
|
||||||
|
url = "github:hyprwm/hyprland";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
|
hyprwm-contrib = {
|
||||||
|
url = "github:hyprwm/contrib";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
|
hyprland-plugins = {
|
||||||
|
url = "github:hyprwm/hyprland-plugins";
|
||||||
|
inputs.hyprland.follows = "hyprland";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = {
|
outputs = {
|
||||||
|
|||||||
15
home-manager/features/desktop/common/default.nix
Normal file
15
home-manager/features/desktop/common/default.nix
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
{lib, pkgs, config, ...}: {
|
||||||
|
imports = [
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
dconf.settings."org/gnome/desktop/interface".color-scheme =
|
||||||
|
if config.colorscheme.variant == "dark"
|
||||||
|
then "prefer-dark"
|
||||||
|
else if config.colorscheme.variant == "light"
|
||||||
|
then "prefer-light"
|
||||||
|
else "default";
|
||||||
|
|
||||||
|
xdg.portal.enable = true;
|
||||||
|
|
||||||
|
}
|
||||||
29
home-manager/features/desktop/common/wayland-wm/default.nix
Normal file
29
home-manager/features/desktop/common/wayland-wm/default.nix
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
{pkgs, ...}: {
|
||||||
|
imports = [];
|
||||||
|
|
||||||
|
xdg.mimeApps.enable = true;
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
grim
|
||||||
|
gtk3
|
||||||
|
imv
|
||||||
|
mimeo
|
||||||
|
primary-xwayland
|
||||||
|
pulseaudio
|
||||||
|
slurp
|
||||||
|
waypipe
|
||||||
|
wf-recorder
|
||||||
|
wl-clipboard
|
||||||
|
wl-mirror
|
||||||
|
wl-mirror-pick
|
||||||
|
xdg-utils
|
||||||
|
ydotool
|
||||||
|
];
|
||||||
|
|
||||||
|
home.sessionVariables = {
|
||||||
|
MOZ_ENABLE_WAYLAND = 1;
|
||||||
|
QT_QPA_PLATFORM = "wayland";
|
||||||
|
LIBSEAT_BACKEND = "logind";
|
||||||
|
};
|
||||||
|
|
||||||
|
xdg.portal.extraPortals = [pkgs.xdg-desktop-portal-wlr];
|
||||||
|
}
|
||||||
1
home-manager/features/desktop/gnome/default.nix
Normal file
1
home-manager/features/desktop/gnome/default.nix
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{imports = [../common];}
|
||||||
40
home-manager/features/desktop/hyprland/default.nix
Normal file
40
home-manager/features/desktop/hyprland/default.nix
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
hyprland = pkgs.inputs.hyprland.hyprland.override {wrapRuntimeDeps = false;};
|
||||||
|
xdhp = pkgs.inputs.hyprland.xdg-desktop-portal-hyprland.override {inherit hyprland;};
|
||||||
|
in {
|
||||||
|
imports = [
|
||||||
|
../common
|
||||||
|
../common/wayland-wm
|
||||||
|
];
|
||||||
|
|
||||||
|
xdg.portal = {
|
||||||
|
extraPortals = [xdhp];
|
||||||
|
configPackages = [hyprland];
|
||||||
|
};
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
inputs.hyprwm-contrib.grimblast
|
||||||
|
hyprslurp
|
||||||
|
hyprpicker
|
||||||
|
];
|
||||||
|
|
||||||
|
wayland.windowManger.hyprland = {
|
||||||
|
enable = true;
|
||||||
|
package = hyprland;
|
||||||
|
systemd = {
|
||||||
|
enable = true;
|
||||||
|
# Same as default but stop graphical-session too
|
||||||
|
extraCommands = lib.mkBefore [
|
||||||
|
"systemctl --user stop graphical-session.target"
|
||||||
|
"systemctl --user start hyprland-session.target"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
#TODO: Add hyprland config
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user