Coder Social home page Coder Social logo

Comments (5)

igor-frolikov avatar igor-frolikov commented on May 19, 2024 1

[igor@nixos:~/Downloads]$ sudo ./bat -c
100

[igor@nixos:~/Downloads]$ sudo ./bat -t 60
Charging threshold set.
Use sudo bat --persist to persist the setting between restarts.

[igor@nixos:~/Downloads]$ sudo ./bat -c
100

[igor@nixos:~/Downloads]$ sudo ./bat -p
2022/06/10 23:14:33 open /etc/systemd/system/bat-suspendthenhibernate.service: read-only file system

Actually NixOS would never allow to write to system files. Thank you for your efforts. I wrote a simple script for cron. Works perfect even on Arch. Just on NixOS I run cron job using NixOS way.

from bat.

igor-frolikov avatar igor-frolikov commented on May 19, 2024

It seems, that you need to add another bash path to your services.go: "/run/current-system/sw/bin/bash"
is it possible to use just "bash" string instead of the full path?

from bat.

tshakalekholoane avatar tshakalekholoane commented on May 19, 2024

Thank you for pointing that out, @igor-frolikov. I think it has to be the full path because some of these are run before path variables are set. But that said, there is probably a better way to set it. Can you check if running command -v bash gives the right location for Bash on your system?

from bat.

igor-frolikov avatar igor-frolikov commented on May 19, 2024

[igor@nixos:~]$ command -v bash
/run/current-system/sw/bin/bash

NixOS has different file structure. Here are almost all symlinks. The path is standard for all NixOS Linux systems.
Another idea is replacing "bash" by "sh". This way "bin/sh" will work fine.

from bat.

tshakalekholoane avatar tshakalekholoane commented on May 19, 2024

Here's a fix. Please let me know if it works.

from bat.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.