forked from Arcanyx-org/NiXium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
133 lines (120 loc) · 4.97 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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
{
description = "Kreyren's Infrastructure Management With NiXium";
inputs = {
# Release inputs
nixpkgs-legacy.url = "github:nixos/nixpkgs/nixos-23.05";
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
# # nixpkgs.url = "git+file:///home/raptor/src/nixpkgs";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
# nixpkgs-unstable-small.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs-master.url = "github:nixos/nixpkgs/master";
nixpkgs-staging.url = "github:nixos/nixpkgs/staging";
# Principle inputs
nixos-hardware.url = "github:NixOS/nixos-hardware";
nixos-flake.url = "github:srid/nixos-flake";
nur.url = "github:nix-community/NUR/master";
impermanence.url = "github:nix-community/impermanence";
flake-parts.url = "github:hercules-ci/flake-parts";
mission-control.url = "github:Platonic-Systems/mission-control";
flake-root.url = "github:srid/flake-root";
ragenix.url = "github:yaxitech/ragenix";
lanzaboote.url = "github:nix-community/lanzaboote/v0.3.0"; # MAINTAIN(Krey): has to be kept up to date
arkenfox.url = "github:dwarfmaster/arkenfox-nixos";
disko-nixpkgs = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
disko-nixpkgs-unstable = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
# Home-Manager
home-manager = {
url = "github:nix-community/home-manager/release-23.11";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager-nixpkgs-unstable = {
url = "github:nix-community/home-manager/master";
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
# Emacs
## TODO(Krey): Implement?
# emacs-overlay.url = "github:nix-community/emacs-overlay";
# nix-doom-emacs.url = "github:nix-community/nix-doom-emacs";
# For T-Head Kernel and stuff
nixos-licheepi4a.url = "github:ryan4yin/nixos-licheepi4a";
nixos-generators = {
url = "github:nix-community/nixos-generators";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs @ { self, ... }:
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
imports = [
./nixos # Imports NixOS related things
./machines # Imports machines
./lib # Implement libs
./tools
inputs.flake-root.flakeModule
inputs.mission-control.flakeModule
];
systems = [ "x86_64-linux" "aarch64-linux" "riscv64-linux" ];
perSystem = { system, config, ... }: {
# FIXME-QA(Krey): Move this to a separate file somehow?
# FIXME-QA(Krey): Figure out how to shorten the `inputs.nixpkgs-unstable.legacyPackages.${system}` ?
## _module.args.nixpkgs = inputs.nixpkgs-unstable.legacyPackages.${system};
## _module.args.nixpkgs = import inputs.nixpkgs { inherit system; };
mission-control.scripts = {
# Editors
vscodium = {
description = "VSCodium (Fully Integrated)";
category = "Integrated Editors";
exec = "${inputs.nixpkgs-unstable.legacyPackages.${system}.vscodium}/bin/codium ./default.code-workspace";
};
vim = {
description = "vIM (Minimal Integration, fixme)";
category = "Integrated Editors";
exec = "${inputs.nixpkgs.legacyPackages.${system}.vim}/bin/vim .";
};
neovim = {
description = "Neovim (Minimal Integration, fixme)";
category = "Integrated Editors";
exec = "${inputs.nixpkgs.legacyPackages.${system}.neovim}/bin/nvim .";
};
emacs = {
description = "Emacs (Minimal Integration, fixme)";
category = "Integrated Editors";
exec = "${inputs.nixpkgs.legacyPackages.${system}.emacs}/bin/emacs .";
};
# Code Formating
nixpkgs-fmt = {
description = "Format Nix Files With The Standard Nixpkgs Formater";
category = "Code Formating";
exec = "${inputs.nixpkgs.legacyPackages.${system}.nixpkgs-fmt}/bin/nixpkgs-fmt .";
};
alejandra = {
description = "Format Nix Files With The Uncompromising Nix Code Formatter (Not Recommended)";
category = "Code Formating";
exec = "${inputs.nixpkgs.legacyPackages.${system}.alejandra}/bin/alejandra .";
};
};
devShells.default = inputs.nixpkgs.legacyPackages.${system}.mkShell {
name = "NiXium-devshell";
nativeBuildInputs = [
inputs.nixpkgs.legacyPackages.${system}.bashInteractive # For terminal
inputs.nixpkgs.legacyPackages.${system}.nil # Needed for linting
inputs.nixpkgs.legacyPackages.${system}.nixpkgs-fmt # Nixpkgs formatter
inputs.nixpkgs.legacyPackages.${system}.git # Working with the codebase
inputs.ragenix.packages.${system}.default # To manage secrets
inputs.nixpkgs.legacyPackages.${system}.sbctl # To set up secureboot
inputs.nixpkgs.legacyPackages.${system}.fira-code # For liquratures in code editors
inputs.nixos-generators.packages.${system}.nixos-generate
];
inputsFrom = [ config.mission-control.devShell ];
# Environmental Variables
#RULES = "./secrets/secrets.nix"; # For ragenix to know where secrets are
};
formatter = inputs.nixpkgs.legacyPackages.${system}.nixpkgs-fmt;
};
};
}