Apply overlay to unstable packages

This commit is contained in:
Paul-Henri Froidmont 2023-01-27 18:23:01 +01:00
parent bb57760151
commit 520e1423cd
Signed by: phfroidmont
GPG key ID: BE948AFD7E7873BE
3 changed files with 7 additions and 13 deletions

View file

@ -7,10 +7,11 @@
outputs = { self, home-manager, nixpkgs, nixpkgs-unstable }: outputs = { self, home-manager, nixpkgs, nixpkgs-unstable }:
let let
pkgs-unstable = nixpkgs-unstable.legacyPackages.x86_64-linux; system = "x86_64-linux";
commonModuleArgs = { pkgs, ... }: { commonModuleArgs = { pkgs, ... }: {
_module.args.pkgs-unstable = import nixpkgs-unstable { _module.args.pkgs-unstable = import nixpkgs-unstable {
inherit (pkgs.stdenv.targetPlatform) system; inherit (pkgs.stdenv.targetPlatform) system;
overlays = [ (import ./overlay.nix) ];
config.allowUnfreePredicate = pkg: builtins.elem (pkgs.lib.getName pkg) [ config.allowUnfreePredicate = pkg: builtins.elem (pkgs.lib.getName pkg) [
"corefonts" "corefonts"
"steam" "steam"
@ -22,7 +23,7 @@
in in
{ {
nixosConfigurations.nixos-desktop = nixpkgs.lib.nixosSystem { nixosConfigurations.nixos-desktop = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; inherit system;
specialArgs = { inherit nixpkgs; inherit nixpkgs-unstable; }; specialArgs = { inherit nixpkgs; inherit nixpkgs-unstable; };
modules = modules =
[ [
@ -33,7 +34,6 @@
./users ./users
( (
{ {
nixpkgs.overlays = [ (import ./overlay.nix { }) ];
networking.hostName = "nixos-desktop"; networking.hostName = "nixos-desktop";
# Allow to externally control MPD # Allow to externally control MPD
networking.firewall.allowedTCPPorts = [ 6600 ]; networking.firewall.allowedTCPPorts = [ 6600 ];
@ -47,7 +47,7 @@
}; };
nixosConfigurations.froidmpa-laptop = nixpkgs.lib.nixosSystem { nixosConfigurations.froidmpa-laptop = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; inherit system;
specialArgs = { inherit nixpkgs; inherit nixpkgs-unstable; }; specialArgs = { inherit nixpkgs; inherit nixpkgs-unstable; };
modules = modules =
[ [
@ -58,7 +58,6 @@
./users ./users
( (
{ {
nixpkgs.overlays = [ (import ./overlay.nix { }) ];
networking.hostName = "froidmpa-laptop"; networking.hostName = "froidmpa-laptop";
nix.registry.nixpkgs.flake = nixpkgs; nix.registry.nixpkgs.flake = nixpkgs;

View file

@ -1,4 +1,3 @@
{}:
final: prev: final: prev:
{ {
ncmpcpp = prev.ncmpcpp.override { visualizerSupport = true; }; ncmpcpp = prev.ncmpcpp.override { visualizerSupport = true; };

View file

@ -14,10 +14,6 @@
./froidmpa/vscode.nix ./froidmpa/vscode.nix
]; ];
nixpkgs = {
overlays = [ (import ../overlay.nix { }) ];
};
xsession = { xsession = {
enable = true; enable = true;
windowManager.xmonad = { windowManager.xmonad = {
@ -300,7 +296,7 @@
systemd.user.services.activitywatch = { systemd.user.services.activitywatch = {
Unit.Description = "Start ActivityWatch"; Unit.Description = "Start ActivityWatch";
Service.Type = "simple"; Service.Type = "simple";
Service.ExecStart = "${pkgs.activitywatch-bin}/bin/aw-server"; Service.ExecStart = "${pkgs-unstable.activitywatch-bin}/bin/aw-server";
Install.WantedBy = [ "default.target" ]; Install.WantedBy = [ "default.target" ];
Service.Restart = "on-failure"; Service.Restart = "on-failure";
Service.RestartSec = 5; Service.RestartSec = 5;
@ -308,7 +304,7 @@
systemd.user.services.activitywatch-afk = { systemd.user.services.activitywatch-afk = {
Unit.Description = "Start ActivityWatch AFK"; Unit.Description = "Start ActivityWatch AFK";
Service.Type = "simple"; Service.Type = "simple";
Service.ExecStart = "${pkgs.activitywatch-bin}/bin/aw-watcher-afk"; Service.ExecStart = "${pkgs-unstable.activitywatch-bin}/bin/aw-watcher-afk";
Install.WantedBy = [ "default.target" ]; Install.WantedBy = [ "default.target" ];
Service.Restart = "on-failure"; Service.Restart = "on-failure";
Service.RestartSec = 5; Service.RestartSec = 5;
@ -316,7 +312,7 @@
systemd.user.services.activitywatch-window = { systemd.user.services.activitywatch-window = {
Unit.Description = "Start ActivityWatch Window"; Unit.Description = "Start ActivityWatch Window";
Service.Type = "simple"; Service.Type = "simple";
Service.ExecStart = "${pkgs.activitywatch-bin}/bin/aw-watcher-window"; Service.ExecStart = "${pkgs-unstable.activitywatch-bin}/bin/aw-watcher-window";
Install.WantedBy = [ "default.target" ]; Install.WantedBy = [ "default.target" ];
Service.Restart = "on-failure"; Service.Restart = "on-failure";
Service.RestartSec = 5; Service.RestartSec = 5;