-
-
Save sondr3/351dc22751aaed7d8a76d62702846003 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{config, options, lib, pkgs, ...}: | |
with lib; | |
let | |
cfg = config.services.vgaswitcheroo; | |
in { | |
options.services.vgaswitcheroo = with types; { | |
enable = mkOption { | |
type = bool; | |
default = false; | |
description = '' | |
Enable vgaswitcheroo. | |
''; | |
}; | |
}; | |
config = mkIf cfg.enable { | |
systemd.services.vgaswitcheroo = { | |
wantedBy = [ "multi-user.target" ]; | |
description = "Deactivate the discrete GPU on boot"; | |
serviceConfig = { | |
Type = "oneshot"; | |
RemainAfterExit = "yes"; | |
ExecStart = ""; | |
ExecStop = ""; | |
}; | |
}; | |
}; | |
} |
infinisil
commented
Apr 15, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment