mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-12-25 08:30:45 -06:00
Compare commits
14 commits
7cb80e2643
...
6ec76eb866
Author | SHA1 | Date | |
---|---|---|---|
6ec76eb866 | |||
e4d08c4195 | |||
14b3e526a5 | |||
6a17f6945f | |||
|
e5fc027d37 | ||
|
29878ac676 | ||
|
2456af8d0c | ||
727b8476a2 | |||
fb09facde4 | |||
5783bf1b77 | |||
50e96ca6b4 | |||
1fe009085b | |||
82d563ac61 | |||
18273425a0 |
12 changed files with 209 additions and 40 deletions
55
.github/actions/clean-disk/action.yml
vendored
Normal file
55
.github/actions/clean-disk/action.yml
vendored
Normal file
|
@ -0,0 +1,55 @@
|
|||
name: 'Maximize build disk space'
|
||||
description: 'Maximize the available disk space by removing unneeded software'
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Disk space report before modification
|
||||
shell: bash
|
||||
run: |
|
||||
echo "==> Available space before cleanup"
|
||||
echo
|
||||
df -h
|
||||
# sudo du /usr/local -h --max-depth=1 | sort -rh || true
|
||||
|
||||
- name: Maximize build disk space
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
|
||||
echo "Removing unwanted software... "
|
||||
|
||||
# sudo docker image prune --all --force > /dev/null &
|
||||
{
|
||||
sudo apt-get remove -y \
|
||||
'^aspnetcore-.*' '^dotnet-.*' '^llvm-.*' \
|
||||
'php.*' '^mongodb-.*' '^mysql-.*' '^google-cloud-*' \
|
||||
azure-cli google-chrome-stable firefox \
|
||||
powershell mono-devel libgl1-mesa-dri \
|
||||
--fix-missing \
|
||||
> /dev/null
|
||||
sudo apt-get remove -y docker > /dev/null
|
||||
sudo apt-get autoremove -y > /dev/null
|
||||
sudo apt-get clean > /dev/null
|
||||
} &
|
||||
wait
|
||||
df -h
|
||||
sudo rm -rf /var/lib/docker
|
||||
df -h
|
||||
|
||||
|
||||
sudo swapoff -a
|
||||
sudo rm -f /mnt/swapfile &
|
||||
sudo rm -rf /usr/{local,share} &
|
||||
sudo rm -rf /opt &
|
||||
sudo rm -rf "$AGENT_TOOLSDIRECTORY" &
|
||||
|
||||
wait
|
||||
echo "... done"
|
||||
|
||||
- name: Disk space report after modification
|
||||
shell: bash
|
||||
run: |
|
||||
echo "==> Available space after cleanup"
|
||||
echo
|
||||
df -h
|
10
.github/dependabot.yml
vendored
Normal file
10
.github/dependabot.yml
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
# Set update schedule for GitHub Actions
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
# Check for updates to GitHub Actions every week
|
||||
interval: "weekly"
|
49
.github/workflows/build.yml
vendored
49
.github/workflows/build.yml
vendored
|
@ -29,26 +29,45 @@ jobs:
|
|||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# The default disk size of these runners is ~14GB
|
||||
# Cleanup the disk, see upstream discussion https://github.com/actions/runner-images/issues/2840.
|
||||
- name: Cleanup Disk Space
|
||||
run: |
|
||||
echo "Before removing files:"
|
||||
df -h
|
||||
sudo rm -rf /usr/share/dotnet
|
||||
sudo rm -rf /opt/ghc
|
||||
sudo rm -rf /opt
|
||||
sudo rm -rf "/usr/local/share/boost"
|
||||
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
|
||||
echo "After removing files:"
|
||||
df -h
|
||||
# # The default disk size of these runners is ~14GB
|
||||
# # Cleanup the disk, see upstream discussion https://github.com/actions/runner-images/issues/2840.
|
||||
# - name: Cleanup Disk Space
|
||||
# run: |
|
||||
# echo "Before removing files:"
|
||||
# df -h
|
||||
# sudo rm -rf "$AGENT_TOOLSDIRECTORY"
|
||||
# sudo rm -rf /opt
|
||||
# sudo rm -rf /usr/share/dotnet
|
||||
# sudo rm -rf /usr/local/{lib/android,share/boost}
|
||||
# sudo docker image prune --all --force
|
||||
# echo "After removing files:"
|
||||
# df -h
|
||||
|
||||
- name: Maximize build space
|
||||
uses: AdityaGarg8/remove-unwanted-software@v3
|
||||
with:
|
||||
remove-android: 'true'
|
||||
remove-dotnet: 'true'
|
||||
remove-haskell: 'true'
|
||||
remove-codeql: 'true'
|
||||
remove-docker-images: 'true'
|
||||
remove-large-packages: 'true'
|
||||
remove-cached-tools: 'true'
|
||||
remove-swapfile: 'true'
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
echo "Free space:"
|
||||
df -h
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: DeterminateSystems/nix-installer-action@main
|
||||
- uses: DeterminateSystems/magic-nix-cache-action@v2
|
||||
- uses: DeterminateSystems/magic-nix-cache-action@v7
|
||||
|
||||
- uses: cachix/cachix-action@v14
|
||||
- uses: cachix/cachix-action@v15
|
||||
with:
|
||||
name: daylin
|
||||
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
|
||||
|
|
52
.github/workflows/checks.yml
vendored
Normal file
52
.github/workflows/checks.yml
vendored
Normal file
|
@ -0,0 +1,52 @@
|
|||
name: Run Nix Flake Checks
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
lockFile:
|
||||
description: 'flake.lock file'
|
||||
type: string
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}-${{ inputs.host }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# The default disk size of these runners is ~14GB
|
||||
# Cleanup the disk, see upstream discussion https://github.com/actions/runner-images/issues/2840.
|
||||
# - name: Cleanup Disk Space
|
||||
# run: |
|
||||
# echo "Before removing files:"
|
||||
# df -h
|
||||
# sudo rm -rf /usr/share/dotnet
|
||||
# sudo rm -rf /opt/ghc
|
||||
# sudo rm -rf /opt
|
||||
# sudo rm -rf "/usr/local/share/boost"
|
||||
# sudo rm -rf "$AGENT_TOOLSDIRECTORY"
|
||||
# echo "After removing files:"
|
||||
# df -h
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: ./.github/actions/clean-disk
|
||||
|
||||
- uses: DeterminateSystems/nix-installer-action@main
|
||||
- uses: DeterminateSystems/magic-nix-cache-action@v7
|
||||
|
||||
- uses: cachix/cachix-action@v15
|
||||
with:
|
||||
name: daylin
|
||||
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
|
||||
|
||||
- name: write lock file
|
||||
if: "${{ inputs.lockFile != '' }}"
|
||||
run: |
|
||||
echo '${{ inputs.lockFile }}' > flake.lock
|
||||
git diff
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
cachix watch-exec daylin -- nix build --accept-flake-config '.#checks.x86_64-linux.packageCheck'
|
5
.github/workflows/push.yml
vendored
5
.github/workflows/push.yml
vendored
|
@ -9,7 +9,12 @@ on:
|
|||
- main
|
||||
|
||||
jobs:
|
||||
checks:
|
||||
uses: ./.github/workflows/checks.yml
|
||||
secrets: inherit
|
||||
|
||||
build:
|
||||
needs: checks
|
||||
strategy:
|
||||
max-parallel: 1
|
||||
matrix:
|
||||
|
|
26
flake.lock
26
flake.lock
|
@ -305,11 +305,11 @@
|
|||
"xdph": "xdph"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1718292752,
|
||||
"narHash": "sha256-NFioPAqyQIOuQMPcDezGCpngCP5ShrudUHfFCfN0d7o=",
|
||||
"lastModified": 1718376341,
|
||||
"narHash": "sha256-Xm8EyYgn752O61QHBera4ygQc/izCLyzhwIqYXqUOdA=",
|
||||
"ref": "refs/heads/main",
|
||||
"rev": "5de273a14427cb4a4cad9ac57a22b418bcd4248d",
|
||||
"revCount": 4821,
|
||||
"rev": "a357fa3e0a60b4f96a1924e0d9753d23001ab00e",
|
||||
"revCount": 4826,
|
||||
"submodules": true,
|
||||
"type": "git",
|
||||
"url": "https://github.com/hyprwm/Hyprland/"
|
||||
|
@ -682,11 +682,11 @@
|
|||
"nixpkgs": "nixpkgs_8"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1718263016,
|
||||
"narHash": "sha256-tLaeDJLvwUmAt2Nd5F6ET87RehB6Krt7M3wnS6TMcTM=",
|
||||
"lastModified": 1718371238,
|
||||
"narHash": "sha256-ntSxtwrYlEVsERaC9X7yFGvNVzbz5H5XuiqkdIc4k/4=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs-wayland",
|
||||
"rev": "8def778b26e7d7f7596633350d739ceebba35ef8",
|
||||
"rev": "77f8f21e3475cdf26eeb68ff6711e6861c9d5dc5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -761,11 +761,11 @@
|
|||
},
|
||||
"nixpkgs_6": {
|
||||
"locked": {
|
||||
"lastModified": 1718149104,
|
||||
"narHash": "sha256-Ds1QpobBX2yoUDx9ZruqVGJ/uQPgcXoYuobBguyKEh8=",
|
||||
"lastModified": 1718276985,
|
||||
"narHash": "sha256-u1fA0DYQYdeG+5kDm1bOoGcHtX0rtC7qs2YA2N1X++I=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "e913ae340076bbb73d9f4d3d065c2bca7caafb16",
|
||||
"rev": "3f84a279f1a6290ce154c5531378acc827836fbb",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -1169,11 +1169,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1718241525,
|
||||
"narHash": "sha256-0Z5pRERV7fgkJsLLuXQfFT+DKFM5DnqjncAKH+7/+bE=",
|
||||
"lastModified": 1718327908,
|
||||
"narHash": "sha256-E3/3urkZTEIaV2afNDniC9Z7Ksxyn6AaVRnrrxxMPZE=",
|
||||
"owner": "Cloudef",
|
||||
"repo": "zig2nix",
|
||||
"rev": "30cffd333f1b732cc83b2f3c49bef28c1fbb58f9",
|
||||
"rev": "d846577330acb4571e837d5c631beeb555988dd0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -16,8 +16,6 @@
|
|||
|
||||
nixos-wsl.url = "github:nix-community/NixOS-WSL";
|
||||
|
||||
# see todo.md
|
||||
# hyprland.url = "git+https://github.com/hyprwm/Hyprland/?submodules=1&rev=4cdddcfe466cb21db81af0ac39e51cc15f574da9";
|
||||
hyprland.url = "git+https://github.com/hyprwm/Hyprland/?submodules=1";
|
||||
|
||||
hyprland-contrib.url = "github:hyprwm/contrib";
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
environment.systemPackages = with pkgs; [
|
||||
zk
|
||||
quarto
|
||||
cachix
|
||||
];
|
||||
|
||||
services.restic.backups.gdrive = {
|
||||
|
|
|
@ -28,6 +28,17 @@ rec {
|
|||
|
||||
nixosModules = listToAttrs (findModulesList ../modules);
|
||||
|
||||
mkPackageCheck =
|
||||
{ packages, pkgs }:
|
||||
pkgs.runCommandLocal "build-third-party"
|
||||
{
|
||||
src = ./.;
|
||||
nativeBuildInputs = [ packages ];
|
||||
}
|
||||
''
|
||||
mkdir "$out"
|
||||
'';
|
||||
|
||||
mkSystem =
|
||||
hostName:
|
||||
nixosSystem {
|
||||
|
@ -74,5 +85,24 @@ rec {
|
|||
packages = oizysPkg;
|
||||
devShells = devShells;
|
||||
formatter = forAllSystems (pkgs: pkgs.nixfmt-rfc-style);
|
||||
checks = forAllSystems (pkgs: {
|
||||
packageCheck = mkPackageCheck {
|
||||
inherit pkgs;
|
||||
# make sure lix is in this?
|
||||
packages = [
|
||||
pkgs.pixi
|
||||
pkgs.swww
|
||||
|
||||
inputs.tsm.packages.${pkgs.system}.default
|
||||
inputs.hyprman.packages.${pkgs.system}.default
|
||||
|
||||
inputs.roc.packages.${pkgs.system}.full
|
||||
inputs.roc.packages.${pkgs.system}.lang-server
|
||||
|
||||
inputs.zls.outputs.packages.${pkgs.system}.default
|
||||
inputs.zig2nix.outputs.packages.${pkgs.system}.zig.master.bin
|
||||
];
|
||||
};
|
||||
});
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
{ lib, ... }:
|
||||
let
|
||||
inherit (builtins)
|
||||
filter;
|
||||
inherit (builtins) filter;
|
||||
inherit (lib)
|
||||
isNixFile
|
||||
mkOption
|
||||
|
@ -9,8 +8,7 @@ let
|
|||
literalExpression
|
||||
mdDoc
|
||||
;
|
||||
inherit (lib.filesystem)
|
||||
listFilesRecursive;
|
||||
inherit (lib.filesystem) listFilesRecursive;
|
||||
in
|
||||
{
|
||||
imports = filter (f: (f != ./default.nix) && (isNixFile f)) (listFilesRecursive ./.);
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
# I'm getting errors related to a non-existent nix-index?
|
||||
programs.nix-index.enableZshIntegration = false;
|
||||
programs.nix-index.enableBashIntegration =false;
|
||||
programs.nix-index.enableBashIntegration = false;
|
||||
programs.nix-index.enableFishIntegration = false;
|
||||
|
||||
nix.settings = {
|
||||
|
|
11
todo.md
11
todo.md
|
@ -1,10 +1,5 @@
|
|||
# oizys todo's
|
||||
|
||||
|
||||
## nix expr
|
||||
|
||||
- [ ] find out why pixi on GHA is different from local (possibly from the fetch git step?)
|
||||
|
||||
## software
|
||||
|
||||
- [ ] lid closed does not engage hyprlock?
|
||||
|
@ -17,4 +12,10 @@
|
|||
> 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