File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{
22 inputs = {
3+ cache-server = {
4+ flake = false ;
5+ url = "github:icedos/cache-server" ;
6+ } ;
7+
38 nixpkgs . url = "github:NixOS/nixpkgs/nixpkgs-unstable" ;
49 } ;
510
Original file line number Diff line number Diff line change 1+ { config , lib , ... } :
2+
3+ let
4+ inherit ( lib ) mkIf ;
5+ inherit ( config . icedos . system . cache ) enable key url priority ;
6+ in
7+ {
8+ nix . settings = mkIf enable {
9+ substituters = [ "${ url } ?priority=${ toString priority } " ] ;
10+ trusted-public-keys = [ key ] ;
11+ } ;
12+ }
Original file line number Diff line number Diff line change 66} :
77
88let
9- inherit ( lib ) types ;
9+ inherit ( lib ) readFile types ;
1010
1111 inherit ( icedosLib )
1212 mkBoolOption
9090 resolution = mkStrOption { default = "1920x1080" ; } ;
9191 } ;
9292
93+ cache = {
94+ enable = mkBoolOption { default = true ; } ;
95+ url = mkStrOption { default = "https://icedos.mirrors.knp.one" ; } ;
96+ key = mkStrOption { default = readFile "${ inputs . icedos-core . inputs . cache-server } /nix-public.pem" ; } ;
97+ priority = mkNumberOption { default = 100 ; } ;
98+ } ;
99+
93100 channels = mkSubmoduleListOption { default = [ ] ; } {
94101 name = mkStrOption { } ;
95102 url = mkStrOption { } ;
You can’t perform that action at this time.
0 commit comments