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"
|
"xdph": "xdph"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1719350558,
|
"lastModified": 1719526850,
|
||||||
"narHash": "sha256-oACeKBS762XSJbN/rz5Y2xPYGzWQHhwDqn+CeODuWsM=",
|
"narHash": "sha256-GPqjH+P9PPmln5KQbyCKm3kfL1NCykIPLejhUel//w4=",
|
||||||
"ref": "refs/heads/main",
|
"ref": "refs/heads/main",
|
||||||
"rev": "e4d09aa3a9de9a9e71c10bf4b6800585b3db9a4c",
|
"rev": "b7f42a1e88a5b6c9d2dbdba31e0f35f6a02461e7",
|
||||||
"revCount": 4891,
|
"revCount": 4893,
|
||||||
"submodules": true,
|
"submodules": true,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/hyprwm/Hyprland/"
|
"url": "https://github.com/hyprwm/Hyprland/"
|
||||||
|
@ -498,36 +498,38 @@
|
||||||
"lix": {
|
"lix": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1718419213,
|
"lastModified": 1719439912,
|
||||||
"narHash": "sha256-WY7BGnu5PnbK4O8cKKv9kvxwzZIGbIQUQLGPHFXitI0=",
|
"narHash": "sha256-Qn0y/WEYcBL/SKEnpJq1e9tDpVi57YGDiJM2MgavLXM=",
|
||||||
"rev": "253546d5fbf8a5aa60ac8164c1b4f5794dc4e9d1",
|
"rev": "5dc85e8b72d1ba433f69200537146275ff1c4a03",
|
||||||
"type": "tarball",
|
"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": {
|
"original": {
|
||||||
"type": "tarball",
|
"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": {
|
"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": 1718778548,
|
"lastModified": 1719353937,
|
||||||
"narHash": "sha256-64lB/NO6AQ6z6EDCemPSYZWX/Qc6Rt04cPia5T5v01g=",
|
"narHash": "sha256-86NBqDxAP20ET/UoKX0WvSItblNQ97czXb2q7lkMrwk=",
|
||||||
"rev": "29ed1bb67751e5b107d08df35d18dda6d45324e9",
|
"rev": "5d9d94089fb1ca96222a34bfe245ef5c5ebefd37",
|
||||||
"type": "tarball",
|
"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": {
|
"original": {
|
||||||
"type": "tarball",
|
"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": {
|
"nix-eval-jobs": {
|
||||||
|
@ -677,11 +679,11 @@
|
||||||
"nixpkgs": "nixpkgs_7"
|
"nixpkgs": "nixpkgs_7"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1719422118,
|
"lastModified": 1719566311,
|
||||||
"narHash": "sha256-lM5QMm2Ig1eurRIQFVAg7KAcg4H+tMKN+M/eyraze+A=",
|
"narHash": "sha256-oH6+liiG3n0SMng5pu1/QbGvcSZpyWb67MpV2PSqjyc=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixpkgs-wayland",
|
"repo": "nixpkgs-wayland",
|
||||||
"rev": "3d5a11c31e5815dcf6a66451e63a2f4631ecbf7a",
|
"rev": "7bee18635843298c20461c7cbec733461c34b9fb",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -740,11 +742,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_5": {
|
"nixpkgs_5": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1719317636,
|
"lastModified": 1719468428,
|
||||||
"narHash": "sha256-bu0xbu2Z6DDzA9LGV81yJunIti6r7tjUImeR8orAL/I=",
|
"narHash": "sha256-vN5xJAZ4UGREEglh3lfbbkIj+MPEYMuqewMn4atZFaQ=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "9c513fc6fb75142f6aec6b7545cb8af2236b80f5",
|
"rev": "1e3deb3d8a86a870d925760db1a5adecc64d329d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -849,11 +851,11 @@
|
||||||
"rust-overlay": "rust-overlay"
|
"rust-overlay": "rust-overlay"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1719383847,
|
"lastModified": 1719577036,
|
||||||
"narHash": "sha256-MhKnV9IHpeMbiARX5e+6LLXYJenNNx0YNFGCVtmufu8=",
|
"narHash": "sha256-OGizrODxLNpyYUlVg7gT5EkeC4BnBnGsn+X1TguY/4Y=",
|
||||||
"owner": "roc-lang",
|
"owner": "roc-lang",
|
||||||
"repo": "roc",
|
"repo": "roc",
|
||||||
"rev": "f8c6786502bc253ab202a55e2bccdcc693e549c8",
|
"rev": "93f45de1e79e4752e807fbb999ba46a85287f351",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -868,6 +870,7 @@
|
||||||
"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",
|
||||||
|
@ -1147,11 +1150,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1719364424,
|
"lastModified": 1719537599,
|
||||||
"narHash": "sha256-EGpIcuGfpx+NQJGUho8vK5Q3TFHdaHtTLoqV/V+n4oY=",
|
"narHash": "sha256-SDal8AzkCFLLu97AUSr/Xpj7M5VmbNWBCB1TZJhBC5M=",
|
||||||
"owner": "Cloudef",
|
"owner": "Cloudef",
|
||||||
"repo": "zig2nix",
|
"repo": "zig2nix",
|
||||||
"rev": "67d44febbeb1fad4c861a5c4d67a8f6719f7f763",
|
"rev": "13a64a338baa44d3c5ffc3a7a4dfe23e342ecad4",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
13
flake.nix
13
flake.nix
|
@ -12,11 +12,18 @@
|
||||||
url = "github:nix-community/nix-index-database";
|
url = "github:nix-community/nix-index-database";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
lix-module = {
|
lix = {
|
||||||
url = "https://git.lix.systems/lix-project/nixos-module/archive/2.90.0-rc1.tar.gz";
|
url = "https://git.lix.systems/lix-project/lix/archive/main.tar.gz";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
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.url = "git+https://github.com/hyprwm/Hyprland/?submodules=1";
|
||||||
hyprland-contrib.url = "github:hyprwm/contrib";
|
hyprland-contrib.url = "github:hyprwm/contrib";
|
||||||
|
|
||||||
|
|
|
@ -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: {
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
# 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;
|
||||||
|
|
|
@ -4,6 +4,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
"oizys/internal/oizys"
|
"oizys/internal/oizys"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -48,11 +48,8 @@ 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()
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,6 @@ import (
|
||||||
|
|
||||||
"github.com/charmbracelet/lipgloss"
|
"github.com/charmbracelet/lipgloss"
|
||||||
|
|
||||||
"github.com/briandowns/spinner"
|
|
||||||
"github.com/charmbracelet/log"
|
"github.com/charmbracelet/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -55,9 +54,19 @@ 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) {
|
||||||
|
@ -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 {
|
func git(rest ...string) *exec.Cmd {
|
||||||
args := []string{"-C", o.flake}
|
args := []string{"-C", o.flake}
|
||||||
args = append(args, rest...)
|
args = append(args, rest...)
|
||||||
|
@ -497,11 +488,6 @@ 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) {
|
||||||
|
@ -511,10 +497,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
13
todo.md
|
@ -1,5 +1,12 @@
|
||||||
# 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?
|
||||||
|
@ -12,10 +19,4 @@
|
||||||
> 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 -->
|
||||||
|
|
Loading…
Reference in a new issue