From 133ae551511523d316e5681e44068cc21fcf7e7c Mon Sep 17 00:00:00 2001 From: Mora Unie Youer Date: Sun, 2 Mar 2025 10:19:14 +0300 Subject: feat: reuse flake inputs --- flake.nix | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 60 insertions(+), 7 deletions(-) (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix index 3c4415a..db86f4f 100644 --- a/flake.nix +++ b/flake.nix @@ -1,21 +1,74 @@ { description = "Mora Unie Youer's NixOS configuration"; + # This section is hugely uses "input reusing" so that there will be no copies + # of the same repository on flake update + # NOTE: unless it is needed :wink: inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; - nurpkgs.url = "github:nix-community/NUR"; - nyxpkgs.url = "github:chaotic-cx/nyx"; - home-manager.url = "github:nix-community/home-manager"; + + flake-compat = { + url = "github:edolstra/flake-compat"; + flake = false; + }; + + flake-utils.url = "github:numtide/flake-utils"; + + flake-parts = { + url = "github:hercules-ci/flake-parts"; + inputs.nixpkgs-lib.follows = "nixpkgs"; + }; + + rust-overlay = { + url = "github:oxalica/rust-overlay"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + home-manager = { + url = "github:nix-community/home-manager"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + nurpkgs = { + url = "github:nix-community/NUR"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.flake-parts.follows = "flake-parts"; + }; + + nyxpkgs = { + url = "github:chaotic-cx/nyx"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.home-manager.follows = "home-manager"; + }; # Secure Boot bootloader - lanzaboote.url = "github:nix-community/lanzaboote"; + lanzaboote = { + url = "github:nix-community/lanzaboote"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.flake-compat.follows = "flake-compat"; + inputs.flake-parts.follows = "flake-parts"; + inputs.rust-overlay.follows = "rust-overlay"; + }; # Setup NixOS sound subsystem better - musnix.url = "github:musnix/musnix"; + musnix = { + url = "github:musnix/musnix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; # Applications - fjordlauncher.url = "github:unmojang/FjordLauncher"; - wezterm.url = "github:wezterm/wezterm?dir=nix"; + fjordlauncher = { + url = "github:unmojang/FjordLauncher"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.flake-compat.follows = "flake-compat"; + }; + + wezterm = { + url = "github:wezterm/wezterm?dir=nix"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.flake-utils.follows = "flake-utils"; + inputs.rust-overlay.follows = "rust-overlay"; + }; }; nixConfig = { -- cgit v1.2.3-70-g09d2