dotfiles

My PC Dotfiles & Website

flake.nix (8283B)


  1###############################################
  2#           ▗▄▄▄       ▗▄▄▄▄    ▄▄▄▖          #
  3#           ▜███▙       ▜███▙  ▟███▛          #
  4#            ▜███▙       ▜███▙▟███▛           #
  5#             ▜███▙       ▜██████▛            #
  6#      ▟█████████████████▙ ▜████▛     ▟▙      #
  7#     ▟███████████████████▙ ▜███▙    ▟██▙     #
  8#            ▄▄▄▄▖           ▜███▙  ▟███▛     #
  9#           ▟███▛             ▜██▛ ▟███▛      #
 10#          ▟███▛               ▜▛ ▟███▛       #
 11# ▟███████████▛                  ▟██████████▙ #
 12# ▜██████████▛                  ▟███████████▛ #
 13#       ▟███▛ ▟▙               ▟███▛          #
 14#      ▟███▛ ▟██▙             ▟███▛           #
 15#     ▟███▛  ▜███▙           ▝▀▀▀▀            #
 16#     ▜██▛    ▜███▙ ▜██████████████████▛      #
 17#      ▜▛     ▟████▙ ▜████████████████▛       #
 18#            ▟██████▙       ▜███▙             #
 19#           ▟███▛▜███▙       ▜███▙            #
 20#          ▟███▛  ▜███▙       ▜███▙           #
 21#          ▝▀▀▀    ▀▀▀▀▘       ▀▀▀▘           #
 22#   ---------------------------------------   #
 23#     Author  -> V 7 <mail@maydayv7.dev>      #
 24#     License -> GPL-3.0                      #
 25#     URL     -> github:maydayv7/dotfiles     #
 26#   ---------------------------------------   #
 27###############################################
 28{
 29  description = ''
 30    My declarative, hermetic, reproducible, automated, extensible, multi-host
 31    NixOS Configuration and 'dotfiles'
 32  '';
 33
 34  ## Repositories ##
 35  inputs = {
 36    ## Package Repositories ##
 37    # NixOS Packages Repository
 38    nixpkgs.follows = "stable";
 39    stable.url = "github:NixOS/nixpkgs?ref=nixos-26.05";
 40
 41    # Unstable Packages Repository
 42    unstable.url = "github:NixOS/nixpkgs?ref=nixos-unstable";
 43
 44    # Proprietary Software
 45    proprietary = {
 46      url = "github:maydayv7/proprietary";
 47      inputs.nixpkgs.follows = "nixpkgs";
 48    };
 49
 50    # VS Code Extensions
 51    vscode = {
 52      url = "github:nix-community/nix-vscode-extensions";
 53      inputs.nixpkgs.follows = "nixpkgs";
 54    };
 55
 56    # LLM Agents
 57    llm.url = "github:numtide/llm-agents.nix";
 58
 59    ## Configuration Modules ##
 60    ## Language Addendum
 61    # Supported Architectures
 62    systems = {
 63      url = "github:maydayv7/dotfiles/systems";
 64      flake = false;
 65    };
 66
 67    # Flakes Framework
 68    flake-parts = {
 69      url = "github:hercules-ci/flake-parts";
 70      inputs.nixpkgs-lib.follows = "nixpkgs";
 71    };
 72
 73    # Module Tree Import Functions
 74    import-tree.url = "github:denful/import-tree";
 75
 76    # Flake Utility Functions
 77    utils = {
 78      url = "github:numtide/flake-utils";
 79      inputs.systems.follows = "systems";
 80    };
 81
 82    # Source Filter Functions
 83    filters.url = "github:numtide/nix-filter";
 84
 85    # Syntax Formatter
 86    formatter = {
 87      url = "github:numtide/treefmt-nix";
 88      inputs.nixpkgs.follows = "nixpkgs";
 89    };
 90
 91    ## Feature Modules
 92    # Hardware Support
 93    hardware.url = "github:NixOS/nixos-hardware";
 94
 95    # User Home Manager
 96    home-manager = {
 97      url = "github:nix-community/home-manager?ref=release-26.05";
 98      inputs.nixpkgs.follows = "nixpkgs";
 99    };
100
101    # Secure Boot
102    boot = {
103      url = "github:nix-community/lanzaboote/v1.2.0";
104      inputs.nixpkgs.follows = "nixpkgs";
105    };
106
107    # Authentication Credentials Manager
108    sops = {
109      url = "github:Mic92/sops-nix";
110      inputs.nixpkgs.follows = "unstable";
111    };
112
113    # Windows Subsystem for Linux
114    nixos-wsl = {
115      url = "github:nix-community/NixOS-WSL?ref=release-26.05";
116      inputs.nixpkgs.follows = "nixpkgs";
117    };
118
119    # Declarative Disk Partitioning
120    disko = {
121      url = "github:nix-community/disko/v1.13.0";
122      inputs.nixpkgs.follows = "nixpkgs";
123    };
124
125    # Filesystem State Handler
126    impermanence = {
127      url = "github:nix-community/impermanence";
128      inputs = {
129        nixpkgs.follows = "nixpkgs";
130        home-manager.follows = "home-manager";
131      };
132    };
133
134    # Nix Index Database
135    index = {
136      url = "github:Mic92/nix-index-database";
137      inputs.nixpkgs.follows = "nixpkgs";
138    };
139
140    # Application Sandboxing
141    nixpak = {
142      url = "github:nixpak/nixpak";
143      inputs = {
144        nixpkgs.follows = "nixpkgs";
145        flake-parts.follows = "flake-parts";
146      };
147    };
148
149    # Declarative Flatpak Wrapper
150    flatpak.url = "github:gmodena/nix-flatpak/latest";
151
152    # Declarative VM Management
153    nixvirt = {
154      url = "github:AshleyYakeley/NixVirt/v0.6.0";
155      inputs.nixpkgs.follows = "nixpkgs";
156    };
157
158    # Discord Module
159    nixcord = {
160      url = "github:4evy/nixcord";
161      inputs = {
162        nixpkgs.follows = "unstable";
163        home-manager.follows = "home-manager";
164        treefmt-nix.follows = "formatter";
165      };
166    };
167
168    # Minecraft Server
169    minecraft = {
170      url = "github:Infinidoge/nix-minecraft";
171      inputs = {
172        nixpkgs.follows = "nixpkgs";
173        systems.follows = "systems";
174      };
175    };
176
177    ## Theming
178    # Base16 Theming Module
179    stylix = {
180      url = "github:nix-community/stylix?ref=release-26.05";
181      inputs = {
182        nixpkgs.follows = "nixpkgs";
183        systems.follows = "systems";
184        flake-parts.follows = "flake-parts";
185      };
186    };
187
188    # Spicetify Module
189    spicetify = {
190      url = "github:Gerg-L/spicetify-nix";
191      inputs = {
192        nixpkgs.follows = "nixpkgs";
193        systems.follows = "systems";
194      };
195    };
196
197    # Catppuccin Theme
198    catppuccin = {
199      url = "github:catppuccin/nix?ref=release-26.05";
200      inputs.nixpkgs.follows = "nixpkgs";
201    };
202
203    # Desktop Shell
204    noctalia = {
205      url = "github:noctalia-dev/noctalia/v5.2.1";
206      inputs.nixpkgs.follows = "nixpkgs";
207    };
208
209    # Login Greeter
210    noctalia-greeter = {
211      url = "github:noctalia-dev/noctalia-greeter/v1.6.0";
212      inputs.nixpkgs.follows = "nixpkgs";
213    };
214
215    # Niri
216    niri = {
217      url = "github:epireyn/niri-flake";
218      inputs = {
219        nixpkgs.follows = "unstable";
220        nixpkgs-stable.follows = "stable";
221      };
222    };
223  };
224
225  ## Configuration ##
226  outputs = inputs:
227    inputs.flake-parts.lib.mkFlake {inherit inputs;}
228    {
229      imports = [
230        (inputs.import-tree ./modules)
231        ./files/_module.nix
232        ./packages/_module.nix
233        ./secrets/_module.nix
234        ./site/_module.nix
235      ];
236    };
237
238  ## Nix Configuration ##
239  nixConfig = rec {
240    commit-lockfile-summary = "chore(flake): Update `inputs`";
241
242    # Binary Caches
243    substituters = [
244      "https://maydayv7-dotfiles.cachix.org"
245      "https://cache.nixos.org"
246      "https://nixpkgs-unfree.cachix.org"
247      "https://nix-community.cachix.org"
248      "https://cache.flox.dev"
249      "https://cache.numtide.com"
250      "https://noctalia.cachix.org"
251      "https://hyprland.cachix.org"
252      "https://catppuccin.cachix.org"
253    ];
254    trusted-substituters = substituters;
255
256    # Public Keys
257    trusted-public-keys = [
258      "maydayv7-dotfiles.cachix.org-1:dpECO0Z2ZMttY6JgWHuAR5M7cqeyfFjUsvHdnMz+j6U="
259      "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
260      "nixpkgs-unfree.cachix.org-1:hqvoInulhbV4nJ9yJOEr+4wxhDV4xq2d1DK7S6Nj6rs="
261      "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
262      "flox-cache-public-1:7F4OyH7ZCnFhcze3fJdfyXYLQw/aV7GEed86nQ7IsOs="
263      "niks3.numtide.com-1:DTx8wZduET09hRmMtKdQDxNNthLQETkc/yaX7M4qK0g="
264      "noctalia.cachix.org-1:pCOR47nnMEo5thcxNDtzWpOxNFQsBRglJzxWPp3dkU4="
265      "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
266      "catppuccin.cachix.org-1:noG/4HkbhJb+lUAdKrph6LaozJvAeEEZj4N732IysmU="
267    ];
268  };
269}