refactor: load overlays differently

This commit is contained in:
Benjamin Bädorf 2023-10-07 20:14:16 +02:00
parent 8ac779d9d3
commit f038ba8bf3
No known key found for this signature in database
GPG key ID: 4406E80E13CD656C
3 changed files with 46 additions and 38 deletions

View file

@ -59,6 +59,7 @@
./modules
./hosts
./users
./overlays
];
perSystem = args@{ system, pkgs, lib, config, ... }: {

View file

@ -3,7 +3,6 @@
inputs,
...
}: {
# Configuration common to all Linux systems
flake = {
nixosModules = rec {
arduino = import ./arduino;
@ -31,35 +30,7 @@
inputs.agenix.nixosModules.default
inputs.musnix.nixosModules.musnix
({ ... }: {
nixpkgs.overlays = [
(final: prev: {
nixd = inputs.nixpkgs-unstable.legacyPackages.${prev.system}.nixd;
cups-brother-hl3140cw = (import inputs.hl3140cw-arm {
system = prev.system;
config.allowUnfree = true;
}).cups-brother-hl3140cw;
factorio-headless = inputs.nixpkgs-master.legacyPackages.${prev.system}.factorio-headless;
paperless-ngx = inputs.nixpkgs-master.legacyPackages.${prev.system}.paperless-ngx;
waybar = inputs.nixpkgs-master.legacyPackages.${prev.system}.waybar;
element-desktop = inputs.nixpkgs-master.legacyPackages.${prev.system}.element-desktop;
signal-desktop = inputs.nixpkgs-master.legacyPackages.${prev.system}.signal-desktop;
scan2paperless = inputs.scan2paperless.legacyPackages.${prev.system}.scan2paperless;
adlist = inputs.adblock-unbound.packages.${prev.system};
})
] ++ (import ../overlays);
nix.nixPath = [
"nixpkgs=${inputs.nixpkgs}"
"nixos-config=${../lib/compat/nixos}"
"home-manager=${inputs.home-manager}"
];
})
self.nixosModules.overlays
self.nixosModules.core
self.nixosModules.crypto
self.nixosModules.nix

View file

@ -1,8 +1,44 @@
[
(import ../pkgs)
(import ./blesh.nix)
(import ./manix.nix)
(import ./rnix-lsp.nix)
(import ./neovim-plugins.nix)
(import ./signal-desktop.nix)
]
{
self,
inputs,
...
}: {
flake = {
nixosModules = rec {
overlays = ({ ... }: {
nixpkgs.overlays = [
(final: prev: {
nixd = inputs.nixpkgs-unstable.legacyPackages.${prev.system}.nixd;
cups-brother-hl3140cw = (import inputs.hl3140cw-arm {
system = prev.system;
config.allowUnfree = true;
}).cups-brother-hl3140cw;
factorio-headless = inputs.nixpkgs-master.legacyPackages.${prev.system}.factorio-headless;
paperless-ngx = inputs.nixpkgs-master.legacyPackages.${prev.system}.paperless-ngx;
waybar = inputs.nixpkgs-master.legacyPackages.${prev.system}.waybar;
element-desktop = inputs.nixpkgs-master.legacyPackages.${prev.system}.element-desktop;
signal-desktop = inputs.nixpkgs-master.legacyPackages.${prev.system}.signal-desktop;
scan2paperless = inputs.scan2paperless.legacyPackages.${prev.system}.scan2paperless;
adlist = inputs.adblock-unbound.packages.${prev.system};
})
(import ../pkgs)
(import ./blesh.nix)
(import ./manix.nix)
(import ./rnix-lsp.nix)
(import ./neovim-plugins.nix)
(import ./signal-desktop.nix)
];
nix.nixPath = [
"nixpkgs=${inputs.nixpkgs}"
"nixos-config=${../lib/compat/nixos}"
"home-manager=${inputs.home-manager}"
];
});
};
};
}