From 846855638578ecd229201191aede11df660c2ca7 Mon Sep 17 00:00:00 2001 From: Aleksandr Lebedev Date: Sun, 10 Aug 2025 01:38:29 +0200 Subject: [PATCH] homeConfigurations don't work with standalone home manager --- flake.lock | 210 +++--------------- flake.nix | 12 +- modules/home/impermanence/default.nix | 12 +- overlays/nix-schemas/default.nix | 19 -- .../kylekrein-framework12/default.nix | 1 - .../x86_64-linux/kylekrein-homepc/default.nix | 1 - 6 files changed, 40 insertions(+), 215 deletions(-) delete mode 100644 overlays/nix-schemas/default.nix diff --git a/flake.lock b/flake.lock index cd98bd4..a7fa83a 100644 --- a/flake.lock +++ b/flake.lock @@ -464,22 +464,6 @@ "type": "github" } }, - "flake-compat_10": { - "flake": false, - "locked": { - "lastModified": 1650374568, - "narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "b4a34015c698c7793d592d66adbab377907a2be8", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, "flake-compat_2": { "flake": false, "locked": { @@ -546,22 +530,6 @@ } }, "flake-compat_6": { - "flake": false, - "locked": { - "lastModified": 1733328505, - "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-compat_7": { "flake": false, "locked": { "lastModified": 1747046372, @@ -577,7 +545,7 @@ "type": "github" } }, - "flake-compat_8": { + "flake-compat_7": { "flake": false, "locked": { "lastModified": 1696426674, @@ -594,7 +562,7 @@ "type": "github" } }, - "flake-compat_9": { + "flake-compat_8": { "flake": false, "locked": { "lastModified": 1650374568, @@ -610,6 +578,22 @@ "type": "github" } }, + "flake-compat_9": { + "flake": false, + "locked": { + "lastModified": 1747046372, + "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "flake-parts": { "inputs": { "nixpkgs-lib": [ @@ -714,27 +698,6 @@ } }, "flake-parts_6": { - "inputs": { - "nixpkgs-lib": [ - "nix-schemas", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1733312601, - "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "flake-parts_7": { "inputs": { "nixpkgs-lib": [ "stylix", @@ -769,21 +732,6 @@ "url": "https://flakehub.com/f/DeterminateSystems/flake-schemas/%3D0.1.5.tar.gz" } }, - "flake-schemas_2": { - "locked": { - "lastModified": 1747430042, - "narHash": "sha256-FXBkQaQ2wptf06JpD9d8FsQcyj1wmSttq7eZIXxqiz4=", - "owner": "DeterminateSystems", - "repo": "flake-schemas", - "rev": "d0e74ee9a30eda4cc153b7f1e347043680834180", - "type": "github" - }, - "original": { - "owner": "DeterminateSystems", - "repo": "flake-schemas", - "type": "github" - } - }, "flake-utils": { "inputs": { "systems": "systems" @@ -827,17 +775,16 @@ "flake-utils": "flake-utils_4" }, "locked": { - "lastModified": 1715533576, - "narHash": "sha256-fT4ppWeCJ0uR300EH3i7kmgRZnAVxrH+XtK09jQWihk=", + "lastModified": 1738591040, + "narHash": "sha256-4WNeriUToshQ/L5J+dTSWC5OJIwT39SEP7V7oylndi8=", "owner": "gytis-ivaskevicius", "repo": "flake-utils-plus", - "rev": "3542fe9126dc492e53ddd252bb0260fe035f2c0f", + "rev": "afcb15b845e74ac5e998358709b2b5fe42a948d1", "type": "github" }, "original": { "owner": "gytis-ivaskevicius", "repo": "flake-utils-plus", - "rev": "3542fe9126dc492e53ddd252bb0260fe035f2c0f", "type": "github" } }, @@ -936,37 +883,6 @@ "type": "github" } }, - "git-hooks-nix": { - "inputs": { - "flake-compat": [ - "nix-schemas" - ], - "gitignore": [ - "nix-schemas" - ], - "nixpkgs": [ - "nix-schemas", - "nixpkgs" - ], - "nixpkgs-stable": [ - "nix-schemas", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1734279981, - "narHash": "sha256-NdaCraHPp8iYMWzdXAt5Nv6sA3MUzlCiGiR586TCwo0=", - "owner": "cachix", - "repo": "git-hooks.nix", - "rev": "aa9f40c906904ebd83da78e7f328cd8aeaeae785", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "git-hooks.nix", - "type": "github" - } - }, "gitignore": { "inputs": { "nixpkgs": [ @@ -1525,32 +1441,6 @@ "type": "github" } }, - "nix-schemas": { - "inputs": { - "flake-compat": "flake-compat_6", - "flake-parts": "flake-parts_6", - "git-hooks-nix": "git-hooks-nix", - "nixpkgs": [ - "nixpkgs" - ], - "nixpkgs-23-11": "nixpkgs-23-11", - "nixpkgs-regression": "nixpkgs-regression" - }, - "locked": { - "lastModified": 1741125032, - "narHash": "sha256-Yy1Cd3Xm4UJTctYsVQfD5jY5z7pVncvLu8cq0cjjYT4=", - "owner": "DeterminateSystems", - "repo": "nix-src", - "rev": "271926aa5997c3120c8ef0962ce1c7f29fee1a05", - "type": "github" - }, - "original": { - "owner": "DeterminateSystems", - "ref": "flake-schemas", - "repo": "nix-src", - "type": "github" - } - }, "nixos-facter-modules": { "locked": { "lastModified": 1750412875, @@ -1584,7 +1474,7 @@ }, "nixos-wsl": { "inputs": { - "flake-compat": "flake-compat_7", + "flake-compat": "flake-compat_6", "nixpkgs": "nixpkgs_13" }, "locked": { @@ -1618,22 +1508,6 @@ "type": "github" } }, - "nixpkgs-23-11": { - "locked": { - "lastModified": 1717159533, - "narHash": "sha256-oamiKNfr2MS6yH64rUn99mIZjc45nGJlj9eGth/3Xuw=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "a62e6edd6d5e1fa0329b8653c801147986f8d446", - "type": "github" - }, - "original": { - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "a62e6edd6d5e1fa0329b8653c801147986f8d446", - "type": "github" - } - }, "nixpkgs-docs": { "locked": { "lastModified": 1705957679, @@ -1693,22 +1567,6 @@ "type": "github" } }, - "nixpkgs-regression": { - "locked": { - "lastModified": 1643052045, - "narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", - "type": "github" - }, - "original": { - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", - "type": "github" - } - }, "nixpkgs-stable": { "locked": { "lastModified": 1724316499, @@ -4212,7 +4070,6 @@ "conduwuit": "conduwuit", "disko": "disko", "emacs-kylekrein": "emacs-kylekrein", - "flake-schemas": "flake-schemas_2", "home-manager": "home-manager_2", "impermanence": "impermanence", "lanzaboote": "lanzaboote", @@ -4223,7 +4080,6 @@ "nix-flatpak": "nix-flatpak", "nix-gaming": "nix-gaming", "nix-on-droid": "nix-on-droid", - "nix-schemas": "nix-schemas", "nixos-facter-modules": "nixos-facter-modules", "nixos-hardware": "nixos-hardware", "nixos-wsl": "nixos-wsl", @@ -4335,7 +4191,7 @@ }, "snowfall-flake": { "inputs": { - "flake-compat": "flake-compat_8", + "flake-compat": "flake-compat_7", "nixpkgs": [ "nixpkgs" ], @@ -4357,7 +4213,7 @@ }, "snowfall-lib": { "inputs": { - "flake-compat": "flake-compat_9", + "flake-compat": "flake-compat_8", "flake-utils-plus": "flake-utils-plus", "nixpkgs": [ "snowfall-flake", @@ -4381,23 +4237,23 @@ }, "snowfall-lib_2": { "inputs": { - "flake-compat": "flake-compat_10", + "flake-compat": "flake-compat_9", "flake-utils-plus": "flake-utils-plus_2", "nixpkgs": [ "nixpkgs" ] }, "locked": { - "lastModified": 1736130495, - "narHash": "sha256-4i9nAJEZFv7vZMmrE0YG55I3Ggrtfo5/T07JEpEZ/RM=", - "owner": "snowfallorg", - "repo": "lib", - "rev": "02d941739f98a09e81f3d2d9b3ab08918958beac", + "lastModified": 1754782494, + "narHash": "sha256-pSvIyyYP9wprEYbHvkwishLIpmLRrMdgxi5r8q9Ie44=", + "owner": "KyleKrein", + "repo": "snowfall-lib", + "rev": "f0e35a78e9c874c6962fddc827965701c3f5ffd2", "type": "github" }, "original": { - "owner": "snowfallorg", - "repo": "lib", + "owner": "KyleKrein", + "repo": "snowfall-lib", "type": "github" } }, @@ -4426,7 +4282,7 @@ "base16-helix": "base16-helix", "base16-vim": "base16-vim", "firefox-gnome-theme": "firefox-gnome-theme", - "flake-parts": "flake-parts_7", + "flake-parts": "flake-parts_6", "gnome-shell": "gnome-shell", "nixpkgs": "nixpkgs_16", "nur": "nur", diff --git a/flake.nix b/flake.nix index d3d14ae..11508f9 100644 --- a/flake.nix +++ b/flake.nix @@ -73,19 +73,13 @@ # The name "snowfall-lib" is required due to how Snowfall Lib processes your # flake's inputs. snowfall-lib = { - url = "github:snowfallorg/lib"; + url = "github:KyleKrein/snowfall-lib";#"git+file:///home/kylekrein/Git/snowfall-lib"; inputs.nixpkgs.follows = "nixpkgs"; }; snowfall-flake = { url = "github:snowfallorg/flake"; inputs.nixpkgs.follows = "nixpkgs"; }; - flake-schemas.url = "github:DeterminateSystems/flake-schemas"; - ## nix client with schema support: see https://github.com/NixOS/nix/pull/8892 - nix-schemas = { - url = "github:DeterminateSystems/nix-src/flake-schemas"; - inputs.nixpkgs.follows = "nixpkgs"; - }; }; outputs = inputs: @@ -121,7 +115,7 @@ nixos-hardware.nixosModules.framework-12-13th-gen-intel ]; - home.modules = with inputs; [ + homes.modules = with inputs; [ impermanence.homeManagerModules.impermanence ]; @@ -131,7 +125,7 @@ formatter = channels.nixpkgs.alejandra; }; - schemas = inputs.flake-schemas.schemas; + #schemas = inputs.flake-schemas.schemas; snowfall = { namespace = "custom"; diff --git a/modules/home/impermanence/default.nix b/modules/home/impermanence/default.nix index 7e13966..c171873 100644 --- a/modules/home/impermanence/default.nix +++ b/modules/home/impermanence/default.nix @@ -1,6 +1,6 @@ { lib, - osConfig, + osConfig ? null, pkgs, inputs, namespace, @@ -15,19 +15,15 @@ with lib; with lib.${namespace}; let cfg = config.${namespace}.impermanence; - osCfg = osConfig.${namespace}.impermanence; + osCfg = osConfig.${namespace}.impermanence or null; name = config.snowfallorg.user.name; home = config.snowfallorg.user.home.directory; in { options.${namespace}.impermanence = with types; { - enable = mkBoolOpt osCfg.enable "Enable impermanence"; - persistentStorage = mkOpt path "${osCfg.persistentStorage}${home}" "Actual persistent storage path"; + enable = mkBoolOpt osCfg.enable or false "Enable impermanence"; + persistentStorage = mkOpt path "${osCfg.persistentStorage or "/persist"}${home}" "Actual persistent storage path"; }; - imports = with inputs; [ - impermanence.homeManagerModules.impermanence - ]; - config = mkIf cfg.enable { home.persistence."${cfg.persistentStorage}" = { directories = [ diff --git a/overlays/nix-schemas/default.nix b/overlays/nix-schemas/default.nix deleted file mode 100644 index e531390..0000000 --- a/overlays/nix-schemas/default.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ - # Channels are named after NixPkgs instances in your flake inputs. For example, - # with the input `nixpkgs` there will be a channel available at `channels.nixpkgs`. - # These channels are system-specific instances of NixPkgs that can be used to quickly - # pull packages into your overlay. - channels, - inputs, - ... -}: final: prev: { - nix-schemas = inputs.nix-schemas.packages.${prev.system}.nix.overrideAttrs (old: { - doCheck = false; - doInstallCheck = false; - postInstall = - old.postInstall or "" - + '' - mv $out/bin/nix $out/bin/nix-schemas - ''; - }); -} diff --git a/systems/x86_64-linux/kylekrein-framework12/default.nix b/systems/x86_64-linux/kylekrein-framework12/default.nix index da76fee..630e440 100644 --- a/systems/x86_64-linux/kylekrein-framework12/default.nix +++ b/systems/x86_64-linux/kylekrein-framework12/default.nix @@ -57,7 +57,6 @@ in }; environment.systemPackages = with pkgs; [ blender - nix-schemas ]; #Chat host networking.firewall.allowedTCPPorts = [80 443 22 8448 9993 8081]; diff --git a/systems/x86_64-linux/kylekrein-homepc/default.nix b/systems/x86_64-linux/kylekrein-homepc/default.nix index abb3f07..bf5e42f 100644 --- a/systems/x86_64-linux/kylekrein-homepc/default.nix +++ b/systems/x86_64-linux/kylekrein-homepc/default.nix @@ -61,7 +61,6 @@ in environment.systemPackages = with pkgs; [ blender - nix-schemas ]; services.zerotierone = {