Something went wrong. Try again.
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160{ description = "NixOS configurations";
inputs = { self.submodules = true; # enable submodule fetching nixpkgs.follows = "hypr/nixpkgs"; nixpkgs-latest.url = "github:nixos/nixpkgs"; nixos-cli.url = "github:nix-community/nixos-cli"; flake-parts.url = "github:hercules-ci/flake-parts"; agenix = { url = "github:ryantm/agenix"; inputs.nixpkgs.follows = "nixpkgs"; }; dictator = { url = "git+https://tangled.org/did:plc:4libu4wugcblub2fw7wujqma"; inputs.nixpkgs.follows = "nixpkgs"; }; doom-one = { url = "github:NTBBloodbath/doom-one.nvim"; flake = false; }; home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; # n.b. nixpkgs comes from this input hypr.url = "github:willruggiano/hyprnix"; jj.url = "github:jj-vcs/jj/v0.47.1"; jj-gh.url = "github:mrjones2014/jj-gh/jj-gh-v0.3.7"; mcmojave-cursor = { url = "github:libadoxon/mcmojave-hyprcursor"; inputs = { hyprcursor.follows = "hypr/hyprcursor"; nixpkgs.follows = "hypr/nixpkgs"; systems.follows = "hypr/systems"; }; }; nix-flake-templates = { url = "github:willruggiano/nix-flake-templates"; flake = false; }; nixos-hardware.url = "github:nixos/nixos-hardware"; nur = { url = "github:nix-community/nur"; inputs.nixpkgs.follows = "nixpkgs"; }; stylix = { url = "github:danth/stylix"; inputs.nixpkgs.follows = "nixpkgs"; }; };
outputs = { flake-parts, self, ... } @ inputs: flake-parts.lib.mkFlake {inherit inputs;} { imports = [ ./packages ./modules ./hosts ];
systems = ["x86_64-linux"]; perSystem = { lib, pkgs, self', ... }: { checks = { deadnix = pkgs.runCommand "deadnix" {} '' ${lib.getExe pkgs.deadnix} --fail ${self.outPath} touch $out ''; statix = pkgs.runCommand "" {} '' ${lib.getExe pkgs.statix} check ${self.outPath} touch $out ''; treefmt = self'.packages.formatter.check self.outPath; }; devShells.default = pkgs.mkShell { buildInputs = with pkgs; [ deadnix just nix-output-monitor renovate yubikey-manager self'.packages.formatter ]; shellHook = let hypr = inputs.hypr.packages.${pkgs.stdenv.hostPlatform.system}.hyprland; luarc = pkgs.writeText "luarc.json" (builtins.toJSON { workspace.library = ["${hypr}/share/hypr/stubs"]; }); in '' ln -sf ${luarc} .luarc.json ''; }; formatter = self'.packages.formatter; packages.formatter = pkgs.treefmt.withConfig { settings = { tree-root-file = "flake.nix"; formatter = { alejandra = { command = "alejandra"; includes = ["*.nix"]; }; fish_indent = { command = "fish_indent"; options = ["--write"]; includes = ["*.fish"]; }; prettier = { command = "prettier"; options = ["--write" "--prose-wrap=always"]; includes = ["*.md"]; }; shfmt = { command = "shfmt"; options = ["-w" "-i" "2" "-s"]; includes = ["*.sh" "*.bash"]; }; stylua = { command = "stylua"; includes = ["*.lua"]; }; taplo = { command = "taplo"; options = ["format"]; includes = ["*.toml"]; }; yamlfmt = { command = "yamlfmt"; includes = ["*.yaml" "*.yml"]; }; }; }; runtimeInputs = with pkgs; [ alejandra fish prettier shfmt stylua taplo yamlfmt ]; }; }; };
nixConfig = { extra-substituters = ["https://watersucks.cachix.org"]; extra-trusted-public-keys = [ "watersucks.cachix.org-1:6gadPC5R8iLWQ3EUtfu3GFrVY7X6I4Fwz/ihW25Jbv8=" ]; };}