Skip to content

Commit dfe8c17

Browse files
committed
refactor: begin transition to dentritic pattern
1 parent 0f0609e commit dfe8c17

File tree

8 files changed

+367
-121
lines changed

8 files changed

+367
-121
lines changed

den/flake-parts/dendritic.nix

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{ inputs, lib, ... }:
2+
{
3+
imports = [
4+
inputs.flake-file.flakeModules.default
5+
inputs.flake-file.flakeModules.import-tree
6+
];
7+
8+
flake-file.inputs = {
9+
flake-file.url = lib.mkDefault "github:vic/flake-file";
10+
11+
flake-parts.url = lib.mkDefault "github:hercules-ci/flake-parts";
12+
flake-parts.inputs.nixpkgs-lib.follows = lib.mkDefault "nixpkgs-lib";
13+
14+
nixpkgs.url = lib.mkDefault "https://channels.nixos.org/nixpkgs-unstable/nixexprs.tar.xz";
15+
nixpkgs-lib.follows = lib.mkDefault "nixpkgs";
16+
};
17+
18+
flake-file.outputs = "inputs: inputs.flake-parts.lib.mkFlake { inherit inputs; } (inputs.import-tree ./den)";
19+
20+
systems = [
21+
"aarch64-linux"
22+
"aarch64-darwin"
23+
"x86_64-linux"
24+
];
25+
}

den/flake-parts/devshell.nix

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
perSystem =
3+
{
4+
config,
5+
pkgs,
6+
inputs',
7+
...
8+
}:
9+
{
10+
devShells = {
11+
default = pkgs.mkShellNoCC {
12+
packages = with pkgs; [
13+
just
14+
15+
sops
16+
act
17+
18+
nh
19+
20+
nil
21+
nixd
22+
deadnix
23+
statix
24+
25+
nix-melt
26+
27+
# inputs.self.checks.${system}.pre-commit-hooks.enabledPackages
28+
inputs'.disko.packages.disko
29+
inputs'.disko.packages.disko-install
30+
];
31+
32+
inputsFrom = [ config.treefmt.build.devShell ];
33+
};
34+
};
35+
};
36+
}

den/flake-parts/treefmt.nix

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{ inputs, ... }:
2+
{
3+
flake-file.inputs = {
4+
treefmt-nix = {
5+
url = "github:numtide/treefmt-nix";
6+
inputs.nixpkgs.follows = "nixpkgs";
7+
};
8+
};
9+
10+
imports = [
11+
inputs.treefmt-nix.flakeModule
12+
];
13+
14+
perSystem.treefmt = {
15+
flakeCheck = true;
16+
programs = {
17+
nixfmt.enable = true;
18+
};
19+
};
20+
}

den/legacy.nix

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
{
2+
self,
3+
inputs,
4+
moduleWithSystem,
5+
withSystem,
6+
...
7+
}:
8+
let
9+
lib = import ../flake/lib {
10+
inherit (inputs.nixpkgs) lib;
11+
};
12+
13+
localFlake = {
14+
inherit
15+
self
16+
inputs
17+
moduleWithSystem
18+
withSystem
19+
lib
20+
;
21+
nixfiles = self;
22+
};
23+
in
24+
{
25+
flake-file.inputs = {
26+
self.submodules = true;
27+
28+
disko.url = "github:nix-community/disko/latest";
29+
disko.inputs.nixpkgs.follows = "nixpkgs";
30+
31+
nixos-generators.url = "github:nix-community/nixos-generators";
32+
nixos-generators.inputs.nixpkgs.follows = "nixpkgs";
33+
34+
ucodenix.url = "github:e-tho/ucodenix";
35+
36+
nixos-hardware.url = "github:nixos/nixos-hardware";
37+
38+
nixos-anywhere.url = "github:nix-community/nixos-anywhere";
39+
nixos-anywhere.inputs.nixpkgs.follows = "nixpkgs";
40+
41+
impermanence.url = "github:nix-community/impermanence/4b3e914cdf97a5b536a889e939fb2fd2b043a170";
42+
preservation.url = "github:nix-community/preservation";
43+
44+
home-manager.url = "github:nix-community/home-manager";
45+
home-manager.inputs.nixpkgs.follows = "nixpkgs";
46+
47+
darwin.url = "github:lnl7/nix-darwin/master";
48+
darwin.inputs.nixpkgs.follows = "nixpkgs";
49+
50+
treefmt-nix.url = "github:numtide/treefmt-nix";
51+
treefmt-nix.inputs.nixpkgs.follows = "nixpkgs";
52+
53+
pre-commit-hooks-nix.url = "github:cachix/pre-commit-hooks.nix";
54+
pre-commit-hooks-nix.inputs.nixpkgs.follows = "nixpkgs";
55+
56+
stylix = {
57+
url = "github:danth/stylix";
58+
inputs.nixpkgs.follows = "nixpkgs";
59+
inputs.nur.follows = "nur";
60+
};
61+
62+
chaotic = {
63+
url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
64+
inputs = {
65+
nixpkgs.follows = "nixpkgs";
66+
home-manager.follows = "home-manager";
67+
};
68+
};
69+
70+
nix-gaming.url = "github:fufexan/nix-gaming";
71+
nix-gaming.inputs.nixpkgs.follows = "nixpkgs";
72+
73+
nix-citizen.url = "github:LovingMelody/nix-citizen";
74+
nix-citizen.inputs.nixpkgs.follows = "nixpkgs";
75+
nix-citizen.inputs.nix-gaming.follows = "nix-gaming";
76+
77+
nur.url = "github:nix-community/NUR";
78+
nur.inputs.nixpkgs.follows = "nixpkgs";
79+
80+
xremap = {
81+
url = "github:xremap/nix-flake";
82+
inputs.nixpkgs.follows = "nixpkgs";
83+
inputs.flake-parts.follows = "flake-parts";
84+
};
85+
86+
neovim-flake.url = "path:vendor/neovim";
87+
88+
plasma-manager = {
89+
url = "github:pjones/plasma-manager/trunk";
90+
inputs.nixpkgs.follows = "nixpkgs";
91+
inputs.home-manager.follows = "home-manager";
92+
};
93+
94+
sops-nix.url = "github:Mic92/sops-nix";
95+
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
96+
97+
lanzaboote.url = "github:nix-community/lanzaboote/v0.4.3";
98+
lanzaboote.inputs.nixpkgs.follows = "nixpkgs";
99+
100+
niri.url = "github:sodiboo/niri-flake";
101+
niri.inputs.nixpkgs.follows = "nixpkgs";
102+
103+
# MT7925 WiFi driver patches for Framework laptops
104+
mt7925.url = "github:zbowling/mt7925";
105+
mt7925.flake = false;
106+
};
107+
108+
imports = [
109+
../flake/lib
110+
];
111+
112+
flake.modules = {
113+
darwin.nixfiles = import ../modules/darwin localFlake;
114+
nixos.nixfiles = import ../modules/nixos localFlake;
115+
homeManager.nixfiles = import ../modules/home localFlake;
116+
};
117+
}

den/nix/_determinate.nix

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
inputs,
3+
...
4+
}:
5+
{
6+
flake-file.inputs = {
7+
# Determinate 3.* module
8+
determinate = {
9+
url = "https://flakehub.com/f/DeterminateSystems/determinate/3";
10+
inputs.nixpkgs.follows = "nixpkgs";
11+
};
12+
};
13+
14+
flake.modules = {
15+
darwin.determinate = {
16+
imports = [ inputs.determinate.darwinModules.default ];
17+
nix.enable = false; # Determinate Nix handles the Nix configuration
18+
};
19+
nixos.determinate = {
20+
imports = [ inputs.determinate.nixosModules.default ];
21+
nix.enable = false; # Determinate Nix handles the Nix configuration
22+
};
23+
};
24+
}

0 commit comments

Comments
 (0)