overlays to module

This commit is contained in:
Ivan Kirilov Dimitrov 2024-08-02 19:27:41 +02:00
parent 7e03c3f3f1
commit e1a429bdec
No known key found for this signature in database
GPG Key ID: 0BDAD4B211C49294
3 changed files with 18 additions and 11 deletions

View File

@ -1,20 +1,13 @@
top@{ inputs, ... }: {
imports = [ ./nixos ./home ./packages ];
imports = [ ./nixos ./home ./packages ./overlays ];
systems = [ "x86_64-linux" ];
flake.stateVersion = "24.05";
perSystem = perSystem@{ config, system, ... }: {
perSystem = perSystem@{ system, ... }: {
config._module.args = {
pkgs = import inputs.nixpkgs {
inherit system;
overlays = [
(final: prev: {
nvim = config.packages.nvim;
bingwp = config.packages.bingwp;
screenshot = config.packages.screenshot;
cursors = config.packages.cursors;
wpd = config.packages.wpd;
})
inputs.sal.overlays.default
top.config.flake.overlays.default
];
};
};

View File

@ -18,7 +18,7 @@ top@{ moduleWithSystem, ... }: {
i18n.supportedLocales = [ "all" ];
time.timeZone = "Europe/Prague";
environment = {
systemPackages = with pkgs; [ cmatrix uutils-coreutils-noprefix cryptsetup fd file git glibc gnumake mlocate openssh openssl procs ripgrep srm unzip vim zip just ];
systemPackages = with pkgs; [ wpd cmatrix uutils-coreutils-noprefix cryptsetup fd file git glibc gnumake mlocate openssh openssl procs ripgrep srm unzip vim zip just ];
sessionVariables = { MAKEFLAGS = "-j 4"; };
shells = with pkgs; [ bash zsh nushell ];
};

14
overlays/default.nix Normal file
View File

@ -0,0 +1,14 @@
top@{ inputs, withSystem, ... }: {
flake.overlays.default = final: prev:
let system = prev.stdenv.hostPlatform.system; in
withSystem system (
{ config, ... }: {
nvim = config.packages.nvim;
bingwp = config.packages.bingwp;
screenshot = config.packages.screenshot;
cursors = config.packages.cursors;
wpd = config.packages.wpd;
sal = inputs.sal.packages.${system}.default;
}
);
}