stuff
This commit is contained in:
parent
6cfa5e604e
commit
bf8bccb404
4
.envrc
4
.envrc
|
@ -18,9 +18,7 @@ fi
|
||||||
use flake .#envrc
|
use flake .#envrc
|
||||||
|
|
||||||
if test -s .remote.toml; then
|
if test -s .remote.toml; then
|
||||||
if ! command -v remote-init >/dev/null || ! command -v tomlq >/dev/null; then
|
use flake .#envrc-remote
|
||||||
use flake .#envrc-remote
|
|
||||||
fi
|
|
||||||
echo
|
echo
|
||||||
echo "Current remote: $(remote-host)"
|
echo "Current remote: $(remote-host)"
|
||||||
tomlq <.remote.toml '.hosts | to_entries[] | "remote-set \(.key+1) # -> \(.value.host)"' -r
|
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";
|
#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
|
#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)
|
# TODO: somehow make these private repos optional (a lazy fetch would be nice)
|
||||||
pbsds-papers.url = "git+ssh://git@github.com/pbsds/papers.git";
|
pbsds-papers.url = "git+ssh://git@github.com/pbsds/papers.git";
|
||||||
|
|
||||||
|
@ -48,9 +55,9 @@
|
||||||
disabledModules = [ "services/misc/polaris.nix" ];
|
disabledModules = [ "services/misc/polaris.nix" ];
|
||||||
imports = [ "${inputs.pr-polaris14}/nixos/modules/services/misc/polaris.nix" ];
|
imports = [ "${inputs.pr-polaris14}/nixos/modules/services/misc/polaris.nix" ];
|
||||||
nixpkgs.overlays = [(final: prev: { # TODO: nixpkgs.config.packageOverrides ?
|
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 = prev.callPackage "${inputs.pr-polaris14}/pkgs/servers/polaris" { };
|
||||||
polaris-web = prev.callPackage "${inputs.pr-polaris14}/pkgs/servers/polaris/web.nix" { };
|
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 {
|
mkConfig = hostname: system: modules: nixlib.nixosSystem {
|
||||||
|
@ -84,7 +91,7 @@
|
||||||
inherit inputs;
|
inherit inputs;
|
||||||
|
|
||||||
overlays.remote-exec = (final: prev: {
|
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:
|
packages = forAllSystems(system:
|
||||||
|
@ -125,7 +132,7 @@
|
||||||
pkgs.home-manager
|
pkgs.home-manager
|
||||||
pkgs.nix-output-monitor
|
pkgs.nix-output-monitor
|
||||||
];
|
];
|
||||||
encrc-remote = mkShell [
|
envrc-remote = mkShell [
|
||||||
remote-exec
|
remote-exec
|
||||||
pkgs.yq
|
pkgs.yq
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,26 +1,80 @@
|
||||||
{ config, pkgs, lib, inputs, ... }:
|
{ config, pkgs, lib, inputs, system, ... }:
|
||||||
let
|
let
|
||||||
# https://stackoverflow.com/a/60232211
|
# https://stackoverflow.com/a/60232211
|
||||||
nixpkgs-manual = import "${inputs.nixpkgs}/doc" { inherit pkgs; };
|
system = config.nixpkgs.system;
|
||||||
nixos-manual = (import "${inputs.nixpkgs}/nixos/release.nix" { inherit (inputs) nixpkgs; }).manualHTML.${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
|
in
|
||||||
{
|
{
|
||||||
services.docs-to-host.docs = [
|
services.docs-to-host.docs = [
|
||||||
{
|
{
|
||||||
dirname = "nix-manual";
|
dirname = "nix-manual";
|
||||||
path = "${pkgs.nix.doc}/share/doc/nix/manual";
|
path = "${pkgs.nix.doc}/share/doc/nix/manual";
|
||||||
desc = "Official nixpkgs manual";
|
desc = "Official Nix manual";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
dirname = "nixpkgs-manual";
|
dirname = "nixpkgs-manual";
|
||||||
basename= "manual.html";
|
basename= "manual.html";
|
||||||
path = "${nixpkgs-manual}/share/doc/nixpkgs";
|
path = "${mk-nixpkgs-manual inputs.nixpkgs}/share/doc/nixpkgs";
|
||||||
desc = "Official nixpkgs manual";
|
desc = "Official Nixpkgs manual";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
dirname = "nixos-manual";
|
dirname = "nixos-manual";
|
||||||
path = "${nixos-manual}/share/doc/nixos";
|
path = "${mk-nixos-manual inputs.nixpkgs}/share/doc/nixos";
|
||||||
desc = "Official Nixos manual";
|
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