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
|
# see: https://github.com/nix-community/home-manager/pull/3454
|
||||||
lib = nixpkgs.lib.extend (self: super: { custom = import ./lib { inherit (nixpkgs) lib; }; });
|
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
|
# 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`
|
# Building configurations is available through `just rebuild` or `nixos-rebuild --flake .#hostname`
|
||||||
nixosConfigurations = mkHostConfigs (readHosts "nixos") false;
|
nixosConfigurations = mkHostConfigs (readHosts "nixos") false;
|
||||||
|
|
||||||
#
|
|
||||||
# ========= Packages =========
|
# ========= Packages =========
|
||||||
#
|
#
|
||||||
# Add custom packages to be shared or upstreamed.
|
# Add custom packages to be shared or upstreamed.
|
||||||
|
@ -147,11 +154,22 @@
|
||||||
inherit system;
|
inherit system;
|
||||||
overlays = [ self.overlays.default ];
|
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
|
in
|
||||||
lib.packagesFromDirectoryRecursive {
|
customPackages
|
||||||
callPackage = lib.callPackageWith pkgs;
|
|
||||||
directory = pkgs/common;
|
|
||||||
}
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,13 +6,15 @@
|
||||||
|
|
||||||
let
|
let
|
||||||
# Adds my custom packages
|
# Adds my custom packages
|
||||||
# FIXME: Add per-system packages
|
|
||||||
additions =
|
additions =
|
||||||
final: prev:
|
final: prev:
|
||||||
(prev.lib.packagesFromDirectoryRecursive {
|
let
|
||||||
callPackage = prev.lib.callPackageWith final;
|
packages = prev.lib.packagesFromDirectoryRecursive {
|
||||||
directory = ../pkgs/common;
|
callPackage = prev.lib.callPackageWith final;
|
||||||
});
|
directory = ../pkgs; # Changed from ../pkgs/common to ../pkgs
|
||||||
|
};
|
||||||
|
in
|
||||||
|
packages;
|
||||||
|
|
||||||
linuxModifications = final: prev: prev.lib.mkIf final.stdenv.isLinux { };
|
linuxModifications = final: prev: prev.lib.mkIf final.stdenv.isLinux { };
|
||||||
|
|
||||||
|
@ -20,20 +22,12 @@ let
|
||||||
# example = prev.example.overrideAttrs (oldAttrs: let ... in {
|
# 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-packages = final: _prev: {
|
||||||
stable = import inputs.nixpkgs-stable {
|
stable = import inputs.nixpkgs-stable {
|
||||||
inherit (final) system;
|
inherit (final) system;
|
||||||
config.allowUnfree = true;
|
config.allowUnfree = true;
|
||||||
# overlays = [
|
|
||||||
# ];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -41,8 +35,6 @@ let
|
||||||
unstable = import inputs.nixpkgs-unstable {
|
unstable = import inputs.nixpkgs-unstable {
|
||||||
inherit (final) system;
|
inherit (final) system;
|
||||||
config.allowUnfree = true;
|
config.allowUnfree = true;
|
||||||
# overlays = [
|
|
||||||
# ];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -20,19 +20,19 @@ sendon = success,error
|
||||||
; set to false to get full programm output via email
|
; set to false to get full programm output via email
|
||||||
short = true
|
short = true
|
||||||
subject = [SnapRAID] Status Report:
|
subject = [SnapRAID] Status Report:
|
||||||
from = cloud@ryot.foo
|
from = [REDACTED]
|
||||||
to = [REDACTED]
|
to = [REDACTED]
|
||||||
; maximum email size in KiB
|
; maximum email size in KiB
|
||||||
maxsize = 500
|
maxsize = 500
|
||||||
|
|
||||||
[smtp]
|
[smtp]
|
||||||
host = ryot.foo
|
host = smtp.protonmail.ch
|
||||||
; leave empty for default port
|
; leave empty for default port
|
||||||
port =
|
port = 587
|
||||||
; set to "true" to activate
|
; set to "true" to activate
|
||||||
ssl = true
|
ssl = true
|
||||||
tls = true
|
tls = true
|
||||||
user = admin
|
user = [REDACTED]
|
||||||
password = [REDACTED]
|
password = [REDACTED]
|
||||||
|
|
||||||
[scrub]
|
[scrub]
|
Loading…
Add table
Reference in a new issue