mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-12-26 05:10:44 -06:00
Compare commits
4 commits
85ed00a547
...
b3858aca0e
Author | SHA1 | Date | |
---|---|---|---|
b3858aca0e | |||
bcc401f812 | |||
99a811084b | |||
626fb78dde |
6 changed files with 33 additions and 17 deletions
|
@ -53,17 +53,20 @@ Usage:
|
|||
|
||||
Available Commands:
|
||||
boot nixos rebuild boot
|
||||
build A brief description of your command
|
||||
build nix build
|
||||
cache build and push to cachix
|
||||
ci offload build to GHA
|
||||
dry poor man's nix flake check
|
||||
help Help about any command
|
||||
output show nixosConfiguration attr
|
||||
switch nixos rebuild switch
|
||||
update update and run nixos rebuild
|
||||
|
||||
Flags:
|
||||
--flake string path to flake ($OIZYS_DIR or $HOME/oizys)
|
||||
-h, --help help for oizys
|
||||
--host string host to build (current host)
|
||||
-v, --verbose show verbose output
|
||||
|
||||
Use "oizys [command] --help" for more information about a command.
|
||||
```
|
||||
|
@ -77,3 +80,4 @@ Oizys was birthed by the goddess Nyx/Nix and embodies suffering and misery. Whic
|
|||
> [!NOTE]
|
||||
> I don't use home-manager to manager my shell/user configs. You can find those in my separate `chezmoi`-managed [`dotfiles`](https://git.dayl.in/daylin/dotfiles) repository.
|
||||
|
||||
|
||||
|
|
|
@ -6,5 +6,5 @@
|
|||
}:
|
||||
mkOizysModule config "docker" {
|
||||
virtualisation.docker.enable = true;
|
||||
environment.systemPackages = with pkgs; [ lazydocker];
|
||||
environment.systemPackages = with pkgs; [ lazydocker ];
|
||||
}
|
||||
|
|
|
@ -1,18 +1,30 @@
|
|||
{ config, mkOizysModule, pkgs,... }:
|
||||
{
|
||||
config,
|
||||
mkOizysModule,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
# TODO: polish this up
|
||||
win10vm = pkgs.stdenvNoCC.mkDerivation {
|
||||
name = "win10vm";
|
||||
unpackPhase = "true";
|
||||
buildPhase = "mkdir $out";
|
||||
version = "unstable";
|
||||
desktopItem = pkgs.makeDesktopItem {
|
||||
|
||||
win10vm = pkgs.stdenvNoCC.mkDerivation rec {
|
||||
name = "win10vm";
|
||||
exec = "VBoxManage startvm win10";
|
||||
# icon = ""; # TODO: add windows icon
|
||||
desktopName = "Windows 10 VM";
|
||||
unpackPhase = "true";
|
||||
version = "unstable";
|
||||
windows10Logo = pkgs.fetchurl {
|
||||
url = "https://upload.wikimedia.org/wikipedia/commons/c/c7/Windows_logo_-_2012.png";
|
||||
hash = "sha256-uVNgGUo0NZN+mUmvMzyk0HKnhx64uqT4YWGSdeBz3T4=";
|
||||
};
|
||||
|
||||
desktopItem = pkgs.makeDesktopItem {
|
||||
name = "win10vm";
|
||||
exec = "VBoxManage startvm win10";
|
||||
icon = "${windows10Logo}";
|
||||
desktopName = "Windows 10 VM";
|
||||
};
|
||||
installPhase = ''
|
||||
install -Dm0644 {${desktopItem},$out}/share/applications/win10vm.desktop
|
||||
'';
|
||||
};
|
||||
};
|
||||
in
|
||||
mkOizysModule config "vbox" {
|
||||
virtualisation.virtualbox = {
|
||||
|
|
|
@ -3,7 +3,7 @@ package cmd
|
|||
import (
|
||||
"os"
|
||||
|
||||
o "oizys/internal"
|
||||
o "oizys/internal/oizys"
|
||||
|
||||
cc "github.com/ivanpirog/coloredcobra"
|
||||
"github.com/spf13/cobra"
|
||||
|
|
|
@ -9,6 +9,7 @@ var updateCmd = &cobra.Command{
|
|||
Short: "update and run nixos rebuild",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
oizys.GitPull()
|
||||
oizys.NixosRebuild("switch", args...)
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
@ -193,8 +193,7 @@ func parseDryRun(buf string) (*packages, *packages) {
|
|||
|
||||
if len(parts[0])+len(parts[1]) == 0 {
|
||||
log.Println("no changes...")
|
||||
log.Println("or I failed to parse it into the expected number of parts")
|
||||
log.Fatalln("failed to parse nix build --dry-run output")
|
||||
log.Fatalln("or failed to parse nix build --dry-run output")
|
||||
}
|
||||
|
||||
return parsePackages(parts[0], "packages to build"),
|
Loading…
Reference in a new issue