-
Notifications
You must be signed in to change notification settings - Fork 1
/
flake.nix
145 lines (134 loc) · 4.01 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
{
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="
];
};
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 = "github:hercules-ci/flake-parts";
haumea.url = "github:nix-community/haumea/v0.2.2";
flake-utils.url = "github:numtide/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 = "github:Mic92/sops-nix/2168851d58595431ee11ebfc3a49d60d318b7312";
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
sops-nix.inputs.nixpkgs-stable.url = "github:divnix/blank";
treefmt-nix.inputs.nixpkgs.follows = "nixpkgs";
treefmt-nix.url = "github:numtide/treefmt-nix";
# customizations
# themes etc
# applications and utilities
# linux only
disko.url = "github:nix-community/disko/v1.8.2";
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 = "github:nixos/nixos-hardware/0ccdd2705669d68bcafd15f45a70ea3c6df57b60";
# 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
./nixos/flake-module.nix
./home/flake-module.nix
];
debug = true;
systems = [
"x86_64-linux"
"aarch64-linux"
];
flake = {
inherit flakeModules;
};
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
# nurl (instead of nvfetcher)
# 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 \