Compare commits

..

No commits in common. "2c0a80f86abdf658dd6b2488deac0cff4a254a77" and "8d77bde4370b01ec92ef1b81bd811ae88cfb89a9" have entirely different histories.

8 changed files with 69 additions and 65 deletions

View file

@ -305,11 +305,11 @@
"xdph": "xdph" "xdph": "xdph"
}, },
"locked": { "locked": {
"lastModified": 1719526850, "lastModified": 1719350558,
"narHash": "sha256-GPqjH+P9PPmln5KQbyCKm3kfL1NCykIPLejhUel//w4=", "narHash": "sha256-oACeKBS762XSJbN/rz5Y2xPYGzWQHhwDqn+CeODuWsM=",
"ref": "refs/heads/main", "ref": "refs/heads/main",
"rev": "b7f42a1e88a5b6c9d2dbdba31e0f35f6a02461e7", "rev": "e4d09aa3a9de9a9e71c10bf4b6800585b3db9a4c",
"revCount": 4893, "revCount": 4891,
"submodules": true, "submodules": true,
"type": "git", "type": "git",
"url": "https://github.com/hyprwm/Hyprland/" "url": "https://github.com/hyprwm/Hyprland/"
@ -498,38 +498,36 @@
"lix": { "lix": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1719439912, "lastModified": 1718419213,
"narHash": "sha256-Qn0y/WEYcBL/SKEnpJq1e9tDpVi57YGDiJM2MgavLXM=", "narHash": "sha256-WY7BGnu5PnbK4O8cKKv9kvxwzZIGbIQUQLGPHFXitI0=",
"rev": "5dc85e8b72d1ba433f69200537146275ff1c4a03", "rev": "253546d5fbf8a5aa60ac8164c1b4f5794dc4e9d1",
"type": "tarball", "type": "tarball",
"url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/5dc85e8b72d1ba433f69200537146275ff1c4a03.tar.gz" "url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/253546d5fbf8a5aa60ac8164c1b4f5794dc4e9d1.tar.gz"
}, },
"original": { "original": {
"type": "tarball", "type": "tarball",
"url": "https://git.lix.systems/lix-project/lix/archive/main.tar.gz" "url": "https://git.lix.systems/lix-project/lix/archive/2.90.0-rc1.tar.gz"
} }
}, },
"lix-module": { "lix-module": {
"inputs": { "inputs": {
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"flakey-profile": "flakey-profile", "flakey-profile": "flakey-profile",
"lix": [ "lix": "lix",
"lix"
],
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
] ]
}, },
"locked": { "locked": {
"lastModified": 1719353937, "lastModified": 1718778548,
"narHash": "sha256-86NBqDxAP20ET/UoKX0WvSItblNQ97czXb2q7lkMrwk=", "narHash": "sha256-64lB/NO6AQ6z6EDCemPSYZWX/Qc6Rt04cPia5T5v01g=",
"rev": "5d9d94089fb1ca96222a34bfe245ef5c5ebefd37", "rev": "29ed1bb67751e5b107d08df35d18dda6d45324e9",
"type": "tarball", "type": "tarball",
"url": "https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/5d9d94089fb1ca96222a34bfe245ef5c5ebefd37.tar.gz" "url": "https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/29ed1bb67751e5b107d08df35d18dda6d45324e9.tar.gz"
}, },
"original": { "original": {
"type": "tarball", "type": "tarball",
"url": "https://git.lix.systems/lix-project/nixos-module/archive/main.tar.gz" "url": "https://git.lix.systems/lix-project/nixos-module/archive/2.90.0-rc1.tar.gz"
} }
}, },
"nix-eval-jobs": { "nix-eval-jobs": {
@ -679,11 +677,11 @@
"nixpkgs": "nixpkgs_7" "nixpkgs": "nixpkgs_7"
}, },
"locked": { "locked": {
"lastModified": 1719566311, "lastModified": 1719422118,
"narHash": "sha256-oH6+liiG3n0SMng5pu1/QbGvcSZpyWb67MpV2PSqjyc=", "narHash": "sha256-lM5QMm2Ig1eurRIQFVAg7KAcg4H+tMKN+M/eyraze+A=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixpkgs-wayland", "repo": "nixpkgs-wayland",
"rev": "7bee18635843298c20461c7cbec733461c34b9fb", "rev": "3d5a11c31e5815dcf6a66451e63a2f4631ecbf7a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -742,11 +740,11 @@
}, },
"nixpkgs_5": { "nixpkgs_5": {
"locked": { "locked": {
"lastModified": 1719468428, "lastModified": 1719317636,
"narHash": "sha256-vN5xJAZ4UGREEglh3lfbbkIj+MPEYMuqewMn4atZFaQ=", "narHash": "sha256-bu0xbu2Z6DDzA9LGV81yJunIti6r7tjUImeR8orAL/I=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "1e3deb3d8a86a870d925760db1a5adecc64d329d", "rev": "9c513fc6fb75142f6aec6b7545cb8af2236b80f5",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -851,11 +849,11 @@
"rust-overlay": "rust-overlay" "rust-overlay": "rust-overlay"
}, },
"locked": { "locked": {
"lastModified": 1719577036, "lastModified": 1719383847,
"narHash": "sha256-OGizrODxLNpyYUlVg7gT5EkeC4BnBnGsn+X1TguY/4Y=", "narHash": "sha256-MhKnV9IHpeMbiARX5e+6LLXYJenNNx0YNFGCVtmufu8=",
"owner": "roc-lang", "owner": "roc-lang",
"repo": "roc", "repo": "roc",
"rev": "93f45de1e79e4752e807fbb999ba46a85287f351", "rev": "f8c6786502bc253ab202a55e2bccdcc693e549c8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -870,7 +868,6 @@
"hyprland": "hyprland", "hyprland": "hyprland",
"hyprland-contrib": "hyprland-contrib", "hyprland-contrib": "hyprland-contrib",
"hyprman": "hyprman", "hyprman": "hyprman",
"lix": "lix",
"lix-module": "lix-module", "lix-module": "lix-module",
"nix-index-database": "nix-index-database", "nix-index-database": "nix-index-database",
"nixos-wsl": "nixos-wsl", "nixos-wsl": "nixos-wsl",
@ -1150,11 +1147,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1719537599, "lastModified": 1719364424,
"narHash": "sha256-SDal8AzkCFLLu97AUSr/Xpj7M5VmbNWBCB1TZJhBC5M=", "narHash": "sha256-EGpIcuGfpx+NQJGUho8vK5Q3TFHdaHtTLoqV/V+n4oY=",
"owner": "Cloudef", "owner": "Cloudef",
"repo": "zig2nix", "repo": "zig2nix",
"rev": "13a64a338baa44d3c5ffc3a7a4dfe23e342ecad4", "rev": "67d44febbeb1fad4c861a5c4d67a8f6719f7f763",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -12,18 +12,11 @@
url = "github:nix-community/nix-index-database"; url = "github:nix-community/nix-index-database";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
lix = {
url = "https://git.lix.systems/lix-project/lix/archive/main.tar.gz";
flake = false;
};
lix-module = { lix-module = {
url = "https://git.lix.systems/lix-project/nixos-module/archive/main.tar.gz"; url = "https://git.lix.systems/lix-project/nixos-module/archive/2.90.0-rc1.tar.gz";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
inputs.lix.follows = "lix";
}; };
hyprland.url = "git+https://github.com/hyprwm/Hyprland/?submodules=1"; hyprland.url = "git+https://github.com/hyprwm/Hyprland/?submodules=1";
hyprland-contrib.url = "github:hyprwm/contrib"; hyprland-contrib.url = "github:hyprwm/contrib";

View file

@ -54,7 +54,7 @@ in
nixosModules = listToAttrs (findModulesList ../modules); nixosModules = listToAttrs (findModulesList ../modules);
nixosConfigurations = mapAttrs (name: _: mkSystem name) (readDir ../hosts); nixosConfigurations = mapAttrs (name: _: mkSystem name) (readDir ../hosts);
packages = forAllSystems (pkgs: rec { packages = forAllSystems (pkgs: rec {
oizys-go = pkgs.callPackage ../pkgs/oizys { }; oizys-go = pkgs.callPackage ../pkgs/oizys {};
default = oizys-go; default = oizys-go;
}); });
devShells = forAllSystems (pkgs: { devShells = forAllSystems (pkgs: {

View file

@ -12,7 +12,6 @@
# nix.package = pkgs.nixVersions.latest; # nix.package = pkgs.nixVersions.latest;
nix.extraOptions = '' nix.extraOptions = ''
experimental-features = nix-command flakes experimental-features = nix-command flakes
use-xdg-base-directories = true
''; '';
nix.optimise.automatic = true; nix.optimise.automatic = true;

View file

@ -4,7 +4,6 @@ import (
"fmt" "fmt"
"github.com/spf13/cobra" "github.com/spf13/cobra"
"oizys/internal/oizys" "oizys/internal/oizys"
) )

View file

@ -48,8 +48,11 @@ var rootCmd = &cobra.Command{
} }
oizys.SetFlake(flake) oizys.SetFlake(flake)
oizys.SetHost(host) oizys.SetHost(host)
oizys.SetCache(cacheName) // TODO: move
oizys.SetVerbose(verbose) oizys.SetVerbose(verbose)
oizys.SetResetCache(resetCache) oizys.SetResetCache(resetCache)
oizys.CheckFlake()
}, },
} }

View file

@ -11,6 +11,7 @@ import (
"github.com/charmbracelet/lipgloss" "github.com/charmbracelet/lipgloss"
"github.com/briandowns/spinner"
"github.com/charmbracelet/log" "github.com/charmbracelet/log"
) )
@ -54,19 +55,9 @@ func New() *Oizys {
} }
func SetFlake(path string) { func SetFlake(path string) {
// Check path exists
if path != "" { if path != "" {
o.flake = 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) { func SetCache(name string) {
@ -140,6 +131,24 @@ 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 { func git(rest ...string) *exec.Cmd {
args := []string{"-C", o.flake} args := []string{"-C", o.flake}
args = append(args, rest...) args = append(args, rest...)
@ -488,6 +497,11 @@ func CacheBuild(rest ...string) {
} }
func CheckFlake() { 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) { func CI(rest ...string) {
@ -497,10 +511,10 @@ func CI(rest ...string) {
exitWithCommand(cmd) exitWithCommand(cmd)
} }
// // TODO: deprecate // TODO: deprecate
// func nixSpinner(host string) *spinner.Spinner { func nixSpinner(host string) *spinner.Spinner {
// msg := fmt.Sprintf("%s %s", " evaluating derivation for:", msg := fmt.Sprintf("%s %s", " evaluating derivation for:",
// lipgloss.NewStyle().Bold(true).Foreground(lipgloss.Color("6")).Render(host), lipgloss.NewStyle().Bold(true).Foreground(lipgloss.Color("6")).Render(host),
// ) )
// return startSpinner(msg) return startSpinner(msg)
// } }

13
todo.md
View file

@ -1,12 +1,5 @@
# oizys todo's # 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 ## software
- [ ] lid closed does not engage hyprlock? - [ ] lid closed does not engage hyprlock?
@ -19,4 +12,10 @@
> kernel: ucsi_acpi USBC000:00: possible UCSI driver bug 2 > kernel: ucsi_acpi USBC000:00: possible UCSI driver bug 2
> kernel: ucsi_acpi USBC000:00: error -EINVAL: PPM init failed > 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 --> <!-- generated with <3 by daylinmorgan/todo -->