mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-11-09 20:33:15 -06:00
Compare commits
10 commits
b0bffa1a1f
...
7fe4f7bd55
Author | SHA1 | Date | |
---|---|---|---|
7fe4f7bd55 | |||
a329763cba | |||
79984d5ddc | |||
db01189615 | |||
da682c0073 | |||
df4da6b3f9 | |||
cb31371784 | |||
0a54af8cc7 | |||
e4a304c274 | |||
91a370de41 |
7 changed files with 77 additions and 83 deletions
3
.github/workflows/build.yml
vendored
3
.github/workflows/build.yml
vendored
|
@ -34,6 +34,7 @@ jobs:
|
||||||
|
|
||||||
- uses: DeterminateSystems/nix-installer-action@v13
|
- uses: DeterminateSystems/nix-installer-action@v13
|
||||||
with:
|
with:
|
||||||
|
source-url: https://install.lix.systems/lix/lix-installer-x86_64-linux
|
||||||
extra-conf: |
|
extra-conf: |
|
||||||
accept-flake-config = true
|
accept-flake-config = true
|
||||||
|
|
||||||
|
@ -57,7 +58,7 @@ jobs:
|
||||||
build --minimal \
|
build --minimal \
|
||||||
--host "${{ inputs.hosts }}" \
|
--host "${{ inputs.hosts }}" \
|
||||||
--flake . \
|
--flake . \
|
||||||
--verbose \
|
|
||||||
--debug \
|
--debug \
|
||||||
-- \
|
-- \
|
||||||
|
--keep-going \
|
||||||
--print-build-logs
|
--print-build-logs
|
||||||
|
|
6
.github/workflows/update.yml
vendored
6
.github/workflows/update.yml
vendored
|
@ -22,6 +22,7 @@ jobs:
|
||||||
|
|
||||||
- uses: DeterminateSystems/nix-installer-action@v13
|
- uses: DeterminateSystems/nix-installer-action@v13
|
||||||
with:
|
with:
|
||||||
|
source-url: https://install.lix.systems/lix/lix-installer-x86_64-linux
|
||||||
extra-conf: |
|
extra-conf: |
|
||||||
accept-flake-config = true
|
accept-flake-config = true
|
||||||
|
|
||||||
|
@ -43,7 +44,6 @@ jobs:
|
||||||
build --minimal \
|
build --minimal \
|
||||||
--host "othalan" \
|
--host "othalan" \
|
||||||
--flake . \
|
--flake . \
|
||||||
--verbose \
|
|
||||||
--debug \
|
--debug \
|
||||||
-- \
|
-- \
|
||||||
--print-build-logs
|
--print-build-logs
|
||||||
|
@ -71,6 +71,7 @@ jobs:
|
||||||
|
|
||||||
- uses: DeterminateSystems/nix-installer-action@v13
|
- uses: DeterminateSystems/nix-installer-action@v13
|
||||||
with:
|
with:
|
||||||
|
source-url: https://install.lix.systems/lix/lix-installer-x86_64-linux
|
||||||
extra-conf: |
|
extra-conf: |
|
||||||
accept-flake-config = true
|
accept-flake-config = true
|
||||||
|
|
||||||
|
@ -86,7 +87,6 @@ jobs:
|
||||||
-- \
|
-- \
|
||||||
build $system_attr \
|
build $system_attr \
|
||||||
--flake . \
|
--flake . \
|
||||||
--verbose \
|
|
||||||
--debug \
|
--debug \
|
||||||
-- \
|
-- \
|
||||||
--print-build-logs \
|
--print-build-logs \
|
||||||
|
@ -101,9 +101,9 @@ jobs:
|
||||||
-- \
|
-- \
|
||||||
build $system_attr \
|
build $system_attr \
|
||||||
--flake . \
|
--flake . \
|
||||||
--verbose \
|
|
||||||
--debug \
|
--debug \
|
||||||
-- \
|
-- \
|
||||||
|
--keep-going \
|
||||||
--print-build-logs \
|
--print-build-logs \
|
||||||
--out-link updated
|
--out-link updated
|
||||||
|
|
||||||
|
|
52
flake.lock
52
flake.lock
|
@ -341,11 +341,11 @@
|
||||||
"xdph": "xdph"
|
"xdph": "xdph"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1722800434,
|
"lastModified": 1722956902,
|
||||||
"narHash": "sha256-0lvzOT3dQWlQ+zyOAhKTxFd9BWZw380ILDNpoGdtekA=",
|
"narHash": "sha256-g3cAlVmRtnyqMZw88MKqVNM8eU88XzgNAlXdTkym5q8=",
|
||||||
"ref": "refs/heads/main",
|
"ref": "refs/heads/main",
|
||||||
"rev": "2b520571e897be2a0e88c8692da607b062000038",
|
"rev": "b0a70f63e3865eaa77f0b78a04b230aa583bc95c",
|
||||||
"revCount": 5051,
|
"revCount": 5055,
|
||||||
"submodules": true,
|
"submodules": true,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/hyprwm/Hyprland/"
|
"url": "https://github.com/hyprwm/Hyprland/"
|
||||||
|
@ -534,11 +534,11 @@
|
||||||
"lix": {
|
"lix": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1722643724,
|
"lastModified": 1722957485,
|
||||||
"narHash": "sha256-FrM0DN/i5kKB06/4KYNkY3mMGpC5hYQhaKtx1mneReU=",
|
"narHash": "sha256-cEemTAXvhRcjn7XxujIRglqEfAFgdlNulkRSFskowbo=",
|
||||||
"rev": "66469fc281fc4abb3284574f77a8051fee8116b9",
|
"rev": "f84997cbefb2f2dd99e48f0ad39f747ed83d69e9",
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
"url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/66469fc281fc4abb3284574f77a8051fee8116b9.tar.gz"
|
"url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/f84997cbefb2f2dd99e48f0ad39f747ed83d69e9.tar.gz"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
|
@ -715,11 +715,11 @@
|
||||||
"nixpkgs": "nixpkgs_6"
|
"nixpkgs": "nixpkgs_6"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1722802723,
|
"lastModified": 1722928655,
|
||||||
"narHash": "sha256-7Yrsx/qbGCojDFxHSMsehU6a9z8rHCUVgjalKxPW4Eg=",
|
"narHash": "sha256-2BAfUaRzrhHwT/JodTq++DUf/nljgoFEc5A79SS8ydU=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixpkgs-wayland",
|
"repo": "nixpkgs-wayland",
|
||||||
"rev": "7ff73584dfac4799a253e38c2aedae80b681dd7f",
|
"rev": "423d21c157c2a7b384ae9c766e25759576dceb87",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -762,11 +762,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_4": {
|
"nixpkgs_4": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1722640603,
|
"lastModified": 1722926584,
|
||||||
"narHash": "sha256-TcXjLVNd3VeH1qKPH335Tc4RbFDbZQX+d7rqnDUoRaY=",
|
"narHash": "sha256-sLA+lfCxTkXf4o3JVxcfe+w9kAzauGfEnJ9roNbNng8=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "81610abc161d4021b29199aa464d6a1a521e0cc9",
|
"rev": "d33cf80b603b3d0cddb48f9816cae707a59e2334",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -794,11 +794,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_6": {
|
"nixpkgs_6": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1722630782,
|
"lastModified": 1722813957,
|
||||||
"narHash": "sha256-hMyG9/WlUi0Ho9VkRrrez7SeNlDzLxalm9FwY7n/Noo=",
|
"narHash": "sha256-IAoYyYnED7P8zrBFMnmp7ydaJfwTnwcnqxUElC1I26Y=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "d04953086551086b44b6f3c6b7eeb26294f207da",
|
"rev": "cb9a96f23c491c081b38eab96d22fa958043c9fa",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -857,11 +857,11 @@
|
||||||
"rust-overlay": "rust-overlay"
|
"rust-overlay": "rust-overlay"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1722735731,
|
"lastModified": 1722856566,
|
||||||
"narHash": "sha256-BN/+/y1zR3sU4KhTdfNkleYS79UEnnmKP9MmY4NHZ8M=",
|
"narHash": "sha256-Yr9P/TyxgVVwgXIiu96up2hgWjMR0zWPbaihyNXp+r0=",
|
||||||
"owner": "roc-lang",
|
"owner": "roc-lang",
|
||||||
"repo": "roc",
|
"repo": "roc",
|
||||||
"rev": "d4d9f69d0fbefd331172c11e430a5f2ac98ee30b",
|
"rev": "13f60cde09ef01c003fe362bf46e592a0f4ae7c6",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -1156,11 +1156,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1722734830,
|
"lastModified": 1722907357,
|
||||||
"narHash": "sha256-cTHYCv/I2P6/V9pUZ9iqwjr/9VIZ4f+aRqZJq6DWsac=",
|
"narHash": "sha256-alp8wfWJtxLXKNuVXPjhWFtrGhp10/3Nle//1RkapgU=",
|
||||||
"owner": "Cloudef",
|
"owner": "Cloudef",
|
||||||
"repo": "zig2nix",
|
"repo": "zig2nix",
|
||||||
"rev": "c45829191ae509708b929872845f75008942d9b5",
|
"rev": "32c6285061bbab4920b020ec9e9f4aa5c9a81750",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -1180,11 +1180,11 @@
|
||||||
"zig-overlay": "zig-overlay"
|
"zig-overlay": "zig-overlay"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1722703886,
|
"lastModified": 1722919037,
|
||||||
"narHash": "sha256-WtOixxAwZS1uTD5L66ms9ctA7gUdEIfzbsY1Gj+aV+4=",
|
"narHash": "sha256-h8BG+XOCli8++tCojSo/cF39AIixVj3mO94b4cuqT94=",
|
||||||
"owner": "zigtools",
|
"owner": "zigtools",
|
||||||
"repo": "zls",
|
"repo": "zls",
|
||||||
"rev": "dfe958e4d1a9ba503cfafd39164f090daea70109",
|
"rev": "74b5a00f67ab4e5a848646411779221e6cc24b87",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
49
flake.nix
49
flake.nix
|
@ -8,10 +8,7 @@
|
||||||
stable.url = "github:nixos/nixpkgs/nixos-23.11";
|
stable.url = "github:nixos/nixpkgs/nixos-23.11";
|
||||||
nixpkgs-wayland.url = "github:nix-community/nixpkgs-wayland";
|
nixpkgs-wayland.url = "github:nix-community/nixpkgs-wayland";
|
||||||
nixos-wsl.url = "github:nix-community/NixOS-WSL";
|
nixos-wsl.url = "github:nix-community/NixOS-WSL";
|
||||||
nix-index-database = {
|
nix-index-database.url = "github:nix-community/nix-index-database";
|
||||||
url = "github:nix-community/nix-index-database";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
|
|
||||||
lix.url = "https://git.lix.systems/lix-project/lix/archive/main.tar.gz";
|
lix.url = "https://git.lix.systems/lix-project/lix/archive/main.tar.gz";
|
||||||
lix.flake = false;
|
lix.flake = false;
|
||||||
|
@ -23,37 +20,23 @@
|
||||||
|
|
||||||
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";
|
||||||
|
roc.url = "github:roc-lang/roc";
|
||||||
|
zig2nix.url = "github:Cloudef/zig2nix";
|
||||||
|
zls.url = "github:zigtools/zls";
|
||||||
|
|
||||||
zig2nix = {
|
pixi.url = "github:daylinmorgan/pixi-flake";
|
||||||
url = "github:Cloudef/zig2nix";
|
f1multiviewer.url = "github:daylinmorgan/f1multiviewer-flake";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
tsm.url = "github:daylinmorgan/tsm?dir=nix";
|
||||||
};
|
hyprman.url = "git+https://git.dayl.in/daylin/hyprman.git";
|
||||||
zls = {
|
|
||||||
url = "github:zigtools/zls";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
|
|
||||||
roc = {
|
hyprman.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
url = "github:roc-lang/roc";
|
f1multiviewer.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
pixi.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
roc.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
pixi = {
|
tsm.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
url = "github:daylinmorgan/pixi-flake";
|
zls.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
zig2nix.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
|
||||||
f1multiviewer = {
|
|
||||||
url = "github:daylinmorgan/f1multiviewer-flake";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
tsm = {
|
|
||||||
url = "github:daylinmorgan/tsm?dir=nix";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
hyprman = {
|
|
||||||
url = "git+https://git.dayl.in/daylin/hyprman.git";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
nixConfig = {
|
nixConfig = {
|
||||||
|
|
|
@ -1,12 +1,17 @@
|
||||||
{ pkgs, enabled, ... }:
|
{ pkgs, enabled, ... }:
|
||||||
{
|
{
|
||||||
networking.networkmanager = enabled;
|
networking.networkmanager = enabled;
|
||||||
services.printing = enabled;
|
|
||||||
services.fwupd = enabled;
|
services.fwupd = enabled;
|
||||||
hardware.bluetooth = enabled // {
|
hardware.bluetooth = enabled // {
|
||||||
powerOnBoot = true;
|
powerOnBoot = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.printing = enabled;
|
||||||
|
hardware.sane = enabled // {
|
||||||
|
extraBackends = [ pkgs.hplipWithPlugin ];
|
||||||
|
};
|
||||||
|
users.users.daylin.extraGroups = ["scanner" "lp"];
|
||||||
|
|
||||||
# https://github.com/NixOS/nixos-hardware/blob/c478b3d56969006e015e55aaece4931f3600c1b2/lenovo/thinkpad/x1/9th-gen/default.nix
|
# https://github.com/NixOS/nixos-hardware/blob/c478b3d56969006e015e55aaece4931f3600c1b2/lenovo/thinkpad/x1/9th-gen/default.nix
|
||||||
# https://github.com/NixOS/nixos-hardware/blob/c478b3d56969006e015e55aaece4931f3600c1b2/common/pc/ssd/default.nix
|
# https://github.com/NixOS/nixos-hardware/blob/c478b3d56969006e015e55aaece4931f3600c1b2/common/pc/ssd/default.nix
|
||||||
services.fstrim = enabled;
|
services.fstrim = enabled;
|
||||||
|
|
|
@ -14,18 +14,29 @@ in
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
# 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
|
use-xdg-base-directories = true
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nix.optimise.automatic = true;
|
optimise.automatic = true;
|
||||||
nix.gc = {
|
gc = {
|
||||||
automatic = true;
|
automatic = true;
|
||||||
dates = "weekly";
|
dates = "weekly";
|
||||||
options = "--delete-older-than 7d";
|
options = "--delete-older-than 7d";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# use the same nixpkgs for nix run "nixpkgs#hello" style commands
|
||||||
|
registry.nixpkgs.flake = inputs.nixpkgs;
|
||||||
|
};
|
||||||
|
|
||||||
|
# https://dataswamp.org/~solene/2022-07-20-nixos-flakes-command-sync-with-system.html#_nix-shell_vs_nix_shell
|
||||||
|
# use the same nixpkgs for nix-shell -p hello style commands
|
||||||
|
# I don't know that this is necesary...
|
||||||
|
# nix.nixPath = [ "nixpkgs=/etc/channels/nixpkgs" ];
|
||||||
|
# environment.etc."channels/nixpkgs".source = inputs.nixpkgs.outPath;
|
||||||
|
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
pkgs.nixd
|
pkgs.nixd
|
||||||
pkgs.nixfmt-rfc-style
|
pkgs.nixfmt-rfc-style
|
||||||
|
|
|
@ -9,6 +9,7 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
"oizys/internal/oizys"
|
"oizys/internal/oizys"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"github.com/charmbracelet/log"
|
"github.com/charmbracelet/log"
|
||||||
"github.com/google/go-github/v63/github"
|
"github.com/google/go-github/v63/github"
|
||||||
|
@ -154,17 +155,10 @@ func ReadMarkdownFromZip(zipData []byte, fileName string) (string, error) {
|
||||||
return string(content), nil
|
return string(content), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// func CI(rest ...string) {
|
|
||||||
// args := []string{
|
|
||||||
// "workflow", "run", "build.yml",
|
|
||||||
// "-F", fmt.Sprintf("hosts=%s", o.host),
|
|
||||||
// }
|
|
||||||
// args = append(args, rest...)
|
|
||||||
// cmd := exec.Command("gh", args...)
|
|
||||||
// e.ExitWithCommand(cmd)
|
|
||||||
// }
|
|
||||||
|
|
||||||
func CreateDispatch(workflowFileName string, ref string, inputs map[string]interface{}) {
|
func CreateDispatch(workflowFileName string, ref string, inputs map[string]interface{}) {
|
||||||
|
if !strings.HasSuffix(workflowFileName, ".yml") && !strings.HasSuffix(workflowFileName, ".yaml") {
|
||||||
|
workflowFileName = workflowFileName + ".yml"
|
||||||
|
}
|
||||||
log.Infof("creating dispatch event for %s", workflowFileName)
|
log.Infof("creating dispatch event for %s", workflowFileName)
|
||||||
event := github.CreateWorkflowDispatchEventRequest{Ref: ref, Inputs: inputs}
|
event := github.CreateWorkflowDispatchEventRequest{Ref: ref, Inputs: inputs}
|
||||||
_, err := client.Actions.CreateWorkflowDispatchEventByFileName(
|
_, err := client.Actions.CreateWorkflowDispatchEventByFileName(
|
||||||
|
|
Loading…
Reference in a new issue