diff options
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 188 |
1 files changed, 14 insertions, 174 deletions
@@ -1,192 +1,32 @@ { - description = "NixOS configs <3"; - inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs-small.url = "github:nixos/nixpkgs/nixos-unstable-small"; - nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-25.05"; - - # Nix replacement because why not - # lix-module = { - # url = "https://git.lix.systems/lix-project/nixos-module/archive/2.91.0.tar.gz"; - # inputs.nixpkgs.follows = "nixpkgs"; - # }; - - home-manager = { - url = "github:nix-community/home-manager/master"; - inputs.nixpkgs.follows = "nixpkgs"; - }; + nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-25.11"; - # Nix User Repo - nurpkgs = { - url = "github:/nix-community/NUR"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - - hyprland = { - url = "github:hyprwm/Hyprland"; - }; - - # Nix command helper - nh = { - url = "github:viperML/nh"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - - # Styling for (almost) everything - stylix.url = "github:danth/stylix"; + flake-parts.url = "github:hercules-ci/flake-parts"; + import-tree.url = "github:vic/import-tree"; + home-manager.url = "github:nix-community/home-manager"; disko = { url = "github:nix-community/disko"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - - # Secrets - sops-nix = { - url = "github:Mic92/sops-nix"; inputs.nixpkgs.follows = "nixpkgs-stable"; }; - crowdsec = { - url = "git+https://codeberg.org/kampka/nix-flake-crowdsec.git"; + agenix = { + url = "github:yaxitech/ragenix"; inputs.nixpkgs.follows = "nixpkgs-stable"; }; - nix-index-database = { - url = "github:nix-community/nix-index-database"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - - zen-browser = { - url = "github:0xc000022070/zen-browser-flake"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - - niri.url = "github:sodiboo/niri-flake"; - - shimmer = { - url = "github:nuclearcodecat/shimmer"; - flake = false; + agenix-rekey = { + url = "github:oddlama/agenix-rekey"; + inputs.nixpkgs.follows = "nixpkgs-stable"; }; - betterfox = { - url = "github:yokoffing/Betterfox"; - flake = false; - }; + deploy-rs.url = "github:serokell/deploy-rs"; }; - outputs = { - self, - nixpkgs, - nixpkgs-stable, - home-manager, - nurpkgs, - hyprland, - disko, - sops-nix, - crowdsec, - nix-index-database, - ... - } @ inputs: let - inherit (self) outputs; - forAllSystems = nixpkgs.lib.genAttrs [ - "aarch64-linux" - "i686-linux" - "x86_64-linux" - ]; - in { - packages = forAllSystems ( - system: let - pkgs = nixpkgs.legacyPackages.${system}; - in - import ./pkgs {inherit pkgs;} - ); - # Devshell for bootstrapping - # Acessible through 'nix develop' or 'nix-shell' (legacy) - devShells = forAllSystems ( - system: let - pkgs = nixpkgs.legacyPackages.${system}; - in - import ./shell.nix {inherit pkgs;} - ); - - # Your custom packages and modifications, exported as overlays - overlays = import ./overlays {inherit inputs outputs;}; - # Reusable nixos modules you might want to export - # These are usually stuff you would upstream into nixpkgs - nixosModules = import ./modules/nixos; - # Reusable home-manager modules you might want to export - # These are usually stuff you would upstream into home-manager - homeManagerModules = import ./modules/home-manager; - - # NixOS configuration entrypoint - # Available through 'nixos-rebuild --flake .#your-hostname' - nixosConfigurations = { - ltrr-mini = nixpkgs.lib.nixosSystem { - specialArgs = {inherit inputs outputs;}; - modules = [ - ./nixos/laptop/configuration.nix - disko.nixosModules.disko - ]; - }; - - ltrr = nixpkgs.lib.nixosSystem { - specialArgs = {inherit inputs outputs;}; - modules = [ - ./nixos/pc/configuration.nix - ]; - }; - - ltrr-tw = nixpkgs-stable.lib.nixosSystem { - specialArgs = {inherit inputs outputs;}; - system = "x86_64-linux"; - modules = [ - disko.nixosModules.disko - sops-nix.nixosModules.sops - crowdsec.nixosModules.crowdsec - ./nixos/tw/configuration.nix - ]; - }; - - ltrr-vpn = nixpkgs-stable.lib.nixosSystem { - system = "x86_64-linux"; - modules = [ - disko.nixosModules.disko - ./nixos/vpn/configuration.nix - ]; - }; - - ltrr-home = nixpkgs-stable.lib.nixosSystem { - specialArgs = {inherit inputs outputs;}; - system = "x86_64-linux"; - modules = [ - disko.nixosModules.disko - sops-nix.nixosModules.sops - ./nixos/server/configuration.nix - ]; - }; - }; - - homeConfigurations = { - "jerpo@ltrr-mini" = home-manager.lib.homeManagerConfiguration { - pkgs = nixpkgs.legacyPackages.x86_64-linux; - extraSpecialArgs = {inherit inputs outputs;}; - modules = [ - ./home-manager/laptop.nix - nurpkgs.modules.homeManager.default - nix-index-database.homeModules.nix-index - ]; - }; - - "jerpo@ltrr" = home-manager.lib.homeManagerConfiguration { - pkgs = nixpkgs.legacyPackages.x86_64-linux; - extraSpecialArgs = {inherit inputs outputs;}; - modules = [ - ./home-manager/pc.nix - nurpkgs.modules.homeManager.default - nix-index-database.homeModules.nix-index - ]; - }; - }; - }; + outputs = inputs: + inputs.flake-parts.lib.mkFlake {inherit inputs;} + (inputs.import-tree ./modules); } |
