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+
6+ inherit ( config . icedos . system . cache )
7+ enable
8+ key
9+ url
10+ priority
11+ ;
12+ in
13+ {
14+ nix . settings = mkIf enable {
15+ substituters = [ "${ url } ?priority=${ toString priority } " ] ;
16+ trusted-public-keys = [ key ] ;
17+ } ;
18+ }
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/icedos" ; } ;
96+
97+ key = mkStrOption {
98+ default = readFile "${ inputs . icedos-core . inputs . cache-server } /nix-public.pem" ;
99+ } ;
100+
101+ priority = mkNumberOption { default = 100 ; } ;
102+ } ;
103+
93104 channels = mkSubmoduleListOption { default = [ ] ; } {
94105 name = mkStrOption { } ;
95106 url = mkStrOption { } ;
You can’t perform that action at this time.
0 commit comments