chore: reworked extraLib
This commit is contained in:
parent
34c1e952c5
commit
21c5f9d77e
|
@ -79,8 +79,6 @@
|
|||
|
||||
stateVersion = "23.05";
|
||||
|
||||
extraLib = import ./nix/lib.nix inputs;
|
||||
|
||||
hosts = {
|
||||
patricknix = {
|
||||
type = "nixos";
|
||||
|
@ -97,6 +95,7 @@
|
|||
}
|
||||
// flake-utils.lib.eachDefaultSystem (system: rec {
|
||||
pkgs = import nixpkgs {
|
||||
overlays = [(import nix/lib.nix inputs)];
|
||||
inherit system;
|
||||
# TODO fix this to only allow specific unfree packages
|
||||
config.allowUnfree = true;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
hyprland,
|
||||
stateVersion,
|
||||
config,
|
||||
extraLib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
home-manager = {
|
||||
|
@ -18,7 +18,6 @@
|
|||
hyprland.homeManagerModules.default
|
||||
];
|
||||
extraSpecialArgs = {
|
||||
inherit extraLib;
|
||||
nixosConfig = config;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -21,8 +21,8 @@ in {
|
|||
inherit (nodeMeta) system;
|
||||
pkgs = self.pkgs.${nodeMeta.system};
|
||||
specialArgs = {
|
||||
inherit (nixpkgs) lib;
|
||||
inherit (self) nodes stateVersion extraLib;
|
||||
inherit (self.pkgs.${nodeMeta.system}) lib;
|
||||
inherit (self) nodes stateVersion;
|
||||
inherit
|
||||
inputs
|
||||
nodeName
|
||||
|
|
|
@ -2,7 +2,10 @@
|
|||
self,
|
||||
nixpkgs,
|
||||
...
|
||||
}: {
|
||||
}: self: super: {
|
||||
lib =
|
||||
super.lib
|
||||
// {
|
||||
# some programs( such as steam do not work with bindmounts
|
||||
# additionally symlinks are a lot faster than bindmounts
|
||||
# ~ 2x faster in my tests
|
||||
|
@ -10,4 +13,5 @@
|
|||
directory = x;
|
||||
method = "symlink";
|
||||
});
|
||||
};
|
||||
}
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
config,
|
||||
lib,
|
||||
nixosConfig,
|
||||
extraLib,
|
||||
...
|
||||
}: {
|
||||
home.persistence."/state/${config.home.homeDirectory}" = with lib.lists; {
|
||||
|
@ -16,7 +15,7 @@
|
|||
optionals config.programs.firefox.enable [
|
||||
".mozilla"
|
||||
]
|
||||
++ extraLib.impermanence.makeSymlinks (
|
||||
++ pkgs.lib.impermanence.makeSymlinks (
|
||||
optionals config.programs.atuin.enable [
|
||||
".local/share/atuin"
|
||||
]
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
config,
|
||||
extraLib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
home = {
|
||||
persistence."/state/${config.home.homeDirectory}" = {
|
||||
allowOther = true;
|
||||
directories = extraLib.impermanence.makeSymlinks [
|
||||
directories = pkgs.lib.impermanence.makeSymlinks [
|
||||
"repos"
|
||||
"Downloads"
|
||||
|
||||
|
|
Loading…
Reference in a new issue