overlays: Create overlays

This commit is contained in:
PapaTutuWawa 2021-08-24 11:36:15 +02:00
parent e3c5c694a6
commit 669c20a354
12 changed files with 46 additions and 71 deletions

View File

@ -1,9 +1,6 @@
{ config, pkgs, modulesPath, lib, ... }:
let
customPkgs = import ../packages/overlay.nix;
unstable = (import ../modules/unstable.nix config);
in {
{
imports = [
./generic.nix
../modules/hardware/generic.nix ../modules/hardware/bluetooth.nix ../modules/hardware/wifi.nix ../modules/hardware/video.nix ../modules/hardware/mobile.nix
@ -15,13 +12,11 @@ in {
];
nixpkgs.overlays = [
customPkgs
# Unstable, NUR, ...
(import ../overlays/unstable.nix pkgs)
(import ../overlays/nur.nix pkgs)
(import ../overlays/custom.nix pkgs)
];
nixpkgs.config.packageOverrides = pkgs: {
nur = (import ../modules/nur.nix pkgs);
unstable = unstable;
};
environment = {
systemPackages = with pkgs; [

View File

@ -1,9 +1,6 @@
{ config, pkgs, modulesPath, lib, ... }:
let
unstable = (import ../modules/unstable.nix config);
customPkgs = import ../packages/overlay.nix;
in {
{
imports = [
./generic.nix
../modules/hardware/generic.nix ../modules/hardware/video.nix
@ -17,14 +14,13 @@ in {
ref = "master";
rev = "ce0e9482d53d69bedc8416d8a984d00e17607826";
}))
customPkgs
# Unstable, NUR, ...
(import ../overlays/unstable.nix pkgs)
(import ../overlays/nur.nix pkgs)
(import ../overlays/custom.nix pkgs)
];
nixpkgs.config.packageOverrides = pkgs: {
nur = (import ../modules/nur.nix pkgs);
unstable = unstable;
};
environment = {
systemPackages = with pkgs; [
emacsPgtkGcc

View File

@ -1,8 +1,6 @@
{ config, pkgs, modulesPath, lib, fetchGit, ... }:
let
customPkgs = import ../packages/overlay.nix;
in {
{
imports = [
./generic.nix
../modules/hardware/generic.nix ../modules/hardware/video.nix ../modules/hardware/desktop.nix
@ -80,12 +78,9 @@ in {
})
# Unstable, NUR, ...
(final: prev: {
unstable = (import ../modules/unstable.nix config);
nur = (import ../modules/nur.nix pkgs);
})
customPkgs
(import ../overlays/unstable.nix pkgs)
(import ../overlays/nur.nix pkgs)
(import ../overlays/custom.nix pkgs)
];
security = {

View File

@ -1,7 +1,5 @@
{ config, ... }:
{ pkgs, ... }:
let
unstable = (import ../unstable.nix config);
in {
environment.systemPackages = [ unstable.mesa ];
{
environment.systemPackages = with pkgs; [ unstable.mesa ];
}

View File

@ -1,8 +0,0 @@
pkgs:
import (builtins.fetchTarball {
url = "https://github.com/nix-community/NUR/archive/master.tar.gz";
sha256 = "0r2pcc6sjxmhg1xxk23648wrwccv2c5v44cfwglx35az5y0hmr1f";
}) {
inherit pkgs;
}

View File

@ -1,8 +1,6 @@
{ pkgs, config, lib, ... }:
let
unstable = (import ../../unstable.nix config);
in {
{
config = {
environment = {
systemPackages = with pkgs; [
@ -10,7 +8,7 @@ in {
gnomeExtensions.appindicator
gnomeExtensions.caffeine
gnomeExtensions.gnome-40-ui-improvements
gnomeExtensionsCustom.notification-timeout # Custom package
gnomeExtensions.notification-timeout # Custom package
gnomeExtensions.application-volume-mixer
gnome.eog
gnome.nautilus

View File

@ -1,10 +0,0 @@
config:
let
unstableTarball =
fetchTarball
https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz;
in
import unstableTarball {
config = config.nixpkgs.config;
}

5
overlays/custom.nix Normal file
View File

@ -0,0 +1,5 @@
pkgs: final: prev:
import ../packages {
pkgs = prev;
}

10
overlays/nur.nix Normal file
View File

@ -0,0 +1,10 @@
pkgs: final: prev:
{
nur = import (builtins.fetchTarball {
url = "https://github.com/nix-community/NUR/archive/master.tar.gz";
sha256 = "0r2pcc6sjxmhg1xxk23648wrwccv2c5v44cfwglx35az5y0hmr1f";
}) {
inherit pkgs;
};
}

10
overlays/unstable.nix Normal file
View File

@ -0,0 +1,10 @@
# NOTE: pkgs is unused but there for consistency with nur.nix
pkgs: final: prev:
let
unstableTarball =
fetchTarball
https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz;
in {
unstable = import unstableTarball {};
}

View File

@ -5,7 +5,7 @@
key-mapper = pkgs.callPackage ./key-mapper { };
vfio-isolate = pkgs.callPackage ./vfio-isolate { };
mopidy-funkwhale = pkgs.callPackage ./mopidy-funkwhale {};
gnomeExtensions = {
gnomeExtensions = pkgs.gnomeExtensions // {
notification-timeout = pkgs.callPackage ./gnomeExtensions-notification-timeout {};
};
replaysorcery = pkgs.callPackage ./replaysorcery {};

View File

@ -1,14 +0,0 @@
self: super:
{
gamemode = super.callPackage ./gamemode {};
key-mapper = super.callPackage ./key-mapper {};
vfio-isolate = super.callPackage ./vfio-isolate {};
mopidy-funkwhale = super.callPackage ./mopidy-funkwhale {};
gnomeExtensionsCustom = {
notification-timeout = super.callPackage ./gnomeExtensions-notification-timeout {};
};
replaysorcery = super.callPackage ./replaysorcery {};
evdev-proxy = super.callPackage ./evdev-proxy {};
anime4k = super.callPackage ./anime4k {};
}