al12gamer / deckscript

Script to set up the Deck for work and play
GNU General Public License v3.0
2 stars 0 forks source link

Nix Issues #17

Closed al12gamer closed 1 year ago

al12gamer commented 1 year ago

It seems, on SteamOS 3.5.7, after installing Nix, I'm met with some errors on current channel when trying to install packages in fish or bash. I'll add a recording below. Don't know how far I want to dig into troubleshooting things, so I may open it up to the community. Fastfetch:

(1)(deck@gabegear ~)$ ff
              .,,,,.                   deck@gabegear
        .,'onNMMMMMNNnn',.             -------------
     .'oNMANKMMMMMMMMMMMNNn'.          OS: SteamOS holo 3.5.7 (steamdeck) x86_64
   .'ANMMMMMMMXKNNWWWPFFWNNMNn.        Host: Jupiter (1)
  ;NNMMMMMMMMMMNWW'' ,.., 'WMMM,       Kernel: 6.1.52-valve9-1-neptune-61
 ;NMMMMV+##+VNWWW' .+;'':+, 'WMW,      Uptime: 12 mins
,VNNWP+######+WW,  +:    :+, +MMM,     Packages: 47 (flatpak)
'+#############,   +.    ,+' +NMMM     Shell: bash 5.1.16
  '*#########*'     '*,,*' .+NMMMM.    Display (ROG PG279Q): 2560x1440 @ 60Hz
     `'*###*'          ,.,;###+WNM,    DE: KDE Plasma 5.27.5
         .,;;,      .;##########+W     WM: KWin (X11)
,',.         ';  ,+##############'     WM Theme: Breeze
 '###+. :,. .,; ,###############'      Theme: Breeze (Vapor) [QT], Breeze [GTK2/3]
  '####.. `'' .,###############'       Icons: breeze-dark [QT], breeze-dark [GTK2/3/4]
    '#####+++################'         Font: Noto Sans (11pt) [QT], Noto Sans (11pt) [GTK2/3/4]
      '*##################*'           Cursor: breeze (24px)
         ''*##########*''              Terminal: konsole 23.4.2
              ''''''                   CPU: AMD Custom 0405 (8) @ 2.80 GHz
                                       GPU: AMD Custom GPU 0405
                                       Memory: 3.51 GiB / 11.51 GiB (30%)
                                       Swap: 256.00 KiB / 16.00 GiB (0%)
                                       Disk (/): 2.74 GiB / 5.00 GiB (55%) - btrfs
                                       Disk (/home): 336.24 GiB / 463.39 GiB (73%) - ext4
                                       Disk (/run/media/deck/34ec9559-770c-42c4-a433-c1d34dc5b131): 440.25 GiB / 468.93 GiB (94%) - ext4
                                       Disk (/var): 15.05 MiB / 229.91 MiB (7%) - ext4
                                       Local IP (enp4s0f3u1u4c2): 10.0.0.75/24 *
                                       Battery: 95% [Not charging]
                                       Locale: en_US.UTF-8

Error seen when trying to install a simple package such as asciinema for terminal recordings:

(deck@gabegear ~)$ nix-env -i asciinema
warning: name collision in input Nix expressions, skipping '/home/deck/.nix-defexpr/channels_root/nixpkgs'
suggestion: remove 'nixpkgs' from either the root channels or the user channels
installing 'asciinema-2.4.0'
error:
       … while evaluating the attribute 'drvPath'

         at /nix/store/nlm3wz58fjzcbf7d9csf2czxmrvsk65k-nixpkgs/nixpkgs/lib/customisation.nix:263:7:

          262|     in commonAttrs // {
          263|       drvPath = assert condition; drv.drvPath;
             |       ^
          264|       outPath = assert condition; drv.outPath;

       … while calling the 'derivationStrict' builtin

         at /derivation-internal.nix:9:12:

            8|
            9|   strict = derivationStrict drvAttrs;
             |            ^
           10|

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: opening lock file '/nix/store/2qvar3q9mrgk7rrzrnw9z7rrp6b1liv4-source.drv.lock': Permission denied
(1)(deck@gabegear ~)$ fish
Welcome to fish, the friendly interactive shell
Type help for instructions on how to use fish
deck@gabegear ~> nix-env -install asciinema
error: unknown flag '-n'
Try 'nix-env --help' for more information.
deck@gabegear ~ [1]> nix-env --install asciinema
warning: name collision in input Nix expressions, skipping '/home/deck/.nix-defexpr/channels_root/nixpkgs'
suggestion: remove 'nixpkgs' from either the root channels or the user channels
installing 'asciinema-2.4.0'
error:
       … while evaluating the attribute 'drvPath'

         at /nix/store/nlm3wz58fjzcbf7d9csf2czxmrvsk65k-nixpkgs/nixpkgs/lib/customisation.nix:263:7:

          262|     in commonAttrs // {
          263|       drvPath = assert condition; drv.drvPath;
             |       ^
          264|       outPath = assert condition; drv.outPath;

       … while calling the 'derivationStrict' builtin

         at /derivation-internal.nix:9:12:

            8|
            9|   strict = derivationStrict drvAttrs;
             |            ^
           10|

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: opening lock file '/nix/store/2qvar3q9mrgk7rrzrnw9z7rrp6b1liv4-source.drv.lock': Permission denied
al12gamer commented 1 year ago

