-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bea3a7e
commit 969cf7f
Showing
11 changed files
with
84 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{pkgs, ...}: { | ||
packages = {inherit (pkgs) flarum;}; | ||
nixos.module.service = ./service.nix; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,6 @@ | |
mapAttrsToList | ||
optional | ||
getExe | ||
strings | ||
concatLines | ||
generators | ||
; | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{...}: { | ||
# https://github.com/ngi-nix/ngipkgs/issues/40 | ||
broken = true; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
{pkgs, ...} @ args: { | ||
{ | ||
pkgs, | ||
lib, | ||
sources, | ||
} @ args: { | ||
packages = { | ||
inherit (pkgs) pretalx-full; | ||
}; | ||
|
6 changes: 5 additions & 1 deletion
6
projects/Rosenpass/project.nix → projects/Rosenpass/default.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,45 @@ | ||
{ | ||
lib, | ||
pkgs ? {}, | ||
... | ||
} @ args: let | ||
baseDirectory = ./.; | ||
|
||
sources, | ||
}: let | ||
inherit | ||
(builtins) | ||
pathExists | ||
elem | ||
readDir | ||
trace | ||
; | ||
|
||
inherit | ||
(lib.attrsets) | ||
mapAttrs | ||
concatMapAttrs | ||
recursiveUpdate | ||
filterAttrs | ||
; | ||
|
||
names = name: type: | ||
if type != "directory" | ||
then assert name == "README.md" || name == "default.nix"; {} | ||
else {${name} = baseDirectory + "/${name}";}; | ||
baseDirectory = ./.; | ||
|
||
allProjectDirectories = concatMapAttrs names (readDir baseDirectory); | ||
allowedFiles = ["README.md" "default.nix"]; | ||
|
||
projectDirectories = lib.filterAttrs (_: directory: | ||
if pathExists (directory + "/project.nix") | ||
then true | ||
else trace "No project.nix found in ${directory}, skipping." false) | ||
allProjectDirectories; | ||
isMarkedBroken = project: project.broken or false; | ||
|
||
filter = name: type: | ||
if type != "directory" | ||
then assert elem name allowedFiles; false | ||
else true; | ||
|
||
hydrate = project: | ||
recursiveUpdate | ||
project | ||
{nixos.tests = mapAttrs (_: pkgs.nixosTest) project.nixos.tests or {};}; | ||
in | ||
mapAttrs ( | ||
_: directory: let | ||
imported = import (directory + "/project.nix") args; | ||
name: type: let | ||
project = import (baseDirectory + "/${name}") { | ||
inherit lib pkgs sources; | ||
}; | ||
in | ||
recursiveUpdate | ||
imported {nixos.tests = mapAttrs (_: pkgs.nixosTest) imported.nixos.tests or {};} | ||
) | ||
projectDirectories | ||
if isMarkedBroken project | ||
then trace "Project '${name}' marked as broken (for system '${pkgs.system or "undefined"}'). Skipping." {} | ||
else hydrate project | ||
) (filterAttrs filter (readDir baseDirectory)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters