-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathflake.nix
152 lines (141 loc) · 4.26 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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
{
description = "Configuration management of the my personal machines, my dotfiles, my other somethings.";
nixConfig = {
commit-lockfile-summary = "flake: bump inputs";
experimental-features = [
"nix-command"
"flakes"
];
extra-substituters = [ "https://nix-community.cachix.org" ];
extra-trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"nixpkgs-python.cachix.org-1:hxjI7pFxTyuTHn2NkvWCrAUcNZLNS3ZAvfYNuYifcEU="
];
};
inputs = {
# nixpkgs
nixpkgs-lib.url = "github:nix-community/nixpkgs.lib";
nixpkgs-24-11.url = "nixpkgs/nixos-24.11";
nixpkgs.follows = "nixpkgs-24-11";
nixpkgs-unstable.url = "nixpkgs/nixos-unstable";
# core modules and libraries
flake-parts.url = "flake:flake-parts";
flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs-lib";
haumea.url = "github:nix-community/haumea/v0.2.2";
flake-compat.url = "github:edolstra/flake-compat";
flake-utils.url = "flake:flake-utils";
flake-schemas.url = "github:DeterminateSystems/flake-schemas";
devshell.inputs.nixpkgs.follows = "nixpkgs";
devshell.url = "github:numtide/devshell";
home-24-11.inputs.nixpkgs.follows = "nixpkgs-24-11";
home-24-11.url = "github:nix-community/home-manager/release-24.11";
home.follows = "home-24-11";
# impermanence.url = github:nix-community/impermanence;
sops-nix.url = "flake:sops-nix";
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
treefmt-nix.inputs.nixpkgs.follows = "nixpkgs";
treefmt-nix.url = "github:numtide/treefmt-nix";
nixpak.url = "github:nixpak/nixpak";
nixpak.inputs.flake-parts.follows = "flake-parts";
nixpak.inputs.nixpkgs.follows = "nixpkgs";
# customizations
# themes etc
# applications and utilities
nixpkgs-python.url = "github:cachix/nixpkgs-python";
# linux only
disko.url = "flake:disko";
disko.inputs.nixpkgs.follows = "nixpkgs";
# microvm.url = github:astro/microvm.nix;
# microvm.inputs.nixpkgs.follows = "nixpkgs";
# microvm.inputs.flake-utils.follows = "flake-utils";
nixos-hardware.url = "flake:nixos-hardware";
# nixos-generators.url = "github:nix-community/nixos-generators";
# nixos-generators.inputs.nixlib.follows = "nixpkgs-lib";
# nixos-generators.inputs.nixpkgs.follows = "nixpkgs-24-05";
};
outputs =
{ self, flake-parts, ... }@inputs:
flake-parts.lib.mkFlake { inherit inputs; } (
{ flake-parts-lib, ... }:
let
inherit (flake-parts-lib) importApply;
flakeModules = rec {
shells = importApply ./shells/flake-module.nix { };
default = shells;
};
in
{
imports = [
flake-parts.flakeModules.flakeModules
flake-parts.flakeModules.modules
./lib/flake-module.nix
./pkgs/flake-module.nix
flakeModules.shells
./modules/flake-module.nix
./nixos/flake-module.nix
./home/flake-module.nix
];
debug = true;
systems = [
"x86_64-linux"
"aarch64-linux"
];
flake = {
inherit flakeModules;
nixConfig = (import ./flake.nix).nixConfig;
};
perSystem =
{ self', ... }:
{
devShells.default = self'.devShells.devshells-nixos;
};
}
);
}
# disko
# lanzaboote
# generators
#
# nixos-hardware
# impermanence (and https://grahamc.com/blog/erase-your-darlings)
#
# nix-init
# nixvim
#
# namaka / nixt
# nix-index-database
# nixos-anywhere
# nix2container
#
#
# wrapper-manager
# helix
# nixago
# sudo -> doas
#
# zfs
# /boot formatted vfat for EFI, or ext4 for BIOS
# and zfs
# https://nixos.wiki/wiki/ZFS
# set disc scheduler to none
# The ZFS dataset partition.
# compression=on
# mountpoint=legacy (not sure)
# tank/
# ├── local
# │ └── nix atime=off
# ├── system
# │ ├── var xattr=sa, acltype=posixacl
# │ └── root
# └── user
# └── home
#
# https://github.com/ne9z/dotfiles-flake/blob/openzfs-guide/hosts/exampleHost/sshUnlock.txt
# -o ashift=12 \
# -o autotrim=on \
# -O acltype=posixacl \
# -O compression=zstd \
# -O dnodesize=auto -O normalization=formD \
# -O relatime=on \
# -O xattr=sa \
# -O checksum=edonr \