Re: What is the difference between the directories in / and in /run/current-system/profile?

2024-04-29 Thread Nathan Dehnel
Thanks for the info

On Mon, Apr 29, 2024 at 11:34 AM Felix Lechner
 wrote:
>
> Hi Nathaniel,
>
> On Sat, Apr 27 2024, Nathan Dehnel wrote:
>
> > These directories are in both locations.
>
> As you already figured out, they contain different things.
>
> > What does it mean for a file to be in one place vs the other?
>
> Files in /var and /etc hold some form of local system state, plus logs.
>
> Files in your system profile's 'var' provide data that packages are
> expected to deposit there.
>
> For 'etc' it's basically the same, except for configuration files.  Many
> of those are actually in the store by themselves---and that's really the
> goal for Guix.
>
> My /bin is empty, except for /bin/sh.  The profile's bin holds symbolic
> links to all 'bin' files from packages in your current profile.  The
> profile's 'bin' is how your shell finds programs.  (It should also look
> in /run/setuid-programs.)
>
> Ideally, / would be empty, except for /gnu/store and mount points for
> /home and /root.  Some folks run / on a tmpfs and manage to get pretty
> close.  One challenge is that we haven't figured out what to do with
> secrets.  The store is public, so they can't go there.
>
> Please don't despair.  Guix is totally different from other operating
> systems, but it makes a great deal of sense once you get used to it.
> That may involve a year of intense adjustment, or more.
>
> Kind regards
> Felix



What is the difference between the directories in / and in /run/current-system/profile?

2024-04-27 Thread Nathan Dehnel
$ comm -1 -2 <(ls /) <(ls /run/current-system/profile)
bin
etc
var

These directories are in both locations. What does it mean for a file
to be in one place vs the other?



Re: GRUB fallback on boot failure

2023-05-29 Thread Nathan Dehnel
>I believe it will work
The problem is I didn't see any documented way to write verbatim to
/etc/default/grub from the service, so I'm wondering if I need to
write a feature request

>Ideally, you would merely "roll back" to the system iteration you
identified as stable. Then the generation that 'guix system
list-generations' shows as (current) corresponds to the system you are
in, and grub.cfg will be rewritten to put that iteration on top. In
that workflow, there is no need to touch the default.
Is it possible to do this without user interaction in the event of a
failure to boot?

On Mon, May 29, 2023 at 6:29 PM Felix Lechner
 wrote:
>
> Hi Nathan,
>
> On Sat, May 27, 2023 at 3:52 PM Nathan Dehnel  wrote:
> >
> > My understanding is this is done by adding the
> > following to /etc/default/grub:
> >
> > export GRUB_FALLBACK="1 2...{number of entries}"
> > GRUB_DEFAULT=saved
> > GRUB_SAVEDEFAULT=true
>
> I believe it will work, but booting older GRUB entries in Guix comes
> with a distinct inconvenience. To my knowledge, it is difficult to
> tell in which iteration you are once you have booted.
>
> Ideally, you would merely "roll back" to the system iteration you
> identified as stable. Then the generation that 'guix system
> list-generations' shows as (current) corresponds to the system you are
> in, and grub.cfg will be rewritten to put that iteration on top. In
> that workflow, there is no need to touch the default.
>
> Personally, I think it's easier to maintain (and update) but please
> feel free to experiment to find out what works best for you.
>
> Kind regards
> Felix



GRUB fallback on boot failure

2023-05-27 Thread Nathan Dehnel
Is it possible in guix to try to boot the latest generation and then
go down the list of previous generations and try to boot them until
one of them works? My understanding is this is done by adding the
following to /etc/default/grub:

export GRUB_FALLBACK="1 2...{number of entries}"
GRUB_DEFAULT=saved
GRUB_SAVEDEFAULT=true



herd service "conflicts / will not be respawned" issue ?

