Did you know that it is rather easy to setup a VM to test your NixOs configuration?
# flake.nix
{
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
@font-face { | |
font-family: 'JetBrains Mono'; | |
src: url('https://cdn.jsdelivr.net/gh/JetBrains/JetBrainsMono/web/woff2/JetBrainsMono-Bold-Italic.woff2') format('woff2'), | |
url('https://cdn.jsdelivr.net/gh/JetBrains/JetBrainsMono/web/woff/JetBrainsMono-Bold-Italic.woff') format('woff'); | |
font-weight: 700; | |
font-style: italic; | |
font-display: swap; | |
} | |
@font-face { |
[ | |
{ | |
"name": "Afghanistan", | |
"dial_code": "+93", | |
"code": "AF" | |
}, | |
{ | |
"name": "Aland Islands", | |
"dial_code": "+358", | |
"code": "AX" |
package extraLarge; | |
/** | |
* The goal of this program is to obtain a HEALTHY | |
* and SUSTAINABLE relationship, darling. | |
* | |
* @author Cassie Wei from Mili | |
*/ | |
public class sustainPlusPlus { | |
public static void main(String[] args) { |
microphone_state='' | |
if [[ $(output=$(amixer set Capture toggle); echo "$output" | grep -m 1 --fixed-strings --only-matching '[on]') ]]; then | |
microphone_state=unmuted; | |
else | |
microphone_state=muted; fi | |
notify-send "Global microphone state: $microphone_state" "Triggered by keybinding (Ctrl + Alt + M)" --app-name=System --expire-time=2500 --urgency=normal |
# You can extract your own 'city' value from 'http://www.cinerama.com.pe/cines' | |
curl --silent http://www.cinerama.com.pe/cartelera_cine/{city} | htmlq --text .row .container .card .card-header | sed 's/.*/\L&/; s/[a-z]*/\u&/g' |
main() { | |
docker_command="docker run -d -p 80:8080 " | |
if [[ $1 != "" ]]; then | |
absolute_path=$(realpath "$1") | |
dir=$(dirname "$absolute_path") | |
docker_command+="-v $dir:/tmp -e SWAGGER_FILE=/tmp/$1 " | |
fi |
Name as battery-charge-threshold.service
and move to /etc/systemd/system
CHARGE_STOP_THRESHOLD -> Battery limit [0-100]
BATTERY_NAME -> Obtained from $ ls /sys/class/power_supply
. Example: BAT0
, BAT1
and BATT
.
Then, run:
$ sudo systemctl enable battery-charge-threshold.service