Using hyprland from flake
This commit is contained in:
1 parent
4b06428bd0
commit
b937743dba
6 files changed
+257
-25
No files matched your search
Generated
+230
@@ -1,5 +1,38 @@
|
||||
{
|
||||
"nodes": {
|
||||
"aquamarine": {
|
||||
"inputs": {
|
||||
"hyprutils": [
|
||||
"hyprland",
|
||||
"hyprutils"
|
||||
],
|
||||
"hyprwayland-scanner": [
|
||||
"hyprland",
|
||||
"hyprwayland-scanner"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"hyprland",
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": [
|
||||
"hyprland",
|
||||
"systems"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1725199881,
|
||||
"narHash": "sha256-jsmipf/u1GFZE5tBUkr56CHMN6VpUWCAjfLIhvQijU0=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "aquamarine",
|
||||
"rev": "f8a687dd29ff019657498f1bd14da2fbbf0e604b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hyprwm",
|
||||
"repo": "aquamarine",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
@@ -58,6 +91,172 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"hyprcursor": {
|
||||
"inputs": {
|
||||
"hyprlang": [
|
||||
"hyprland",
|
||||
"hyprlang"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"hyprland",
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": [
|
||||
"hyprland",
|
||||
"systems"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1722623071,
|
||||
"narHash": "sha256-sLADpVgebpCBFXkA1FlCXtvEPu1tdEsTfqK1hfeHySE=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprcursor",
|
||||
"rev": "912d56025f03d41b1ad29510c423757b4379eb1c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprcursor",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"hyprland": {
|
||||
"inputs": {
|
||||
"aquamarine": "aquamarine",
|
||||
"hyprcursor": "hyprcursor",
|
||||
"hyprlang": "hyprlang",
|
||||
"hyprutils": "hyprutils",
|
||||
"hyprwayland-scanner": "hyprwayland-scanner",
|
||||
"nixpkgs": [
|
||||
"unstable"
|
||||
],
|
||||
"systems": [
|
||||
"systems"
|
||||
],
|
||||
"xdph": "xdph"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1725667615,
|
||||
"narHash": "sha256-ksmD1gNS/AX4qHvcCS7u+agvB+0fg2wCukFr3Hy4A3I=",
|
||||
"ref": "refs/heads/main",
|
||||
"rev": "0500213086f8402ccbdb2acb4748dbc6d22e21f6",
|
||||
"revCount": 5192,
|
||||
"submodules": true,
|
||||
"type": "git",
|
||||
"url": "https://github.com/hyprwm/Hyprland"
|
||||
},
|
||||
"original": {
|
||||
"submodules": true,
|
||||
"type": "git",
|
||||
"url": "https://github.com/hyprwm/Hyprland"
|
||||
}
|
||||
},
|
||||
"hyprland-protocols": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"hyprland",
|
||||
"xdph",
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": [
|
||||
"hyprland",
|
||||
"xdph",
|
||||
"systems"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1721326555,
|
||||
"narHash": "sha256-zCu4R0CSHEactW9JqYki26gy8h9f6rHmSwj4XJmlHgg=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprland-protocols",
|
||||
"rev": "5a11232266bf1a1f5952d5b179c3f4b2facaaa84",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprland-protocols",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"hyprlang": {
|
||||
"inputs": {
|
||||
"hyprutils": [
|
||||
"hyprland",
|
||||
"hyprutils"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"hyprland",
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": [
|
||||
"hyprland",
|
||||
"systems"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1725188252,
|
||||
"narHash": "sha256-yBH8c4GDaEAtBrh+BqIlrx5vp6gG/Gu8fQQK63KAQgs=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprlang",
|
||||
"rev": "c12ab785ce1982f82594aff03b3104c598186ddd",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprlang",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"hyprutils": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"hyprland",
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": [
|
||||
"hyprland",
|
||||
"systems"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1724966483,
|
||||
"narHash": "sha256-WXDgKIbzjYKczxSZOsJplCS1i1yrTUpsDPuJV/xpYLo=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprutils",
|
||||
"rev": "8976e3f6a5357da953a09511d0c7f6a890fb6ec2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprutils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"hyprwayland-scanner": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"hyprland",
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": [
|
||||
"hyprland",
|
||||
"systems"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1721324119,
|
||||
"narHash": "sha256-SOOqIT27/X792+vsLSeFdrNTF+OSRp5qXv6Te+fb2Qg=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprwayland-scanner",
|
||||
"rev": "a048a6cb015340bd82f97c1f40a4b595ca85cc30",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprwayland-scanner",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-darwin": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
@@ -130,6 +329,7 @@
|
||||
"inputs": {
|
||||
"gBar": "gBar",
|
||||
"home-manager": "home-manager",
|
||||
"hyprland": "hyprland",
|
||||
"nix-darwin": "nix-darwin",
|
||||
"nixos-hardware": "nixos-hardware",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
@@ -204,6 +404,36 @@
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"xdph": {
|
||||
"inputs": {
|
||||
"hyprland-protocols": "hyprland-protocols",
|
||||
"hyprlang": [
|
||||
"hyprland",
|
||||
"hyprlang"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"hyprland",
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": [
|
||||
"hyprland",
|
||||
"systems"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1725203932,
|
||||
"narHash": "sha256-VLULC/OnI+6R9KEP2OIGk+uLJJsfRlaLouZ5gyFd2+Y=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "xdg-desktop-portal-hyprland",
|
||||
"rev": "2425e8f541525fa7409d9f26a8ffaf92a3767251",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hyprwm",
|
||||
"repo": "xdg-desktop-portal-hyprland",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
|
||||
@@ -6,6 +6,12 @@
|
||||
# Nixpkgs
|
||||
unstable.url = "github:NixOS/nixpkgs/master";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
|
||||
# Hyprland
|
||||
hyprland = {
|
||||
url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
|
||||
inputs.nixpkgs.follows = "unstable";
|
||||
inputs.systems.follows = "systems";
|
||||
};
|
||||
# Home manager
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/release-24.05";
|
||||
@@ -33,6 +39,7 @@
|
||||
, unstable-home-manager
|
||||
, nix-darwin
|
||||
, gBar
|
||||
, hyprland
|
||||
}:
|
||||
let
|
||||
user = {
|
||||
@@ -82,8 +89,14 @@
|
||||
nix-darwin
|
||||
hlCommonSettings
|
||||
systems
|
||||
gBar
|
||||
;
|
||||
specialArgs = {
|
||||
inputs = {
|
||||
inherit
|
||||
gBar
|
||||
hyprland;
|
||||
};
|
||||
};
|
||||
};
|
||||
# Libs
|
||||
lib = (import modules/lib.nix ({
|
||||
|
||||
+3
-4
@@ -3,7 +3,7 @@
|
||||
, nix-darwin
|
||||
, systems
|
||||
, hlCommonSettings
|
||||
, gBar
|
||||
, specialArgs
|
||||
}:
|
||||
let
|
||||
makeImports =
|
||||
@@ -11,7 +11,7 @@ let
|
||||
, extraConfiguration ? [ ]
|
||||
}: (if (isNull attrs.configuration) then [ ] else [ attrs.configuration ])
|
||||
++ [
|
||||
(import ./main.nix (attrs // { inherit gBar; }))
|
||||
(import ./main.nix attrs)
|
||||
] ++ extraConfiguration;
|
||||
eachSystem = nixpkgs.lib.genAttrs (import systems);
|
||||
allPkgs = eachSystem (system:
|
||||
@@ -22,12 +22,12 @@ let
|
||||
makeNixOsModuleMaker =
|
||||
masterAttrs:
|
||||
{ system ? masterAttrs.system ? "x86_64-linux"
|
||||
, configuration ? null
|
||||
, ...
|
||||
}@attrs:
|
||||
let joinedttrs = masterAttrs // attrs;
|
||||
in
|
||||
nixpkgs.lib.nixosSystem {
|
||||
inherit specialArgs;
|
||||
system = system;
|
||||
modules = (makeImports {
|
||||
attrs = joinedttrs;
|
||||
@@ -42,7 +42,6 @@ let
|
||||
makeDarwinModule =
|
||||
{ system ? "x86_64-darwin"
|
||||
, user
|
||||
, configuration ? null
|
||||
, ...
|
||||
}@attrs:
|
||||
nix-darwin.lib.darwinSystem {
|
||||
|
||||
+3
-11
@@ -2,33 +2,25 @@
|
||||
, homeManagerVersion
|
||||
, systemStateVersion
|
||||
, hostName
|
||||
, system
|
||||
, enableNetworkDrives ? false
|
||||
# Desktop Module
|
||||
, desktop ? {
|
||||
enable = false;
|
||||
}
|
||||
# os
|
||||
, os ? {
|
||||
enable = false;
|
||||
}
|
||||
, localNixCaches ? { keys = [ ]; urls = [ ]; }
|
||||
, gBar
|
||||
, ...
|
||||
}:
|
||||
{ pkgs, ... }: {
|
||||
imports = [
|
||||
(import ./core)
|
||||
(import ./nixos)
|
||||
(import ./network-drives.nix)
|
||||
./core
|
||||
./nixos
|
||||
./network-drives.nix
|
||||
];
|
||||
# Share defaults
|
||||
skyg.user = user;
|
||||
skyg.core.hostName = hostName;
|
||||
skyg.home-manager.version = homeManagerVersion;
|
||||
skyg.home-manager.extraImports = [
|
||||
gBar.homeManagerModules.x86_64-linux.default
|
||||
];
|
||||
skyg.core.substituters = localNixCaches;
|
||||
skyg.networkDrives.enabled = enableNetworkDrives;
|
||||
skyg.nixos.common.containers = (if os.enable then os.containers else { });
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
with lib;
|
||||
|
||||
{ config, lib, pkgs, inputs, ... }:
|
||||
let
|
||||
cfg = config.skyg.nixos.desktop.hyprland;
|
||||
hyprpkgs = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system};
|
||||
in
|
||||
{
|
||||
config = mkIf cfg.enabled {
|
||||
config = lib.mkIf cfg.enabled {
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
portalPackage = pkgs.xdg-desktop-portal-hyprland;
|
||||
package = hyprpkgs.hyprland;
|
||||
portalPackage = hyprpkgs.xdg-desktop-portal-hyprland;
|
||||
xwayland.enable = true;
|
||||
systemd.setPath.enable = true;
|
||||
};
|
||||
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-hyprland ];
|
||||
xdg.portal.extraPortals = [ hyprpkgs.xdg-desktop-portal-hyprland ];
|
||||
services.hypridle.enable = true;
|
||||
environment.sessionVariables = { NIXOS_OZONE_WL = "1"; };
|
||||
environment.systemPackages = with pkgs; [
|
||||
@@ -27,7 +27,6 @@ in
|
||||
xwaylandvideobridge
|
||||
lxqt.lxqt-policykit
|
||||
xdg-desktop-portal
|
||||
xdg-desktop-portal-hyprland
|
||||
auto-cpufreq
|
||||
|
||||
# general utilities
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
{ lib, ... }:
|
||||
with lib;
|
||||
{
|
||||
imports = [
|
||||
./common.nix
|
||||
@@ -7,7 +6,7 @@ with lib;
|
||||
./nwg-shell.nix
|
||||
];
|
||||
options = {
|
||||
skyg.nixos.desktop.hyprland = {
|
||||
skyg.nixos.desktop.hyprland = with lib; {
|
||||
enabled = mkEnableOption
|
||||
"Hyprland";
|
||||
useNWG = mkEnableOption
|
||||
|
||||
Reference in new issue
Block a user