Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempting to test out your AGS configuration into my own NixOS config however getting in an error #42

Open
AlxTray opened this issue Sep 3, 2024 · 15 comments

Comments

@AlxTray
Copy link

AlxTray commented Sep 3, 2024

When running AGS, after installing the dependencies listed and using the AGS home-manager module, I get these errors:

(com.github.Aylur.ags:3089): Gjs-WARNING **: 13:13:08.441: Gio.UnixOutputStream has been moved to a separate platform-specific library. Please update your code to use GioUnix.OutputStream instead.
0 subprocess() ["resource:///com/github/Aylur/ags/utils/exec.js":27:23]
1 BrightnessService() ["file:///home/alx/.config/ags/services/brightness.js":59:10]
2 <TOP LEVEL> ["file:///home/alx/.config/ags/services/brightness.js":84:16]
3 _init/GLib.MainLoop.prototype.runAsync/</<() ["resource:///org/gnome/gjs/modules/core/overrides/GLib.js":266:33]


(com.github.Aylur.ags:3089): Gjs-WARNING **: 13:13:08.441: Gio.UnixInputStream has been moved to a separate platform-specific library. Please update your code to use GioUnix.InputStream instead.
0 subprocess() ["resource:///com/github/Aylur/ags/utils/exec.js":31:23]
1 BrightnessService() ["file:///home/alx/.config/ags/services/brightness.js":59:10]
2 <TOP LEVEL> ["file:///home/alx/.config/ags/services/brightness.js":84:16]
3 _init/GLib.MainLoop.prototype.runAsync/</<() ["resource:///org/gnome/gjs/modules/core/overrides/GLib.js":266:33]


(com.github.Aylur.ags:3089): Gjs-CRITICAL **: 13:13:08.452: JS ERROR: TypeError: section.get_file() is null
applyCss/<@resource:///com/github/Aylur/ags/app.js:73:34
applyCss@resource:///com/github/Aylur/ags/app.js:81:29
config@resource:///com/github/Aylur/ags/app.js:180:18
@file:///home/alx/.config/ags/config.js:15:5
_init/GLib.MainLoop.prototype.runAsync/</<@resource:///org/gnome/gjs/modules/core/overrides/GLib.js:266:34


(com.github.Aylur.ags:3089): Gjs-WARNING **: 13:13:08.452: JS ERROR: Gtk.CssProviderError: <data>:1:0Expected a valid selector
applyCss@resource:///com/github/Aylur/ags/app.js:81:29
config@resource:///com/github/Aylur/ags/app.js:180:18
@file:///home/alx/.config/ags/config.js:15:5
_init/GLib.MainLoop.prototype.runAsync/</<@resource:///org/gnome/gjs/modules/core/overrides/GLib.js:266:34
@AlxTray AlxTray changed the title Attempting to test out your AGS configuration into my own NixOS config hwoever getting in an error Attempting to test out your AGS configuration into my own NixOS config however getting in an error Sep 3, 2024
@fufexan
Copy link
Owner

fufexan commented Sep 4, 2024

Has the css compiled properly? Looks like the error is on the line telling ags to use a css file (which is compiled using sass).

@AlxTray
Copy link
Author

AlxTray commented Sep 4, 2024

Yeah that seems to be the problem, though running sass in the directory manually seems to work fine. Is there any particular setup that is required for this work on NixOS that I've missed? I've tried both the way you have it setup as a SystemD service and using the configDir = ./ags option of the ags home-manager module, and both ways have the same problem.

@fufexan
Copy link
Owner

fufexan commented Sep 4, 2024

I probably forgot to mention this anywhere, but I manually symlink the ags dir from my dots to ~/.config/ags. Try this and it should work.

@AlxTray
Copy link
Author

AlxTray commented Sep 4, 2024

I'll try that, but is that not what the configDir option does? Or is the SystemD stuff required as well? As when I tried the configDir option I just listed the dependencies under home.packages.

@fufexan
Copy link
Owner

fufexan commented Sep 4, 2024

That works, but the dependencies have to propagate properly, so make sure to have wayland.windowManager.hyprland.systemd.variables = ["--all"]; (iirc)

@AlxTray
Copy link
Author

AlxTray commented Sep 4, 2024

Yeah, I do have that option set to [ "--all" ]. With the configDir option set I can see that the AGS config is symlinked to .config/ags, but still getting the error when attempting to run ags.

@AlxTray
Copy link
Author

AlxTray commented Sep 4, 2024

Symlinked the same as if it was ln -s or home.file

@fufexan
Copy link
Owner

fufexan commented Sep 4, 2024

In that case I have no clue. Maybe you can set up some logging.

@DockterTeagle
Copy link

I am currently having an issue with the current ags config as well, when I try to run it I get:

(com.github.Aylur.ags:406485): Gjs-WARNING **: 18:20:40.185: JS ERROR: SyntaxError: ambiguous indirect export: default @ file:///home/cdockter/.config/ags/windows/osd/main.js:5:7

also my lsp reports various errors throughout this config with regards to urls. I have no clue how JS works so it is possible I am missing something very trivial.

@fufexan
Copy link
Owner

fufexan commented Sep 22, 2024

It might be due to the lsp not knowing the types. You have to set up the types first. https://aylur.github.io/ags-docs/config/type-checking/

@DockterTeagle
Copy link

I thought I had done that,but the error occurs when running ags. For future reference how do I make the ags types work with home-manager? as it seems to be symlinked and thus causing issues with home-manager switch(due to the directory being non-empty).

@fufexan
Copy link
Owner

fufexan commented Sep 22, 2024

It actually looks like the HM module already sets types up https://github.com/Aylur/ags/blob/main/nix/hm-module.nix#L78. As for why you get the runtime error, I don't know. Are there more errors?

@DockterTeagle
Copy link

currently all I get is the warning previously described;however, ags does not seem to run.

@fufexan
Copy link
Owner

fufexan commented Sep 23, 2024

Check for version mismatches. Otherwise, I suggest you try to remove the import until it works, and figure out how to make it work later. I've never encountered this before, so I can't help much.

@Neurarian
Copy link
Contributor

I got a similar error, but resolved it. Using the home-manager module, you could try the following instead of imperatively symlinking the dir to .config/ags:

   programs.ags = {
      enable = true;
      configDir = config.lib.file.mkOutOfStoreSymlink /home/${user}/.dotfiles/nix/home/${user}/common/optional/ags; 
      extraPackages = dependencies;
      systemd.enable = true;
    };

Not using the full path to the config together with the out-of-store-symlink, will point all files to copies in the store, which are immutable. So sass, etc. won't work. At least with flakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants