flake: add overlays and minimal devShell
inspired by 1cbeaa156b/profiles/base/default.nix
This commit is contained in:
parent
bcf415bcec
commit
5cb55e9805
|
@ -1,6 +1,8 @@
|
|||
{ pkgs, config, ... }:
|
||||
{ lib, pkgs, config, ... }:
|
||||
|
||||
{
|
||||
# take overlays from flake
|
||||
nixpkgs.overlays = lib.attrValues config.inputInjection.flake-inputs.self.overlays;
|
||||
# List packages installed in system profile.
|
||||
environment.systemPackages = with pkgs; [
|
||||
wget
|
||||
|
|
18
flake.nix
18
flake.nix
|
@ -26,10 +26,10 @@
|
|||
};
|
||||
|
||||
outputs =
|
||||
{ self, nixpkgs, nur, lanzaboote, flake-utils, home-manager, ... }@inputs:
|
||||
{ self, nixpkgs, nur, lanzaboote, utils, home-manager, ... }@inputs:
|
||||
let
|
||||
# FIXME: allow different systems
|
||||
systems = flake-utils.lib.system;
|
||||
systems = utils.lib.system;
|
||||
# necessary to make the top-level inputs available to system configuration
|
||||
# inspired by https://jade.fyi/blog/flakes-arent-real/
|
||||
inputInjection = {pkgs, lib, ...}: {
|
||||
|
@ -74,10 +74,24 @@
|
|||
};
|
||||
in
|
||||
{
|
||||
overlays.default = import ./packages;
|
||||
nixosConfigurations = {
|
||||
thinknix = mkSystem systems.x86_64-linux [ ./hosts/thinknix inputs.nixos-hardware.nixosModules.lenovo-thinkpad-t440s lanzaboote.nixosModules.lanzaboote ];
|
||||
framenix = mkSystem systems.x86_64-linux [ ./hosts/framenix inputs.nixos-hardware.nixosModules.framework-13-7040-amd lanzaboote.nixosModules.lanzaboote ];
|
||||
};
|
||||
homeConfigurations.spiollinux = mkHomeManager "spiollinux" "spiollinux" systems.x86_64-linux;
|
||||
} // utils.lib.eachDefaultSystem(system:
|
||||
let
|
||||
nixpkgs = import inputs.nixpkgs {
|
||||
inherit system;
|
||||
overlays = nixpkgs.lib.attrValues self.overlays;
|
||||
};
|
||||
pkgs = inputs.nixpkgs.legacyPackages.${system};
|
||||
in {
|
||||
devShells.default = pkgs.mkShell {
|
||||
buildInputs = [];
|
||||
};
|
||||
# expose nixpkgs with overlay; TODO: figure out role of config
|
||||
#legacyPackages = nixpkgs;
|
||||
});
|
||||
}
|
||||
|
|
2
packages/default.nix
Normal file
2
packages/default.nix
Normal file
|
@ -0,0 +1,2 @@
|
|||
final: prev: {
|
||||
}
|
Loading…
Reference in a new issue