2022-12-20 Thread Nathan Dehnel
>Conflicts with ().
I believe this lists services that cannot run at the same time as this
service. There are no conflicts, so the list is empty.
>Will not be respawned.
I think this is controlled by (respawn? #t) in the service definition.



export LC_ALL=C

2022-10-24 Thread Nathan Dehnel
>Unfortunatelly I lost this email.

Assuming it was posted to this mailing list, you can go to
https://lists.gnu.org/archive/html/help-guix/ and search for it by
some text the email contained.



How to grant a program permission to access /run/dbus/system_bus_socket

2022-09-08 Thread Nathan Dehnel
nathan@guixlaptop ~/guix-configs $ nixGLIntel bitwarden
Fontconfig error: Cannot load default config file: No such file: (null)
(node:27126) DeprecationWarning: file property is deprecated and will
be removed in v5.
(Use `bitwarden --trace-deprecation ...` to show where the warning was created)
Fontconfig error: Cannot load default config file: No such file: (null)
[27126:0908/182240.112106:ERROR:bus.cc(398)] Failed to connect to the
bus: Failed to connect to socket /run/dbus/system_bus_socket:
Permission denied
[27126:0908/182240.112150:ERROR:bus.cc(398)] Failed to connect to the
bus: Failed to connect to socket /run/dbus/system_bus_socket:
Permission denied
[27126:0908/182240.147940:ERROR:platform_font_skia.cc(246)] Could not
find any font: Sans, sans. Falling back to the default
[27126:0908/182240.194552:ERROR:bus.cc(398)] Failed to connect to the
bus: Failed to connect to socket /run/dbus/system_bus_socket:
Permission denied
[27126:0908/182240.194584:ERROR:bus.cc(398)] Failed to connect to the
bus: Failed to connect to socket /run/dbus/system_bus_socket:
Permission denied
[27126:0908/182240.194599:ERROR:bus.cc(398)] Failed to connect to the
bus: Failed to connect to socket /run/dbus/system_bus_socket:
Permission denied
18:23:06.071 › TypeError: Object has been destroyed
at WindowMain.
(/nix/store/sfi1jv9vxlhh6rpxs6dnf6rc5i0ixg2v-bitwarden-2022.8.1/opt/Bitwarden/resources/app.asar/main.js:49732:36)
at Generator.next ()
at 
/nix/store/sfi1jv9vxlhh6rpxs6dnf6rc5i0ixg2v-bitwarden-2022.8.1/opt/Bitwarden/resources/app.asar/main.js:49546:71
at new Promise ()
at window_main_awaiter
(/nix/store/sfi1jv9vxlhh6rpxs6dnf6rc5i0ixg2v-bitwarden-2022.8.1/opt/Bitwarden/resources/app.asar/main.js:49542:12)
at WindowMain.updateWindowState
(/nix/store/sfi1jv9vxlhh6rpxs6dnf6rc5i0ixg2v-bitwarden-2022.8.1/opt/Bitwarden/resources/app.asar/main.js:49727:16)
at WindowMain.
(/nix/store/sfi1jv9vxlhh6rpxs6dnf6rc5i0ixg2v-bitwarden-2022.8.1/opt/Bitwarden/resources/app.asar/main.js:49681:28)
at Generator.next ()
at 
/nix/store/sfi1jv9vxlhh6rpxs6dnf6rc5i0ixg2v-bitwarden-2022.8.1/opt/Bitwarden/resources/app.asar/main.js:49546:71
at new Promise ()

Chowning the /run/dbus/system_bus_socket might break something and
would be overwritten anyways. What's the Best Practices™ way to fix
this?



Store path in package definition

2022-08-26 Thread Nathan Dehnel
Would something like this work?

(string-append (assoc-ref %outputs "out") "/passff.py")

https://guix.gnu.org/cookbook/en/html_node/Extended-example.html#Build-system-arguments



Re: How to get en_US.UTF-8 locale in guix shell

2022-08-22 Thread Nathan Dehnel
I figured it out, I had to REMOVE the glibc package from my profile.

On Fri, Aug 19, 2022 at 6:23 PM Nathan Dehnel  wrote:
>
> After following these instructions
> https://guix.gnu.org/manual/en/html_node/Application-Setup.html#locales_002dand_002dlocpath
> locale -a only returns
> C
> POSIX
> as the locales inside a guix shell. What else do I need to do?
> glibc-locales is installed both inside and outside the shell.



How to get en_US.UTF-8 locale in guix shell

2022-08-19 Thread Nathan Dehnel
After following these instructions
https://guix.gnu.org/manual/en/html_node/Application-Setup.html#locales_002dand_002dlocpath
locale -a only returns
C
POSIX
as the locales inside a guix shell. What else do I need to do?
glibc-locales is installed both inside and outside the shell.



Substitute not being used

2022-07-25 Thread Nathan Dehnel
I have telegram-desktop installed and I've never seen a substitute
download for it. It always builds from source.



Re: What to do if headers are not found

2022-07-03 Thread Nathan Dehnel
That did work! Much appreciated.

On Sun, Jul 3, 2022 at 3:52 PM Andreas Enge  wrote:
>
> Am Sun, Jul 03, 2022 at 03:40:22PM -0500 schrieb Nathan Dehnel:
> > That didn't work, unfortunately.
>
> If you try "guix build util-linux", you will see that there are three
> outputs. The header files are in the lib output, so you need to add
> (inputs
>   `(("util-linux" ,util-linux "lib")))
> (And maybe something different with the new syntax, but it works this way.)
> Then it passes this hurdle, and complains about a missing dbus package next.
>
> Andreas
>



Re: What to do if headers are not found

2022-07-03 Thread Nathan Dehnel
That didn't work, unfortunately.



What to do if headers are not found

2022-07-02 Thread Nathan Dehnel
This is a package I'm making. Configure can't find libmount.h, which
comes from util-linux, even though I have added it to
propagated-inputs, as the manual suggests. How can I fix this or
further investigate?

(define-module (gooby-channel packages snapper)
  #:use-module (guix licenses)
  #:use-module (guix packages)
  #:use-module (guix build-system gnu)
  #:use-module (guix download)
  #:use-module (gnu packages linux)
  #:use-module (gnu packages autotools)
  #:use-module (gnu packages pkg-config)
)

(define-public snapper
  (package
(name "snapper")
(version "v0.10.2")
(source (origin
 (method url-fetch)
 (uri (string-append
"https://github.com/openSUSE/snapper/archive/refs/tags/; version
 ".tar.gz"))
 (sha256
  (base32
   "1anp4iqw2ina7izn7pgqs9cm2nlywmdrhzybx2y3l0n5wpmyrkw5"
(build-system gnu-build-system)
(arguments
 `(#:phases
(modify-phases %standard-phases
  )
))
 (native-inputs
`(("automake" ,automake)
("autoconf" ,autoconf)
("libtool" ,libtool)
("pkg-config" ,pkg-config)
))
(propagated-inputs
`(("util-linux" ,util-linux)))
(home-page
  "http://snapper.io/;)
(synopsis
  "Snapper is a tool for Linux filesystem snapshot management.")
(description
  "INSERT_HERE")
(license gpl3)))

starting phase `set-SOURCE-DATE-EPOCH'
phase `set-SOURCE-DATE-EPOCH' succeeded after 0.0 seconds
starting phase `set-paths'
environment variable `PATH' set to
`/gnu/store/d8l3aaq7vs2kzkwg0afj1lv1hb2s5fxm-automake-1.16.3/bin:/gnu/store/km9l89sd4wm9jp358481v2z6qacwl2h9-autoconf-2.69/bin:/gnu/store/81n58x4293zwhvydzvvnypcz7y59jqmx-libtool-2.4.6/bin:/gnu/store/2b3blhwbag1ial0dhxw7wh4zjxl0cqpk-pkg-config-0.29.2/bin:/gnu/store/31ffp5lszf1g7h1zw750w621cm14hxlr-util-linux-2.37.2/bin:/gnu/store/31ffp5lszf1g7h1zw750w621cm14hxlr-util-linux-2.37.2/sbin:/gnu/store/g2ajyl8xk9aarxrgjbng2hkj3qm2v0z2-tar-1.34/bin:/gnu/store/iixwcv3k49ks1rf34pjgfzmzyhhgwng3-gzip-1.10/bin:/gnu/store/s3hl12jxz9ybs7nsy7kq7ybzz7qnzmsg-bzip2-1.0.8/bin:/gnu/store/c8isj4jq6knv0icfgr43di6q3nvdzkx7-xz-5.2.5/bin:/gnu/store/4ic6244i3ca4b4rxc2wnrgllsidyishv-file-5.39/bin:/gnu/store/ahmmvw21p11ik80lg1f953y7fd8bqkjm-diffutils-3.8/bin:/gnu/store/z39hnrwds1dgcbpfgj8dnv2cngjb2xbl-patch-2.7.6/bin:/gnu/store/39rsx3nl4c31952jybbjb8d6idr5hx7r-findutils-4.8.0/bin:/gnu/store/690qz3fg334dpwn3pn6k59n4wc943p2b-gawk-5.1.0/bin:/gnu/store/wxgv6i8g0p24q5gcyzd0yr07s8kn9680-sed-4.8/bin:/gnu/store/xjwp2hsd9256icjjybfrmznppjicywf6-grep-3.6/bin:/gnu/store/d251rfgc9nm2clzffzhgiipdvfvzkvwi-coreutils-8.32/bin:/gnu/store/55cbpsi18mahg131nmiya6km5b4mscfa-make-4.3/bin:/gnu/store/4y5m9lb8k3qkb1y9m02sw9w9a6hacd16-bash-minimal-5.1.8/bin:/gnu/store/s2pg5k98fl2g2szg9dykxyd9zl3xihv9-ld-wrapper-0/bin:/gnu/store/rc781v4k0drhaqn90xfwwpspki5x0bvf-binutils-2.37/bin:/gnu/store/069aq2v993kpc41yabp5b6vm4wb9jkhg-gcc-10.3.0/bin:/gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33/bin:/gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33/sbin:/gnu/store/gwrii9zfm1vl70cx3z16i0s5wbvng997-m4-1.4.18/bin'
environment variable `ACLOCAL_PATH' set to
`/gnu/store/d8l3aaq7vs2kzkwg0afj1lv1hb2s5fxm-automake-1.16.3/share/aclocal:/gnu/store/81n58x4293zwhvydzvvnypcz7y59jqmx-libtool-2.4.6/share/aclocal:/gnu/store/2b3blhwbag1ial0dhxw7wh4zjxl0cqpk-pkg-config-0.29.2/share/aclocal'
environment variable `PKG_CONFIG_PATH' set to
`/gnu/store/c8isj4jq6knv0icfgr43di6q3nvdzkx7-xz-5.2.5/lib/pkgconfig:/gnu/store/4ic6244i3ca4b4rxc2wnrgllsidyishv-file-5.39/lib/pkgconfig'
environment variable `BASH_LOADABLES_PATH' unset
environment variable `C_INCLUDE_PATH' set to
`/gnu/store/s3hl12jxz9ybs7nsy7kq7ybzz7qnzmsg-bzip2-1.0.8/include:/gnu/store/c8isj4jq6knv0icfgr43di6q3nvdzkx7-xz-5.2.5/include:/gnu/store/4ic6244i3ca4b4rxc2wnrgllsidyishv-file-5.39/include:/gnu/store/690qz3fg334dpwn3pn6k59n4wc943p2b-gawk-5.1.0/include:/gnu/store/55cbpsi18mahg131nmiya6km5b4mscfa-make-4.3/include:/gnu/store/rc781v4k0drhaqn90xfwwpspki5x0bvf-binutils-2.37/include:/gnu/store/069aq2v993kpc41yabp5b6vm4wb9jkhg-gcc-10.3.0/include:/gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33/include:/gnu/store/6mjww4iz4xdan74d5bbjfh7il8rngfkk-linux-libre-headers-5.10.35/include'
environment variable `CPLUS_INCLUDE_PATH' set to
`/gnu/store/s3hl12jxz9ybs7nsy7kq7ybzz7qnzmsg-bzip2-1.0.8/include:/gnu/store/c8isj4jq6knv0icfgr43di6q3nvdzkx7-xz-5.2.5/include:/gnu/store/4ic6244i3ca4b4rxc2wnrgllsidyishv-file-5.39/include:/gnu/store/690qz3fg334dpwn3pn6k59n4wc943p2b-gawk-5.1.0/include:/gnu/store/55cbpsi18mahg131nmiya6km5b4mscfa-make-4.3/include:/gnu/store/rc781v4k0drhaqn90xfwwpspki5x0bvf-binutils-2.37/include:/gnu/store/069aq2v993kpc41yabp5b6vm4wb9jkhg-gcc-10.3.0/include/c++:/gnu/store/069aq2v993kpc41yabp5b6vm4wb9jkhg-gcc-10.3.0/include:/gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33/include:/gnu/store/6mjww4iz4xdan74d5bbjfh7il8rngfkk-linux-libre-headers-5.10.35/include'

add a substitute server and thoughts for improvement

2022-04-10 Thread Nathan Dehnel
I suggest checking out "guix weather", "guix upgrade --dry-run", and
"guix upgrade --do-not-upgrade="



Re: with every guix pull icedove updating I have to set up icedove again

2022-03-30 Thread Nathan Dehnel
Run icedove -ProfileManager

On Wed, Mar 30, 2022, 11:12 AM Gottfried  wrote:

> at the moment I am getting my wires crossed/ I am a bit slow on the uptake
>
> what do you mean by " to launch the profile manager"
> do you mean to open the .guix-profile folder?
>
> "and select the profile"
> do you mean to open: .guix-profile/bin/
> and choose the profile "icedove"
> If yes, I did that, but it opened the new version which asks me for
> setting up icedove.
> So this didn't help me.
>
> Or do you mean to open /gnu/store/?
> and choose the right profile?
> If yes, than which profile should I choose?
>
>
>
>
> Am 29.03.22 um 21:47 schrieb Nathan Dehnel:
> > I also have this problem. It forgets which profile I'm using or
> > something. I have to launch the profile manager and select the profile
> > for it to use.
>


with every guix pull icedove updating I have to set up icedove again

2022-03-29 Thread Nathan Dehnel
I also have this problem. It forgets which profile I'm using or
something. I have to launch the profile manager and select the profile
for it to use.



Professional audio setup (JACK, PipeWire)

2022-03-23 Thread Nathan Dehnel
I had a similar error a while ago: https://github.com/rncbc/qjackctl/issues/96



Re: How to put a file in /gnu/store and set its permissions

2021-12-07 Thread Nathan Dehnel
Thanks. Though that code causes "guix system: error: symlink: File
exists: "/etc/ssh"" when I use it, and by the looks of it, would still
be putting the key in the store, which is insecure.

On Sun, Dec 5, 2021 at 8:44 PM Gary Johnson  wrote:
>
> Nathan Dehnel  writes:
>
> > Thanks. I guess then I need to know how to put a file in /etc/ssh
> > without putting it in the store.
>
> To programmatically add a file to /etc, you can extend the
> etc-service-type in your operating-system's services field like so:
>
> ```
> (use-modules
>  ((gnu services) #:select (simple-service etc-service-type))
>  ((gnu services desktop) #:select (%desktop-services))
>  ((gnu system)   #:select (operating-system))
>  ((guix gexp)#:select (local-file)))
>
> (define guixrig_host_rsa_key
>   (local-file "ssh/guixrig_host_rsa_key" #:recursive? #t))
>
> (operating-system
>  ...
>  (services (cons* (simple-service 'my-secret-service etc-service-type
>   `(("ssh/guixrig_host_rsa_key" 
> ,guixrig_host_rsa_key)))
>   %desktop-services)))
> ```
>
> Have fun and happy hacking!
>   ~Gary
>
> --
> GPG Key ID: 7BC158ED
> Use `gpg --search-keys lambdatronic' to find me
> Protect yourself from surveillance: https://emailselfdefense.fsf.org
> ===
> ()  ascii ribbon campaign - against html e-mail
> /\  www.asciiribbon.org   - against proprietary attachments
>
> Why is HTML email a security nightmare? See https://useplaintext.email/
>
> Please avoid sending me MS-Office attachments.
> See http://www.gnu.org/philosophy/no-word-attachments.html



Re: How to put a file in /gnu/store and set its permissions

2021-12-05 Thread Nathan Dehnel
Thanks. I guess then I need to know how to put a file in /etc/ssh
without putting it in the store.

