initial nix flake rewrite
This commit is contained in:
parent
0666d5e8ec
commit
baaa0f4942
48
flake.lock
generated
Normal file
48
flake.lock
generated
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1739736696,
|
||||||
|
"narHash": "sha256-zON2GNBkzsIyALlOCFiEBcIjI4w38GYOb+P+R4S8Jsw=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "d74a2335ac9c133d6bbec9fc98d91a77f1604c1f",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs",
|
||||||
|
"wfvm": "wfvm"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"wfvm": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1718082876,
|
||||||
|
"narHash": "sha256-u4OgfsO6jnQwHNmxHhSIfCKaa2gYoIYwGKPJFZSpK/A=",
|
||||||
|
"ref": "refs/heads/master",
|
||||||
|
"rev": "e811c7c5d87059cb93b6548109fcafb3268a3af1",
|
||||||
|
"revCount": 70,
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://git.m-labs.hk/m-labs/wfvm"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://git.m-labs.hk/m-labs/wfvm"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
61
flake.nix
Normal file
61
flake.nix
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
{
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
wfvm.url = "git+https://git.m-labs.hk/m-labs/wfvm";
|
||||||
|
|
||||||
|
# wfvm uses a very old branch of nixpkgs (2023-05-25)
|
||||||
|
wfvm.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs =
|
||||||
|
{
|
||||||
|
self,
|
||||||
|
nixpkgs,
|
||||||
|
wfvm,
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
# import nixpkgs
|
||||||
|
pkgs = (import nixpkgs {});
|
||||||
|
in
|
||||||
|
{
|
||||||
|
packages."${pkgs.system}".windows-vm = wfvm.lib.makeWindowsImage {
|
||||||
|
windowsImage = (pkgs.fetchurl {
|
||||||
|
url = "file:///home/primary/Downloads/tiny11.iso";
|
||||||
|
sha256 = "ea9cee512457c763484dbeaeee98caba8c2e69e0420bdae8c4508e31ad8ccd99";
|
||||||
|
});
|
||||||
|
|
||||||
|
installCommands = [
|
||||||
|
{
|
||||||
|
name = "execute oem bat";
|
||||||
|
script =
|
||||||
|
let
|
||||||
|
oem_bat = ./oem/install.bat;
|
||||||
|
in
|
||||||
|
''
|
||||||
|
ln -s ${oem_bat} ./oem_bat.bat
|
||||||
|
win-put oem_bat.bat .
|
||||||
|
echo Running Oem Bat...
|
||||||
|
win-exec 'start /wait "" .\oem_bat.bat'
|
||||||
|
echo Oem Bat finished
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "execute powershell";
|
||||||
|
script =
|
||||||
|
let
|
||||||
|
powershell_oem = ./oem/powershell-stuff.ps1;
|
||||||
|
in
|
||||||
|
''
|
||||||
|
ln -s ${powershell_oem} ./oem_ps.ps1
|
||||||
|
win-put oem_ps.ps1 .
|
||||||
|
echo Running Oem PS...
|
||||||
|
win-exec 'start /wait "" powershell -executionpolicy remotesigned -File .\oem_ps.ps1'
|
||||||
|
echo Oem powershell finished
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@ -19,7 +19,7 @@ winget install -e --id Microsoft.VisualStudio.2022.BuildTools --accept-source-ag
|
|||||||
winget install -e --id Microsoft.VisualStudio.2022.Community --accept-source-agreements --override "--passive --wait --add Microsoft.VisualStudio.Workload.NativeDesktop --includeRecommended"
|
winget install -e --id Microsoft.VisualStudio.2022.Community --accept-source-agreements --override "--passive --wait --add Microsoft.VisualStudio.Workload.NativeDesktop --includeRecommended"
|
||||||
|
|
||||||
:: powershell stuff
|
:: powershell stuff
|
||||||
powershell -executionpolicy remotesigned -File C:\OEM\powershell-stuff.ps1
|
:: powershell -executionpolicy remotesigned -File C:\OEM\powershell-stuff.ps1
|
||||||
|
|
||||||
|
|
||||||
winget install Mozilla.Firefox --accept-source-agreements
|
winget install Mozilla.Firefox --accept-source-agreements
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user