Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
78c54171b3
|
||
|
|
1a05ffd770
|
||
|
|
349dad753c
|
||
|
|
1597d0e3d6 |
@@ -51,6 +51,7 @@ in
|
||||
./roles/graphviz
|
||||
./roles/hydra
|
||||
./roles/image_based_appliance
|
||||
./roles/instawow
|
||||
./roles/iso
|
||||
./roles/iso_mount
|
||||
./roles/jujutsu
|
||||
@@ -281,6 +282,53 @@ in
|
||||
(disableOptimizationsPython3 "zopfli") # /nix/store/idjhlmljrapzm3i1svl5x9mdwfxxj51v-pytest-check-hook/nix-support/setup-hook: line 23: 280 Segmentation fault (core dumped) /nix/store/87l6i0czch42nzv39ydwld5hnhcq0b65-python3-3.14.7/bin/python3.14 "${flagsArray[@]}"
|
||||
(disableOptimizations "zopfli")
|
||||
(disableOptimizations "nototools") # Needs to use the same version of python as the zopfli package
|
||||
(final: prev: {
|
||||
instawow = prev.instawow.overrideAttrs (
|
||||
finalAttrs: prevAttrs:
|
||||
let
|
||||
version = "7.2.1";
|
||||
in
|
||||
{
|
||||
inherit version;
|
||||
|
||||
src = final.fetchFromGitHub {
|
||||
owner = "layday";
|
||||
repo = "instawow";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-5y+oJfzWwaUc3p4fzsQ4j8a6YJEsI+3Qy3gK6VPkjA4=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = prevAttrs.propagatedBuildInputs ++ [ final.python3.pkgs.versioningit ];
|
||||
|
||||
postPatch = ''
|
||||
# Upstream uses versioningit to set the version
|
||||
sed -i '/^name =.*/a version = "${version}"' pyproject.toml
|
||||
sed -i "/dynamic =/,+2d" pyproject.toml
|
||||
'';
|
||||
}
|
||||
);
|
||||
})
|
||||
(final: prev: {
|
||||
pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [
|
||||
(python-final: python-prev: {
|
||||
aiohttp-client-cache = python-prev.aiohttp-client-cache.overridePythonAttrs (
|
||||
oldAttrs:
|
||||
let
|
||||
version = "0.15.0";
|
||||
in
|
||||
{
|
||||
inherit version;
|
||||
|
||||
src = final.fetchPypi {
|
||||
pname = "aiohttp_client_cache";
|
||||
inherit version;
|
||||
hash = "sha256-Jk+n1pvNsuT+mZTn9Bq17sfLuipfXiYNRE0AL5Ym43Q=";
|
||||
};
|
||||
}
|
||||
);
|
||||
})
|
||||
];
|
||||
})
|
||||
];
|
||||
|
||||
# This option defines the first version of NixOS you have installed on this particular machine,
|
||||
|
||||
@@ -107,6 +107,7 @@
|
||||
me.graphical = true;
|
||||
me.graphics_card_type = "amd";
|
||||
me.graphviz.enable = true;
|
||||
me.instawow.enable = true;
|
||||
me.iso_mount.enable = true;
|
||||
me.jujutsu.config = ../../roles/jujutsu/files/jujutsu_config_home.toml;
|
||||
me.jujutsu.enable = true;
|
||||
|
||||
@@ -100,6 +100,7 @@
|
||||
me.graphical = true;
|
||||
me.graphics_card_type = "amd";
|
||||
me.graphviz.enable = true;
|
||||
me.instawow.enable = true;
|
||||
me.iso_mount.enable = true;
|
||||
me.jujutsu.config = ../../roles/jujutsu/files/jujutsu_config_home.toml;
|
||||
me.jujutsu.enable = true;
|
||||
@@ -137,7 +138,7 @@
|
||||
me.sshd.enable = true;
|
||||
me.steam.enable = true;
|
||||
me.steam_run_free.enable = true;
|
||||
me.sunshine.enable = false;
|
||||
me.sunshine.enable = true;
|
||||
me.sway.enable = true;
|
||||
me.tekton.enable = true;
|
||||
me.terraform.enable = true;
|
||||
|
||||
@@ -10,19 +10,6 @@
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
patchScriptBin =
|
||||
filename: contents:
|
||||
((pkgs.writeScriptBin filename contents).overrideAttrs (old: {
|
||||
buildCommand = "${old.buildCommand}\n patchShebangs $out";
|
||||
}));
|
||||
cache_status_full = (
|
||||
patchScriptBin "cache_status_full" (builtins.readFile ./files/cache_status_full.bash)
|
||||
);
|
||||
cache_status_latest = (
|
||||
patchScriptBin "cache_status_latest" (builtins.readFile ./files/cache_status_latest.bash)
|
||||
);
|
||||
in
|
||||
{
|
||||
imports = [ ];
|
||||
|
||||
@@ -39,8 +26,6 @@ in
|
||||
environment.systemPackages = with pkgs; [
|
||||
nix_builder.packages.x86_64-linux.default
|
||||
sqlite # For manually inspecting the database.
|
||||
cache_status_full
|
||||
cache_status_latest
|
||||
];
|
||||
|
||||
environment.persistence."/persist" = lib.mkIf (config.me.mountPersistence) {
|
||||
@@ -80,32 +65,33 @@ in
|
||||
systemd.services."build-cache" =
|
||||
let
|
||||
enabled_targets = [
|
||||
# "wip"
|
||||
"odo"
|
||||
"odo_update"
|
||||
"odowork"
|
||||
"odowork_update"
|
||||
"quark"
|
||||
"quark_update"
|
||||
"hydra"
|
||||
"hydra_update"
|
||||
"controller0"
|
||||
"controller0_update"
|
||||
"controller1"
|
||||
"controller1_update"
|
||||
"controller2"
|
||||
"controller2_update"
|
||||
"worker0"
|
||||
"worker0_update"
|
||||
"worker1"
|
||||
"worker1_update"
|
||||
"worker2"
|
||||
"worker2_update"
|
||||
"family_disks"
|
||||
"family_disks_update"
|
||||
"nixbsd"
|
||||
"nix_builder_develop"
|
||||
"organic_develop"
|
||||
"natter_develop"
|
||||
# "odo_update"
|
||||
# "odowork"
|
||||
# "odowork_update"
|
||||
# "quark"
|
||||
# "quark_update"
|
||||
# "hydra"
|
||||
# "hydra_update"
|
||||
# "controller0"
|
||||
# "controller0_update"
|
||||
# "controller1"
|
||||
# "controller1_update"
|
||||
# "controller2"
|
||||
# "controller2_update"
|
||||
# "worker0"
|
||||
# "worker0_update"
|
||||
# "worker1"
|
||||
# "worker1_update"
|
||||
# "worker2"
|
||||
# "worker2_update"
|
||||
# "family_disks"
|
||||
# "family_disks_update"
|
||||
# "nixbsd"
|
||||
# "nix_builder_develop"
|
||||
# "organic_develop"
|
||||
# "natter_develop"
|
||||
];
|
||||
build_flags = lib.concatMap (target: [
|
||||
"--target"
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Shows the status of all builds in nix_builder.
|
||||
set -euo pipefail
|
||||
IFS=$'\n\t'
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
doas -u nixworker env NIX_REMOTE='local?root=/.disk/root' RUST_BACKTRACE=1 RUST_LOG=nix_builder=DEBUG sqlite3 -header -box /home/nixworker/persist/nix_builder/nix_builder.sqlite "select * from (select build.id, datetime(build.start_time, 'unixepoch') as start_time, datetime(build.end_time, 'unixepoch') as end_time, build.status, build.target, flake_inputs.rev from build left outer join flake_inputs on build.id=flake_inputs.build_id and flake_inputs.input_name='nixpkgs' order by build.id desc
|
||||
limit 45) order by id asc;"
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Shows the status of all builds in nix_builder.
|
||||
set -euo pipefail
|
||||
IFS=$'\n\t'
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
doas -u nixworker env NIX_REMOTE='local?root=/.disk/root' RUST_BACKTRACE=1 RUST_LOG=nix_builder=DEBUG sqlite3 -header -box /home/nixworker/persist/nix_builder/nix_builder.sqlite "select * from (select build.id, datetime(build.start_time, 'unixepoch') as start_time, datetime(build.end_time, 'unixepoch') as end_time, build.status, build.target, flake_inputs.rev from build left outer join flake_inputs on build.id=flake_inputs.build_id and flake_inputs.input_name='nixpkgs' order by build.id desc
|
||||
limit 45) order by id asc;"
|
||||
@@ -1,5 +1,12 @@
|
||||
output_directory = "/home/nixworker/persist/nix_builder"
|
||||
|
||||
[[targets]]
|
||||
name = "wip"
|
||||
repo = "https://code.fizz.buzz/talexander/machine_setup.git"
|
||||
branch = "wip"
|
||||
path = "nix/configuration"
|
||||
attr = "nixosConfigurations.odo.config.system.build.toplevel"
|
||||
|
||||
[[targets]]
|
||||
name = "odo"
|
||||
repo = "https://code.fizz.buzz/talexander/machine_setup.git"
|
||||
|
||||
53
nix/configuration/roles/instawow/default.nix
Normal file
53
nix/configuration/roles/instawow/default.nix
Normal file
@@ -0,0 +1,53 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [ ];
|
||||
|
||||
options.me = {
|
||||
instawow.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
example = true;
|
||||
description = "Whether we want to install instawow.";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.me.instawow.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
instawow
|
||||
];
|
||||
|
||||
environment.persistence."/persist" = lib.mkIf (config.me.mountPersistence) {
|
||||
hideMounts = true;
|
||||
users.talexander = {
|
||||
directories = [
|
||||
{
|
||||
directory = ".config/instawow";
|
||||
user = "talexander";
|
||||
group = "talexander";
|
||||
mode = "0755";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
environment.persistence."/state" = lib.mkIf (config.me.mountPersistence) {
|
||||
hideMounts = true;
|
||||
users.talexander = {
|
||||
directories = [
|
||||
{
|
||||
directory = ".cache/instawow";
|
||||
user = "talexander";
|
||||
group = "talexander";
|
||||
mode = "0755";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -6,7 +6,7 @@ metadata:
|
||||
spec:
|
||||
interval: 5m0s
|
||||
ref:
|
||||
branch: main
|
||||
branch: nix
|
||||
secretRef:
|
||||
name: kubernetes-deploy-key
|
||||
# url: ssh://git@74.80.180.138:65099/repos/mrmanager
|
||||
|
||||
Reference in New Issue
Block a user