stuff
This commit is contained in:
parent
6cfa5e604e
commit
bf8bccb404
4
.envrc
4
.envrc
|
@ -18,9 +18,7 @@ fi
|
|||
use flake .#envrc
|
||||
|
||||
if test -s .remote.toml; then
|
||||
if ! command -v remote-init >/dev/null || ! command -v tomlq >/dev/null; then
|
||||
use flake .#envrc-remote
|
||||
fi
|
||||
use flake .#envrc-remote
|
||||
echo
|
||||
echo "Current remote: $(remote-host)"
|
||||
tomlq <.remote.toml '.hosts | to_entries[] | "remote-set \(.key+1) # -> \(.value.host)"' -r
|
||||
|
|
13
flake.nix
13
flake.nix
|
@ -15,6 +15,13 @@
|
|||
#sops-nix.inputs.nixpkgs.follows = "nixpkgs";
|
||||
#matrix-next.url = "github:dali99/nixos-matrix-modules"; # see https://git.pvv.ntnu.no/Drift/pvv-nixos-config/src/main/flake.nix
|
||||
|
||||
# used to host old docs
|
||||
#nixpkgs-22.url = "github:NixOS/nixpkgs/nixos-22.11";
|
||||
#nixpkgs-21.url = "github:NixOS/nixpkgs/nixos-21.11";
|
||||
#nixpkgs-20.url = "github:NixOS/nixpkgs/nixos-20.09";
|
||||
#nixpkgs-19.url = "github:NixOS/nixpkgs/nixos-19.09";
|
||||
#nixpkgs-19.flake = false; # Earlier versions are not pure
|
||||
|
||||
# TODO: somehow make these private repos optional (a lazy fetch would be nice)
|
||||
pbsds-papers.url = "git+ssh://git@github.com/pbsds/papers.git";
|
||||
|
||||
|
@ -48,9 +55,9 @@
|
|||
disabledModules = [ "services/misc/polaris.nix" ];
|
||||
imports = [ "${inputs.pr-polaris14}/nixos/modules/services/misc/polaris.nix" ];
|
||||
nixpkgs.overlays = [(final: prev: { # TODO: nixpkgs.config.packageOverrides ?
|
||||
remote-exec = prev.python3Packages.callPackage "${inputs.pr-remote-exec}/pkgs/tools/misc/remote-exec" { };
|
||||
polaris = prev.callPackage "${inputs.pr-polaris14}/pkgs/servers/polaris" { };
|
||||
polaris-web = prev.callPackage "${inputs.pr-polaris14}/pkgs/servers/polaris/web.nix" { };
|
||||
remote-exec = prev.python3Packages.callPackage "${inputs.pr-remote-exec}/pkgs/tools/misc/remote-exec" { };
|
||||
})];
|
||||
};
|
||||
mkConfig = hostname: system: modules: nixlib.nixosSystem {
|
||||
|
@ -84,7 +91,7 @@
|
|||
inherit inputs;
|
||||
|
||||
overlays.remote-exec = (final: prev: {
|
||||
remote-exec = prev.python3Packages.callPackage ( inputs.pr-remote-exec + "/pkgs/tools/misc/remote-exec" ) {};
|
||||
remote-exec = prev.python3Packages.callPackage "${inputs.pr-remote-exec}/pkgs/tools/misc/remote-exec" {};
|
||||
});
|
||||
|
||||
packages = forAllSystems(system:
|
||||
|
@ -125,7 +132,7 @@
|
|||
pkgs.home-manager
|
||||
pkgs.nix-output-monitor
|
||||
];
|
||||
encrc-remote = mkShell [
|
||||
envrc-remote = mkShell [
|
||||
remote-exec
|
||||
pkgs.yq
|
||||
];
|
||||
|
|
|
@ -1,26 +1,80 @@
|
|||
{ config, pkgs, lib, inputs, ... }:
|
||||
{ config, pkgs, lib, inputs, system, ... }:
|
||||
let
|
||||
# https://stackoverflow.com/a/60232211
|
||||
nixpkgs-manual = import "${inputs.nixpkgs}/doc" { inherit pkgs; };
|
||||
nixos-manual = (import "${inputs.nixpkgs}/nixos/release.nix" { inherit (inputs) nixpkgs; }).manualHTML.${config.nixpkgs.system};
|
||||
system = config.nixpkgs.system;
|
||||
|
||||
#mk-nixpkgs-manual = input: import "${input}/doc" { pkgs = import input { inherit system; }; };
|
||||
mk-nixpkgs-manual = input: (import "${input}/pkgs/top-level/release.nix" { nixpkgs = import input { inherit system; }; }).manual;
|
||||
mk-nixos-manual = input: (import "${input}/nixos/release.nix" { nixpkgs = import input { inherit system; }; }).manualHTML.${system};
|
||||
|
||||
in
|
||||
{
|
||||
services.docs-to-host.docs = [
|
||||
{
|
||||
dirname = "nix-manual";
|
||||
path = "${pkgs.nix.doc}/share/doc/nix/manual";
|
||||
desc = "Official nixpkgs manual";
|
||||
desc = "Official Nix manual";
|
||||
}
|
||||
{
|
||||
dirname = "nixpkgs-manual";
|
||||
basename= "manual.html";
|
||||
path = "${nixpkgs-manual}/share/doc/nixpkgs";
|
||||
desc = "Official nixpkgs manual";
|
||||
path = "${mk-nixpkgs-manual inputs.nixpkgs}/share/doc/nixpkgs";
|
||||
desc = "Official Nixpkgs manual";
|
||||
}
|
||||
{
|
||||
dirname = "nixos-manual";
|
||||
path = "${nixos-manual}/share/doc/nixos";
|
||||
path = "${mk-nixos-manual inputs.nixpkgs}/share/doc/nixos";
|
||||
desc = "Official Nixos manual";
|
||||
}
|
||||
# == Old Nixpkgs manuals ==
|
||||
/** /
|
||||
{
|
||||
dirname = "nixpkgs-manual-22.11";
|
||||
basename= "manual.html";
|
||||
path = "${mk-nixpkgs-manual inputs.nixpkgs-22}/share/doc/nixpkgs";
|
||||
desc = "Official Nixpkgs 22.11 manual";
|
||||
}
|
||||
{
|
||||
dirname = "nixpkgs-manual-21.11";
|
||||
basename= "manual.html";
|
||||
path = "${mk-nixpkgs-manual inputs.nixpkgs-21}/share/doc/nixpkgs";
|
||||
desc = "Official Nixpkgs 21.11 manual";
|
||||
}
|
||||
{
|
||||
dirname = "nixpkgs-manual-20.09";
|
||||
basename= "manual.html";
|
||||
path = "${mk-nixpkgs-manual inputs.nixpkgs-20}/share/doc/nixpkgs";
|
||||
desc = "Official Nixpkgs 20.09 manual";
|
||||
}
|
||||
{
|
||||
dirname = "nixpkgs-manual-19.09";
|
||||
basename= "manual.html";
|
||||
path = "${mk-nixpkgs-manual inputs.nixpkgs-19}/share/doc/nixpkgs";
|
||||
desc = "Official Nixpkgs 19.09 manual";
|
||||
}
|
||||
/**/
|
||||
# == Old Nixos manuals ==
|
||||
/** /
|
||||
{
|
||||
dirname = "nixos-manual-22.11";
|
||||
path = "${mk-nixos-manual inputs.nixpkgs-22}/share/doc/nixos";
|
||||
desc = "Official Nixos 22.11 manual";
|
||||
}
|
||||
{
|
||||
dirname = "nixos-manual-21.11";
|
||||
path = "${mk-nixos-manual inputs.nixpkgs-21}/share/doc/nixos";
|
||||
desc = "Official Nixos 21.11 manual";
|
||||
}
|
||||
{
|
||||
dirname = "nixos-manual-20.09";
|
||||
path = "${mk-nixos-manual inputs.nixpkgs-20}/share/doc/nixos";
|
||||
desc = "Official Nixos 20.09 manual";
|
||||
}
|
||||
{
|
||||
dirname = "nixos-manual-19.09";
|
||||
path = "${mk-nixos-manual inputs.nixpkgs-19}/share/doc/nixos";
|
||||
desc = "Official Nixos 19.09 manual";
|
||||
}
|
||||
/**/
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue