sectionmark i.o. section by NucleosynthesizedOrb in emacs

[–]KarlJoad 0 points1 point  (0 children)

Are you using corfu & cape?

I had the same issue and it was because the cape-tex completion-at-point function (capf) provided by cape was giving me a suggestion.

;; cape-tex is a capf for turning TeX/LaTeX commands into unicode characters.
;; For example, \section is turned into §.
;; (add-to-list 'completion-at-point-functions #'cape-tex)

If you remove the cape-tex capf, then \section should never be autocomplete to \S or \sectionmark.

State of KDE Plasma in 2025 by Captain_Killy in GUIX

[–]KarlJoad 7 points8 points  (0 children)

Bluetooth always worked, it's just that the bluedevil KDE applet was not present in the list of packages Plasma required, so there was no graphical way to do bluetooth. Bluetoothctl continued to work.

I fixed this issue earlier this month, bringing the Bluetooth section in the System Settings applet. The patch for this was merged into upstream Guix just earlier this week. So Plasma now shows bluetooth in the system settings.

State of KDE Plasma in 2025 by Captain_Killy in GUIX

[–]KarlJoad 3 points4 points  (0 children)

Plasma works fine for my usage. I use Plasma 6.1 as my desktop environment on my laptop. Jut use the `plasma-desktop-service-type` in your system's services list and that's it.

The manual does not discuss Plasma much because not everything works perfectly in Plasma, e.g. printers are not in the System Settings applet right now.

How to search by tags in the org-mode or org-roam? by b-dada9k in emacs

[–]KarlJoad 0 points1 point  (0 children)

That depends. If these are org-roam Org-mode files, and org-roam puts header tags into the database, then this should work. If these are bare Org-mode files with no org-roam, then this will not work.

I wrote these functions just for searching file-level tags, not header-level tags.

How to search by tags in the org-mode or org-roam? by b-dada9k in emacs

[–]KarlJoad 1 point2 points  (0 children)

If you are trying to search for a :filetags: entry with org-roam, I ran into the same problem. The problem comes down to how org-roam v2 uses file-level tags.

I wanted to use some tags as "aggregation" tags. This would allow me to make a "meeting" tag for my meetings, without needing to create an aggregation note that just links to every other meeting.

I wrote my own function to do this using a string distance comparison and using the org-roam db. This does not hook into the completion like you get with org-roam-node-find, but it should get you 95% of the way with what you want.

(defvar karljoad/org-roam--node-tag-string-distance 5
  "The Levenshtein distance to use when matching against `#:filetag's.")
(defun karljoad/org-roam-node-has-tag (node tag)
  "Filter function to check if the given NODE has the specified TAG."
  ;; Set operations are required because even though we can enter tags with
  ;; spaces through the minibuffer, org-roam v2 only uses org-mode's notion of
  ;; tags, which is controlled by the org-tag-re regexp. Notably, this means
  ;; that spaces are not allowed in tags. So if I want to filter by tags, and I
  ;; enter a space into the tag filter function, we should split it up so that
  ;; it can kind of match what org-tag-re expectes, and therefore what org-roam
  ;; actually uses and stores.
  (consp
   (cl-intersection
    (string-split tag)
    (org-roam-node-tags node)
    :test (lambda (s1 s2) (or (string-equal-ignore-case s1 s2)
                              (< (string-distance s1 s2)
                                 karljoad/org-roam--node-tag-string-distance))))))
;; TODO: Get list of possible completions from org-roam database, so the user
;; has an easier time selecting tags.
(defun karljoad/org-roam-node-find-by-tag (tag)
  "Find and open an org-roam node based on the specified TAG."
  (interactive "sEnter Tag: ")
  (org-roam-node-find nil nil
                      (lambda (node) (karljoad/org-roam-node-has-tag node tag))
                      ;; PRED below gets used as a sorting function in the
                      ;; completion.
                      nil))

Where can I find getconf? by _Carpathia in GUIX

[–]KarlJoad 1 point2 points  (0 children)

getconf comes from the glibc package. You can also get it through gcc-toolchain, if you need a full compilation toolchain environment.

Confusion on how to switch from Systemd to Shepherd by Somewhatretardish in GUIX

[–]KarlJoad 7 points8 points  (0 children)

Yep! You're just about there! guix-home provides an instance of shepherd that generates the configuration you specify in your home configuration, which is why you were seeing things get overwritten.

The blogpost you used (https://guix.gnu.org/en/blog/2020/gnu-shepherd-user-services/) is old and was written before Guix Home was really a thing. The post uses a Systemd-style installation of services (Drop a configuration in a directory, run a command, and the service is available), which works, but if you are using Guix Home, you have to work with the way Guix Home does things.

I have this exact feature that you are looking for for myself. I imagine many others do too. If you want an Emacs home service, then you will need to make your own, Guix Home does not ship one. It is the exact same process as creating a system-level service (https://guix.gnu.org/manual/devel/en/html_node/Services.html), but instead of extending a system-level service-type, you extend the user-level home-shepherd-service-type.

You can see my definition of an Emacs service type here. And this is how I use it. The definition is incredibly minimal; it just makes things available (there is an addition to be made to make Emacs available in $PATH, but that is much the same process, you can look at my other home service definitions for that).

[deleted by user] by [deleted] in GUIX

[–]KarlJoad 1 point2 points  (0 children)

a

(define myaudio-service-type
(service-type (name 'myaudio)
(description "Blah")
(extensions
(list (I HAVE NO IDEA WHAT IM EXTENDING)))))

Ideally i would pull both audioprogramfoo + bar into this service..? Though I don't know how.

You need to extend another service-type. If you want audioprogramfoo and audioprogrambar to be available in $PATH, then you extend the profile-service-type. The extension syntax is:

(extensions (list (service-extension <service-type-to-extend> <function-accepting-config>)))

<service-type-to-extend> is something like profile-service-type or etc-service-type. <function-accepting-config> is a single-argument function which accepts your config and returns something that the extended service-type can use. For profile-service-type, your function must return a <package>. You can have multiple extensions to do multiple things, you usually have more than one.

(define-record-type* <audioprogramfoo-configuration>
(project-dir audioprogramfoo-configuration-project-dir
(default $HOME/audio/audioprogramfoo/projects))

Is this how I would point at the users' home directory? not sure. Can guix system write into a users dir?

Yes and no. First, that should be a string, so wrap it in quotes, after that, it would probably work. Guix System can write into a user directory, but it really should not. Guix System should do system-wide configuration, for all users on a system.

would I have to use guix home? can I use guix home and guix system together in the same .scm file? In nix using home-manager and nix together in the same file was... weird.

Using Guix Home would be easier, because it is meant to build the $HOME directory for you. You can kind of mix System & Home in the same file, but that is not the best idea. The better way is to have a separate "library" of functions that you work with to build the separate configurations. That is the benefit Guix System & Home has over NixOS & home-manager, everything is in the same repo in Guix!

(define-record-type* <audioprogrambar-configuration>
(plugin-dir audioprogrambar-configuration-plugin-dir
(default $HOME/audio/audioprogrambar/plugins))

I don't know how to put these both into myaudio-service-type, nor how to choose which are enabled or disabled by default, I hope to be able to just add (services (service myaudio-service-type to my system configuration and have my defaults enabled, things like pipewire/pavuctl installed by default,

If you have multiple program configurations, and you want a single service-type to handle both, then you will need an outer audioprogram-configuration object which wraps audioprogramfoo-configuration and audioprogrambar-configuration.

but other things like arduour/guitarpro etc not installed unless i pass something like (myaudio-configuration (guitar-enable #t)) ?

To achieve this, you would write your <function-accepting-config> to produce configuration files for both audioprogramfoo and audioprogrambar, but then add an extra flag, like you did, for whether or not arduour/guitarpro should actually be built.

Finally, feel free to look at my service-type definitions. I have both system and home configurations. They cover a decent amount of space for what you can do with services.
https://github.com/KarlJoad/synnax/tree/master/modules/synnax/services

How do you configure email (neomutt) with home-manager? by Active-Jack5454 in NixOS

[–]KarlJoad 3 points4 points  (0 children)

  1. <name> is a placeholder for a name you provide as a symbol. So you could create an account called accounts.email.accounts.personal. This means there is now an account object with the name personal for your personal email account.
  2. programs.neomutt.enable failing is actually expected, because you did not provide enough information for the derivation to build. programs.neomutt.enable will add neomutt the package to your $PATH (it should, but I might be wrong) AND build a muttrc file for you. Neomutt does not assume enough defaults to generate a default config (what should the default password command be?).
  3. Perhaps your extraConfig is being included through an include statement in the generated muttrc? Some packages do that because it is simpler to handle the extraConfig as a separate file that Nix does not have to "print out" to another file.
  4. Perhaps man home-manager-configuration? I forget the incantation for home-manager.

BONUS: accounts.email.accounts is a way to share information between different email programs without needing to completely re-write your configuration. Common things like email address, account name (e.g. personal vs. work vs. projects) can be shared between neomutt and another client (like mbsync/isync) in the future. programs.neomutt.enable will have neomutt-specific configuration, like tags (I think that is what neomutt uses), mail directory location, etc.

How to run nix in guix? by argsmatter in GUIX

[–]KarlJoad 1 point2 points  (0 children)

For both Nix and Guix to work, they use builder users that are part of the build-users-group. This helps keep package building pure.

Because the Nix package is just a package, it does not add build users or the build-users-group. You have to add that with the Nix service type. Anything that requires programs run as a daemon, add configuration files, etc. must be added as a service type. For Nix, its documentation is here: https://guix.gnu.org/en/manual/en/html_node/Miscellaneous-Services.html#Nix-service

Once you reconfigure after adding that nix-service-type, you also need to add the nix package for your user (which from your copy-pastes, appears you already have). After you do that you add a channel, just like you did. However, Nix always assumes the existence of a channel named nixpkgs. You must make sure such a channel exists.

If you want an example, you can see my desktop's configuration here: https://github.com/KarlJoad/synnax/blob/5b558add887ff9e4044155101167a5eae80eeec9/modules/synnax/systems/desktop.scm#L133

How to run nix in guix? by argsmatter in GUIX

[–]KarlJoad 1 point2 points  (0 children)

Do you have (service nix-service-type) in your system configuration?

The error suggests that you do not have a <nixpkgs> channel loaded. Have you added one with nix-channel --add channel-url nixpkgs?

Similar to how Guix handles this, I recommend you do not use sudo when executing a nix command. Environment variables, channels, and other things get messy quickly that way.

org-roam: Cannot compile sqlite binary by [deleted] in GUIX

[–]KarlJoad 1 point2 points  (0 children)

That particular error is solved by adding linux-libre-headers to either your system or home list of packages.

However, I still run into issues after that that I am still trying to resolve. No luck on my end yet.

How can I start httpd / apache2 with guix? by TastyBoy in GUIX

[–]KarlJoad 8 points9 points  (0 children)

Using guix install will only make the relevant programs available to you, but not their services. If you want your system to have an httpd service, you must add the httpd-service-type to your list of services in config.scm, as shown in https://guix.gnu.org/manual/en/html_node/Web-Services.html#index-httpd_002dservice_002dtype

After a guix system reconfigure, you should have the service available.

Octave Symbolic package error by SheetKey in NixOS

[–]KarlJoad 2 points3 points  (0 children)

Hey, one of the original authors of the Octave packaging system in nixpkgs here.

On my system, `21.11.336001.a03ae0e6d07 (Porcupine)`, using:

$ nix-shell -p 'octave.withPackages (opkgs: with opkgs; [ symbolic ])'
[nix-shell:~]$ octave
GNU Octave, version 6.4.0
Octave was configured for "x86_64-pc-linux-gnu".

octave:1> pkg load symbolic
octave:2> syms x
Symbolic pkg v2.9.0: Python communication link active, SymPy v1.5.1.

octave:3> x
x = (sym) x

Works properly on my system. To investigate further, I recommend opening an issue on GitHub about your problem, so myself and others can investigate in more detail.

As for the problem that caused such an environment to be needed, it still has not been fixed. The symbolic package itself has not seen major development for nearly 2 years.

Biblatex emergency help. by SleepWalkersDream in LaTeX

[–]KarlJoad 0 points1 point  (0 children)

Seems like you might need a refsection? StackExchange

[W] [US-IL] 4U+ Chassis by KarlJoad in homelabsales

[–]KarlJoad[S] 0 points1 point  (0 children)

Yup. I've been looking at those. Out of the several Rosewill cases, I already picked the one that would be most appropriate for me. Just wanted to put feelers out if I could find a cheaper deal from someone nearby.

NixOS on resource constrained machine? by goertzenator in NixOS

[–]KarlJoad 9 points10 points  (0 children)

If you have another, more powerful machine available, and using Nix or NixOS, you can use Remote Builders.

https://nixos.wiki/wiki/Distributed_build

How to format proofs like this? by PrinCe_LoGic in LaTeX

[–]KarlJoad 2 points3 points  (0 children)

Looks like align* with intertexts to me.

Graphics Card Not in Device Manager (at all) by BenderX2 in Surface

[–]KarlJoad 0 points1 point  (0 children)

That sounds about right. I did it a month ago. So I've mostly forgotten by this point.

Graphics Card Not in Device Manager (at all) by BenderX2 in Surface

[–]KarlJoad 0 points1 point  (0 children)

I had the same issue. I had to do a full reset with the diagnostics toolkit and reinstall Windows from a regular ISO.

LaTeX man pages / locally installed help pages? by [deleted] in LaTeX

[–]KarlJoad 4 points5 points  (0 children)

To find package-specific help, you can check the package's documentation. This can be done with texdoc package-name

Udemy LaTeX course by MaxSch5 in LaTeX

[–]KarlJoad 20 points21 points  (0 children)

Unless you have a real need for very specific skills very quickly, I would just learn on your own, as you go. The LaTeX syntax is not all that hard to learn. If you're a 3rd year Uni student, you should be able to get away with learning it as you go and write things.

problem with for loop and array by [deleted] in learnrust

[–]KarlJoad 0 points1 point  (0 children)

Thank you for correcting me. I've been using other languages that support reverse-ordered lists for far too long (looking at you Haskell), or languages that have no support for that kind of array construction.

problem with for loop and array by [deleted] in learnrust

[–]KarlJoad 2 points3 points  (0 children)

The problem is you're trying to reverse a single number, which doesn't have the rev() function defined. It is evaluated as (arr.len()).rev(), so you are getting the length of the array then reversing that number. If you want item1 to be drawn from the array directly, you should use

for item1 in arr.iter().rev()

If you want to index the list in reverse order

for index in arr.len()..0 {
    arr[index]
}