{ description = "NixOS configuration"; inputs = { # nixpkgs nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; # home manager home-manager.url = "github:nix-community/home-manager/master"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; # hyprland hyprland.url = "github:hyprwm/Hyprland/v0.51.0"; hyprland.inputs.nixpkgs.follows = "nixpkgs"; # hyprland plugins hyprland-plugins.url = "github:hyprwm/hyprland-plugins/v0.51.0"; hyprland-plugins.inputs.hyprland.follows = "hyprland"; # hyprland hy3 hy3.url = "github:outfoxxed/hy3/hl0.51.0"; hy3.inputs.hyprland.follows = "hyprland"; # sops sops-nix.url = "github:Mic92/sops-nix"; sops-nix.inputs.nixpkgs.follows = "nixpkgs"; # astal astal.url = "github:aylur/astal"; astal.inputs.nixpkgs.follows = "nixpkgs"; # talc talc.url = "git+https://g.trimill.xyz/talc"; talc.inputs.nixpkgs.follows = "nixpkgs"; # apple-fonts apple-fonts.url = "github:Lyndeno/apple-fonts.nix"; apple-fonts.inputs.nixpkgs.follows = "nixpkgs"; # nixos-wsl nixos-wsl.url = "github:nix-community/nixos-wsl"; nixos-wsl.inputs.nixpkgs.follows = "nixpkgs"; # rose-pine-hyprcursor rose-pine-hyprcursor.url = "github:ndom91/rose-pine-hyprcursor"; rose-pine-hyprcursor.inputs.nixpkgs.follows = "nixpkgs"; rose-pine-hyprcursor.inputs.hyprlang.follows = "hyprland/hyprlang"; # zen browser zen-browser.url = "github:0xc000022070/zen-browser-flake"; zen-browser.inputs.nixpkgs.follows = "nixpkgs"; zen-browser.inputs.home-manager.follows = "home-manager"; # firefox-nightly firefox-nightly.url = "github:nix-community/flake-firefox-nightly"; firefox-nightly.inputs.nixpkgs.follows = "nixpkgs"; }; outputs = { self, nixpkgs, home-manager, ... } @ inputs: let systems = ["x86_64-linux"]; perSystem = func: builtins.listToAttrs (map ( system: let pkgs = nixpkgs.legacyPackages.${system}; in { name = system; value = func pkgs system; } ) systems); mkSystem = file: system: nixpkgs.lib.nixosSystem { inherit system; specialArgs = {inherit inputs;}; modules = [ ./system ./options.nix file ]; }; mkHome = file: system: let hostModule = mkSystem file system; in home-manager.lib.homeManagerConfiguration { inherit (hostModule) pkgs; extraSpecialArgs = {inherit inputs;}; modules = [ ./home ./options.nix (self.lib.homeConfig hostModule.config) { nixpkgs.config.allowUnfree = true; programs.home-manager.enable = nixpkgs.lib.mkForce false; } ]; }; in rec { nixosConfigurations = { shinji = mkSystem ./hosts/shinji "x86_64-linux"; kaworu = mkSystem ./hosts/kaworu "x86_64-linux"; thinkpad = mkSystem ./hosts/thinkpad "x86_64-linux"; wsl = mkSystem ./hosts/wsl "x86_64-linux"; }; homeConfigurations = { shinji = mkHome ./hosts/shinji "x86_64-linux"; kaworu = mkHome ./hosts/kaworu "x86_64-linux"; thinkpad = mkHome ./hosts/thinkpad "x86_64-linux"; wsl = mkHome ./hosts/wsl "x86_64-linux"; kagamine = mkHome ./hosts/work "x86_64-linux"; }; lib = import ./lib { inherit inputs; inherit (nixpkgs) lib; }; packages = perSystem ( pkgs: system: import ./pkgs { inherit pkgs inputs system; inherit (nixpkgs) lib; } ); legacyPackages = packages; formatter = perSystem ( pkgs: system: pkgs.alejandra ); devShell = perSystem ( pkgs: system: pkgs.mkShell { packages = [ home-manager.packages.${system}.home-manager ]; } ); }; }