Skip to content

Instantly share code, notes, and snippets.

@Kabouik
Last active April 7, 2025 15:45
Show Gist options
  • Save Kabouik/72fba8f15350092786ac1d8a7256be41 to your computer and use it in GitHub Desktop.
Save Kabouik/72fba8f15350092786ac1d8a7256be41 to your computer and use it in GitHub Desktop.
nbfc-linux experiments on Guix

@florhizome has packaged nbfc-linux for Guix in 2022, but documentation is missing as to how to configure and run it in Guix, and unfortunately they went MIA since.

nbfc seems to expect working only with configuration files in its own installation folder, and the service nbfc_linux cannot be fed directly with a configuration file: the configuration file has to be set and then applied with nbfc config first, before nbfc_linux can use it. This won't work in Guix, because nbfc will try to do so in the installation folder, which is read-only.

This documentation explains that the way to get nbfc_service to load a configuration file when the package is installed in an immutable read-only folder, like /gnu/store/*nbfc-linux*/, is to create a custom nbfc.json somewhere that contains only the following line:

$ cat ~/.config/nbfc/nbfc.json
{"SelectedConfigId": "Asus Zenbook Flip UX360UAK"}

Where Asus Zenbook FLIP UX360UAK is the name of a configuration file (without its .json extensionin/gnu/store/nbfc-linux/share/nbfc/configs`:

$  tree $(realpath $(which nbfc) | sed -e 's,/bin/nbfc,,')/share/nbfc/configs
/gnu/store/np8apcdnlrryyxb3y0kqdv651zsyn0j6-nbfc-linux-0.1.7-0.4c2b75e/share/nbfc/configs
├── Acer Aspire 1410.json
├── Acer Aspire 1810T.json
├── Acer Aspire 1810TZ.json
├── Acer Aspire 1825PTZ.json
├── Acer Aspire 4750G.json
├── Acer Aspire 5738G.json
├── Acer Aspire 5745G.json
├── Acer Aspire 5749.json
├── Acer Aspire 5930.json
├── Acer Aspire 7551G.json
├── Acer Aspire 7735.json
├── Acer Aspire 7740G.json
├── Acer Aspire 7741G.json
├── Acer Aspire E1-522.json
├── Acer Aspire E1-772.json
├── Acer Aspire E5-471G.json
├── Acer Aspire E5-475G.json
├── Acer Aspire E5-575G.json
├── Acer Aspire E5-731.json
├── Acer Aspire LT-10Q.json
├── Acer Aspire One AO531h.json
├── Acer Aspire One AO721.json
├── Acer Aspire One AO751h.json
├── Acer Aspire One AOA110.json
├── Acer Aspire One AOA150.json
├── Acer Aspire S3.json
├── Acer Aspire S7-191.json
├── Acer Aspire S7-391.json
├── Acer Aspire V13.json
├── Acer Aspire V3-371.json
├── Acer Aspire V3-571G.json
├── Acer Aspire V5-472PG.json
├── Acer Aspire V5-551.json
├── Acer Aspire V5-572G.json
├── Acer Aspire VN7-572G V15 Nitro BE.json
├── Acer Aspire VN7-572G V15 Nitro.json
├── Acer Aspire VN7-591G V15 Nitro BE.json
├── Acer Aspire VN7-593G V15 Nitro BE.json
├── Acer Aspire VN7-791G V17 Nitro BE.json
├── Acer Aspire VN7-792G V17 Nitro BE.json
├── Acer Aspire VN7-793G V17 Nitro BE.json
├── Acer Extensa 5220.json
├── Acer Extensa 5630Z.json
├── Acer LT-10Q.json
├── Acer NC-A315-55G-73N7.json
├── Acer Nitro AN515-43.json
├── Acer Nitro AN515-51.json
├── Acer Nitro AN715-51.json
├── Acer Predator 17 G9-793-782K.json
├── Acer Predator G3-572.json
├── Acer Predator PH315-53.json
├── Acer Swift SF314-54G.json
├── Acer TravelMate 7730G.json
├── Alienware m15 R3.json
├── Asus F5SR.json
├── Asus G53SX.json
├── Asus K43SD.json
├── Asus K43U.json
├── Asus K46C.json
├── Asus K501LX.json
├── Asus K501UX.json
├── Asus M52VA.json
├── Asus N550JV.json
├── Asus N550JX.json
├── Asus N551JB.json
├── Asus N56JR.json
├── Asus N56VZ.json
├── Asus ROG G501JW.json
├── Asus ROG G751JL.json
├── Asus ROG G751JT.json
├── Asus ROG G751JY.json
├── Asus ROG G752VS.json
├── Asus ROG G752VT.json
├── Asus ROG G752VY.json
├── Asus ROG G75VX.json
├── Asus ROG GL702VM.json
├── Asus ROG GL702ZC.json
├── Asus TP301UJ.json
├── Asus Transformer 3 Pro.json
├── Asus Vivobook S400CA.json
├── Asus Vivobook TP301UA.json
├── ASUS VivoBook X505ZA_X505ZA.json
├── ASUS Vivobook X580VD.json
├── Asus X301A1.json
├── Asus X540LA.json
├── Asus X756UX.json
├── Asus Zenbook Flip UX360UAK.json
├── Asus Zenbook Pro UX550VE.json
├── Asus Zenbook UX21E.json
├── Asus Zenbook UX301LA.json
├── Asus Zenbook UX302LA.json
├── Asus Zenbook UX310UA.json
├── Asus Zenbook UX310UAK.json
├── Asus Zenbook UX31A.json
├── Asus Zenbook UX32A.json
├── Asus Zenbook UX32LN.json
├── Asus Zenbook UX32VD.json
├── Asus Zenbook UX330UA.json
├── Asus Zenbook UX410UQ.json
├── Asus Zenbook UX430UA.json
├── Asus Zenbook UX430UQ.json
├── Asus Zenbook UX51VZA.json
├── Asus Zenbook UX530U.json
├── Dell Inspiron 7348.json
├── Dell Inspiron 7375.json
├── Dell Vostro 3350.json
├── Dell XPS M1530.json
├── Fujitsu ESPRIMO Mobile V5505.json
├── Gateway AOA110.json
├── Gateway AOA150.json
├── Gateway LT31.json
├── Gigabyte AERO 14KV8.json
├── Gigabyte p35w v3.json
├── HP 15-BW00x.json
├── HP 245 G7 Notebook PC.json
├── HP Compaq 15-s103tx.json
├── HP Compaq 615.json
├── HP Compaq 625.json
├── HP Compaq 6530b.json
├── HP Compaq 6735s Turion X2 RM-72.json
├── HP Compaq 8710p.json
├── HP Compaq nw9440.json
├── HP Compaq Presario CQ40 Turion X2 RM-74.json
├── HP EliteBook 2560p.json
├── HP EliteBook 2570p.json
├── HP EliteBook 2760p.json
├── HP EliteBook 745 G5.json
├── HP EliteBook 830 G6.json
├── HP EliteBook 840 G2.json
├── HP EliteBook 8470p.json
├── HP EliteBook 850 G3.json
├── HP EliteBook 850 G5.json
├── HP EliteBook 8560p.json
├── HP EliteBook 8560w.json
├── HP EliteBook 8760w.json
├── HP EliteBook Folio 1040 G1.json
├── HP EliteBook Folio 9470m_i5-3427u_bios-F.66.json
├── HP EliteBook Folio 9470m.json
├── HP ENVY dv6-7xxx.json
├── HP ENVY dv7-7xxx.json
├── HP ENVY m6 1206dx.json
├── HP ENVY m6-1254eo.json
├── HP ENVY m6 Sleekbook.json
├── HP ENVY x360 15-w104ne.json
├── HP ENVY x360 Convertible 13-ag0xxx.json
├── HP ENVY x360 Convertible 15-bq1xx.json
├── HP ENVY x360 Convertible 15-cn0xxx.json
├── HP Laptop 14-cm0xxx.json
├── HP Laptop 14-dk0xxx.json
├── HP Laptop 15s-gr0xxx.json
├── HP Laptop 17-by1xxx.json
├── HP Laptop 17-ca1xxx.json
├── HP Notebook 15-ba010ng.json
├── HP Omen 15-dc00xxxx.json
├── HP OMEN Laptop 15-en0xxx.json
├── HP OMEN Notebook PC 15.json
├── HP Pavilion 14-v066br.json
├── HP Pavilion 17-ab240nd.json
├── HP Pavilion dv6 6190.json
├── HP Pavilion dv6.json
├── HP Pavilion Gaming Laptop 15-ec0xxx.json
├── HP Pavilion Gaming Laptop 15-ec1xxx.json
├── HP Pavilion HDX18.json
├── HP Pavilion x360 Convertible 14-dh1xxx.json
├── HP Pavilion x360 Convertible 15-br0xx.json
├── HP ProBook 430 G1.json
├── HP ProBook 440 G3.json
├── HP ProBook 450 G1.json
├── HP ProBook 450 G2.json
├── HP ProBook 4520s.json
├── HP ProBook 4530s.json
├── HP ProBook 4535s.json
├── HP ProBook 4540s.json
├── HP ProBook 4710s.json
├── HP ProBook 4720s.json
├── HP ProBook 5330m.json
├── HP ProBook 640 G1.json
├── HP ProBook 6455b.json
├── HP ProBook 6460b.json
├── HP ProBook 6465b.json
├── HP ProBook 650 G1.json
├── HP ProBook 650 G2.json
├── HP ProBook 6550b.json
├── HP ProBook 6560b.json
├── HP Spectre x360 Convertible 13-ae0xx.json
├── HP Spectre x360 Convertible 15-ch0xx.json
├── HP Spectre x360 Convertible 15-df1015ng.json
├── HP Spectre x360 Convertible 15t-df1xx.json
├── HP ZBook 15 G3.json
├── HP ZBook 15.json
├── HP ZBook Fury 15 G7.json
├── HP ZBook Studio G3.json
├── HP ZBook Studio x360 G5.json
├── Lenovo Ideacenter AIO 700-24AGR.json
├── Lenovo Ideapad 500S-13ISK.json
├── Lenovo Ideapad 500S-14ISK.json
├── Lenovo Ideapad 510s.json
├── Lenovo Ideapad 710S.json
├── Lenovo Ideapad U160.json
├── Lenovo Ideapad U330p.json
├── Lenovo Ideapad U430p.json
├── Lenovo IdeaPad Y580.json
├── Lenovo ThinkPad 13.json
├── Lenovo ThinkPad Edge E520.json
├── Lenovo ThinkPad Helix.json
├── Lenovo ThinkPad L380 Yoga.json
├── Lenovo ThinkPad L390 i7-8565U.json
├── Lenovo Thinkpad L530.json
├── Lenovo Thinkpad L540.json
├── Lenovo ThinkPad T430s.json
├── Lenovo ThinkPad T440s.json
├── Lenovo ThinkPad T540p.json
├── Lenovo ThinkPad T580.json
├── Lenovo ThinkPad x121e.json
├── Lenovo ThinkPad X1 8th gen.json
├── Lenovo ThinkPad x220i.json
├── Lenovo ThinkPad x230.json
├── Lenovo U31-70.json
├── Lenovo U41-70.json
├── Lenovo V330-IKB(81AX).json
├── Lenovo V580.json
├── Lenovo Yoga 11s.json
├── Lenovo Yoga 13 2191.json
├── Lenovo Yoga 2 13.json
├── Lenovo Yoga 3 14.json
├── Lenovo Yoga 500-15IBD.json
├── Lenovo Yoga 510.json
├── Lenovo Yoga 710.json
├── Lenovo Yoga 710 KabyLake.json
├── Lenovo Yoga Slim7.json
├── MECHREVO Jiaolong Series GK5NR0O.json
├── Medion Akoya P6612.json
├── Medion Akoya P6630.json
├── Packard Bell AOA110.json
├── Packard Bell AOA150.json
├── Packard Bell DOA150.json
├── Packard Bell DOTMA.json
├── Packard Bell DOTMU.json
├── Packard Bell DOTVR46.json
├── Packard Bell Easynote TJ65.json
├── Packard Bell ENBFT.json
├── Razer Blade 14 2017.json
├── RedmiBook 14 (TM1814).json
├── Sony Corporation VGN-CR392_W.json
├── Sony Vaio SVE1711.json
├── Sony Vaio SVE1713Y1E.json
├── Sony Vaio SVF13N190X.json
├── Sony Vaio SVF14N1C5E.json
├── Sony Vaio SVT1312M1ES.json
├── Sony Vaio VPCF12S1E.json
├── Toshiba Satellite L740.json
├── Toshiba Satellite L745.json
├── Vestel Smartboard Series-14XXXX.json
└── Xiaomi Mi Book (TM1613, TM1703).json
$ sudo nbfc_service --config-file /home/mat/.config/nbfc/nbfc.json
Using 'Asus Zenbook Flip UX360UAK' as model config
Using 'ECSysLinux' as EmbeddedControllerType
Using '/sys/class/hwmon/hwmon5/temp1_input' as temperature source
Using '/sys/class/hwmon/hwmon5/temp2_input' as temperature source
Using '/sys/class/hwmon/hwmon5/temp3_input' as temperature source
Using '/sys/class/hwmon/hwmon5/temp4_input' as temperature source
Using '/sys/class/hwmon/hwmon5/temp5_input' as temperature source
$ sudo nbfc status -a
Read-only               : False
Selected config name    : UX360UAK
Temperature             : 43.03

Fan display name        : 
Auto control enabled    : True
Critical mode enabled   : False
Current fan speed       : 0.0
Target fan speed        : 0.0
Fan speed steps         : 8

But if we need a custom configuration file that is not in the install folder of nbfc-linux, does that mean we need to repackage it with the extra configuration files?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment