From cd456da0e693a847ff175bbaa3b8043649de9c1d Mon Sep 17 00:00:00 2001 From: Dmitriy Kholkin Date: Sat, 7 Jun 2025 22:21:25 +0300 Subject: [PATCH] fix: import dummy home-manager module to hosts without real home-manager --- flake.lock | 8 ++++---- flake.nix | 3 ++- modules/nixos/applications/corectrl.nix | 8 ++------ modules/nixos/applications/steam.nix | 3 +-- modules/nixos/workspace/wayland.nix | 9 ++------- 5 files changed, 11 insertions(+), 20 deletions(-) diff --git a/flake.lock b/flake.lock index 8c250ce..6516778 100644 --- a/flake.lock +++ b/flake.lock @@ -589,16 +589,16 @@ }, "lite-config": { "locked": { - "lastModified": 1748522697, - "narHash": "sha256-TPmDm8A7LeyMcLoJu6/DsGkyeA8MkZbr6H7YVsYiD1w=", + "lastModified": 1749323815, + "narHash": "sha256-NAhCvl7RZDL0XiQi7GMJ4KJsakQZDpKuIb5H9m3nhSI=", "owner": "ataraxiasjel", "repo": "lite-config", - "rev": "6ad11bd210d87035b7e5d58f6f68c16221354ff8", + "rev": "dc6717c8fbdabf81740a26c745316a5cb40e8c70", "type": "github" }, "original": { "owner": "ataraxiasjel", - "ref": "v0.9.0", + "ref": "v0.10.0", "repo": "lite-config", "type": "github" } diff --git a/flake.nix b/flake.nix index 1fdff77..da526e2 100644 --- a/flake.nix +++ b/flake.nix @@ -21,7 +21,7 @@ nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05"; nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; flake-parts.url = "github:hercules-ci/flake-parts"; - lite-config.url = "github:ataraxiasjel/lite-config/v0.9.0"; + lite-config.url = "github:ataraxiasjel/lite-config/v0.10.0"; flake-registry = { url = "github:nixos/flake-registry"; flake = false; @@ -91,6 +91,7 @@ (final: prev: (import ./overlays inputs) final prev) ]; }; + importDummyHomeManager = true; extraSpecialArgs = { flake-self = self; secretsDir = ./secrets; diff --git a/modules/nixos/applications/corectrl.nix b/modules/nixos/applications/corectrl.nix index 2e2dc00..e47c0fd 100644 --- a/modules/nixos/applications/corectrl.nix +++ b/modules/nixos/applications/corectrl.nix @@ -2,7 +2,6 @@ config, lib, pkgs, - options, ... }: let @@ -23,13 +22,10 @@ in # gpuOverclock.ppfeaturemask = "0xffffffff"; }; - home-manager = mkIf (hasAttr "home-manager" options) { + home-manager = mkIf (hasAttr "users" config.home-manager) { users.${defaultUser} = { startupApplications = [ "${pkgs.corectrl}/bin/corectrl" ]; - - persist.state.directories = [ - ".config/corectrl" - ]; + persist.state.directories = [ ".config/corectrl" ]; }; }; }; diff --git a/modules/nixos/applications/steam.nix b/modules/nixos/applications/steam.nix index 4a1dffb..67a678a 100644 --- a/modules/nixos/applications/steam.nix +++ b/modules/nixos/applications/steam.nix @@ -2,7 +2,6 @@ config, lib, pkgs, - options, ... }: let @@ -43,7 +42,7 @@ in }; programs.steam.gamescopeSession.args = [ "--adaptive-sync" ]; - home-manager = mkIf (hasAttr "home-manager" options) { + home-manager = mkIf (hasAttr "users" config.home-manager) { users.${defaultUser} = { startupApplications = [ "${config.programs.steam.package}/bin/steam" ]; persist.state.directories = [ ".local/share/Steam" ]; diff --git a/modules/nixos/workspace/wayland.nix b/modules/nixos/workspace/wayland.nix index b76ce3b..7c44eae 100644 --- a/modules/nixos/workspace/wayland.nix +++ b/modules/nixos/workspace/wayland.nix @@ -1,9 +1,4 @@ -{ - config, - lib, - options, - ... -}: +{ config, lib, ... }: let inherit (builtins) hasAttr; inherit (lib) getExe mkEnableOption mkIf; @@ -36,7 +31,7 @@ in }; }; - home-manager = mkIf (hasAttr "home-manager" options) { + home-manager = mkIf (hasAttr "users" config.home-manager) { users.${defaultUser} = { ataraxia.wayland.hyprland.enable = cfg.hyprland.enable; };