-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathold.txt
1630 lines (915 loc) · 37.5 KB
/
old.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
optionalAttrs = bool: attrs:
if bool
then attrs
else {};
##################################################
# Makefile Directives
##################################################
.EXPORT_ALL_VARIABLES:
SHELL=bash
##################################################
# Makefile Settings
##################################################
# Programs...
TEX ?=xelatex -file-line-error -interaction=nonstopmode
CP ?=cp "--no-preserve=mode,ownership"
RM ?=rm
NIX ?="nix"
NIX_EVAL ?=nix-instantiate --eval
NIX_BUILD ?=nix-build --show-trace
NIX_REPL ?=$(NIX) repl
##################################################
# Files...
#TODO ResumeTex ?=./tex/resume.tex
OutputDirectory ?=.make/
NixDirectory ?=./nix
##################################################
# Targets
##################################################
default: build open
.PHONY: default
#------------------------------------------------#
build:
.PHONY: build
#------------------------------------------------#
all: json cls tex pdf
.PHONY: all
##################################################
resume:
@$(NIX_BUILD) $(NixDirectory) -A 'resume'
.PHONY: resume
#------------------------------------------------#
pdf:
@mkdir -p "$(OutputDirectory)"
@$(CP) `$(NIX_BUILD) $(NixDirectory) -A 'resume.pdf'` "$(OutputDirectory)/resume.pdf"
.PHONY: pdf
#------------------------------------------------#
tex:
@mkdir -p "$(OutputDirectory)"
@$(CP) `$(NIX_BUILD) $(NixDirectory) -A 'resume.tex'` "$(OutputDirectory)/resume.tex"
.PHONY: tex
#------------------------------------------------#
cls:
@mkdir -p "$(OutputDirectory)"
@$(CP) `$(NIX_BUILD) $(NixDirectory) -A 'resume.cls'` "$(OutputDirectory)/resume.cls"
.PHONY: cls
#------------------------------------------------#
json:
@mkdir -p "$(OutputDirectory)"
@$(CP) `$(NIX_BUILD) $(NixDirectory) -A 'resume.json'` "$(OutputDirectory)/resume.json"
.PHONY: json
#------------------------------------------------#
repl:
$(NIX_REPL) ./nix/resume/
#------------------------------------------------#
open: build
xdg-open result/resume.pdf
.PHONY: open
#------------------------------------------------#
install: build
mkdir -p archive/
$(CP) "result/resume.pdf" "archive/resume.pdf"
ls -l ./archive
.PHONY: open
#------------------------------------------------#
clean:
@$(RM) -f *.{aux,log,out} # TeX temp files.
@$(RM) result || rm -f result/ # « ./result » is a symlink, either a file or a directory.
@$(RM) -fr $(OutputDirectory) # « ./.make » is our working directory.
.PHONY: clean
##################################################
resume.tex: #TODO « ./nix/**/*.nix »
#TODO nix eval ./nix -A 'resume' > ./tex/resume.tex
$(NIX_EVAL) --strict --expr '(import nix/resume {}).resume'
##################################################
cp "$clsPath" "./resume.cls"
cp "$texPath" "./resume.tex"
cp -r "$src/fonts" ./fonts
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\makecvfooter
{SBOOSALI}
{\thepage}
{1} %%TODO {\pageref{LastPage}}
@$(NIX_BUILD) $(NixDirectory) -A 'resume.tex' | grep "/nix/store/" > resume.tex
#------------------------------------------------#
pdf:
nix-shell --run '$(TEX) resume.tex'
find -L ./result -type f -name '*.pdf'
.PHONY: pdf
#------------------------------------------------#
# indentBy = { indentation ? 4 }: s:
# let
# i =
# if builtins.isInt indentation
# then (replicateSpaces indentation)
# else
# if builtins.isString indentation
# then indentation
# else s # (silently ignore type error)
# in
# i ++ s;
list.entry = xs:
assert (5 == builtins.length xs);
let
a = builtins.elemAt xs 0;
b = builtins.elemAt xs 1;
c = builtins.elemAt xs 2;
d = builtins.elemAt xs 3;
e = builtins.elemAt xs 4;
e' = cv.list.items e;
ys = [ a b c d e' ];
in
tex.command { name = "entry"; arguments = ; };
##################################################
{ types ? (import <nixpkgs> {}).lib.types
}:
##################################################
# Imports ########################################
##################################################
let
in
##################################################
# Utilities ######################################
##################################################
let
in
##################################################
# Definitions ####################################
##################################################
let
##################################################
# xfce4-notifyd
# xfce4-notifyd = {
# initial-opacity = mkPercentageOption { example = 0.850000;
# description = "";
# };
# notify-location = mkNaturalOption { example = 2;
# description = "";
# };
# theme = mkStringOption { example = "Greybird";
# description = "";
# };
# };
##################################################
# thunar-volman
# thunar-volman = {
# autobrowse.enabled = mkEnableOption { default = true; };
# autoburn.audio-cd-command = mkCommandOption { example = ''xfburn -a''; };
# autoburn.data-cd-command = mkCommandOption { example = ''xfburn -d''; };
# autoburn.enabled = mkEnableOption { default = false; };
# autoipod.enabled = mkEnableOption { default = false; };
# autokeyboard.enabled = mkEnableOption { default = false; };
# automount-drives.enabled = mkEnableOption { default = true; };
# automount-media.enabled = mkEnableOption { default = true; };
# automouse.enabled = mkEnableOption { default = false; };
# autoopen.enabled = mkEnableOption { default = false; };
# autophoto.enabled = mkEnableOption { default = false; };
# autoplay-audio-cds.command = mkCommandOption { example = ''parole --device=%d''; };
# autoplay-audio-cds.enabled = mkEnableOption { default = true; };
# autoplay-video-cds.command = mkCommandOption { example = ''parole --device=%d''; };
# autoplay-video-cds.enabled = mkEnableOption { default = true; };
# autoprinter.enabled = mkEnableOption { default = false; };
# autorun.enabled = mkEnableOption { default = false; };
# autotablet.enabled = mkEnableOption { default = false; };
# };
##################################################
# xfprint
# xfprint = {
# printing-system = mkStringOption { example = "cups_plugin.so"; description = ""; };
# XfPrint.system = mkStringOption { example = "cups_plugin.so"; description = ""; };
# };
##################################################
# parole
# parole = {
# parole.plugins = mkStringOption { example = "parole-mpris2.so"; description = ""; };
# video.videosink = mkStringOption { example = "xvimagesink"; description = ""; };
# };
##################################################
# xfce4-settings-editor
#xfce4-settings-editor = {
# last.paned-position 180
# last.window-height 558
# last.window-width 1502
#};
##################################################
# displays
displays = {
Default.eDP1.__value__ = ''1. Sharp Corporation 16"'';
Default.eDP1.Active = true;
Default.eDP1.Position.X = 0;
Default.eDP1.Position.Y = 0;
Default.eDP1.Primary = false;
Default.eDP1.Reflection = 0;
Default.eDP1.RefreshRate = mkFrequencyOption 59.996625;
Default.eDP1.Resolution = [3840 2160]; #3840x2160
Default.eDP1.Rotation = 0;
};
##################################################
# xfce4-panel
xfce4-panel = {
configver = mkNaturalOption { example = 2; description = "Version of this « xfce4-panel » Configuration"; };
panels = mkListOptionOf Panel { example = []; description = "Panels"; };
plugins = mkListOptionOf Plugins { example = []; description = "Plugins"; };
# panels.__value__ = mkNaturalOption { example = 1; description = "The number of panels"; };
#
# panels.panel-0.autohide-behavior 0
# panels.panel-0.background-alpha 80
# panels.panel-0.background-style 1
# panels.panel-0.disable-struts false
# panels.panel-0.enter-opacity 100
# panels.panel-0.leave-opacity 100
# panels.panel-0.length 100
# panels.panel-0.length-adjust false
# panels.panel-0.mode 0
# panels.panel-0.nrows 1
# panels.panel-0.plugin-ids <<UNSUPPORTED>>
# panels.panel-0.position p=6;x=1920;y=65
# panels.panel-0.position-locked false
# panels.panel-0.size 128
# panels.panel-0.span-monitors false
# plugins.plugin-1 = mkStringOption { example = "whiskermenu"; description = ""; };
# plugins.plugin-2 = mkStringOption { example = "tasklist"; description = ""; };
# plugins.plugin-2.flat-buttons false
# plugins.plugin-2.grouping 1
# plugins.plugin-2.include-all-workspaces true
# plugins.plugin-2.show-handle true
# plugins.plugin-2.show-labels false
# plugins.plugin-2.show-wireframes true
# plugins.plugin-2.sort-order 1
# plugins.plugin-2.window-scrolling false
# plugins.plugin-3 = mkStringOption { example = "separator"; description = ""; };
# plugins.plugin-3.expand true
# plugins.plugin-3.style 2
# plugins.plugin-4 = mkStringOption { example = "systray"; description = ""; };
# plugins.plugin-4.names-visible <<UNSUPPORTED>>
# plugins.plugin-4.show-frame false
# plugins.plugin-4.size-max 28
# plugins.plugin-5 = mkStringOption { example = "power-manager-plugin"; description = ""; };
# plugins.plugin-6 = mkStringOption { example = "indicator"; description = ""; };
# plugins.plugin-6.blacklist <<UNSUPPORTED>>
# plugins.plugin-6.known-indicators <<UNSUPPORTED>>
# plugins.plugin-7 = mkStringOption { example = "separator"; description = ""; };
# plugins.plugin-7.expand false
# plugins.plugin-7.style 3
};
##################################################
# xfce4-settings-manager
# xfce4-settings-manager = {
# last.window-height 500
# last.window-width 905
# };
##################################################
# xfce4-session
xfce4-session = {
};
##################################################
# xsettings
xsettings = {
Gtk.ButtonImages = mkNullableFlagOption "Should buttons have images?" true;
Gtk.CanChangeAccels true
Gtk.ColorPalette = mkStringOption { example = "black:white:gray50:red:purple:blue:light blue:green:yellow:orange:lavender:brown:goldenrod4:dodger blue:pink:light green:gray10:gray30:gray75:gray90"; description = ""; };
Gtk.CursorThemeName = mkStringOption { example = "Human"; description = ""; };
Gtk.CursorThemeSize 36
Gtk.DecorationLayout maximize,minimize:menu,close
Gtk.FontName = mkStringOption { example = "Noto Sans 24"; description = ""; };
Gtk.IconSizes = mkOption { type = StringOrIconSizes; examples = [ "gtk-menu=32,32:gtk-panel=48,4" { gtk-menu = [ 32 32 ]; gtk-panel = 48; } ]; };
Gtk.KeyThemeName = mkStringOption { example = "TODO"; description = ""; };
Gtk.MenuBarAccel
Gtk.MenuImages true
Gtk.ToolbarIconSize 9
Gtk.ToolbarStyle = mkOption { type = types.nullOr ToolbarStyle; example = "both-horiz"; };
Net.CursorBlink true
Net.CursorBlinkTime 1200
Net.DndDragThreshold 8
Net.DoubleClickDistance 5
Net.DoubleClickTime 400
Net.EnableEventSounds false
Net.EnableInputFeedbackSounds false
Net.IconThemeName = mkStringOption { example = "Paper"; description = ""; };
Net.SoundThemeName default
Net.ThemeName = mkStringOption { example = "HighContrast"; description = ""; };
Xfce.LastCustomDPI 96
Xft.Antialias 0
Xft.DPI 192
Xft.Hinting 1
Xft.HintStyle hintslight
Xft.Lcdfilter lcddefault
Xft.RGBA vbgr
};
##################################################
# keyboard-layout
keyboard-layout = {
};
##################################################
# keyboards
keyboards = {
};
##################################################
# xfce4-keyboard-shortcuts
xfce4-keyboard-shortcuts = {
};
##################################################
# xfce4-mime-settings
# xfce4-mime-settings = {
# last.default-width 558
# last.mime-width 300
# last.status-width 75
# last.window-height 400
# last.window-width 953
# };
##################################################
# xfwm4
xfwm4 = {
general.activate_action = mkOption { type = WindowActivateAction; example = "bring"; };
general.borderless_maximize true
general.box_move false
general.box_resize false
general.button_layout = mkOption { type = StringOrWindowButtonsLayout; examples = [ "MHO|C" [ "maximize" "minimize" "menu" null "close" ]]; }; #TODO examples?
general.button_offset 0
general.button_spacing 0
general.click_to_focus true
general.cycle_apps_only false
general.cycle_draw_frame true
general.cycle_hidden true
general.cycle_minimum true
general.cycle_preview true
general.cycle_tabwin_mode 0
general.cycle_workspaces false
general.double_click_action = mkOption { type = WindowClickAction; example = "maximize"; };
general.double_click_distance 5
general.double_click_time 400
general.easy_click = mkStringOption { example = "Alt"; description = ""; };
general.focus_delay 250
general.focus_hint true
general.focus_new true
general.frame_opacity 100
general.full_width_title true
general.horiz_scroll_opacity false
general.inactive_opacity 100
general.maximized_offset 0
general.mousewheel_rollup false
general.move_opacity 100
general.placement_mode = mkOption { type = HorizontalAlignment; example = "center"; }; #TODO type?
general.placement_ratio 20
general.popup_opacity = mkOption { type = Percentage; example = "100"; };
general.prevent_focus_stealing false
general.raise_delay 250
general.raise_on_click true
general.raise_on_focus false
general.raise_with_any_button true
general.repeat_urgent_blink false
general.resize_opacity 100
general.scroll_workspaces false
general.shadow_delta_height 0
general.shadow_delta_width 0
general.shadow_delta_x 0
general.shadow_delta_y -3
general.shadow_opacity 50
general.show_app_icon false
general.show_dock_shadow false
general.show_frame_shadow true
general.show_popup_shadow true
general.snap_resist false
general.snap_to_border true
general.snap_to_windows false
general.snap_width 10
general.sync_to_vblank false
general.theme = mkStringOption { example = "Default-xhdpi"; description = ""; };
general.tile_on_move true
general.title_alignment = mkOption { type = HorizontalAlignment; example = "right"; };
general.title_font = mkStringOption { example = "Noto Sans Bold 36"; description = ""; };
general.title_horizontal_offset 0
general.titleless_maximize false
general.title_shadow_active false
general.title_shadow_inactive false
general.title_vertical_offset_active 0
general.title_vertical_offset_inactive 0
general.toggle_workspaces false
general.unredirect_overlays true
general.urgent_blink false
general.use_compositing true
general.workspace_count 1
general.workspace_names <<UNSUPPORTED>>
general.wrap_cycle true
general.wrap_layout true
general.wrap_resistance 10
general.wrap_windows true
general.wrap_workspaces false
general.zoom_desktop true
};
##################################################
# thunar
# thunar = {
# /last-icon-view-zoom-level THUNAR_ZOOM_LEVEL_NORMAL
# /last-view ThunarIconView
# /last-window-maximized true
# /misc-volume-management true
# /shortcuts-icon-size THUNAR_ICON_SIZE_SMALLEST
# };
##################################################
# xfce4-desktop
xfce4-desktop = {
# backdrop.screen0.monitor0.image-path = mkStringOption {
# example = "/usr/share/xfce4/backdrops/xubuntu-wallpaper.png";
# description = "";
# };
# backdrop.screen0.monitor0.image-show = true;
# backdrop.screen0.monitor0.image-style = 5;
# backdrop.screen0.monitor0.workspace0.color-style = 0;
# backdrop.screen0.monitor0.workspace0.image-style = 5;
# backdrop.screen0.monitor0.workspace0.last-image = mkStringOption {
# example = "/usr/share/xfce4/backdrops/xubuntu-development.png";
# description = "";
# };
# backdrop.screen0.monitor1.image-path = mkStringOption {
# example = "/usr/share/xfce4/backdrops/xubuntu-wallpaper.png";
# description = "";
# };
# backdrop.screen0.monitor1.image-show = true;
# backdrop.screen0.monitor1.image-style = 5;
desktop-icons.file-icons.show-filesystem = true;
desktop-icons.file-icons.show-home = true;
desktop-icons.file-icons.show-removable = true;
desktop-icons.file-icons.show-trash = true;
desktop-icons.font-size = 36.000000;
desktop-icons.icon-size = 36;
desktop-icons.show-hidden-files = true;
desktop-icons.single-click = false;
desktop-icons.style = 2;
desktop-icons.tooltip-size = 64.000000;
desktop-icons.use-custom-font-size = true;
desktop-menu.show-icons = true;
last.window-height = 1127;
last.window-width = 1646;
windowlist-menu.show = false;
};
##################################################
# xfce4-power-manager
xfce4-power-manager = {
xfce4-power-manager.blank-on-ac = 5;
xfce4-power-manager.blank-on-battery = 1;
xfce4-power-manager.brightness-on-battery = 9;
xfce4-power-manager.brightness-switch = 0;
xfce4-power-manager.brightness-switch-restore-on-exit = 0;
xfce4-power-manager.critical-power-action = 3;
xfce4-power-manager.dpms-enabled = true;
xfce4-power-manager.dpms-on-ac-off = 15;
xfce4-power-manager.dpms-on-ac-sleep = 10;
xfce4-power-manager.dpms-on-battery-off = 3;
xfce4-power-manager.dpms-on-battery-sleep = 2;
xfce4-power-manager.hibernate-button-action = 3;
xfce4-power-manager.inactivity-on-ac = 240;
xfce4-power-manager.inactivity-on-battery = 60;
xfce4-power-manager.lid-action-on-ac = 0;
xfce4-power-manager.lid-action-on-battery = 1;
xfce4-power-manager.lock-screen-suspend-hibernate = false;
xfce4-power-manager.logind-handle-lid-switch = false;
xfce4-power-manager.power-button-action = 3;
xfce4-power-manager.show-tray-icon = 1;
xfce4-power-manager.sleep-button-action = 3;
};
##################################################
in
##################################################
# Exports ########################################
##################################################
{
}
##################################################
# Notes ##########################################
##################################################
/*
{ example = ""; escription = ""; }
$ xfconf-query -c xfwm4 -p /general/activate_action -s bring|switch|none
As the name suggests, the “bring” option moves the window requesting to be raised to the current workspace,
the “switch” option switches workspaces,
and the “none” option takes no action.
*/
##################################################
fromAttrs = name: value:
assert (builtins.isString name) "fromAttrs — (« name » :: String)";
assert (builtins.isAttrs value) "fromAttrs — (« value » :: Attrs _)";
let
children = builtins.map _indent_ properties;
properties = concatMapAttrs fromNix value;
_indent_ = indentString { };
in
builtins.concatLists [
[ ''<property name="${name}" type="empty">'' ]
children
[ ''</property>'' ]
];
############################
/* :: String -> List Atom -> List String
*
* Atom is anything but a set, list, or function.
*/
fromList = name: value:
assert (builtins.isString name) "fromList — (« name » :: String)";
assert (builtins.isList value) "fromList — (« value » :: List _)";
let
children = builtins.map _indent_ values;
values = builtins.concatMap fromNixAtom value;
_indent_ = indentString { };
in
builtins.concatLists [
[ ''<property name="${name}" type="array">'' ]
children
[ ''</property>'' ]
];
############################
/* :: String -> () -> String
*/
fromNull = name:
assert (builtins.isString name) "fromNull — (« name » :: String)";
asEmptyProperty { inherit name; };
############################
/* :: String -> Bool -> String
*/
fromBool = name: value:
assert (builtins.isString name) "fromBool — (« name » :: String)";
assert (builtins.isBool value) "fromBool — (« value » :: Bool)";
asProperty {
inherit name;
type = "bool";
value = asBool value;
};
#NOTE « builtins.toString true » is « "1" » (not « "true" »).
############################
/* :: String -> Int -> String
*/
fromInt = name: value:
assert (builtins.isString name) "fromInt — (« name » :: String)";
assert (builtins.isInt value) "fromInt — (« value » :: Int)";
asProperty {
inherit name;
type = "int";
value = builtins.toString value;
};
############################
/* :: String -> Float -> String
*/
fromFloat = name: value:
assert (builtins.isString name) "fromFloat — (« name » :: String)";
assert (builtins.isFloat value) "fromFloat — (« value » :: Float)";
asProperty {
inherit name;
type = "double";
value = builtins.toString value;
};
############################
/* :: String -> String -> String
*/
fromString = name: value:
assert (builtins.isString name) "fromString — (« name » :: String)";
assert (builtins.isString value) "fromString — (« value » :: String)";
asProperty {
inherit name value;
type = "string";
};