On Sat, Dec 4, 2021 at 11:13 PM Leo Famulari  wrote:
>
> On Sat, Dec 04, 2021 at 04:47:12PM -0600, Nathan Dehnel wrote:
> > https://guix.gnu.org/manual/en/html_node/G_002dExpressions.html
> > This says to set #:recursive? #t and guix will preserve its
> > permissions in the store. I have done this:
> >
> > (define guixrig_host_rsa_key
> > (local-file "ssh/guixrig_host_rsa_key" #:recursive? #t))
> >
> > The file this expression puts in the store has permissions of 444,
> > despite the original being 400. How do I prevent guix from changing
> > permissions, or manually override them?
>
> In general, the store cannot be used to store secrets.  By design,
> everything in the store is made world-readable despite what permissions
> are set, for example in a package definition. I'm not sure if that's
> documented in the manual; I don't see it in the manual section The Store
> [1].
>
> I'm not sure exactly what code ensures that everything in the store is
> readable, but it's probably somewhere in the daemon [0], which is what
> writes to the store [1].
>
> The question of how to handle secrets in Guix has been discussed many
> times over the years and there are some solutions in various services;
> maybe there is a canonical solution now. But basically the idea is to
> store the secret outside of the store, like in /etc, as defined in a
> service configuration in config.scm.
>
> Hopefully some other people can join the conversation with more specific
> advice.
>
> [0]
> https://git.savannah.gnu.org/cgit/guix.git/tree/nix?h=v1.3.0
>
> [1] I'd guess that canonicaliseTimestampAndPermissions is always called:
> https://guix.gnu.org/manual/en/html_node/The-Store.html



How to put a file in /gnu/store and set its permissions

2021-12-04 Thread Nathan Dehnel
https://guix.gnu.org/manual/en/html_node/G_002dExpressions.html
This says to set #:recursive? #t and guix will preserve its
permissions in the store. I have done this:

(define guixrig_host_rsa_key
(local-file "ssh/guixrig_host_rsa_key" #:recursive? #t))

The file this expression puts in the store has permissions of 444,
despite the original being 400. How do I prevent guix from changing
permissions, or manually override them?



Re: guix pull: error: getting attributes of path: No such file or directory

2021-09-08 Thread Nathan Dehnel
I seem to have fixed it by running guix gc -D on a bunch of objects in
/gnu/store.

On Wed, Sep 8, 2021 at 4:59 PM Nathan Dehnel  wrote:
>
> I installed guix on gentoo with this
> https://github.com/trofi/nix-guix-gentoo and ran guix pull, and I got
> this error:
>
> ;;; note: source file /usr/share/guile/site/2.2/json.scm
> ;;;   newer than compiled /usr/lib64/guile/2.2/site-ccache/json.go
> ;;; note: source file /usr/share/guile/site/2.2/json.scm
> ;;;   newer than compiled /usr/lib64/guile/2.2/site-ccache/json.go
> Updating channel 'guix' from Git repository at
> 'https://git.savannah.gnu.org/git/guix.git'...
> Building from this channel:
>   guix  https://git.savannah.gnu.org/git/guix.git16ef7b4
> guix pull: error: getting attributes of path
> `/gnu/store/1f2frr4fcdb8gib7x3akr6vz3562g73v-i18n.scm': No such file
> or directory
>
> Does anyone have any advice on how to fix this?



guix pull: error: getting attributes of path: No such file or directory

2021-09-08 Thread Nathan Dehnel
I installed guix on gentoo with this
https://github.com/trofi/nix-guix-gentoo and ran guix pull, and I got
this error:

;;; note: source file /usr/share/guile/site/2.2/json.scm
;;;   newer than compiled /usr/lib64/guile/2.2/site-ccache/json.go
;;; note: source file /usr/share/guile/site/2.2/json.scm
;;;   newer than compiled /usr/lib64/guile/2.2/site-ccache/json.go
Updating channel 'guix' from Git repository at
'https://git.savannah.gnu.org/git/guix.git'...
Building from this channel:
  guix  https://git.savannah.gnu.org/git/guix.git16ef7b4
guix pull: error: getting attributes of path
`/gnu/store/1f2frr4fcdb8gib7x3akr6vz3562g73v-i18n.scm': No such file
or directory

Does anyone have any advice on how to fix this?



How do I specify a btrfs subvolume?

2021-03-14 Thread Nathan Dehnel
This is extremely confusing:
https://guix.gnu.org/manual/en/html_node/Btrfs-file-system.html

I made my best attempt at creating and mounting a subvolume at
/media/offsite-backup:

  (file-systems
(cons* (file-system
 (mount-point "/")
 (device
   (uuid "b2e0f449-0583-46fd-8c23-ad2e6cd661a1"
 'btrfs))
 (type "btrfs"))
   (file-system
 (mount-point "/media/offsite-backup")
 (device
   (uuid "b2e0f449-0583-46fd-8c23-ad2e6cd661a1"
 'btrfs))
 (type "btrfs")
 (options "subvol=offsite-backup,compress=zlib:9"))

It gives this error:

building 
/gnu/store/mrs1qbg619qk4n2lv8k377arclgzwqjq-install-bootloader.scm.drv...
guix system: bootloader successfully installed on '/dev/sda'
guix system: warning: exception caught while executing 'start' on
service 'file-system-/media/offsite-backup':
In procedure mount: mount "/dev/sda2" on "///media/offsite-backup": No
such file or directory
guix system: warning: some services could not be upgraded

But /media/offsite-backup exists.



Re: /dev/bcache/by-uuid directory empty

2020-12-22 Thread Nathan Dehnel
(define-module (gooby-channel packages bcache-tools)
  #:use-module (guix licenses)
  #:use-module (guix packages)
  #:use-module (gnu packages)
  #:use-module (guix build-system gnu)
  #:use-module (guix git-download)
  #:use-module (gnu packages linux)
  #:use-module (gnu packages pkg-config))

(define-public bcache-tools
  (package
(name "bcache-tools")
(version "1.1")
(source
 (origin
   (method git-fetch)
   (uri
(git-reference
 (url (string-append
"https://git.kernel.org/pub/scm/linux/kernel/git/colyli/; name
".git"))
 (commit (string-append name "-" version
   (file-name (git-file-name name version))
   (sha256
(base32
 "1vfqm3asx7h1sjwyq45dki4wk7lkipqrx2pw2hnqm4xir85qf67h"))
   (patches (search-patches "bcache-tools-noprobe.patch"
(build-system gnu-build-system)
(arguments
 `(;;#:tests? #f  ; no "check" target
   #:make-flags
 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
   #:phases
 (modify-phases %standard-phases
  (delete 'configure
(inputs
 `(("util-linux" ,util-linux)))
(native-inputs
 `(("pkg-config" ,pkg-config)))
(home-page "https://bcache.evilpiepirate.org/;)
(synopsis "These are the userspace tools required for bcache.")
(description "Bcache patches for the Linux kernel allow one to use
SSDs to cache other block devices. It's analogous to L2Arc for ZFS,
but Bcache also does writeback caching (besides just write through
caching), and it's filesystem agnostic. ")
(license gpl2)))

I tried to make a package, but I got stuck.
https://www.mail-archive.com/bug-guix@gnu.org/msg00180.html
According to this,  if you use gnu-build-system, all packages added to
inputs get added to PKG_CONFIG_PATH, but for some reason it's not
happening for util-linux, which causes a build error.

On Fri, Dec 18, 2020 at 10:31 AM Nathan Dehnel  wrote:
>
> >which is a bit more than that.  Guix doesn't ship bcache-tools
> (yet); are you using your own package?  If so, please consider
> sharing :-)
>
> I could try to make a package.
>
> >Have you tried this?
>
> Yes.
>
> On Fri, Dec 18, 2020 at 8:13 AM Tobias Geerinckx-Rice  wrote:
> >
> > Nathan,
> >
> > You may well be the first to (try to) use bcache on Guix System.
> >
> > Nathan Dehnel 写道:
> > > The manual https://www.kernel.org/doc/Documentation/bcache.txt
> > > states
> > > that udev is necessary, and it is enabled:
> >
> > It says:
> >
> > --8<---cut here---start->8---
> > bcache-tools now ships udev rules, and bcache devices are known to
> > the kernel immediately.
> > --8<---cut here---end--->8---
> >
> > which is a bit more than that.  Guix doesn't ship bcache-tools
> > (yet); are you using your own package?  If so, please consider
> > sharing :-)
> >
> > You'd have to add it to the RULES field of your system's
> > UDEV-CONFIGURATION to make the system's udev ‘see’ the rules.
> > Simply installing it or adding it to your system packages isn't
> > enough.
> >
> > The kernel docs continue:
> >
> > --8<---cut here---start->8---
> > Without udev, you can manually register devices like this::
> >
> >   echo /dev/sdb > /sys/fs/bcache/register
> >   echo /dev/sdc > /sys/fs/bcache/register
> >
> > Registering the backing device makes the bcache device show up in
> > /dev; you can now format it and use it as normal.
> > --8<---cut here---end--->8---
> >
> > Have you tried this?
> >
> > Good luck,
> >
> > T G-R



Re: /dev/bcache/by-uuid directory empty

2020-12-18 Thread Nathan Dehnel
>which is a bit more than that.  Guix doesn't ship bcache-tools
(yet); are you using your own package?  If so, please consider
sharing :-)

I could try to make a package.

>Have you tried this?

Yes.

On Fri, Dec 18, 2020 at 8:13 AM Tobias Geerinckx-Rice  wrote:
>
> Nathan,
>
> You may well be the first to (try to) use bcache on Guix System.
>
> Nathan Dehnel 写道:
> > The manual https://www.kernel.org/doc/Documentation/bcache.txt
> > states
> > that udev is necessary, and it is enabled:
>
> It says:
>
> --8<---cut here---start->8---
> bcache-tools now ships udev rules, and bcache devices are known to
> the kernel immediately.
> --8<---cut here---end--->8---
>
> which is a bit more than that.  Guix doesn't ship bcache-tools
> (yet); are you using your own package?  If so, please consider
> sharing :-)
>
> You'd have to add it to the RULES field of your system's
> UDEV-CONFIGURATION to make the system's udev ‘see’ the rules.
> Simply installing it or adding it to your system packages isn't
> enough.
>
> The kernel docs continue:
>
> --8<---cut here---start->8---
> Without udev, you can manually register devices like this::
>
>   echo /dev/sdb > /sys/fs/bcache/register
>   echo /dev/sdc > /sys/fs/bcache/register
>
> Registering the backing device makes the bcache device show up in
> /dev; you can now format it and use it as normal.
> --8<---cut here---end--->8---
>
> Have you tried this?
>
> Good luck,
>
> T G-R



/dev/bcache/by-uuid directory empty

2020-12-17 Thread Nathan Dehnel
I have modprobed bcache and registered the caches + backing drives
necessary to mount a volume on bcache:

root@guixrig ~/guix-configs/guixrig# ls /dev/bcache*
/dev/bcache0  /dev/bcache2  /dev/bcache4  /dev/bcache6  /dev/bcache8
/dev/bcache1  /dev/bcache3  /dev/bcache5  /dev/bcache7  /dev/bcache9

However, /dev/bcache/by-uuid is empty.
The manual https://www.kernel.org/doc/Documentation/bcache.txt states
that udev is necessary, and it is enabled:

root@guixrig ~/guix-configs/guixrig# herd status udev
Status of udev:
  It is started.
  Running value is 206.
  It is enabled.
  Provides (udev).
  Requires (root-file-system).
  Conflicts with ().
  Will not be respawned.

Is there something else I need to do to get the directory to populate?



Unable to edit pulseaudio config file

2020-06-11 Thread Nathan Dehnel
I made a modified config file in
/home/nathan/.config/pulse/default.pa, and then added this to
config.scm, per the manual:
https://guix.gnu.org/manual/en/html_node/Sound-Services.html

(service pulseaudio-service-type
 (pulseaudio-configuration (script-file (file-append
pulseaudio "/home/nathan/.config/pulse/default.pa"

But guix system reconfigure gives:

guix system: error: duplicate 'pulse' entry for /etc

How do I fix this?



Cannot setup git with libsecret

2020-02-28 Thread Nathan Dehnel
I'm trying to set up git with libsecret. According to this
https://stackoverflow.com/questions/13385690/how-to-use-git-with-gnome-keyring-integration/14528360#14528360

I don't know where to start. Apparently I can use "git config --global
credential.helper libsecret"? Or maybe I have to use the full file
path under /usr (which doesn't exist in guix)? Or I have to compile it
myself? Or maybe I actually have to use gnome-keyring instead?

Nothing I've tried has worked so far. Libsecret and gnome-keyring are
installed. Has anyone gotten git working with either of these on guix?



Cannot mount NFS share as user or root

2020-02-17 Thread Nathan Dehnel
bash-5.0$ mount /media/store
mount: /media/store: bad option; for several filesystems (e.g. nfs,
cifs) you might need a /sbin/mount. helper program

/etc/config.scm:

(file-system
 (mount-point "/media/store")
 (device "gentooserver:/")
 (type "nfs4")
 (mount? #f)
 (create-mount-point? #t)
 (options "rw,_netdev,noauto,user,lazytime,exec,tcp"))

/etc/fstab:

gentooserver:/ /media/store nfs4 rw,_netdev,noauto,user,lazytime,exec,tcp

nfs-utils is installed:

bash-5.0$ guix package -i nfs-utils
The following package will be upgraded:
   nfs-utils 2.4.2 → 2.4.2
/gnu/store/chmbpkh0gvvmdhgwjw7rpl63f99mv7i6-nfs-utils-2.4.2

nothing to be done



How to fix broken user guix?

2020-02-15 Thread Nathan Dehnel
bash-5.0$ guix pull
Updating channel 'nonguix' from Git repository at
'https://gitlab.com/nonguix/nonguix'...
guix pull: error: Git error: failed open -
'/home/nathan/.cache/guix/checkouts/l74zueb3lgylhgxnuzx3d5fzraztxvzu2s4466wlqqvmz7hdct3a/.git/FETCH_HEAD'
is locked: Permission denied



"no code for module"

2019-12-28 Thread Nathan Dehnel
I made a package which is basically a clone of the "hello" package example.

(use-modules (guix packages)
 (guix download)
 (guix build-system gnu)
 (guix licenses))
(define-public deadbeef
 (package
   (name "deadbeef")
   (version "1.8.2")
   (source (origin
 (method url-fetch)
 (uri (string-append
"https://github.com/DeaDBeeF-Player/deadbeef/archive/; version
 ".tar.gz"))
 (sha256
  (base32
   "1wsx62gi1bfd9rx5br2gprq4q3sfp7iqj1inxhhiqjasbm85vg50"
   (build-system gnu-build-system)
   (synopsis "A music player for *nix-like systems and OS X")
   (description
"GNU Hello prints the message \"Hello, world!\" and then exits.  It
serves as an example of standard GNU coding practices.  As such, it supports
command-line arguments, multiple languages, and so on.")
   (home-page "https://deadbeef.sourceforge.io/;)
   (license gpl2)))

I added it to a channel, and added the channel, then ran guix pull. I
got this error:

(repl-version 0 0)
(exception misc-error (value #f) (value "~A ~S") (value ("no code for
module" (deadbeef))) (value #f))

Any idea what the problem is?



Is Shepherd socket-activated?

2019-12-02 Thread Nathan Dehnel
Is Shepherd socket-activated like Systemd? Or does its design allow it
to be modified to add that feature?
Referring to this: http://0pointer.de/blog/projects/socket-activation.html



GuixSD install, bootable on multiple architectures

2018-10-01 Thread Nathan Dehnel
I had an idea for an operating system that is portable across CPU
architectures.

You would have a set of bootloaders for each architecture (let's say,
x86 and PowerPC). The x86 bootloader would be stored in the EFI
partition, and the PowerPC bootloader would be stored in the
OpenFirmware partition. (These could all be GRUB2, or whatever). The
bootloader would be configured to load the appropriate kernel.

You would have a set of Linux kernels stored in /boot, one compiled
for each architecture. Let's say the x86 bootloader loads the x86
kernel. Then the x86 kernel loads the appropriate x86-compiled init.
(This could be done by setting the init= kernel option, for example).

The init system loads the guix daemon, which is used from then on to
load the correct programs for the running system.

One copy of each application would be installed in /gnu/store for each
architecture keyworded (to use Gentoo termiology) by the package
manager. The appropriate application for the current CPU would be
linked to the typical location on the filesystem hierarchy (/bin/cp,
/bin/cat, etc.) by the guix daemon.

This would for example allow you to install GuixSD for x86, then, by
setting an option in your package manager, install a set of PowerPC
packages in parallel, and then put your drive in a PowerPC machine and
it would boot.

Is this theoretically possible to implement?