Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ while [[ $# -gt 0 ]]; do
export_full_config=1
shift
;;
--genflake-only)
genflake_only=1
shift
;;
--update)
update_all="1"
update_core="1"
Expand Down Expand Up @@ -187,6 +191,13 @@ elif [ "$update_repos_inputs" == "1" ]; then
)
fi

# Stop after the flake (and its lock) have been generated, without
# building anything. Lets callers evaluate the generated flake (e.g. to
# query per-package output paths) without realising the system closure.
if [ "$genflake_only" == "1" ]; then
exit 0
fi

if [ "$export_full_config" == "1" ]; then
(
cd "$ICEDOS_STATE_DIR"
Expand Down
5 changes: 5 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
inputs = {
cache-server = {
flake = false;
url = "github:icedos/cache-server";
};

nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
};

Expand Down
12 changes: 12 additions & 0 deletions modules/cache.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{ config, lib, ... }:

let
inherit (lib) mkIf;
inherit (config.icedos.system.cache) enable key url;
in
{
nix.settings = mkIf enable {
substituters = [ url ];
trusted-public-keys = [ key ];
};
}
8 changes: 7 additions & 1 deletion modules/options.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
}:

let
inherit (lib) types;
inherit (lib) readFile types;

inherit (icedosLib)
mkBoolOption
Expand Down Expand Up @@ -90,6 +90,12 @@ in
resolution = mkStrOption { default = "1920x1080"; };
};

cache = {
enable = mkBoolOption { default = true; };
key = mkStrOption { default = readFile "${inputs.icedos-core.inputs.cache-server}/nix-public.pem"; };
url = mkStrOption { default = "https://icedos.mirrors.knp.one"; };
};

channels = mkSubmoduleListOption { default = [ ]; } {
name = mkStrOption { };
url = mkStrOption { };
Expand Down