a
This commit is contained in:
parent
7b9c264ec8
commit
9d5d268a97
@ -130,10 +130,22 @@
|
|||||||
inter
|
inter
|
||||||
];
|
];
|
||||||
|
|
||||||
|
virtualisation = {
|
||||||
|
podman = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
# Create a `docker` alias for podman, to use it as a drop-in replacement
|
||||||
|
dockerCompat = true;
|
||||||
|
|
||||||
|
# Required for containers under podman-compose to be able to talk to each other.
|
||||||
|
defaultNetwork.dnsname.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
# List packages installed in system profile. To search, run:
|
# List packages installed in system profile. To search, run:
|
||||||
# $ nix search wget
|
# $ nix search wget
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
set-backlight-script
|
|
||||||
neovim
|
neovim
|
||||||
git
|
git
|
||||||
wget
|
wget
|
||||||
@ -341,26 +353,26 @@ $NEW_PROMPT_COMMAND"
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
let set-backlight-script = (writeShellApplication {
|
|
||||||
|
systemd.services.setbacklight = let set-backlight-script = (pkgs.writeShellApplication {
|
||||||
name = "set-backlight-script";
|
name = "set-backlight-script";
|
||||||
text = ''
|
text = ''
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
for d in /sys/class/backlight/*; do
|
for d in /sys/class/backlight/*; do
|
||||||
cd $d
|
cd "$d"
|
||||||
echo $(( $(cat max_brightness) / 2)) > brightness
|
echo $(( $(cat max_brightness) / 2)) > brightness
|
||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
});
|
});
|
||||||
in
|
in {
|
||||||
systemd.services.99setbacklight = {
|
|
||||||
enable = true;
|
enable = true;
|
||||||
description = "bar";
|
description = "bar";
|
||||||
unitConfig = {
|
unitConfig = {
|
||||||
Type = "simple";
|
Type = "simple";
|
||||||
};
|
};
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = "${set-backlight-script}";
|
ExecStart = "${set-backlight-script}/bin/set-backlight-script";
|
||||||
};
|
};
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user