This repository has been archived by the owner on Nov 29, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
118 lines (101 loc) · 3.5 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
{
description = "Uniks";
inputs = {
hob.url = github:maisiliym/hob;
uniks = {
url = path:./lib;
flake = false;
};
};
outputs = inputs@{ self, hob, uniks }:
let
hob = inputs.hob.Hob // { uniks.mein = inputs.uniks; };
nixpkgs = hob.nixpkgs.mein;
flake-utils = hob.flake-utils.mein;
emacs-overlay = hob.emacs-overlay.mein;
in
let
inherit (builtins) fold attrNames mapAttrs;
inherit (nixpkgs) lib;
kor = import ./nix/kor.nix;
inherit (kor) mkLamdy arkSistymMap;
inherit (flake-utils.lib) eachDefaultSystem;
kriosfirProposal = {
maisiliym = hob.maisiliym.mein.NeksysProposal;
};
mkKriosfir = import ./nix/mkKriosfir;
kriosfir = mkKriosfir { inherit kriosfirProposal kor lib; };
mkKriozonz = import ./nix/mkKriozonz;
kriozonz = mkKriozonz { inherit kor lib kriosfir; };
mkUniksOS = import ./nix/mkUniksOS;
mkHom = import ./nix/mkHom;
mkNeksysDerivations = priNeksysNeim: kriozon:
let
inherit (kriozon) krimynz;
inherit (kriozon.astra.mycin) ark;
system = arkSistymMap.${ark};
uyrld = self.uyrld.${system};
hyraizyn = kriozon;
src = self;
krimynProfiles = {
light = { dark = false; };
dark = { dark = true; };
};
mkKrimynHomz = krimynNeim: krimyn:
let
emacsPkgs = uyrld.pkdjz.meikPkgs {
overlays = [ emacs-overlay.overlay ];
};
pkgs =
if (krimyn.stail == "emacs")
then emacsPkgs
else nixpkgs.legacyPackages.${system};
home-manager = hob.home-manager.mein;
mkProfileHom = profileName: profile:
mkHom {
inherit lib kor uyrld kriozon krimyn
profile hob home-manager pkgs;
};
in
mapAttrs mkProfileHom krimynProfiles;
mkKrimynImaks = krimynNeim: krimyn:
let
inherit (uyrld.pkdjz) meikImaks;
mkProfileImaks = profileName: profile:
meikImaks { inherit kriozon krimyn profile; };
in
mapAttrs mkProfileImaks krimynProfiles;
in
{
os = mkUniksOS { inherit src nixpkgs kor uyrld hyraizyn; };
hom = mapAttrs mkKrimynHomz krimynz;
imaks = mapAttrs mkKrimynImaks krimynz;
};
mkEachKriozonDerivations = kriozonz:
let
mkNeksysDerivationIndex = neksysNeim: neksysPrineksysIndeks:
mapAttrs mkNeksysDerivations neksysPrineksysIndeks;
in
mapAttrs mkNeksysDerivationIndex kriozonz;
uniksOS = mkEachKriozonDerivations kriozonz;
mkOutputs = system:
let
pkgs = nixpkgs.legacyPackages.${system};
mkUyrld = import ./nix/mkUyrld.nix;
uyrld = mkUyrld { inherit pkgs kor lib system hob; };
inherit (uyrld.pkdjz) shen-ecl-bootstrap;
shen = shen-ecl-bootstrap;
legacyPackages = pkgs;
packages = uyrld;
defaultPackage = shen;
devShell = pkgs.mkShell {
inputsFrom = [ ];
UNIKSBOOTFILE = self + /boot.shen;
buildInputs = [ shen ];
};
in
{ inherit uyrld legacyPackages packages defaultPackage devShell; };
perSystemOutputs = eachDefaultSystem mkOutputs;
in
perSystemOutputs // { inherit uniksOS hob; };
}