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:
|
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.
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -6,5 +6,5 @@
|
||||||
}:
|
}:
|
||||||
mkOizysModule config "docker" {
|
mkOizysModule config "docker" {
|
||||||
virtualisation.docker.enable = true;
|
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
|
let
|
||||||
# TODO: polish this up
|
|
||||||
win10vm = pkgs.stdenvNoCC.mkDerivation {
|
win10vm = pkgs.stdenvNoCC.mkDerivation rec {
|
||||||
name = "win10vm";
|
|
||||||
unpackPhase = "true";
|
|
||||||
buildPhase = "mkdir $out";
|
|
||||||
version = "unstable";
|
|
||||||
desktopItem = pkgs.makeDesktopItem {
|
|
||||||
name = "win10vm";
|
name = "win10vm";
|
||||||
exec = "VBoxManage startvm win10";
|
unpackPhase = "true";
|
||||||
# icon = ""; # TODO: add windows icon
|
version = "unstable";
|
||||||
desktopName = "Windows 10 VM";
|
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
|
in
|
||||||
mkOizysModule config "vbox" {
|
mkOizysModule config "vbox" {
|
||||||
virtualisation.virtualbox = {
|
virtualisation.virtualbox = {
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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...)
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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"),
|
Loading…
Reference in a new issue