pbsdspkgs

This commit is contained in:
Peder Bergebakken Sundt 2024-10-09 16:43:52 +02:00
parent bd765031de
commit 1341d9d719
3 changed files with 31 additions and 17 deletions

View File

@ -12,7 +12,9 @@
(ifExists ./hardware-configuration.nix )
];
nixpkgs.overlays = [ (import ./overlay.nix) ];
nixpkgs.overlays = [
(import ./overlays/wl-clipboard-timeout.nix)
];
nixpkgs.config.permittedInsecurePackages = [
pkgs.pulsar.name

View File

@ -183,9 +183,13 @@
networking.domain = domain;
networking.search = [ domain ];
nixpkgs.overlays = [
self.overlays.pbsdspkgs
(final: prev: {
#unstable = unstable.legacyPackages.${final.system};
unstable = import inputs.unstable { inherit system; config.allowUnfree = true; }; # TODO: inherit nixos config from stable
unstable = import inputs.unstable {
inherit system;
config = final.pkgs.config;
};
})
];
# This makes commandline tools like 'nix run nixpkgs#hello'
@ -290,14 +294,9 @@
nixosConfigurations = mkHosts (mkConfig []);
nixosReports = mkHosts (mkReport []);
# TODO: overlays
packages = forAllSystems ({ inputs, pkgs, lib, ... }: let
# TODO: by-name
mk-nspawn-setup = hostname: # TODO: nspawn-tarball.nix populates /etc/nixos with junk
(pkgs.callPackage ./pkgs/mk-nspawn-setup {})
(mkHosts (mkConfig [ "${nixos-nspawn}/nspawn-tarball.nix" ])).${hostname};
in {
overlays = {
pbsdspkgs = pkgs: prev: let inherit (pkgs) lib; in {
pbsds = lib.makeScope pkgs.newScope (pbsds: {
# TODO: get faketty to work, ${expect}/bin/unbuffer is bad
nixos-rebuild-nom = pkgs.writeScriptBin "nixos-rebuild" ''
if test -t 1 && test -z "''${NIX_NO_NOM-}"; then
@ -310,7 +309,20 @@
device-mon = pkgs.callPackage ./pkgs/device-mon {};
#pdoc-docs = (pkgs.callPackage ./pkgs/pdocs.nix {}).pdocs;
#pdoc3-docs = (pkgs.callPackage ./pkgs/pdocs.nix {}).pdocs3;
});
};
wl-clipboard-timeout = ./overlays/wl-clipboard-timeout.nix;
default = self.overlays.pbsdspkgs;
};
packages = forAllSystems ({ inputs, pkgs, lib, ... }: let
# TODO: by-name
mk-nspawn-setup = hostname: # TODO: nspawn-tarball.nix populates /etc/nixos with junk
(pkgs.callPackage ./pkgs/mk-nspawn-setup {})
(mkHosts (mkConfig [ "${nixos-nspawn}/nspawn-tarball.nix" ])).${hostname};
pbsdspkgs = lib.filterAttrs (name: value: lib.isDerivation value) (self.overlays.pbsdspkgs pkgs null).pbsds;
in
pbsdspkgs // {
nspawn-setup-brumlebasse = mk-nspawn-setup "brumlebasse";
image-brumlebasse-openstack = nixos-generators-2311.nixosGenerate {
system = "x86_64-linux";