Created
December 17, 2020 15:35
-
-
Save superherointj/5ce794172071adb45efecce3047b168a to your computer and use it in GitHub Desktop.
Retornar 2 derivações para o environment.systemPackages
This file contains hidden or 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
# configuration.nix | |
{ config, pkgs, ... }: | |
environment.systemPackages = [ (import ./win10boot.nix {inherit pkgs; }) ] |
This file contains hidden or 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
# ./win10boot.nix | |
{ pkgs, ... }: with pkgs; | |
let desktop-item = makeDesktopItem { | |
name = "win10-boot-now"; | |
desktopName = "Windows 10 => Boot Now!"; | |
type = "Application"; | |
exec = "win10-boot-now"; | |
}; | |
winscript = pkgs.writeScriptBin "win10-boot-now" '' | |
#! /usr/bin/env nix-shell | |
#! nix-shell -i bash -p efibootmgr -I nixpkgs=https://github.com/NixOS/nixpkgs-channels/archive/nixos-unstable.tar.gz | |
WINENTRY=`efibootmgr -v | grep "Windows Boot Manager" | cut -d' ' -f1 | tr -d Boot*` | |
sudo efibootmgr -n''${WINENTRY} | |
reboot | |
''; | |
in | |
[ desktop-item winscript ] # Quero retornar essas duas derivações. Isso aqui vai dar erro. Mas coloquei assim pra passar a idéia. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment