Commit db67371

HPCesia <me@hpcesia.com>
2026-03-20 06:18:39
refactor: flake-file
1 parent c75419e
Changed files (15)
modules/core/shell/command-not-found.nix
@@ -1,4 +1,9 @@
 {inputs, ...}: {
+  flake-file.inputs.programsdb = {
+    url = "github:wamserma/flake-programs-sqlite";
+    inputs.nixpkgs.follows = "nixpkgs";
+  };
+
   flake.modules.nixos.core = {pkgs, ...}: {
     programs.command-not-found.dbPath = inputs.programsdb.packages.${pkgs.stdenv.hostPlatform.system}.programs-sqlite;
   };
modules/core/stylix.nix
@@ -3,6 +3,17 @@
   lib,
   ...
 }: {
+  flake-file.inputs = {
+    stylix = {
+      url = "github:nix-community/stylix";
+      inputs.nixpkgs.follows = "nixpkgs";
+    };
+    wallpapers = {
+      url = "git+https://repo.hpcesia.com/HPCesia/Wallpapers?shallow=1";
+      flake = false;
+    };
+  };
+
   flake.modules.nixos.core = {
     pkgs,
     config,
modules/desktop/apps/discord.nix
@@ -1,4 +1,6 @@
 {inputs, ...}: {
+  flake-file.inputs.nixcord.url = "github:kaylorben/nixcord";
+
   flake.modules.homeManager.desktop = _: {
     imports = [
       inputs.nixcord.homeModules.nixcord
modules/desktop/desktop-environment/discrete/shell/noctalia/default.nix
@@ -1,4 +1,9 @@
 {inputs, ...}: {
+  flake-file.inputs.noctalia = {
+    url = "github:noctalia-dev/noctalia-shell/v4.6.7";
+    inputs.nixpkgs.follows = "nixpkgs";
+  };
+
   flake.modules.nixos.de-shell-noctalia = {...}: {
     imports = [inputs.noctalia.nixosModules.default];
 
modules/desktop/desktop-environment/discrete/wm/niri/default.nix
@@ -1,4 +1,6 @@
 {inputs, ...}: {
+  flake-file.inputs.niri-flake.url = "github:sodiboo/niri-flake";
+
   flake.modules.nixos.wm-niri = {pkgs, ...}: {
     nixpkgs.overlays = [
       inputs.niri-flake.overlays.niri
modules/desktop/desktop-environment/plasma6/default.nix
@@ -1,4 +1,10 @@
 {inputs, ...}: {
+  flake-file.inputs.plasma-manager = {
+    url = "github:nix-community/plasma-manager";
+    inputs.nixpkgs.follows = "nixpkgs";
+    inputs.home-manager.follows = "home-manager";
+  };
+
   flake.modules.nixos.de-plasma6 = _: {
     services = {
       xserver.enable = true;
modules/desktop/desktop-environment/plasma6/sddm.nix
@@ -3,6 +3,8 @@
   lib,
   ...
 }: {
+  flake-file.inputs.silentSDDM.url = "github:uiriansan/SilentSDDM";
+
   flake.modules.nixos.de-plasma6 = {pkgs, ...}: let
     sddm-theme = inputs.silentSDDM.packages.${pkgs.stdenv.hostPlatform.system}.default.override {
       theme = "catppuccin-macchiato";
modules/dev/helix/default.nix
@@ -1,4 +1,9 @@
 {inputs, ...}: {
+  flake-file.inputs.wakatime-ls = {
+    url = "github:mrnossiom/wakatime-ls";
+    inputs.nixpkgs.follows = "nixpkgs";
+  };
+
   flake.modules.homeManager.dev-helix = {pkgs, ...}: {
     programs.helix = {
       enable = true;
modules/flake/vaultix/vaultix.nix
@@ -5,6 +5,8 @@
   withSystem,
   ...
 }: {
+  flake-file.inputs.vaultix.url = "github:milieuim/vaultix";
+
   imports = [inputs.vaultix.flakeModules.default];
 
   flake.vaultix = let
modules/flake/inputs.nix
@@ -5,69 +5,18 @@
     description = "NixOS configuration of HPCesia.";
 
     inputs = {
-      aagl-gtk-on-nix = {
-        inputs.nixpkgs.follows = "nixpkgs";
-        url = "github:ezKEa/aagl-gtk-on-nix";
-      };
-
       deploy-rs.url = "github:serokell/deploy-rs";
-
-      disko.url = "github:nix-community/disko/v1.11.0";
-
-      distro-grub-themes.url = "github:AdisonCavani/distro-grub-themes";
-
       flake-file.url = "github:vic/flake-file";
-
       flake-parts.url = "github:hercules-ci/flake-parts";
-
       home-manager.url = "github:nix-community/home-manager/master";
       home-manager.inputs.nixpkgs.follows = "nixpkgs";
-
       import-tree.url = "github:vic/import-tree";
-
-      niri-flake.url = "github:sodiboo/niri-flake";
-
-      nix-cachyos-kernel.url = "github:xddxdd/nix-cachyos-kernel/release";
-
-      nix-gaming.url = "github:fufexan/nix-gaming";
-      nix-gaming.inputs.nixpkgs.follows = "nixpkgs";
-
-      nixcord.url = "github:kaylorben/nixcord";
-
       nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
-
-      nixos-hardware.url = "github:NixOS/nixos-hardware/master";
-
-      noctalia.url = "github:noctalia-dev/noctalia-shell/v4.6.7";
-      noctalia.inputs.nixpkgs.follows = "nixpkgs";
-
       nur.url = "github:nix-community/NUR";
-
       pkgs-by-name-for-flake-parts.url = "github:drupol/pkgs-by-name-for-flake-parts";
-
-      plasma-manager.url = "github:nix-community/plasma-manager";
-      plasma-manager.inputs.nixpkgs.follows = "nixpkgs";
-      plasma-manager.inputs.home-manager.follows = "home-manager";
-
-      programsdb.url = "github:wamserma/flake-programs-sqlite";
-      programsdb.inputs.nixpkgs.follows = "nixpkgs";
-
-      silentSDDM.url = "github:uiriansan/SilentSDDM";
-
-      stylix.url = "github:nix-community/stylix";
-      stylix.inputs.nixpkgs.follows = "nixpkgs";
-
-      vaultix.url = "github:milieuim/vaultix";
-
-      wakatime-ls.url = "github:mrnossiom/wakatime-ls";
-      wakatime-ls.inputs.nixpkgs.follows = "nixpkgs";
-
       # == Personal inputs ==
       nixos-logo.url = "git+https://repo.hpcesia.com/HPCesia/nixos-logo?shallow=1";
       nixos-logo.flake = false;
-
-      wallpapers.url = "git+https://repo.hpcesia.com/HPCesia/Wallpapers?shallow=1";
-      wallpapers.flake = false;
     };
   };
 }
modules/game/hoyo-games.nix
@@ -1,4 +1,9 @@
 {inputs, ...}: {
+  flake-file.inputs.aagl-gtk-on-nix = {
+    inputs.nixpkgs.follows = "nixpkgs";
+    url = "github:ezKEa/aagl-gtk-on-nix";
+  };
+
   flake.modules.nixos.game = _: {
     networking.hosts = {
       "0.0.0.0" = [
modules/game/misc.nix
@@ -1,4 +1,9 @@
 {
+  flake-file.inputs.nix-gaming = {
+    url = "github:fufexan/nix-gaming";
+    inputs.nixpkgs.follows = "nixpkgs";
+  };
+
   flake.modules.nixos.game = {pkgs, ...}: let
     # Fix DualSense haptics until https://github.com/alsa-project/alsa-ucm-conf/issues/677 been resolved.
     patched-alsa-ucm-conf = pkgs.alsa-ucm-conf.overrideAttrs (oldAttrs: {
modules/hosts/kevin/boot.nix
@@ -1,4 +1,6 @@
 {inputs, ...}: {
+  flake-file.inputs.distro-grub-themes.url = "github:AdisonCavani/distro-grub-themes";
+
   flake.modules.nixos."hosts/kevin" = {pkgs, ...}: {
     stylix.targets.plymouth.enable = false;
     stylix.targets.grub.enable = false;
modules/hosts/default.nix
@@ -0,0 +1,7 @@
+{
+  flake-file.inputs = {
+    disko.url = "github:nix-community/disko/v1.11.0";
+    nix-cachyos-kernel.url = "github:xddxdd/nix-cachyos-kernel/release";
+    nixos-hardware.url = "github:NixOS/nixos-hardware/master";
+  };
+}
justfile
@@ -7,6 +7,9 @@ build-boot:
 build-switch:
     nh os switch .
 
+write-flake:
+    nix run .#write-flake
+
 # Edit Vaultix secret
 edit_secret target:
     nix run .#vaultix.app.{{ system }}.edit -- '{{ target }}'