Compare commits

..

4 commits

6 changed files with 33 additions and 17 deletions

View file

@ -53,17 +53,20 @@ Usage:
Available Commands: Available Commands:
boot nixos rebuild boot boot nixos rebuild boot
build A brief description of your command build nix build
cache build and push to cachix cache build and push to cachix
ci offload build to GHA
dry poor man's nix flake check dry poor man's nix flake check
help Help about any command help Help about any command
output show nixosConfiguration attr output show nixosConfiguration attr
switch nixos rebuild switch switch nixos rebuild switch
update update and run nixos rebuild
Flags: Flags:
--flake string path to flake ($OIZYS_DIR or $HOME/oizys) --flake string path to flake ($OIZYS_DIR or $HOME/oizys)
-h, --help help for oizys -h, --help help for oizys
--host string host to build (current host) --host string host to build (current host)
-v, --verbose show verbose output
Use "oizys [command] --help" for more information about a command. 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] > [!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. > 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.

View file

@ -1,17 +1,29 @@
{ config, mkOizysModule, pkgs,... }: {
config,
mkOizysModule,
pkgs,
...
}:
let let
# TODO: polish this up
win10vm = pkgs.stdenvNoCC.mkDerivation { win10vm = pkgs.stdenvNoCC.mkDerivation rec {
name = "win10vm"; name = "win10vm";
unpackPhase = "true"; unpackPhase = "true";
buildPhase = "mkdir $out";
version = "unstable"; 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 { desktopItem = pkgs.makeDesktopItem {
name = "win10vm"; name = "win10vm";
exec = "VBoxManage startvm win10"; exec = "VBoxManage startvm win10";
# icon = ""; # TODO: add windows icon icon = "${windows10Logo}";
desktopName = "Windows 10 VM"; desktopName = "Windows 10 VM";
}; };
installPhase = ''
install -Dm0644 {${desktopItem},$out}/share/applications/win10vm.desktop
'';
}; };
in in
mkOizysModule config "vbox" { mkOizysModule config "vbox" {

View file

@ -3,7 +3,7 @@ package cmd
import ( import (
"os" "os"
o "oizys/internal" o "oizys/internal/oizys"
cc "github.com/ivanpirog/coloredcobra" cc "github.com/ivanpirog/coloredcobra"
"github.com/spf13/cobra" "github.com/spf13/cobra"

View file

@ -9,6 +9,7 @@ var updateCmd = &cobra.Command{
Short: "update and run nixos rebuild", Short: "update and run nixos rebuild",
Run: func(cmd *cobra.Command, args []string) { Run: func(cmd *cobra.Command, args []string) {
oizys.GitPull() oizys.GitPull()
oizys.NixosRebuild("switch", args...)
}, },
} }

View file

@ -193,8 +193,7 @@ func parseDryRun(buf string) (*packages, *packages) {
if len(parts[0])+len(parts[1]) == 0 { if len(parts[0])+len(parts[1]) == 0 {
log.Println("no changes...") log.Println("no changes...")
log.Println("or I failed to parse it into the expected number of parts") log.Fatalln("or failed to parse nix build --dry-run output")
log.Fatalln("failed to parse nix build --dry-run output")
} }
return parsePackages(parts[0], "packages to build"), return parsePackages(parts[0], "packages to build"),