From 87fbcda3d3bb91149e9df6e1c54244a05192b659 Mon Sep 17 00:00:00 2001 From: Jimbo Date: Wed, 9 Oct 2024 23:52:50 -0400 Subject: [PATCH] Changes to the flake, thanks Jules --- flake.nix | 57 +++++++++++-------- modules/system/services/minecraft/default.nix | 2 - 2 files changed, 32 insertions(+), 27 deletions(-) diff --git a/flake.nix b/flake.nix index e36e1a1..f0741bb 100644 --- a/flake.nix +++ b/flake.nix @@ -33,13 +33,8 @@ lanzaboote, home-manager, ... - } @inputs: let - inherit (self) outputs; - forAllSystems = nixpkgs.lib.genAttrs [ - "aarch64-linux" - "x86_64-linux" - ]; - in rec { + } @inputs: + let channels = { master = import nixpkgs { inherit (flake) system overlays; @@ -49,41 +44,53 @@ nur = import nur { nurpkgs = import nixpkgs { inherit (flake) system; }; }; }; - packages = import ./packages/default.nix { inherit (nix) pkgs; }; - - # 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; + flake = { + overlays = [ + nur.overlay + minecraft.overlay + (import ./overlays/mpv { inherit (self) inputs channels; }) + ]; + packages = import ./packages/default.nix { inherit (nix) pkgs; }; + 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; + }; + nix = rec { + pkgs = channels.master // flake.packages; + inherit (pkgs) lib; + inherit (flake) channels-config; + }; + in { # NixOS config entrypoint, use 'nixos-rebuild --flake .#your-hostname' nixosConfigurations = { JimDesktop = nixpkgs.lib.nixosSystem { - specialArgs = {inherit inputs outputs;}; + inherit (nix) pkgs; + specialArgs = { inherit inputs outputs; }; modules = [ ./system/hosts/JimDesktop/configuration.nix lanzaboote.nixosModules.lanzaboote ]; }; JimServer = nixpkgs.lib.nixosSystem { - specialArgs = {inherit inputs outputs;}; + specialArgs = { inherit inputs outputs; }; modules = [ ./system/hosts/JimServer/configuration.nix mailserver.nixosModule ]; }; JimPine = nixpkgs.lib.nixosSystem { - specialArgs = {inherit inputs outputs;}; + specialArgs = { inherit inputs outputs; }; modules = [ ./system/hosts/JimPine/configuration.nix hardware.nixosModules.pine64-pinebook-pro ]; }; JimLenovo = nixpkgs.lib.nixosSystem { - specialArgs = {inherit inputs outputs;}; + specialArgs = { inherit inputs outputs; }; modules = [ ./system/hosts/JimLenovo/configuration.nix ]; @@ -94,7 +101,7 @@ homeConfigurations = { "jimbo@JimDesktop" = home-manager.lib.homeManagerConfiguration { pkgs = nixpkgs.legacyPackages.x86_64-linux; - extraSpecialArgs = {inherit inputs outputs;}; + extraSpecialArgs = { inherit inputs outputs; }; modules = [ ./home/hosts/JimDesktop/home.nix nur.nixosModules.nur @@ -102,14 +109,14 @@ }; "jimbo@JimServer" = home-manager.lib.homeManagerConfiguration { pkgs = nixpkgs.legacyPackages.x86_64-linux; - extraSpecialArgs = {inherit inputs outputs;}; + extraSpecialArgs = { inherit inputs outputs; }; modules = [ ./home/hosts/JimServer/home.nix ]; }; "jimbo@JimPine" = home-manager.lib.homeManagerConfiguration { pkgs = nixpkgs.legacyPackages.aarch64-linux; - extraSpecialArgs = {inherit inputs outputs;}; + extraSpecialArgs = { inherit inputs outputs; }; modules = [ ./home/hosts/JimPine/home.nix nur.nixosModules.nur @@ -117,7 +124,7 @@ }; "jimbo@JimLenovo" = home-manager.lib.homeManagerConfiguration { pkgs = nixpkgs.legacyPackages.x86_64-linux; - extraSpecialArgs = {inherit inputs outputs;}; + extraSpecialArgs = { inherit inputs outputs; }; modules = [ ./home/hosts/JimLenovo/home.nix nur.nixosModules.nur @@ -126,7 +133,7 @@ # 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;}; + extraSpecialArgs = { inherit inputs outputs; }; modules = [ ./home/hosts/JimTerminal/home.nix ]; diff --git a/modules/system/services/minecraft/default.nix b/modules/system/services/minecraft/default.nix index 8ab54a6..8f14c82 100644 --- a/modules/system/services/minecraft/default.nix +++ b/modules/system/services/minecraft/default.nix @@ -10,8 +10,6 @@ ./servers/uberbeta ]; - nixpkgs.overlays = [ inputs.minecraft.overlay ]; - services.minecraft-servers = { enable = true; eula = true;