{ description = "Jimbo's systems as a flake"; inputs = { # Nixpkgs nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05"; nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; nur.url = "github:nix-community/NUR"; mailserver.url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-24.05"; blender-bin.url = "https://flakehub.com/f/edolstra/blender-bin/1.0.8.tar.gz"; minecraft.url = "github:Infinidoge/nix-minecraft"; hardware.url = "github:nixos/nixos-hardware/master"; # Home manager home-manager = { url = "github:nix-community/home-manager/release-24.05"; inputs.nixpkgs.follows = "nixpkgs"; }; }; outputs = { self, nixpkgs, nixpkgs-unstable, nur, mailserver, blender-bin, hardware, home-manager, ... } @inputs: let inherit (self) outputs; forAllSystems = nixpkgs.lib.genAttrs [ "aarch64-linux" "x86_64-linux" ]; in rec { # Your custom packages # Accessible through 'nix build', 'nix shell', etc packages = forAllSystems (system: import ./extras/pkgs nixpkgs.legacyPackages.${system}); # Your custom packages and modifications, exported as overlays overlays = import ./extras/overlays.nix {inherit inputs;}; # Variables defined so they can be accessed globally secrets = import ./extras/secrets.nix; cmd = import ./extras/cmd.nix; displays = import ./extras/displays.nix; ips = import ./extras/ips.nix; look = import ./extras/look.nix; ws = import ./extras/workspaces.nix; # NixOS config entrypoint, use 'nixos-rebuild --flake .#your-hostname' nixosConfigurations = { JimDesktop = nixpkgs.lib.nixosSystem { specialArgs = {inherit inputs outputs;}; modules = [ ./hosts/JimDesktop/configuration.nix ]; }; JimServer = nixpkgs.lib.nixosSystem { specialArgs = {inherit inputs outputs;}; modules = [ ./JimServer/configuration.nix mailserver.nixosModule ]; }; JimPine = nixpkgs.lib.nixosSystem { specialArgs = {inherit inputs outputs;}; modules = [ ./hosts/JimPine/configuration.nix hardware.nixosModules.pine64-pinebook-pro ]; }; JimLenovo = nixpkgs.lib.nixosSystem { specialArgs = {inherit inputs outputs;}; modules = [ ./hosts/JimLenovo/configuration.nix ]; }; }; # Home-manager configuration, use 'home-manager --flake .#your-username@your-hostname' homeConfigurations = { "jimbo@JimDesktop" = home-manager.lib.homeManagerConfiguration { pkgs = nixpkgs.legacyPackages.x86_64-linux; extraSpecialArgs = {inherit inputs outputs;}; modules = [ ./hosts/JimDesktop/home.nix nur.nixosModules.nur ]; }; "jimbo@JimServer" = home-manager.lib.homeManagerConfiguration { pkgs = nixpkgs.legacyPackages.x86_64-linux; extraSpecialArgs = {inherit inputs outputs;}; modules = [ ./hosts/JimServer/home.nix ]; }; "jimbo@JimPine" = home-manager.lib.homeManagerConfiguration { pkgs = nixpkgs.legacyPackages.aarch64-linux; extraSpecialArgs = {inherit inputs outputs;}; modules = [ ./hosts/JimPine/home.nix nur.nixosModules.nur ]; }; "jimbo@JimLenovo" = home-manager.lib.homeManagerConfiguration { pkgs = nixpkgs.legacyPackages.x86_64-linux; extraSpecialArgs = {inherit inputs outputs;}; modules = [ ./hosts/JimLenovo/home.nix nur.nixosModules.nur ]; }; # Derivation for ssh envrionments on other people's servers "jimbo@JimTerminal" = home-manager.lib.homeManagerConfiguration { pkgs = nixpkgs.legacyPackages.x86_64-linux; extraSpecialArgs = {inherit inputs outputs;}; modules = [ ./hosts/JimTerminal/home.nix ]; }; }; }; }