From 8249e20585a9442715e42c831053dcfa890fbea4 Mon Sep 17 00:00:00 2001 From: John Locke Date: Sat, 23 Mar 2024 11:31:50 -0700 Subject: [PATCH] WIP - overlay in flake --- desktop/dev.nix | 5 ----- desktop/overlays.nix | 13 ------------- flake.nix | 30 +++++++++++++++++++----------- 3 files changed, 19 insertions(+), 29 deletions(-) delete mode 100644 desktop/overlays.nix diff --git a/desktop/dev.nix b/desktop/dev.nix index 9a9eb4f..e39e95e 100644 --- a/desktop/dev.nix +++ b/desktop/dev.nix @@ -1,10 +1,5 @@ {config, pkgs, lib, ...}: { - nixpkgs.config = { - packageOverrides = pkgs: { - inherit mergedPkgs; - }; - }; environment.systemPackages = with pkgs; [ ddev diff --git a/desktop/overlays.nix b/desktop/overlays.nix deleted file mode 100644 index 83a2eb6..0000000 --- a/desktop/overlays.nix +++ /dev/null @@ -1,13 +0,0 @@ -# overlays.nix - -{ self, nixpkgs, myNixpkgs }: - -let - myOverlay = final: prev: { - # Replace 'examplePackage' with the package you want to override - jetbrains.phpstorm = myNixpkgs.jetbrains.phpstorm; - }; -in -{ - overlays = [ myOverlay ]; -} diff --git a/flake.nix b/flake.nix index 90447b1..c2645ff 100644 --- a/flake.nix +++ b/flake.nix @@ -1,20 +1,28 @@ # /etc/nixos/flake.nix { inputs = { - # NOTE: Replace "nixos-23.11" with that which is in system.stateVersion of - # configuration.nix. You can also use latter versions if you wish to - # upgrade. nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; - # nixos-needsreboot.url = "https://flakehub.com/f/thefossguy/nixos-needsreboot/*.tar.gz"; }; - outputs = inputs@{ self, nixpkgs, ... }: { - # NOTE: 'nixos' is the default hostname set by the installer - nixosConfigurations.valhalla = nixpkgs.lib.nixosSystem { - # NOTE: Change this to aarch64-linux if you are on ARM - system = "x86_64-linux"; - modules = [ ./hosts/desktop/valhalla/configuration.nix ]; + outputs = { nixpkgs, ... }: + let + pkgs = import nixpkgs { system = "x86_64-linux"; + overlays = [ + ( final: prev: { + jetbrains.phpstorm = prev.jetbrains.phpstorm.overrideAttrs (old: { + src = prev.fetchFromGithub { + owner = "freelock"; + repo = "nixpkgs"; + rev = "b324cfea863d9191518b96774e1317a6d933075f"; + hash =""; + }; + }); + } ) + ]; + }; + in { + nixosConfigurations.valhalla = pkgs.nixos { + imports = [ ./hosts/desktop/valhalla/configuration.nix ]; }; - # environment.systemPackages = [nixos-needsreboot.packages.${nixpkgs.system}.default]; nixosConfigurations.katmai = nixpkgs.lib.nixosSystem { # NOTE: Change this to aarch64-linux if you are on ARM system = "x86_64-linux";