Flake: apply patch to nixpkgs-unstable
This feels really dirty, but it works and it's less effort that switching to something like flake-utils that can do this for you
This commit is contained in:
parent
ea3870aa6e
commit
b4020d4316
2 changed files with 50 additions and 21 deletions
29
flake.lock
generated
29
flake.lock
generated
|
|
@ -26,7 +26,7 @@
|
||||||
"catppuccin-vsc": {
|
"catppuccin-vsc": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs-unstable"
|
"nixpkgs-unstable-raw"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
|
|
@ -101,7 +101,7 @@
|
||||||
"home-manager-unstable": {
|
"home-manager-unstable": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs-unstable"
|
"nixpkgs-unstable-raw"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
|
|
@ -143,7 +143,7 @@
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nix-github-actions": "nix-github-actions",
|
"nix-github-actions": "nix-github-actions",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs-unstable"
|
"nixpkgs-unstable-raw"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
|
|
@ -236,7 +236,7 @@
|
||||||
"nix-index-db-unstable": {
|
"nix-index-db-unstable": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs-unstable"
|
"nixpkgs-unstable-raw"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
|
|
@ -284,7 +284,19 @@
|
||||||
"type": "indirect"
|
"type": "indirect"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-unstable": {
|
"nixpkgs-pr280779": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"narHash": "sha256-eP6JaUafbs7ulve2jOsidJKM28bKzcLgoQ4WKXN1k4I=",
|
||||||
|
"type": "file",
|
||||||
|
"url": "https://github.com/NixOS/nixpkgs/pull/280779.patch"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "file",
|
||||||
|
"url": "https://github.com/NixOS/nixpkgs/pull/280779.patch"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs-unstable-raw": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1704722960,
|
"lastModified": 1704722960,
|
||||||
"narHash": "sha256-mKGJ3sPsT6//s+Knglai5YflJUF2DGj7Ai6Ynopz0kI=",
|
"narHash": "sha256-mKGJ3sPsT6//s+Knglai5YflJUF2DGj7Ai6Ynopz0kI=",
|
||||||
|
|
@ -305,7 +317,7 @@
|
||||||
"home-manager-unstable"
|
"home-manager-unstable"
|
||||||
],
|
],
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs-unstable"
|
"nixpkgs-unstable-raw"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
|
|
@ -335,7 +347,8 @@
|
||||||
"nix-index-db-unstable": "nix-index-db-unstable",
|
"nix-index-db-unstable": "nix-index-db-unstable",
|
||||||
"nixos-hardware": "nixos-hardware",
|
"nixos-hardware": "nixos-hardware",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
"nixpkgs-pr280779": "nixpkgs-pr280779",
|
||||||
|
"nixpkgs-unstable-raw": "nixpkgs-unstable-raw",
|
||||||
"plasma-manager": "plasma-manager",
|
"plasma-manager": "plasma-manager",
|
||||||
"vscode-extensions": "vscode-extensions"
|
"vscode-extensions": "vscode-extensions"
|
||||||
}
|
}
|
||||||
|
|
@ -375,7 +388,7 @@
|
||||||
"flake-compat": "flake-compat",
|
"flake-compat": "flake-compat",
|
||||||
"flake-utils": "flake-utils",
|
"flake-utils": "flake-utils",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs-unstable"
|
"nixpkgs-unstable-raw"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
|
|
|
||||||
42
flake.nix
42
flake.nix
|
|
@ -3,7 +3,12 @@
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "nixpkgs/nixos-23.11";
|
nixpkgs.url = "nixpkgs/nixos-23.11";
|
||||||
nixpkgs-unstable.url = "nixpkgs/nixos-unstable";
|
nixpkgs-unstable-raw.url = "nixpkgs/nixos-unstable";
|
||||||
|
|
||||||
|
nixpkgs-pr280779 = {
|
||||||
|
url = "file+https://github.com/NixOS/nixpkgs/pull/280779.patch";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
|
||||||
agenix = {
|
agenix = {
|
||||||
url = "github:ryantm/agenix";
|
url = "github:ryantm/agenix";
|
||||||
|
|
@ -20,14 +25,14 @@
|
||||||
|
|
||||||
home-manager-unstable = {
|
home-manager-unstable = {
|
||||||
url = "github:nix-community/home-manager/";
|
url = "github:nix-community/home-manager/";
|
||||||
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
inputs.nixpkgs.follows = "nixpkgs-unstable-raw";
|
||||||
};
|
};
|
||||||
|
|
||||||
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
||||||
|
|
||||||
jovian = {
|
jovian = {
|
||||||
url = "github:Jovian-Experiments/Jovian-NixOS";
|
url = "github:Jovian-Experiments/Jovian-NixOS";
|
||||||
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
inputs.nixpkgs.follows = "nixpkgs-unstable-raw";
|
||||||
};
|
};
|
||||||
|
|
||||||
nix-impermanence.url = "github:nix-community/impermanence";
|
nix-impermanence.url = "github:nix-community/impermanence";
|
||||||
|
|
@ -43,30 +48,41 @@
|
||||||
|
|
||||||
nix-index-db-unstable = {
|
nix-index-db-unstable = {
|
||||||
url = "github:Mic92/nix-index-database";
|
url = "github:Mic92/nix-index-database";
|
||||||
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
inputs.nixpkgs.follows = "nixpkgs-unstable-raw";
|
||||||
};
|
};
|
||||||
|
|
||||||
plasma-manager = {
|
plasma-manager = {
|
||||||
url = "github:pjones/plasma-manager";
|
url = "github:pjones/plasma-manager";
|
||||||
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
inputs.nixpkgs.follows = "nixpkgs-unstable-raw";
|
||||||
inputs.home-manager.follows = "home-manager-unstable";
|
inputs.home-manager.follows = "home-manager-unstable";
|
||||||
};
|
};
|
||||||
|
|
||||||
catppuccin-vsc = {
|
catppuccin-vsc = {
|
||||||
url = "github:catppuccin/vscode";
|
url = "github:catppuccin/vscode";
|
||||||
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
inputs.nixpkgs.follows = "nixpkgs-unstable-raw";
|
||||||
};
|
};
|
||||||
|
|
||||||
vscode-extensions = {
|
vscode-extensions = {
|
||||||
url = "github:nix-community/nix-vscode-extensions";
|
url = "github:nix-community/nix-vscode-extensions";
|
||||||
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
inputs.nixpkgs.follows = "nixpkgs-unstable-raw";
|
||||||
|
|
||||||
};
|
};
|
||||||
nix-flatpak.url = github:gmodena/nix-flatpak/main;
|
nix-flatpak.url = github:gmodena/nix-flatpak/main;
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { ... } @inputs: with inputs; {
|
outputs = { ... } @inputs: with inputs;
|
||||||
|
# Patch nixpkgs
|
||||||
|
# https://ertt.ca/nix/patch-nixpkgs/
|
||||||
|
let
|
||||||
|
nixpkgs-unstable-patched = nixpkgs.legacyPackages.x86_64-linux.applyPatches {
|
||||||
|
name = "patched-nixpkgs-unstable";
|
||||||
|
src = nixpkgs-unstable-raw;
|
||||||
|
patches = [ nixpkgs-pr280779 ];
|
||||||
|
};
|
||||||
|
# https://discourse.nixos.org/t/proper-way-of-applying-patch-to-system-managed-via-flake/21073/26
|
||||||
|
nixpkgs-unstable = (import "${nixpkgs-unstable-patched}/flake.nix").outputs { self = inputs.self; };
|
||||||
|
in
|
||||||
|
{
|
||||||
devShells.x86_64-linux.default = nixpkgs.legacyPackages.x86_64-linux.mkShell {
|
devShells.x86_64-linux.default = nixpkgs.legacyPackages.x86_64-linux.mkShell {
|
||||||
name = "Environment for toast's nixos configurations";
|
name = "Environment for toast's nixos configurations";
|
||||||
# The agenix cli is not needed to activate a configuration, so instead of installing it
|
# The agenix cli is not needed to activate a configuration, so instead of installing it
|
||||||
|
|
@ -82,7 +98,7 @@
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
packages = {
|
packages = {
|
||||||
x86_64-linux = with import nixpkgs-unstable { system = "x86_64-linux"; }; {
|
x86_64-linux = with import nixpkgs-unstable-raw { system = "x86_64-linux"; }; {
|
||||||
pseint = callPackage ./pkgs/pseint.nix {};
|
pseint = callPackage ./pkgs/pseint.nix {};
|
||||||
anything-sync-daemon = callPackage ./pkgs/anything-sync-daemon {};
|
anything-sync-daemon = callPackage ./pkgs/anything-sync-daemon {};
|
||||||
discord-krisp-fixer = callPackage ./pkgs/discord-krisp-fixer {};
|
discord-krisp-fixer = callPackage ./pkgs/discord-krisp-fixer {};
|
||||||
|
|
@ -91,7 +107,7 @@
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
Archie = nixpkgs-unstable.lib.nixosSystem {
|
Archie = nixpkgs-unstable.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
specialArgs = { systemPkgs = inputs.nixpkgs-unstable; flakeSelf = self; };
|
specialArgs = { systemPkgs = inputs.nixpkgs-unstable-raw; flakeSelf = self; };
|
||||||
/*
|
/*
|
||||||
I used to set up nixpkgs in the flake, but doing that made
|
I used to set up nixpkgs in the flake, but doing that made
|
||||||
defining overlays in modules impossible (or at least I could
|
defining overlays in modules impossible (or at least I could
|
||||||
|
|
@ -113,7 +129,7 @@
|
||||||
|
|
||||||
SurfaceGo = nixpkgs-unstable.lib.nixosSystem {
|
SurfaceGo = nixpkgs-unstable.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
specialArgs = { systemPkgs = inputs.nixpkgs-unstable; flakeSelf = self; };
|
specialArgs = { systemPkgs = inputs.nixpkgs-unstable-raw; flakeSelf = self; };
|
||||||
modules = [
|
modules = [
|
||||||
agenix.nixosModules.default
|
agenix.nixosModules.default
|
||||||
home-manager-unstable.nixosModule
|
home-manager-unstable.nixosModule
|
||||||
|
|
@ -128,7 +144,7 @@
|
||||||
|
|
||||||
SteamDeck = nixpkgs-unstable.lib.nixosSystem {
|
SteamDeck = nixpkgs-unstable.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
specialArgs = { systemPkgs = inputs.nixpkgs-unstable; flakeSelf = self; };
|
specialArgs = { systemPkgs = inputs.nixpkgs-unstable-raw; flakeSelf = self; };
|
||||||
modules = [
|
modules = [
|
||||||
agenix.nixosModules.default
|
agenix.nixosModules.default
|
||||||
jovian.nixosModules.default
|
jovian.nixosModules.default
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue