Update lib directory, organize things
This commit is contained in:
parent
714723c6eb
commit
864cf63397
3 changed files with 29 additions and 37 deletions
|
@ -50,7 +50,7 @@
|
|||
inherit (self) outputs;
|
||||
stateVersion = "23.11";
|
||||
hmStateVersion = "23.11";
|
||||
libx = import ./lib { inherit self inputs outputs stateVersion hmStateVersion; };
|
||||
libx = import ./lib/default.nix { inherit self inputs outputs stateVersion hmStateVersion; };
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
# Linode VMs
|
||||
|
|
|
@ -42,10 +42,8 @@
|
|||
ip ? null,
|
||||
ephemeral ? false,
|
||||
deployment_type ? "containers",
|
||||
pkgs ? import inputs.${repo}
|
||||
{ inherit system; config.allowUnfree = unfree; hostPlatform = system; },
|
||||
pkgs-unstable ? import inputs.nixpkgs-unstable
|
||||
{ inherit system; config.allowUnfree = unfree; hostPlatform = system; }
|
||||
pkgs ? let packages = (import ./packages.nix { inherit inputs repo system unfree; }); in packages.pkgs,
|
||||
pkgs-unstable ? let packages = (import ./packages.nix { inherit inputs repo system unfree; }); in packages.pkgs-unstable,
|
||||
}: {
|
||||
bindMounts = lib.mkMerge [
|
||||
( import ../nixos/containers/mounts.nix )
|
||||
|
@ -87,16 +85,12 @@
|
|||
theme ? "default",
|
||||
type ? "default",
|
||||
repo ? "nixpkgs-unstable",
|
||||
unfree ? true,
|
||||
deployment_type ? "hosts",
|
||||
}: inputs.${repo}.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
inherit inputs outputs desktop hostname username hmStateVersion stateVersion gpu system theme self deployment_type;
|
||||
# Some packages (ie, Vintage Story) I want to keep on unstable no matter what default repo I use
|
||||
pkgs-unstable = import inputs.nixpkgs-unstable {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
hostPlatform = system;
|
||||
};
|
||||
pkgs-unstable = let packages = (import ./packages.nix { inherit inputs repo system unfree; }); in packages.pkgs-unstable;
|
||||
};
|
||||
|
||||
modules = [
|
||||
|
@ -124,17 +118,8 @@
|
|||
specialArgs = {
|
||||
inherit inputs outputs desktop hostname username hmStateVersion stateVersion gpu system theme self deployment_type;
|
||||
# Choose whether to pull from stable or unstable
|
||||
pkgs = import inputs.${repo} {
|
||||
inherit system;
|
||||
config.allowUnfree = unfree;
|
||||
hostPlatform = system;
|
||||
};
|
||||
# Some packages (ie, Vintage Story) I want to keep on unstable no matter what default repo I use
|
||||
pkgs-unstable = import inputs.nixpkgs-unstable {
|
||||
inherit system;
|
||||
config.allowUnfree = unfree;
|
||||
hostPlatform = system;
|
||||
};
|
||||
pkgs = let packages = (import ./packages.nix { inherit inputs repo system unfree; }); in packages.pkgs;
|
||||
pkgs-unstable = let packages = (import ./packages.nix { inherit inputs repo system unfree; }); in packages.pkgs-unstable;
|
||||
};
|
||||
|
||||
modules = [
|
||||
|
@ -160,21 +145,8 @@
|
|||
specialArgs = {
|
||||
inherit inputs outputs desktop hostname username stateVersion hmStateVersion gpu system theme format;
|
||||
# Choose whether to pull from stable or unstable
|
||||
pkgs = import inputs.${repo} {
|
||||
inherit system;
|
||||
config.allowUnfree = unfree;
|
||||
# For Logseq / Obsidian
|
||||
config.permittedInsecurePackages = [ "electron-27.3.11" ];
|
||||
hostPlatform = system;
|
||||
};
|
||||
# Some packages (ie, Vintage Story) I want to keep on unstable no matter what default repo I use
|
||||
pkgs-unstable = import inputs.nixpkgs-unstable {
|
||||
inherit system;
|
||||
config.allowUnfree = unfree;
|
||||
# For Logseq / Obsidian
|
||||
config.permittedInsecurePackages = [ "electron-27.3.11" ];
|
||||
hostPlatform = system;
|
||||
};
|
||||
pkgs = let packages = (import ./packages.nix { inherit inputs repo system unfree; }); in packages.pkgs;
|
||||
pkgs-unstable = let packages = (import ./packages.nix { inherit inputs repo system unfree; }); in packages.pkgs-unstable;
|
||||
};
|
||||
system = system;
|
||||
format = format;
|
||||
|
|
20
lib/packages.nix
Normal file
20
lib/packages.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{ inputs, system, unfree, repo, ... }: {
|
||||
# Choose whether to pull from stable or unstable
|
||||
pkgs = (import inputs.${repo} {
|
||||
inherit system;
|
||||
config = {
|
||||
allowUnfree = unfree;
|
||||
permittedInsecurePackages = [ "electron-27.3.11" ];
|
||||
};
|
||||
hostPlatform = system;
|
||||
});
|
||||
# Some packages (ie, Vintage Story) I want to keep on unstable no matter what default repo I use
|
||||
pkgs-unstable = (import inputs.nixpkgs-unstable {
|
||||
inherit system;
|
||||
config = {
|
||||
allowUnfree = unfree;
|
||||
permittedInsecurePackages = [ "electron-27.3.11" ];
|
||||
};
|
||||
hostPlatform = system;
|
||||
});
|
||||
}
|
Loading…
Reference in a new issue