more pipes

This commit is contained in:
Daylin Morgan 2024-08-10 15:50:20 -05:00
parent 56eafc5350
commit e0a862ce4d
Signed by: daylin
GPG key ID: 950D13E9719334AD
4 changed files with 22 additions and 21 deletions

View file

@ -1,6 +1,6 @@
inputs: final: prev:
let
inherit (builtins) listToAttrs substring filter;
inherit (builtins) listToAttrs substring;
inherit (final)
concatStringsSep
hasSuffix
@ -12,6 +12,7 @@ let
inherit (final.filesystem) listFilesRecursive;
in
let
enabled = {
enable = true;
};
@ -68,7 +69,7 @@ let
isNixFile = p: hasSuffix ".nix" p;
isDefaultNixFile = p: hasSuffix "default.nix" p;
filterNotDefaultNixFile = paths: filter (p: !(isDefaultNixFile p) && (isNixFile p)) paths;
filterNotDefaultNixFile = paths: builtins.filter (p: !(isDefaultNixFile p) && (isNixFile p)) paths;
listNixFilesRecursive = dir: filterNotDefaultNixFile (listFilesRecursive dir);
# defaultLinuxPackage = flake: flake.packages.x86_64-linux.default;
@ -81,6 +82,10 @@ let
pkgs = pkgsFromSystem system;
pkg = pkgFromSystem system;
};
functional = {
filterF = list: f: builtins.filter f list;
};
in
{
inherit
@ -99,5 +104,6 @@ in
pkgFromSystem
overlayFrom
flakeFromSystem
functional
;
}

View file

@ -20,31 +20,17 @@ let
flake = flakeFromSystem "x86_64-linux";
hostPath = host: ../. + "/hosts/${host}";
# all nix files not including pkgs.nix
hostFiles = host: filter isNixFile (listFilesRecursive (hostPath host));
# hostFiles = host: filter isNixFile (listFilesRecursive (hostPath host));
hostFiles = host: host |> hostPath |> listFilesRecursive |> filter isNixFile;
# hostFiles =
# host:
# filter isNixFile (
# host
# |> hostPath
# |> listFilesRecursive
# )
mkIso = nixosSystem {
system = "x86_64-linux";
modules = [
inputs.lix-module.nixosModules.default
self.nixosModules.nix
self.nixosModules.essentials
(
{ pkgs, modulesPath, ... }:
{
imports = [ (modulesPath + "/installer/cd-dvd/installation-cd-minimal.nix") ];
environment.systemPackages = (with pkgs; [ neovim ]) ++ [
self.packages.${pkgs.system}.default
];
}
)
self.nixosModules.iso
];
specialArgs = {
inherit

5
modules/iso.nix Normal file
View file

@ -0,0 +1,5 @@
{ pkgs, modulesPath, ... }:
{
imports = [ (modulesPath + "/installer/cd-dvd/installation-cd-minimal.nix") ];
environment.systemPackages = (with pkgs; [ neovim ]);
}

View file

@ -16,7 +16,11 @@ in
# nix.package = pkgs.nixVersions.latest;
nix = {
settings = {
experimental-features = [ "nix-command" "flakes" "pipe-operator"];
experimental-features = [
"nix-command"
"flakes"
"pipe-operator"
];
use-xdg-base-directories = true;
};