mirror of
https://github.com/divnix/digga.git
synced 2024-12-26 09:34:15 +03:00
5e0ca31d02
Now you can add packages to the list in pkgs/override.nix and they will be pulled in from nixpkgs master instead of the default NixOS flake when installed.
77 lines
1.6 KiB
Nix
77 lines
1.6 KiB
Nix
{ home
|
|
, lib
|
|
, nixos
|
|
, master
|
|
, pkgset
|
|
, self
|
|
, system
|
|
, utils
|
|
, ...
|
|
}:
|
|
let
|
|
inherit (utils) recImport;
|
|
inherit (builtins) attrValues removeAttrs;
|
|
inherit (pkgset) osPkgs pkgs;
|
|
|
|
config = hostName:
|
|
lib.nixosSystem {
|
|
inherit system;
|
|
|
|
modules =
|
|
let
|
|
inherit (home.nixosModules) home-manager;
|
|
|
|
core = self.nixosModules.profiles.core;
|
|
|
|
global = {
|
|
networking.hostName = hostName;
|
|
nix.nixPath = let path = toString ../.; in
|
|
[
|
|
"nixpkgs=${master}"
|
|
"nixos=${nixos}"
|
|
"nixos-config=${path}/configuration.nix"
|
|
"nixpkgs-overlays=${path}/overlays"
|
|
];
|
|
|
|
nixpkgs = { pkgs = osPkgs; };
|
|
|
|
nix.registry = {
|
|
nixos.flake = nixos;
|
|
nixflk.flake = self;
|
|
nixpkgs.flake = master;
|
|
};
|
|
};
|
|
|
|
overrides = {
|
|
# use latest systemd
|
|
systemd.package = pkgs.systemd;
|
|
|
|
nixpkgs.overlays =
|
|
let
|
|
override = import ../pkgs/override.nix pkgs;
|
|
|
|
overlay = pkg: final: prev: {
|
|
inherit pkg;
|
|
};
|
|
in
|
|
map overlay override;
|
|
};
|
|
|
|
local = import "${toString ./.}/${hostName}.nix";
|
|
|
|
# Everything in `./modules/list.nix`.
|
|
flakeModules =
|
|
attrValues (removeAttrs self.nixosModules [ "profiles" ]);
|
|
|
|
in
|
|
flakeModules ++ [ core global local home-manager overrides ];
|
|
|
|
};
|
|
|
|
hosts = recImport {
|
|
dir = ./.;
|
|
_import = config;
|
|
};
|
|
in
|
|
hosts
|