Something went wrong. Try again.
yep, more dotfiles
Something went wrong. Try again.
dotfiles flake.nix
4.2 kB · 128 lines
Nix
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129{ description = "NixOS and Home Manager configuration for Milo's laptops";
inputs = { nixpkgs.url = "https://channels.nixos.org/nixos-26.05/nixexprs.tar.xz"; unixpkgs.url = "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz";
home-manager.url = "github:nix-community/home-manager?ref=release-26.05"; home-manager.inputs.nixpkgs.follows = "nixpkgs";
nix-darwin.url = "github:nix-darwin/nix-darwin?ref=nix-darwin-26.05"; nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
stylix.url = "github:nix-community/stylix?ref=release-26.05"; stylix.inputs.nixpkgs.follows = "nixpkgs";
## Miscellaneous
agenix.url = "github:ryantm/agenix"; agenix.inputs.nixpkgs.follows = "nixpkgs"; agenix.inputs.home-manager.follows = "home-manager";
disko.url = "github:nix-community/disko"; disko.inputs.nixpkgs.follows = "nixpkgs";
nixos-hardware.url = "github:nixos/nixos-hardware"; nixos-hardware.inputs.nixpkgs.follows = "nixpkgs";
lanzaboote.url = "github:nix-community/lanzaboote"; lanzaboote.inputs.nixpkgs.follows = "unixpkgs";
srvos.url = "github:nix-community/srvos"; srvos.inputs.nixpkgs.follows = "nixpkgs";
## Libraries
net.url = "github:0xCCF4/nix-net-lib"; net.inputs.nixpkgs.follows = "unixpkgs";
## Packages
git-leave.url = "github:mrnossiom/git-leave"; git-leave.inputs.nixpkgs.follows = "nixpkgs";
git-pages.url = "git+https://codeberg.org/git-pages/git-pages"; git-pages.inputs.nixpkgs.follows = "nixpkgs";
helix.url = "github:helix-editor/helix"; helix.inputs.nixpkgs.follows = "unixpkgs";
hypixel-bank-tracker.url = "github:pixilie/hypixel-bank-tracker"; hypixel-bank-tracker.inputs.nixpkgs.follows = "nixpkgs";
nix-alien.url = "github:thiagokokada/nix-alien"; nix-alien.inputs.nixpkgs.follows = "nixpkgs";
tangled.url = "git+https://tangled.org/tangled.org/core"; tangled.inputs.nixpkgs.follows = "unixpkgs";
# remove useless tangled inputs tangled.inputs = { actor-typeahead-src.follows = ""; fenix.follows = ""; htmx-src.follows = ""; htmx-ws-src.follows = ""; ibm-plex-mono-src.follows = ""; inter-fonts-src.follows = ""; lucide-src.follows = ""; mermaid-src.follows = ""; };
wakatime-ls.url = "github:mrnossiom/wakatime-ls"; wakatime-ls.inputs.nixpkgs.follows = "nixpkgs";
zen-browser.url = "github:0xc000022070/zen-browser-flake"; zen-browser.inputs.nixpkgs.follows = "unixpkgs"; zen-browser.inputs.home-manager.follows = "home-manager";
## Files
wolf-alabaster-helix.url = "github:wolf/alabaster-for-helix"; wolf-alabaster-helix.flake = false; };
outputs = { self, nixpkgs, ... }: let inherit (self) outputs; inherit (flake-lib) forAllSystems;
flake-lib = import ./lib/flake ({ inherit self; inherit (nixpkgs) lib; });
allPkgs = forAllSystems ( system: # This should be the only constructed nixpkgs instance in this flake # (along with the derived unixpkgs instance in specialModuleArgs) import nixpkgs { inherit system; config.allowUnfreePredicate = import ./lib/unfree.nix { inherit (nixpkgs) lib; }; overlays = [ outputs.overlays.all ]; } );
forAllPkgs = func: forAllSystems (system: func allPkgs.${system}); in { formatter = forAllPkgs (pkgs: pkgs.nixfmt-tree);
inherit flake-lib; # Nonstandard lib = forAllPkgs (import ./lib); globals = forAllPkgs (import ./globals.nix); templates = import ./templates;
devShells = forAllPkgs (import ./shells.nix); overlays = import ./overlays (nixpkgs // { inherit self; }); packages = forAllPkgs (import ./pkgs);
homeManagerModules = import ./modules/home-manager; nixosModules = import ./modules/nixos;
# `nixos`, `home-manager` and `nix-darwin` configs are generic over `pkgs` and placed in `configurations.nix` # `legacyPackages` tree structure is not checked by `nix flake check` but picked up by all rebuild tools legacyPackages = forAllPkgs (import ./configurations.nix flake-lib); };}