Adds overlays and restructures package directories
- Applies overlays in flake to make custom packages available - Replaces recursive package import with explicit package scanning - Moves packages from `pkgs/common` to `pkgs/` and updates overlay paths - Updates snapraid-runner email configuration (from, host, port, credentials)
This commit is contained in:
parent
55634220ae
commit
f44e48c1ba
10 changed files with 35 additions and 25 deletions
30
flake.nix
30
flake.nix
|
@ -114,7 +114,15 @@
|
|||
# see: https://github.com/nix-community/home-manager/pull/3454
|
||||
lib = nixpkgs.lib.extend (self: super: { custom = import ./lib { inherit (nixpkgs) lib; }; });
|
||||
};
|
||||
modules = [ ./hosts/nixos/${host} ];
|
||||
modules = [
|
||||
# Apply the overlays to make custom packages available
|
||||
{
|
||||
nixpkgs.overlays = [
|
||||
self.overlays.default
|
||||
];
|
||||
}
|
||||
./hosts/nixos/${host}
|
||||
];
|
||||
};
|
||||
};
|
||||
# Invoke mkHost for each host config that is declared for either X86 or ARM
|
||||
|
@ -136,7 +144,6 @@
|
|||
# Building configurations is available through `just rebuild` or `nixos-rebuild --flake .#hostname`
|
||||
nixosConfigurations = mkHostConfigs (readHosts "nixos") false;
|
||||
|
||||
#
|
||||
# ========= Packages =========
|
||||
#
|
||||
# Add custom packages to be shared or upstreamed.
|
||||
|
@ -147,11 +154,22 @@
|
|||
inherit system;
|
||||
overlays = [ self.overlays.default ];
|
||||
};
|
||||
|
||||
# Get all package directories from pkgs/
|
||||
packageDirs = builtins.attrNames (builtins.readDir ./pkgs);
|
||||
|
||||
# Filter to only include names that resulted in valid packages
|
||||
validPackages = builtins.filter (name: builtins.hasAttr name pkgs) packageDirs;
|
||||
|
||||
# Create a set with all the packages
|
||||
customPackages = builtins.listToAttrs (
|
||||
builtins.map (name: {
|
||||
inherit name;
|
||||
value = pkgs.${name};
|
||||
}) validPackages
|
||||
);
|
||||
in
|
||||
lib.packagesFromDirectoryRecursive {
|
||||
callPackage = lib.callPackageWith pkgs;
|
||||
directory = pkgs/common;
|
||||
}
|
||||
customPackages
|
||||
);
|
||||
};
|
||||
}
|
||||
|
|
|
@ -6,13 +6,15 @@
|
|||
|
||||
let
|
||||
# Adds my custom packages
|
||||
# FIXME: Add per-system packages
|
||||
additions =
|
||||
final: prev:
|
||||
(prev.lib.packagesFromDirectoryRecursive {
|
||||
callPackage = prev.lib.callPackageWith final;
|
||||
directory = ../pkgs/common;
|
||||
});
|
||||
let
|
||||
packages = prev.lib.packagesFromDirectoryRecursive {
|
||||
callPackage = prev.lib.callPackageWith final;
|
||||
directory = ../pkgs; # Changed from ../pkgs/common to ../pkgs
|
||||
};
|
||||
in
|
||||
packages;
|
||||
|
||||
linuxModifications = final: prev: prev.lib.mkIf final.stdenv.isLinux { };
|
||||
|
||||
|
@ -20,20 +22,12 @@ let
|
|||
# example = prev.example.overrideAttrs (oldAttrs: let ... in {
|
||||
# ...
|
||||
# });
|
||||
# flameshot = prev.flameshot.overrideAttrs {
|
||||
# cmakeFlags = [
|
||||
# (prev.lib.cmakeBool "USE_WAYLAND_GRIM" true)
|
||||
# (prev.lib.cmakeBool "USE_WAYLAND_CLIPBOARD" true)
|
||||
# ];
|
||||
# };
|
||||
};
|
||||
|
||||
stable-packages = final: _prev: {
|
||||
stable = import inputs.nixpkgs-stable {
|
||||
inherit (final) system;
|
||||
config.allowUnfree = true;
|
||||
# overlays = [
|
||||
# ];
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -41,8 +35,6 @@ let
|
|||
unstable = import inputs.nixpkgs-unstable {
|
||||
inherit (final) system;
|
||||
config.allowUnfree = true;
|
||||
# overlays = [
|
||||
# ];
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -20,19 +20,19 @@ sendon = success,error
|
|||
; set to false to get full programm output via email
|
||||
short = true
|
||||
subject = [SnapRAID] Status Report:
|
||||
from = cloud@ryot.foo
|
||||
from = [REDACTED]
|
||||
to = [REDACTED]
|
||||
; maximum email size in KiB
|
||||
maxsize = 500
|
||||
|
||||
[smtp]
|
||||
host = ryot.foo
|
||||
host = smtp.protonmail.ch
|
||||
; leave empty for default port
|
||||
port =
|
||||
port = 587
|
||||
; set to "true" to activate
|
||||
ssl = true
|
||||
tls = true
|
||||
user = admin
|
||||
user = [REDACTED]
|
||||
password = [REDACTED]
|
||||
|
||||
[scrub]
|
Loading…
Add table
Reference in a new issue