Using hyprland from flake

This commit is contained in:
ari committed 2024-09-07 15:49:53 -04:00
1 parent 4b06428bd0
commit b937743dba
6 files changed
+257 -25

No files matched your search

+3 -4
View File
@@ -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
View File
@@ -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 { });
+6 -7
View File
@@ -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 -2
View File
@@ -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