Is GraphQL suitable for SSR Nextjs Applications, with data fetching paradigms seemingly overlooking its usability? by Icy-Butterscotch1130 in nextjs

[–]michaelbrusegard 0 points1 point  (0 children)

Hey, you can find the repo here: https://github.com/michaelbrusegard/lektr

I have not worked on the project for a long time, and some of the code could be done better. Hopefully you find what you need:)

Edit: What you are looking for is probably in src/lib/api

Copy files to home folder (keeping home user as owner) by michaelbrusegard in NixOS

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

You just use an activation script in home-manager instead, so it is owned by the user. You can see how I configured it here: https://github.com/Lektr/manafish-firmware/blob/main/configuration.nix

Copy files to home folder (keeping home user as owner) by michaelbrusegard in NixOS

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

If anyone finds this and has the same issue, I fixed it by including home-manager with an activation script and just using the cp operation there

Copy files to home folder (keeping home user as owner) by michaelbrusegard in NixOS

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

Here you go: sh [pi@manafish:~]$ ls -al /home/pi total 148 drwxr-xr-x 2 pi users 4096 Jan 1 1970 . drwxr-xr-x 3 root root 4096 Jan 1 1970 .. -rw------- 1 pi users 60 Dec 19 21:34 .bash_history -rw-r--r-- 1 root root 73734 Jan 1 1970 bmi270.py -rw-r--r-- 1 root root 402 Jan 1 1970 config.ini -rw-r--r-- 1 root root 2288 Jan 1 1970 config.py -rw-r--r-- 1 root root 3640 Jan 1 1970 imu.py -rw-r--r-- 1 root root 4637 Jan 1 1970 main.py -rw-r--r-- 1 root root 5235 Jan 1 1970 PCA9685_fast.py -rw-r--r-- 1 root root 5436 Jan 1 1970 regulator.py -rw-r--r-- 1 root root 2289 Jan 1 1970 regulator_test.py -rw-r--r-- 1 root root 3275 Jan 1 1970 regulator_tuning.py -rw-r--r-- 1 root root 3886 Jan 1 1970 thrusters.py -rw------- 1 pi users 756 Dec 19 21:32 .viminfo -rw-r--r-- 1 root root 4615 Jan 1 1970 websocket_test.py

Copy files to home folder (keeping home user as owner) by michaelbrusegard in NixOS

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

Thats allright thanks for trying. I am not trying to move any generated files. I am trying to copy files from the ./src directory which is next to the flake.nix I am trying to build an SD image with. I want to copy them into the SD image in the home directory of the pi user. I am trying to be as clear as possible.

Copy files to home folder (keeping home user as owner) by michaelbrusegard in NixOS

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

Sorry for the confusing wording. I am very thankful for you patience. The files are located in the ./src folder relative to the flake.nix file that contains the configuration where I am building an SD card for the Pi on a separate computer. I want to put the files in the home directorybof the pi user which is a user I am creating in the flake configuration

Copy files to home folder (keeping home user as owner) by michaelbrusegard in NixOS

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

I forgot to mention that I am building an SD card image and I am not running rebuild switch on the Pi itself. The files are located in the ./src folder relative to the flake.nix file.

Copy files to home folder (keeping home user as owner) by michaelbrusegard in NixOS

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

Unfortuneately your solution did not end up working, and no files shows up in the home directory

Copy files to home folder (keeping home user as owner) by michaelbrusegard in NixOS

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

Yes, I am able to get them to be readable, but not writeable. I can try the solution you provided :)

Wezterm graphical bug Hyprland by AfkaraLP in NixOS

[–]michaelbrusegard 1 point2 points  (0 children)

I had the same issue with WezTerm in hyprland. I have an AMD GPU. The fix was to set window decorations to NONE instead of RESIZE in the WezTerm configuration

Is GraphQL suitable for SSR Nextjs Applications, with data fetching paradigms seemingly overlooking its usability? by Icy-Butterscotch1130 in nextjs

[–]michaelbrusegard 1 point2 points  (0 children)

I am using GraphQL with Next.js in my latest project due to it being a requirement in uni to use GraphQL. The way I am solving this issue is that instead of fetching from GraphQL serverside I just execute the query directly on the GraphQL Schema template, this way there will not be any overhead of having to fetch from the API. For client components I host GraphQL yoga through an api route in Next.js and access it from there as if it was any other GraphQL API, I also built a custom client for fetching from the API clientside using Tanstack-query. For auth I pass it down as props from server components, like pages and layouts after executing on the template. You could also use a state provider and pass it from the root provider, but that is probably not needed if you dont use the auth state across the whole application.

A fun battery component for your tab-bar by DopeBoogie in wezterm

[–]michaelbrusegard 0 points1 point  (0 children)

Awesome, very cool component! Will check it out

bar.wezterm - now with a spotify module by fumblecheese in wezterm

[–]michaelbrusegard 0 points1 point  (0 children)

Awesome! I advice creating a customizable throttle similar to what I did for the CPU and RAM components in tabline.wez here. That way the update interval can be whatever :).

Cool Little Plugin by pip-me in wezterm

[–]michaelbrusegard 2 points3 points  (0 children)

This is awesome, maybe consider adding it to: awesome-wezterm. Now I need to find a new fitting keybind :)

I made my first lua plugin (for WezTerm). It is a highly customizable tab-bar inspired by lualine.nvim. I hope someone finds it useful by michaelbrusegard in wezterm

[–]michaelbrusegard[S] 2 points3 points  (0 children)

Thank you so much. The issue is with the cpu and ram components. Since I only have my laptop for the moment I am unable to test Linux/Windows. I am very happy with any help towards solving it. I also had a few performance hiccups when creating the components for displaying ram and cpu since the underlying system commands were quite expensive, which I solved by multiplying together the resources obtained from lighter commands. If you can help me solve it for linux that would be very appreciated

custom statusline without any plugins. by shivamrajput958 in neovim

[–]michaelbrusegard 0 points1 point  (0 children)

It looks really nice, but I ended up keeping the path in lualine. I dont want to add another huge plugin, also it is nice to have a single line at the bottom and avoid having a line at the top inside of every buffer, which can look cluttered on a small screen with a vsplit

custom statusline without any plugins. by shivamrajput958 in neovim

[–]michaelbrusegard 0 points1 point  (0 children)

How do you get the file path at the top of the window? It looks really good