First I'll try doing a factory reset and then reinstalling and chowning Nix

al12gamer commented 1 year ago

After a factory reset, and then running deckscript, it seems that the nix-env -iA command for installing didn't register and the script just kept on going with everything else. Interesting. Will have to modify that.

al12gamer commented 1 year ago

After a factory reset, then running through the script and manually installing various packages using nix-env --install instead of the guide-recommended nix-env -iA for installing a bunch of packages, things seem to be working. Will change in kind.

al12gamer commented 1 year ago

Working now

(1)(deck@gabegearlcd ~)$ alias
alias ddc='sudo dmidecode'
alias ff='fastfetch'
alias grep='grep --color=auto'
alias ll='ls -la'
alias ls='ls --color=auto'
alias net='sudo systemctl restart NetworkManager'
alias rb='sudo shutdown -r now'
alias upd='nix-channel --update && nix-env --upgrade && flatpak update --appstream && flatpak update -y && flatpak remove --unused'
(deck@gabegearlcd ~)$ upd
unpacking channels...
Updating appstream data for remote flathub
Updating appstream data for user remote flathub
Looking for updates…

Nothing to do.
Nothing unused to uninstall
(deck@gabegearlcd ~)$ ff
                                       deck@gabegearlcd
                                       ----------------
              .,,,,.                   OS: SteamOS holo 3.5.7 (steamdeck) x86_64
        .,'onNMMMMMNNnn',.             Host: Jupiter (1)
     .'oNMANKMMMMMMMMMMMNNn'.          Kernel: 6.1.52-valve9-1-neptune-61
   .'ANMMMMMMMXKNNWWWPFFWNNMNn.        Uptime: 43 mins
  ;NNMMMMMMMMMMNWW'' ,.., 'WMMM,       Packages: 14 (flatpak-system), 13 (flatpak-user)
 ;NMMMMV+##+VNWWW' .+;'':+, 'WMW,      Shell: bash 5.1.16
,VNNWP+######+WW,  +:    :+, +MMM,     Display (ROG PG279Q): 2560x1440 @ 60Hz
'+#############,   +.    ,+' +NMMM     DE: KDE Plasma 5.27.5
  '*#########*'     '*,,*' .+NMMMM.    WM: KWin (X11)
     `'*###*'          ,.,;###+WNM,    WM Theme: Breeze
         .,;;,      .;##########+W     Theme: Breeze (Vapor) [QT], Breeze [GTK2/3]
,',.         ';  ,+##############'     Icons: breeze-dark [QT], breeze-dark [GTK2/3/4]
 '###+. :,. .,; ,###############'      Font: Noto Sans (11pt) [QT], Noto Sans (11pt) [GTK2/3/4]
  '####.. `'' .,###############'       Cursor: breeze (24px)
    '#####+++################'         Terminal: konsole 23.4.2
      '*##################*'           CPU: AMD Custom 0405 (8) @ 2.80 GHz
         ''*##########*''              GPU: AMD Custom GPU 0405
              ''''''                   Memory: 3.56 GiB / 11.51 GiB (31%)
                                       Disk (/): 2.74 GiB / 5.00 GiB (55%) - btrfs
                                       Disk (/esp): 1.75 MiB / 63.86 MiB (3%) - vfat
                                       Disk (/home): 141.18 GiB / 457.92 GiB (31%) - ext4
                                       Disk (/run/media/deck/34ec9559-770c-42c4-a433-c1d34dc5b131): 439.32 GiB / 468.93 GiB (94%) - ext4
                                       Disk (/run/media/deck/zippyboi): 1.89 MiB / 7.29 GiB (0%) - ext4 [External]
                                       Disk (/var): 9.84 MiB / 229.91 MiB (4%) - ext4
                                       Battery: 95% [Not charging]
                                       Locale: en_US.UTF-8

                                       ████████████████████████
                                       ████████████████████████
al12gamer commented 1 year ago

While it doesn't show in ff, looks like packages are installed fine too

(1)(deck@gabegearlcd ~)$ nix-env -q
brave-1.60.125
btop-1.2.13
fastfetch-2.2.3
nix-2.19.2
qbittorrent-4.6.2
vim-9.0.2048
al12gamer commented 1 year ago

merge should have fixed it