diff --git a/flake.lock b/flake.lock index 1e74503..24154ba 100644 --- a/flake.lock +++ b/flake.lock @@ -302,6 +302,21 @@ "type": "github" } }, + "flake-file": { + "locked": { + "lastModified": 1779051720, + "narHash": "sha256-+jbXnODsR19pFKB0x/6kHhFgW6yV6N+CGClFr45eDU8=", + "owner": "denful", + "repo": "flake-file", + "rev": "c58eb27d9434e5be0c8693f1eb18d47035bc21ba", + "type": "github" + }, + "original": { + "owner": "denful", + "repo": "flake-file", + "type": "github" + } + }, "flake-parts": { "inputs": { "nixpkgs-lib": [ @@ -993,6 +1008,7 @@ "determinate-nix-cli": "determinate-nix-cli", "disko": "disko", "emacs-overlay": "emacs-overlay", + "flake-file": "flake-file", "flake-parts": "flake-parts_6", "hister": "hister", "home-manager": "home-manager", diff --git a/flake.nix b/flake.nix index 99c9797..2d30ba6 100644 --- a/flake.nix +++ b/flake.nix @@ -1,99 +1,8 @@ +# DO-NOT-EDIT. This file was auto-generated using github:vic/flake-file. +# Use `nix run .#write-flake` to regenerate it. { description = "My system configurations for macOS, WSL, and NixOS"; - inputs = { - flake-parts.url = "github:hercules-ci/flake-parts"; - - nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; - nixpkgs-bleeding.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; - nixpkgs-stable-darwin.url = "github:NixOS/nixpkgs/nixpkgs-26.05-darwin"; - nixpkgs-stable-nixos.url = "github:NixOS/nixpkgs/nixos-26.05"; - - nur.url = "github:nix-community/NUR"; - nur.inputs.nixpkgs.follows = "nixpkgs"; - - nixos-wsl.url = "github:nix-community/NixOS-WSL/main"; - nixos-wsl.inputs.nixpkgs.follows = "nixpkgs"; - - nix-darwin.url = "github:LnL7/nix-darwin"; - nix-darwin.inputs.nixpkgs.follows = "nixpkgs"; - - home-manager.url = "github:nix-community/home-manager"; - home-manager.inputs.nixpkgs.follows = "nixpkgs"; - - emacs-overlay = { - url = "github:nix-community/emacs-overlay"; - inputs.nixpkgs.follows = "nixpkgs"; - inputs.nixpkgs-stable.follows = "nixpkgs-stable-nixos"; - }; - - bible.url = "github:amusingimpala75/bible.sh"; - bible.inputs.nixpkgs.follows = "nixpkgs"; - - nix-index-database.url = "github:nix-community/nix-index-database"; - nix-index-database.inputs.nixpkgs.follows = "nixpkgs"; - - sops-nix.url = "github:Mic92/sops-nix"; - sops-nix.inputs.nixpkgs.follows = "nixpkgs"; - - brew-api.url = "github:BatteredBunny/brew-api"; - brew-api.flake = false; - brew-nix.url = "github:BatteredBunny/brew-nix"; - brew-nix.inputs = { - brew-api.follows = "brew-api"; - nix-darwin.follows = "nix-darwin"; - nixpkgs.follows = "nixpkgs"; - }; - - jj-spr.url = "github:amusingimpala75/jj-spr/fix-nix-jj-38"; - jj-spr.inputs.nixpkgs.follows = "nixpkgs"; - - pi-quota-usage.url = "github:Limb/pi-quota-usage"; - pi-quota-usage.flake = false; - - automader.url = "github:amusingimpala75/automata_grader"; - automader.inputs.nixpkgs.follows = "nixpkgs"; - - determinate-nix-cli.url = "github:DeterminateSystems/nix-src"; - - agent-sandbox.url = "github:archie-judd/agent-sandbox.nix"; - agent-sandbox.inputs.nixpkgs.follows = "nixpkgs"; - - angrr.url = "github:linyinfeng/angrr"; - angrr.inputs = { - nixpkgs.follows = "nixpkgs"; - nix-darwin.follows = "nix-darwin"; - }; - - disko.url = "github:nix-community/disko"; - disko.inputs.nixpkgs.follows = "nixpkgs"; - - impermanence.url = "github:nix-community/impermanence"; - impermanence.inputs = { - nixpkgs.follows = "nixpkgs"; - home-manager.follows = "home-manager"; - }; - - nixos-anywhere.url = "github:nix-community/nixos-anywhere"; - nixos-anywhere.inputs = { - nixpkgs.follows = "nixpkgs"; - disko.follows = ""; - nixos-stable.follows = ""; - nixos-images.follows = ""; - nix-vm-test.follows = ""; - treefmt-nix.follows = ""; - }; - - qylock.url = "github:LordHerdier/qylock-nix"; - qylock.inputs.nixpkgs.follows = "nixpkgs"; - - breaktime.url = "github:amusingimpala75/breaktime"; - breaktime.inputs.nixpkgs.follows = "nixpkgs"; - - hister.url = "github:asciimoo/hister"; - hister.inputs.nixpkgs.follows = "nixpkgs"; - }; - outputs = inputs: inputs.flake-parts.lib.mkFlake { inherit inputs; } ( @@ -108,4 +17,118 @@ ); } ); + + inputs = { + agent-sandbox = { + url = "github:archie-judd/agent-sandbox.nix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + angrr = { + url = "github:linyinfeng/angrr"; + inputs = { + nix-darwin.follows = "nix-darwin"; + nixpkgs.follows = "nixpkgs"; + }; + }; + automader = { + url = "github:amusingimpala75/automata_grader"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + bible = { + url = "github:amusingimpala75/bible.sh"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + breaktime = { + url = "github:amusingimpala75/breaktime"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + brew-api = { + url = "github:BatteredBunny/brew-api"; + flake = false; + }; + brew-nix = { + url = "github:BatteredBunny/brew-nix"; + inputs = { + brew-api.follows = "brew-api"; + nix-darwin.follows = "nix-darwin"; + nixpkgs.follows = "nixpkgs"; + }; + }; + determinate-nix-cli.url = "github:DeterminateSystems/nix-src"; + disko = { + url = "github:nix-community/disko"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + emacs-overlay = { + url = "github:nix-community/emacs-overlay"; + inputs = { + nixpkgs.follows = "nixpkgs"; + nixpkgs-stable.follows = "nixpkgs-stable-nixos"; + }; + }; + flake-file.url = "github:denful/flake-file"; + flake-parts.url = "github:hercules-ci/flake-parts"; + hister = { + url = "github:asciimoo/hister"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + home-manager = { + url = "github:nix-community/home-manager"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + impermanence = { + url = "github:nix-community/impermanence"; + inputs = { + home-manager.follows = "home-manager"; + nixpkgs.follows = "nixpkgs"; + }; + }; + jj-spr = { + url = "github:amusingimpala75/jj-spr/fix-nix-jj-38"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + nix-darwin = { + url = "github:LnL7/nix-darwin"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + nix-index-database = { + url = "github:nix-community/nix-index-database"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + nixos-anywhere = { + url = "github:nix-community/nixos-anywhere"; + inputs = { + disko.follows = ""; + nix-vm-test.follows = ""; + nixos-images.follows = ""; + nixos-stable.follows = ""; + nixpkgs.follows = "nixpkgs"; + treefmt-nix.follows = ""; + }; + }; + nixos-wsl = { + url = "github:nix-community/NixOS-WSL/main"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + nixpkgs-bleeding.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + nixpkgs-stable-darwin.url = "github:NixOS/nixpkgs/nixpkgs-26.05-darwin"; + nixpkgs-stable-nixos.url = "github:NixOS/nixpkgs/nixos-26.05"; + nur = { + url = "github:nix-community/NUR"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + pi-quota-usage = { + url = "github:Limb/pi-quota-usage"; + flake = false; + }; + qylock = { + url = "github:LordHerdier/qylock-nix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + sops-nix = { + url = "github:Mic92/sops-nix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; } diff --git a/modules/flake/autowire.nix b/modules/flake/autowire.nix index a65c91d..ad519c1 100644 --- a/modules/flake/autowire.nix +++ b/modules/flake/autowire.nix @@ -58,7 +58,7 @@ rec { _: pkg: { type = "app"; program = lib.getExe pkg; - meta.description = pkg.meta.description; + meta.description = pkg.meta.description or ""; } ); }; diff --git a/modules/flake/breaktime.nix b/modules/flake/breaktime.nix index 6b306c6..900f238 100644 --- a/modules/flake/breaktime.nix +++ b/modules/flake/breaktime.nix @@ -48,4 +48,9 @@ services.breaktime.enable = true; # settings TODO once proper theming support is actually working }; + + flake-file.inputs.breaktime = { + url = "github:amusingimpala75/breaktime"; + inputs.nixpkgs.follows = "nixpkgs"; + }; } diff --git a/modules/flake/brew.nix b/modules/flake/brew.nix index 4513187..a10ca71 100644 --- a/modules/flake/brew.nix +++ b/modules/flake/brew.nix @@ -14,4 +14,19 @@ self.overlays.brew-hashes ]; }; + + flake-file.inputs = { + brew-api = { + url = "github:BatteredBunny/brew-api"; + flake = false; + }; + brew-nix = { + url = "github:BatteredBunny/brew-nix"; + inputs = { + brew-api.follows = "brew-api"; + nix-darwin.follows = "nix-darwin"; + nixpkgs.follows = "nixpkgs"; + }; + }; + }; } diff --git a/modules/flake/cli.nix b/modules/flake/cli.nix index 4d69a55..19c42f3 100644 --- a/modules/flake/cli.nix +++ b/modules/flake/cli.nix @@ -24,4 +24,9 @@ up ]; }; + + flake-file.inputs.bible = { + url = "github:amusingimpala75/bible.sh"; + inputs.nixpkgs.follows = "nixpkgs"; + }; } diff --git a/modules/flake/default.nix b/modules/flake/default.nix index bb7dba3..1546424 100644 --- a/modules/flake/default.nix +++ b/modules/flake/default.nix @@ -20,4 +20,42 @@ formatter = pkgs.nixfmt-tree; }; + + flake-file.inputs = { + flake-parts.url = "github:hercules-ci/flake-parts"; + + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + nixpkgs-bleeding.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + nixpkgs-stable-darwin.url = "github:NixOS/nixpkgs/nixpkgs-26.05-darwin"; + nixpkgs-stable-nixos.url = "github:NixOS/nixpkgs/nixos-26.05"; + + nur = { + url = "github:nix-community/NUR"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + nix-darwin = { + url = "github:LnL7/nix-darwin"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + home-manager = { + url = "github:nix-community/home-manager"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + emacs-overlay = { + url = "github:nix-community/emacs-overlay"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.nixpkgs-stable.follows = "nixpkgs-stable-nixos"; + }; + nixos-anywhere = { + url = "github:nix-community/nixos-anywhere"; + inputs = { + nixpkgs.follows = "nixpkgs"; + disko.follows = ""; + nixos-stable.follows = ""; + nixos-images.follows = ""; + nix-vm-test.follows = ""; + treefmt-nix.follows = ""; + }; + }; + }; } diff --git a/modules/flake/determinate-nix.nix b/modules/flake/determinate-nix.nix index 7db6bad..c8759b7 100644 --- a/modules/flake/determinate-nix.nix +++ b/modules/flake/determinate-nix.nix @@ -22,4 +22,6 @@ in flake.modules.darwin.determinate-nix = withSubstituters true; flake.modules.homeManager.determinate-nix = withSubstituters false; flake.modules.nixos.determinate-nix = withSubstituters true; + + flake-file.inputs.determinate-nix-cli.url = "github:DeterminateSystems/nix-src"; } diff --git a/modules/flake/disko.nix b/modules/flake/disko.nix new file mode 100644 index 0000000..a71dd3c --- /dev/null +++ b/modules/flake/disko.nix @@ -0,0 +1,14 @@ +{ + inputs, + ... +}: +{ + flake.modules.nixos.disko = { + imports = [ inputs.disko.nixosModules.default ]; + }; + + flake-file.inputs.disko = { + url = "github:nix-community/disko"; + inputs.nixpkgs.follows = "nixpkgs"; + }; +} diff --git a/modules/flake/flake-file.nix b/modules/flake/flake-file.nix new file mode 100644 index 0000000..29d3473 --- /dev/null +++ b/modules/flake/flake-file.nix @@ -0,0 +1,25 @@ +{ + inputs, + ... +}: +{ + imports = [ inputs.flake-file.flakeModules.default ]; + flake-file.inputs.flake-file.url = "github:denful/flake-file"; + flake-file.outputs = '' + inputs: + inputs.flake-parts.lib.mkFlake { inherit inputs; } ( + { + lib, + ... + }: + { + # Custom import-tree courtesy of iampavel.dev + imports = lib.fileset.toList ( + lib.fileset.fileFilter (file: file.hasExt "nix" && !(lib.hasPrefix "_" file.name)) ./modules/flake + ); + } + ) + ''; + + flake-file.description = "My system configurations for macOS, WSL, and NixOS"; +} diff --git a/modules/flake/hister.nix b/modules/flake/hister.nix new file mode 100644 index 0000000..19ed451 --- /dev/null +++ b/modules/flake/hister.nix @@ -0,0 +1,15 @@ +{ + inputs, + ... +}: +{ + flake.modules.homeManager.hister = { + imports = [ inputs.hister.homeModules.default ]; + services.hister.enable = true; + }; + + flake-file.inputs.hister = { + url = "github:asciimoo/hister"; + inputs.nixpkgs.follows = "nixpkgs"; + }; +} diff --git a/modules/flake/hollowknight-login.nix b/modules/flake/hollowknight-login.nix index c54d12a..76da7bf 100644 --- a/modules/flake/hollowknight-login.nix +++ b/modules/flake/hollowknight-login.nix @@ -15,4 +15,9 @@ wayland.enable = true; }; }; + + flake-file.inputs.qylock = { + url = "github:LordHerdier/qylock-nix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; } diff --git a/modules/flake/host/feanor/default.nix b/modules/flake/host/feanor/default.nix index adac2dd..949a982 100644 --- a/modules/flake/host/feanor/default.nix +++ b/modules/flake/host/feanor/default.nix @@ -1,5 +1,4 @@ { - inputs, self, ... }: @@ -11,9 +10,8 @@ [ broadcom-wifi iwd - inputs.disko.nixosModules.disko feanor-disko - inputs.impermanence.nixosModule + impermanence # [TODO] add persisting some folders with impermanence btrfs-rollback ram-compression diff --git a/modules/flake/host/feanor/disko.nix b/modules/flake/host/feanor/disko.nix index b890751..70c1464 100644 --- a/modules/flake/host/feanor/disko.nix +++ b/modules/flake/host/feanor/disko.nix @@ -1,5 +1,11 @@ +{ + self, + ... +}: { flake.modules.nixos.feanor-disko = { + imports = [ self.modules.nixos.disko ]; + disko.devices.disk.main = { type = "disk"; device = "/dev/disk/by-id/ata-APPLE_SSD_SD0128F_141644410441"; diff --git a/modules/flake/impermanence.nix b/modules/flake/impermanence.nix new file mode 100644 index 0000000..7be151b --- /dev/null +++ b/modules/flake/impermanence.nix @@ -0,0 +1,17 @@ +{ + inputs, + ... +}: +{ + flake.modules.nixos.impermanence = { + imports = [ inputs.impermanence.nixosModules.default ]; + }; + + flake-file.inputs.impermanence = { + url = "github:nix-community/impermanence"; + inputs = { + nixpkgs.follows = "nixpkgs"; + home-manager.follows = "home-manager"; + }; + }; +} diff --git a/modules/flake/jujutsu/default.nix b/modules/flake/jujutsu/default.nix index 47d524e..e027f7b 100644 --- a/modules/flake/jujutsu/default.nix +++ b/modules/flake/jujutsu/default.nix @@ -105,4 +105,9 @@ # since we rely on git colocation programs.git.enable = true; }; + + flake-file.inputs.jj-spr = { + url = "github:amusingimpala75/jj-spr/fix-nix-jj-38"; + inputs.nixpkgs.follows = "nixpkgs"; + }; } diff --git a/modules/flake/ng-nix.nix b/modules/flake/ng-nix.nix index 4c8bffb..29a1a3b 100644 --- a/modules/flake/ng-nix.nix +++ b/modules/flake/ng-nix.nix @@ -59,4 +59,9 @@ }; }; }; + + flake-file.inputs.nix-index-database = { + url = "github:nix-community/nix-index-database"; + inputs.nixpkgs.follows = "nixpkgs"; + }; } diff --git a/modules/flake/pi/default.nix b/modules/flake/pi/default.nix index 9135713..0f569ff 100644 --- a/modules/flake/pi/default.nix +++ b/modules/flake/pi/default.nix @@ -157,4 +157,16 @@ }; }; }; + + flake-file.inputs = { + agent-sandbox = { + url = "github:archie-judd/agent-sandbox.nix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + pi-quota-usage = { + url = "github:Limb/pi-quota-usage"; + flake = false; + }; + }; } diff --git a/modules/flake/sops.nix b/modules/flake/sops.nix index d533af3..969de9a 100644 --- a/modules/flake/sops.nix +++ b/modules/flake/sops.nix @@ -31,4 +31,9 @@ }; }; }; + + flake-file.inputs.sops-nix = { + url = "github:Mic92/sops-nix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; } diff --git a/modules/flake/store-garbage-collect.nix b/modules/flake/store-garbage-collect.nix index a959ee3..67be36f 100644 --- a/modules/flake/store-garbage-collect.nix +++ b/modules/flake/store-garbage-collect.nix @@ -51,4 +51,12 @@ in }; }; }; + + flake-file.inputs.angrr = { + url = "github:linyinfeng/angrr"; + inputs = { + nixpkgs.follows = "nixpkgs"; + nix-darwin.follows = "nix-darwin"; + }; + }; } diff --git a/modules/flake/user/lukemurray.nix b/modules/flake/user/lukemurray.nix index e87ad7d..067e7c8 100644 --- a/modules/flake/user/lukemurray.nix +++ b/modules/flake/user/lukemurray.nix @@ -21,6 +21,7 @@ firefox ghostty git + hister jujutsu minecraft ng-cli @@ -32,8 +33,6 @@ wallust window-borders zsh - - inputs.hister.homeModules.default ]; programs.radicle.settings.node.alias = "amusingimpala75@finarfin"; @@ -43,8 +42,6 @@ username = "amusingimpala75"; }; - services.hister.enable = true; - # programs.infat = { # enable = true; # package = pkgs.infat.overrideAttrs (_: rec { diff --git a/modules/flake/user/murrayle23.nix b/modules/flake/user/murrayle23.nix index ced0ca9..7ba2fc2 100644 --- a/modules/flake/user/murrayle23.nix +++ b/modules/flake/user/murrayle23.nix @@ -56,4 +56,10 @@ home.stateVersion = "24.05"; } ); + + flake-file.inputs.automader = { + url = "github:amusingimpala75/automata_grader"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + } diff --git a/modules/flake/wsl.nix b/modules/flake/wsl.nix index 4dc150a..ded1929 100644 --- a/modules/flake/wsl.nix +++ b/modules/flake/wsl.nix @@ -68,4 +68,9 @@ ) |> lib.hm.dag.entryAfter [ "onFilesChange" ]; }; + + flake-file.inputs.nixos-wsl = { + url = "github:nix-community/NixOS-WSL/main"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }