❄️ Dotfiles for our NixOS system configuration.
1{
2 description = "NixOS configuration for the Sapphic Angels system.";
3
4 inputs = {
5 # Packages
6 nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
7
8 # Flakes
9 flake-parts.url = "github:hercules-ci/flake-parts";
10 easy-hosts.url = "github:tgirlcloud/easy-hosts";
11
12 # Systems
13 nix-darwin = {
14 url = "github:nix-darwin/nix-darwin";
15 inputs.nixpkgs.follows = "nixpkgs";
16 };
17
18 nixos-wsl = {
19 url = "github:nix-community/NixOS-WSL";
20 inputs.nixpkgs.follows = "nixpkgs";
21 };
22
23 # Userspace
24 home-manager = {
25 url = "github:nix-community/home-manager";
26 inputs.nixpkgs.follows = "nixpkgs";
27 };
28
29 # Misc
30 ## Catppuccin theme
31 catppuccin = {
32 url = "github:catppuccin/nix";
33 inputs.nixpkgs.follows = "nixpkgs";
34 };
35
36 ## Nix Language Server
37 nil = {
38 url = "github:oxalica/nil";
39 inputs.nixpkgs.follows = "nixpkgs";
40 };
41
42 ## Secrets management
43 ragenix = {
44 url = "github:yaxitech/ragenix";
45 inputs.nixpkgs.follows = "nixpkgs";
46 };
47
48 ## Logitech config tool
49 solaar = {
50 url = "github:Svenum/Solaar-Flake/main";
51 inputs.nixpkgs.follows = "nixpkgs";
52 };
53 };
54
55 outputs =
56 inputs@{
57 flake-parts,
58 nixos-wsl,
59 ...
60 }:
61 flake-parts.lib.mkFlake { inherit inputs; } {
62 imports = [
63 inputs.easy-hosts.flakeModule
64 ];
65
66 systems = [
67 "x86_64-linux"
68 "aarch64-darwin"
69 ];
70
71 perSystem =
72 { pkgs, ... }:
73 {
74 formatter = pkgs.nixfmt;
75 };
76
77 easy-hosts = {
78 path = ./hosts;
79
80 additionalClasses = {
81 wsl = "nixos";
82 };
83
84 shared = {
85 modules = [ ./modules/base ];
86 specialArgs = { inherit inputs; };
87 };
88
89 perClass = class: {
90 modules = [ ./modules/${class}/default.nix ];
91 };
92
93 hosts = {
94 caulfield = {
95 arch = "x86_64";
96 class = "nixos";
97 tags = [ "laptop" ];
98 };
99
100 dullscythe = {
101 arch = "x86_64";
102 class = "nixos";
103 tags = [ "server" ];
104 };
105
106 juniper = {
107 arch = "aarch64";
108 class = "darwin";
109 tags = [ "laptop" ];
110 };
111
112 solstice = {
113 arch = "x86_64";
114 class = "wsl";
115 tags = [ "wsl" ];
116 };
117 };
118 };
119 };
120}