README 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. # GuixSD Configuration \
  2. for merlin.browniehive.net
  3. Be aware of silly commit messages. Also, be aware that notabug removes strings inside angle brackets '<' so names from the irc log is snipped out, but they are there... :P
  4. # TODO
  5. SHEPHERD SERVICES!
  6. - Mcron: check and fix missing /var/run/tor. And check for battery - launch i3nagbar.
  7. - [DONE-ish] Fix battery alert using i3-nagbar. Y U NO Do wat I want?
  8. - rottlog? logrot?
  9. - Check and look through others/pkill9-desktop-config.scm
  10. - Send patch for norwegian dict
  11. - change or fix "build system" Now is a disaster of manual operations and failing scripts.
  12. - linode;
  13. - gvfs/fuser for usb and mmc;
  14. - wkhtmltopdf(.org)
  15. - BORG BACKUP: Almost done, need somewhere to backup to.
  16. - VPN: merlin - linode - quercus
  17. - WWOFFLE? https://www.gedanken.org.uk/software/wwwoffle/README
  18. - fetchmail?
  19. # brhive
  20. - Check ./maintenance/hydra/berlin.scm and so on as servers
  21. - Check ./others/ng0-old-systems/guixsd/servers/{shadownet,mailserver,++}
  22. - Migrate to guixsd.
  23. - evaluate alternatives for linode
  24. - ?setup weeslack?: https://github.com/wee-slack/wee-slack
  25. - ipfs?
  26. - xmpp
  27. - ¿mail?
  28. - httpd
  29. - vpn!
  30. - mosh
  31. - whatever else is on linode now
  32. - Setup quercus! even though physical location is undecided atm.
  33. ## Hitpoints is dead
  34. Got our hands on a macbook, now called merlin.
  35. Look at the following for setup:
  36. https://medium.com/@philpl/arch-linux-running-on-my-macbook-2ea525ebefe3
  37. http://www.frankshin.com/macbook-air-62-2013-setting-it-up-with-archlinux/
  38. https://github.com/pandeiro/arch-on-air
  39. # Notes
  40. ## This is on inheritance (is this inheritance from guix or guile?) from the #guix IRC channel:
  41. [16:29:19] <thomassgn> snape: allright, that does the trick. quite cumbersome though, it keeps throwing these at me, resolving number 3 now... :)
  42. [16:29:32] * marusich has quit (Quit: Leaving)
  43. [16:30:08] <snape> thomassgn: as an alternative, you can just run "guix build <my-package>" in a shell
  44. [16:34:10] <thomassgn> hehe, yes. Or not really. 'guix build -f ./libreoffice.scm libreoffice' tells me it cannot build. how can I tell it to build this definition of package...?
  45. [16:34:50] <snape> you need to put it into GUIX_PACKAGE_PATH
  46. [16:35:36] <snape> thomassgn: see https://www.gnu.org/software/guix/manual/guix.html#Defining-Packages
  47. [16:35:50] <snape> if it's your own package file
  48. [16:36:06] <snape> if it's within the guix source, then guix build libreoffice should work
  49. [16:36:44] <thomassgn> ok. But how do I know which libreoffice it builds if I say guix package -i libreoffice? I'm just testing a few things, and would like to do just copy the file and test some changes...
  50. [16:37:16] <thomassgn> I guess I could start changing the names and so on in the package definition.
  51. [16:37:17] <snape> if you modify Guix's libreoffice definition and run: "guix build libreoffice", it will build the modified libreoffice
  52. [16:37:39] <thomassgn> but I'm not modifying in place
  53. [16:38:01] <efraim> GUIX_PACKAGE_PATH takes precedence over guix proper for leaf packages
  54. [16:38:16] <thomassgn> cause it's read only in my profile... :)
  55. [16:38:19] <thomassgn> Ah!
  56. [16:38:44] <snape> thomassgn: your custom libreoffice package should probably inherit Guix's one
  57. [16:39:17] * atw has joined #guix
  58. [16:39:18] <snape> so that you don't have to copy everything
  59. [16:39:23] <thomassgn> nice. So any package with duplicate variable-name in my GUIX_PACKAGE_PATH will always be chosen?! nice.
  60. [16:39:39] <snape> yes, but it's probably clearer if the name is different
  61. [16:39:52] <snape> say, my-libreoffice
  62. [16:39:52] <thomassgn> Yes, I don't entirely understand inheritance though :P I'm a bit slow :)
  63. [16:40:16] <snape> you're not slow, it takes time ;)
  64. [16:41:50] <snape> thomassgn: there are a few package inheritance examples in the Guix source. You can grep "inherit" in /gnu/packages/ to see them.
  65. [16:42:45] <thomassgn> cool, I'll have a look. I've used it once in a simple thing I mostly copied.
  66. [16:43:05] <snape> also, things in GUIX_PACKAGE_PATH need to be valid Guile modules
  67. [16:43:46] <rekado> inheritance is a way to avoid duplication.
  68. [16:43:46] <resh> https://thepasteb.in/p/76hE6RvkK2DHV
  69. [16:44:03] <thomassgn> hehe, yes. I keep getting warnings from guix commands when I'm fiddling with somethings in there.
  70. [16:44:05] <rekado> a package can inherit all fields from another package.
  71. [16:44:19] <rekado> you can then override individual fields without having to specify others.
  72. [16:44:23] * atw has quit (Ping timeout: 260 seconds)
  73. [16:44:46] <roptat> resh: is the tarball in /tmp?
  74. [16:44:46] <rekado> resh: where is the tar.xz file?
  75. [16:45:07] <thomassgn> ah, but if I specify parts of a field will it append it to contents of the previous? or discard the previous?
  76. [16:45:15] <thomassgn> previous=inherited
  77. [16:45:24] <roptat> discard
  78. [16:45:27] <thomassgn> right
  79. [16:45:56] <roptat> but you can get the value by using (package-<field-name> libreoffice)
  80. [16:46:14] <resh> roptat and rekado not inside any directory ... installed without cd to any directory
  81. [16:47:03] <rekado> resh: so it might still be in your home directory then.
  82. [16:47:08] <thomassgn> So if I just want to add something I have to copy the contents of the inherited field into the new def.? uh, sorry, what did you mean with (package-<field-name> libreoffice)? I ould just go read the docs ofc.
  83. [16:47:25] <thomassgn> roptat: ^^
  84. [16:47:39] <rekado> thomassgn: (package-synopsis libreoffice) gives you the synopsis of the libreoffice package, for example.
  85. [16:47:51] <rekado> thomassgn: (package-inputs libreoffice) gives you the inputs.
  86. [16:47:59] <roptat> for instance to add an input you would write (inputs `(("some-package" ,some-package) ,@(package-inputs libreoffice)))
  87. [16:48:18] <roptat> with enough parenthesis
  88. [16:48:48] <thomassgn> haha, Nice. Thanks :)
  89. [16:49:08] <rekado> i.e. the inputs field has a quasi-quoted list with the list ("some-package" ,some-package) followed by the items in the inputs field of the libreoffice package.
  90. ## And from guix mailing list about environments "permanence":
  91. > Hello, I've been using guix `environment -l env.scm` to work on
  92. > different programming projects on my laptop.
  93. > The problem is: When I do guix pull or gc, these environments might get
  94. > lost, and when I'm on the train with no network and run `guix
  95. > environment` it will try to graft/rebuild/whatever, which requires an
  96. > internet connection, instead of just opening the last working environment.
  97. > So I can't work on my projects until I get back online.
  98. To protect your environment from GC, you can use ‘guix environment
  99. --root’: it register a “garbage collector root” for your environment as
  100. a symlink, which means your environment won’t be GC’d unless you remove
  101. that symlink.
  102. To prevent your environment from being updated even if you ran ‘guix
  103. pull’ in the meantime, you can use a separate profile. For instance,
  104. you can create a ‘dev’ profile for your development environment:
  105. guix package -p dev -i gcc-toolchain make
  106. and then whenever you want to “enter” that profile, do:
  107. . ./dev/etc/profile
  108. And of course you can have as many profiles as you want.
  109. ## And from IRC on commit messages, emacs and yasnippets
  110. [09:44:52] <thomassgn> Hey, I've been fixing the package definitions I sent in the other day. I'm writing the commitmessage now, but after reading the gnu changelog standards I have a few questions: My current commit message looks like "* gnu/packages/xdisorg.scm (screen-message): Add package definition" Should I add more explanation? and from before I'm used to putting just 68 characters on the first line no punctuation and then
  111. [09:44:54] <thomassgn> blank line before any more descritpion, but the gnu standards seem to say differently. is that right?
  112. [09:47:45] <roptat> thomassgn: it should be "* gnu/packages/xdisorg.scm (screen-message): New variable."
  113. [09:47:57] <roptat> see other commit messages for examples
  114. [09:48:43] <thomassgn> roptat: ah, I've tried looking at other commits and can't see any adding packages. I'm doing something wrong, yes.
  115. [09:49:12] <rekado> I want to build “axoloti-patcher” but the patch for “axoloti-libusb” no longer applies. So I updated the patch, but Guix still insists on applying the old version of the patch.
  116. [09:49:19] <rekado> What am I doing wrong?
  117. [10:09:07] <roptat> thomassgn: I think I confused you: the message should be "gnu: Add screen-message", a blank line and then "* gnu/packages/xdisorg.scm (screen-message): New variable.""
  118. [10:09:47] <roptat> and don't sign-off your own patch
  119. [10:09:52] <snape> with a '.' after "Add screen-message" :-)
  120. [10:16:20] <thomassgn> derp. ok, sent them allready. these guidelines are too complex/confusing for me it seems.
  121. [10:16:54] <thomassgn> thanks for pointing it out though, next commit message will be a bit better.
  122. [10:18:06] <rekado> thomassgn: if you’re using Emacs + magit you may find our commit message snippets useful.
  123. [10:18:22] <rekado> they are in etc/snippets and can be used with yasnippet.
  124. [10:18:57] <rekado> I only type “add” hit TAB and it expands to the right text for adding a new package.
  125. [10:18:57] <thomassgn> rekado: cool, is there an easy way to add them? Ah, yasnippet: the plugin I've had since the start, but never used... :P
  126. [10:19:07] <thomassgn> awesome
  127. [10:19:24] <rekado> thomassgn: take a look at the contributing manual section.
  128. [10:19:36] <rekado> it tells you how to set this up.
  129. [10:22:32] <thomassgn> you mean the section "the perfect setup"?
  130. [10:22:57] <rekado> yes, that’s the one
  131. [10:23:43] <rekado> BTW my patch problem was due to GUIX_PACKAGE_PATH, which included a duplicate package definition
  132. [10:23:44] <thomassgn> cause it assumes that I'm working in a git checkout of the guix source, which I don't. I remember I couldn't make it work, too much confusion between my running system and the git checkout...
  133. [10:24:21] <rekado> you can also just copy the snippets to some other directory and refer to them.
  134. [10:24:32] <rekado> you don’t need to wrok from a git checkout to use the snippets.
  135. [10:24:45] <rekado> (but I do wonder how you submit patches when you don’t use a git checkout.)
  136. [10:25:08] <thomassgn> I understand a lot more now, compared to last time I tried this. So I'll probably try again soon.
  137. [10:27:01] <wigust> thomassgn: Also “C-x v l runs the command vc-print-log” in file you want to commit helps with a commit message.
  138. [10:27:09] <thomassgn> oh I do use git, but I have my own repo where I write and test package defs. and then I copy the defs over to the guix src checkout and make the patch. Yes it's tedious, but I understand what's happening and I don't have errors I don't understand flowing around... :P
  139. [10:27:46] <thomassgn> cool, thanks wigust and rekado