mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-11-10 00:43:15 -06:00
Compare commits
5 commits
8d77bde437
...
2c0a80f86a
Author | SHA1 | Date | |
---|---|---|---|
2c0a80f86a | |||
7e62677590 | |||
8752bec99e | |||
517958b8b3 | |||
c3af54a9f6 |
8 changed files with 67 additions and 71 deletions
57
flake.lock
57
flake.lock
|
@ -305,11 +305,11 @@
|
|||
"xdph": "xdph"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1719350558,
|
||||
"narHash": "sha256-oACeKBS762XSJbN/rz5Y2xPYGzWQHhwDqn+CeODuWsM=",
|
||||
"lastModified": 1719526850,
|
||||
"narHash": "sha256-GPqjH+P9PPmln5KQbyCKm3kfL1NCykIPLejhUel//w4=",
|
||||
"ref": "refs/heads/main",
|
||||
"rev": "e4d09aa3a9de9a9e71c10bf4b6800585b3db9a4c",
|
||||
"revCount": 4891,
|
||||
"rev": "b7f42a1e88a5b6c9d2dbdba31e0f35f6a02461e7",
|
||||
"revCount": 4893,
|
||||
"submodules": true,
|
||||
"type": "git",
|
||||
"url": "https://github.com/hyprwm/Hyprland/"
|
||||
|
@ -498,36 +498,38 @@
|
|||
"lix": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1718419213,
|
||||
"narHash": "sha256-WY7BGnu5PnbK4O8cKKv9kvxwzZIGbIQUQLGPHFXitI0=",
|
||||
"rev": "253546d5fbf8a5aa60ac8164c1b4f5794dc4e9d1",
|
||||
"lastModified": 1719439912,
|
||||
"narHash": "sha256-Qn0y/WEYcBL/SKEnpJq1e9tDpVi57YGDiJM2MgavLXM=",
|
||||
"rev": "5dc85e8b72d1ba433f69200537146275ff1c4a03",
|
||||
"type": "tarball",
|
||||
"url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/253546d5fbf8a5aa60ac8164c1b4f5794dc4e9d1.tar.gz"
|
||||
"url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/5dc85e8b72d1ba433f69200537146275ff1c4a03.tar.gz"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://git.lix.systems/lix-project/lix/archive/2.90.0-rc1.tar.gz"
|
||||
"url": "https://git.lix.systems/lix-project/lix/archive/main.tar.gz"
|
||||
}
|
||||
},
|
||||
"lix-module": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"flakey-profile": "flakey-profile",
|
||||
"lix": "lix",
|
||||
"lix": [
|
||||
"lix"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1718778548,
|
||||
"narHash": "sha256-64lB/NO6AQ6z6EDCemPSYZWX/Qc6Rt04cPia5T5v01g=",
|
||||
"rev": "29ed1bb67751e5b107d08df35d18dda6d45324e9",
|
||||
"lastModified": 1719353937,
|
||||
"narHash": "sha256-86NBqDxAP20ET/UoKX0WvSItblNQ97czXb2q7lkMrwk=",
|
||||
"rev": "5d9d94089fb1ca96222a34bfe245ef5c5ebefd37",
|
||||
"type": "tarball",
|
||||
"url": "https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/29ed1bb67751e5b107d08df35d18dda6d45324e9.tar.gz"
|
||||
"url": "https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/5d9d94089fb1ca96222a34bfe245ef5c5ebefd37.tar.gz"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://git.lix.systems/lix-project/nixos-module/archive/2.90.0-rc1.tar.gz"
|
||||
"url": "https://git.lix.systems/lix-project/nixos-module/archive/main.tar.gz"
|
||||
}
|
||||
},
|
||||
"nix-eval-jobs": {
|
||||
|
@ -677,11 +679,11 @@
|
|||
"nixpkgs": "nixpkgs_7"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1719422118,
|
||||
"narHash": "sha256-lM5QMm2Ig1eurRIQFVAg7KAcg4H+tMKN+M/eyraze+A=",
|
||||
"lastModified": 1719566311,
|
||||
"narHash": "sha256-oH6+liiG3n0SMng5pu1/QbGvcSZpyWb67MpV2PSqjyc=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs-wayland",
|
||||
"rev": "3d5a11c31e5815dcf6a66451e63a2f4631ecbf7a",
|
||||
"rev": "7bee18635843298c20461c7cbec733461c34b9fb",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -740,11 +742,11 @@
|
|||
},
|
||||
"nixpkgs_5": {
|
||||
"locked": {
|
||||
"lastModified": 1719317636,
|
||||
"narHash": "sha256-bu0xbu2Z6DDzA9LGV81yJunIti6r7tjUImeR8orAL/I=",
|
||||
"lastModified": 1719468428,
|
||||
"narHash": "sha256-vN5xJAZ4UGREEglh3lfbbkIj+MPEYMuqewMn4atZFaQ=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "9c513fc6fb75142f6aec6b7545cb8af2236b80f5",
|
||||
"rev": "1e3deb3d8a86a870d925760db1a5adecc64d329d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -849,11 +851,11 @@
|
|||
"rust-overlay": "rust-overlay"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1719383847,
|
||||
"narHash": "sha256-MhKnV9IHpeMbiARX5e+6LLXYJenNNx0YNFGCVtmufu8=",
|
||||
"lastModified": 1719577036,
|
||||
"narHash": "sha256-OGizrODxLNpyYUlVg7gT5EkeC4BnBnGsn+X1TguY/4Y=",
|
||||
"owner": "roc-lang",
|
||||
"repo": "roc",
|
||||
"rev": "f8c6786502bc253ab202a55e2bccdcc693e549c8",
|
||||
"rev": "93f45de1e79e4752e807fbb999ba46a85287f351",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -868,6 +870,7 @@
|
|||
"hyprland": "hyprland",
|
||||
"hyprland-contrib": "hyprland-contrib",
|
||||
"hyprman": "hyprman",
|
||||
"lix": "lix",
|
||||
"lix-module": "lix-module",
|
||||
"nix-index-database": "nix-index-database",
|
||||
"nixos-wsl": "nixos-wsl",
|
||||
|
@ -1147,11 +1150,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1719364424,
|
||||
"narHash": "sha256-EGpIcuGfpx+NQJGUho8vK5Q3TFHdaHtTLoqV/V+n4oY=",
|
||||
"lastModified": 1719537599,
|
||||
"narHash": "sha256-SDal8AzkCFLLu97AUSr/Xpj7M5VmbNWBCB1TZJhBC5M=",
|
||||
"owner": "Cloudef",
|
||||
"repo": "zig2nix",
|
||||
"rev": "67d44febbeb1fad4c861a5c4d67a8f6719f7f763",
|
||||
"rev": "13a64a338baa44d3c5ffc3a7a4dfe23e342ecad4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
13
flake.nix
13
flake.nix
|
@ -12,11 +12,18 @@
|
|||
url = "github:nix-community/nix-index-database";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
lix-module = {
|
||||
url = "https://git.lix.systems/lix-project/nixos-module/archive/2.90.0-rc1.tar.gz";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
lix = {
|
||||
url = "https://git.lix.systems/lix-project/lix/archive/main.tar.gz";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
lix-module = {
|
||||
url = "https://git.lix.systems/lix-project/nixos-module/archive/main.tar.gz";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.lix.follows = "lix";
|
||||
};
|
||||
|
||||
|
||||
hyprland.url = "git+https://github.com/hyprwm/Hyprland/?submodules=1";
|
||||
hyprland-contrib.url = "github:hyprwm/contrib";
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
# nix.package = pkgs.nixVersions.latest;
|
||||
nix.extraOptions = ''
|
||||
experimental-features = nix-command flakes
|
||||
use-xdg-base-directories = true
|
||||
'';
|
||||
|
||||
nix.optimise.automatic = true;
|
||||
|
|
|
@ -4,6 +4,7 @@ import (
|
|||
"fmt"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"oizys/internal/oizys"
|
||||
)
|
||||
|
||||
|
|
|
@ -48,11 +48,8 @@ var rootCmd = &cobra.Command{
|
|||
}
|
||||
oizys.SetFlake(flake)
|
||||
oizys.SetHost(host)
|
||||
oizys.SetCache(cacheName) // TODO: move
|
||||
oizys.SetVerbose(verbose)
|
||||
oizys.SetResetCache(resetCache)
|
||||
|
||||
oizys.CheckFlake()
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,6 @@ import (
|
|||
|
||||
"github.com/charmbracelet/lipgloss"
|
||||
|
||||
"github.com/briandowns/spinner"
|
||||
"github.com/charmbracelet/log"
|
||||
)
|
||||
|
||||
|
@ -55,9 +54,19 @@ func New() *Oizys {
|
|||
}
|
||||
|
||||
func SetFlake(path string) {
|
||||
// Check path exists
|
||||
if path != "" {
|
||||
o.flake = path
|
||||
}
|
||||
// check local path exists
|
||||
if !strings.HasPrefix(o.flake, "github") && !strings.HasPrefix(o.flake, "git+") {
|
||||
if _, ok := os.LookupEnv("OIZYS_SKIP_CHECK"); !ok {
|
||||
if _, err := os.Stat(o.flake); errors.Is(err, fs.ErrNotExist) {
|
||||
log.Warnf("path to flake %s does not exist, using remote as fallback", o.flake)
|
||||
o.flake = "github:daylinmorgan/oizys"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func SetCache(name string) {
|
||||
|
@ -131,24 +140,6 @@ func Output() string {
|
|||
}
|
||||
}
|
||||
|
||||
// func (o *Oizys) Set(
|
||||
// flake, host, cache string,
|
||||
// verbose, systemPath, resetCache bool,
|
||||
// ) {
|
||||
// if host != "" {
|
||||
// o.host = host
|
||||
// }
|
||||
// if flake != "" {
|
||||
// o.flake = flake
|
||||
// }
|
||||
// if cache != "" {
|
||||
// o.cache = cache
|
||||
// }
|
||||
// o.verbose = verbose
|
||||
// o.systemPath = systemPath
|
||||
// o.resetCache = resetCache
|
||||
// }
|
||||
|
||||
func git(rest ...string) *exec.Cmd {
|
||||
args := []string{"-C", o.flake}
|
||||
args = append(args, rest...)
|
||||
|
@ -497,11 +488,6 @@ func CacheBuild(rest ...string) {
|
|||
}
|
||||
|
||||
func CheckFlake() {
|
||||
if _, ok := os.LookupEnv("OIZYS_SKIP_CHECK"); !ok {
|
||||
if _, err := os.Stat(o.flake); errors.Is(err, fs.ErrNotExist) {
|
||||
log.Fatalf("path to flake: %s does not exist", o.flake)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func CI(rest ...string) {
|
||||
|
@ -511,10 +497,10 @@ func CI(rest ...string) {
|
|||
exitWithCommand(cmd)
|
||||
}
|
||||
|
||||
// TODO: deprecate
|
||||
func nixSpinner(host string) *spinner.Spinner {
|
||||
msg := fmt.Sprintf("%s %s", " evaluating derivation for:",
|
||||
lipgloss.NewStyle().Bold(true).Foreground(lipgloss.Color("6")).Render(host),
|
||||
)
|
||||
return startSpinner(msg)
|
||||
}
|
||||
// // TODO: deprecate
|
||||
// func nixSpinner(host string) *spinner.Spinner {
|
||||
// msg := fmt.Sprintf("%s %s", " evaluating derivation for:",
|
||||
// lipgloss.NewStyle().Bold(true).Foreground(lipgloss.Color("6")).Render(host),
|
||||
// )
|
||||
// return startSpinner(msg)
|
||||
// }
|
||||
|
|
13
todo.md
13
todo.md
|
@ -1,5 +1,12 @@
|
|||
# oizys todo's
|
||||
|
||||
## oizys
|
||||
|
||||
- [ ] make interoperable with a single command so first installation can be ran by root as:
|
||||
```sh
|
||||
nix --extra-experimental-features 'flakes nix-command' run "github:daylinmorgan/oiyzs" switch --host <host>
|
||||
```
|
||||
|
||||
## software
|
||||
|
||||
- [ ] lid closed does not engage hyprlock?
|
||||
|
@ -12,10 +19,4 @@
|
|||
> kernel: ucsi_acpi USBC000:00: possible UCSI driver bug 2
|
||||
> kernel: ucsi_acpi USBC000:00: error -EINVAL: PPM init failed
|
||||
|
||||
|
||||
GHA is running out of space to build `othalan`.
|
||||
I really just want the CI to pre-compile a subset of the packages.
|
||||
Currently, it just burns resources downloading packages over and over again.
|
||||
Maybe I could use nix flake checks to accomplish this?
|
||||
|
||||
<!-- generated with <3 by daylinmorgan/todo -->
|
||||
|
|
Loading…
Reference in a new issue