Compare commits

...

3 commits

Author SHA1 Message Date
Geoffrey Frogeye c4bb02b16e
Attempt at using lix
Without remote builds and with my laptop setup it's not really viable
for now :(
2024-05-06 22:26:36 +02:00
Geoffrey Frogeye e68be9e665
curacao: nvidia drivers were not there? 2024-05-06 22:26:15 +02:00
Geoffrey Frogeye 836f8ee8b4
Further attempt at remote builds 2024-05-06 22:25:35 +02:00
7 changed files with 166 additions and 9 deletions

View file

@ -27,7 +27,7 @@
}; };
}; };
# Needs prefetched binary blobs, see https://nixos.wiki/wiki/Displaylink # Needs prefetched binary blobs, see https://nixos.wiki/wiki/Displaylink
services.xserver.videoDrivers = [ "displaylink" "modesetting" ]; services.xserver.videoDrivers = [ "nvidia" "displaylink" "modesetting" ];
}; };
imports = [ imports = [
nixos-hardware.nixosModules.dell-g3-3779 nixos-hardware.nixosModules.dell-g3-3779

View file

@ -203,11 +203,11 @@
"systems": "systems" "systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1701680307, "lastModified": 1710146030,
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725", "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -220,6 +220,24 @@
"inputs": { "inputs": {
"systems": "systems_2" "systems": "systems_2"
}, },
"locked": {
"lastModified": 1701680307,
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_3": {
"inputs": {
"systems": "systems_3"
},
"locked": { "locked": {
"lastModified": 1685518550, "lastModified": 1685518550,
"narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=", "narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=",
@ -234,6 +252,21 @@
"type": "github" "type": "github"
} }
}, },
"flakey-profile": {
"locked": {
"lastModified": 1712898590,
"narHash": "sha256-FhGIEU93VHAChKEXx905TSiPZKga69bWl1VB37FK//I=",
"owner": "lf-",
"repo": "flakey-profile",
"rev": "243c903fd8eadc0f63d205665a92d4df91d42d9d",
"type": "github"
},
"original": {
"owner": "lf-",
"repo": "flakey-profile",
"type": "github"
}
},
"fromYaml": { "fromYaml": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -313,6 +346,48 @@
"type": "github" "type": "github"
} }
}, },
"lix": {
"flake": false,
"locked": {
"lastModified": 1714955862,
"narHash": "sha256-REWlo2RYHfJkxnmZTEJu3Cd/2VM+wjjpPy7Xi4BdDTQ=",
"ref": "refs/tags/2.90-beta.1",
"rev": "b6799ab0374a8e1907a48915d3187e07da41d88c",
"revCount": 15501,
"type": "git",
"url": "https://git@git.lix.systems/lix-project/lix"
},
"original": {
"ref": "refs/tags/2.90-beta.1",
"type": "git",
"url": "https://git@git.lix.systems/lix-project/lix"
}
},
"lix-module": {
"inputs": {
"flake-utils": "flake-utils",
"flakey-profile": "flakey-profile",
"lix": [
"lix"
],
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1714868057,
"narHash": "sha256-Q9vGkxmuarySjPKO6yixjZ0tkaVIQS2wU9FpCpDA7+I=",
"ref": "refs/heads/main",
"rev": "e31baf57680bab449ab5b40179cc4a08a99f5314",
"revCount": 62,
"type": "git",
"url": "https://git.lix.systems/lix-project/nixos-module"
},
"original": {
"type": "git",
"url": "https://git.lix.systems/lix-project/nixos-module"
}
},
"nix-formatter-pack": { "nix-formatter-pack": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -426,7 +501,7 @@
}, },
"nixvim": { "nixvim": {
"inputs": { "inputs": {
"flake-utils": "flake-utils", "flake-utils": "flake-utils_2",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ],
@ -513,7 +588,7 @@
"pre-commit-hooks": { "pre-commit-hooks": {
"inputs": { "inputs": {
"flake-compat": "flake-compat", "flake-compat": "flake-compat",
"flake-utils": "flake-utils_2", "flake-utils": "flake-utils_3",
"gitignore": "gitignore", "gitignore": "gitignore",
"nixpkgs": [ "nixpkgs": [
"nixvim", "nixvim",
@ -539,6 +614,8 @@
"inputs": { "inputs": {
"disko": "disko", "disko": "disko",
"home-manager": "home-manager", "home-manager": "home-manager",
"lix": "lix",
"lix-module": "lix-module",
"nix-on-droid": "nix-on-droid", "nix-on-droid": "nix-on-droid",
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
@ -610,6 +687,21 @@
"type": "github" "type": "github"
} }
}, },
"systems_3": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"unixpkgs": { "unixpkgs": {
"locked": { "locked": {
"lastModified": 1714280680, "lastModified": 1714280680,

View file

@ -2,6 +2,19 @@
description = "Geoffrey Frogeye's base configurations"; description = "Geoffrey Frogeye's base configurations";
inputs = { inputs = {
# Package manager
lix = {
url = "git+https://git@git.lix.systems/lix-project/lix?ref=refs/tags/2.90-beta.1";
flake = false;
};
lix-module = {
url = "git+https://git.lix.systems/lix-project/nixos-module";
inputs = {
lix.follows = "lix";
nixpkgs.follows = "nixpkgs";
};
};
# Packages
nixpkgs.url = "nixpkgs/nixos-23.11"; nixpkgs.url = "nixpkgs/nixos-23.11";
unixpkgs.url = "nixpkgs"; unixpkgs.url = "nixpkgs";
# OS # OS

View file

@ -12,6 +12,7 @@
./diff ./diff
./gaming ./gaming
./geoffrey.nix ./geoffrey.nix
# ./lix
./printing ./printing
./remote-builds ./remote-builds
./style ./style

View file

@ -18,6 +18,8 @@
# even though home-manager sets it # even though home-manager sets it
programs.zsh.enable = true; programs.zsh.enable = true;
nix.settings.trusted-users = [ "geoffrey" ];
home-manager = { home-manager = {
users.geoffrey = { pkgs, ... }: { users.geoffrey = { pkgs, ... }: {
frogeye = lib.mkDefault config.frogeye; frogeye = lib.mkDefault config.frogeye;

16
os/lix/default.nix Normal file
View file

@ -0,0 +1,16 @@
{ pkgs, lib, config, lix-module, ... }:
{
imports = [
lix-module.nixosModules.default
];
config = {
nix.settings = {
substituters = [
"https://cache.lix.systems"
];
trusted-public-keys = [
"cache.lix.systems:aBnZUw8zA7H35Cz2RyKFVs3H4PlGTLawyY5KRbvJR8o="
];
};
};
}

View file

@ -1,15 +1,48 @@
{ pkgs, lib, config, ... }: { pkgs, lib, config, ... }:
let let
vivariumBuilderDefault = {
systems = [ "x86_64-linux" ];
protocol = "ssh-ng";
sshUser = "nixremote";
# sshKey doesn't work
};
vivariumBuilders = [
{
hostName = "abavorana.frogeye.fr";
publicHostKey = "c3NoLWVkMjU1MTkgQUFBQUMzTnphQzFsWkRJMU5URTVBQUFBSUZsaW9WYWZVWEIwdFNzSDRUVHBremphUkNkb0piSmRjVDRGOXFLZithMnEgcm9vdEBhYmF2b3JhbmEK";
supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ];
}
{
hostName = "ludwig.clowncar.frogeye.fr";
publicHostKey = "c3NoLWVkMjU1MTkgQUFBQUMzTnphQzFsWkRJMU5URTVBQUFBSVBaRHIrQmVqZzRXTVVGR1NGdkd5YituMk0zMG9VR09KVUlzY3Z1b2F4VEQgcm9vdEBsdWR3aWcK";
}
];
# MANU pass vivarium/lemmy/remote-builds/cache | nix key convert-secret-to-public | cat
publicKeys = [ publicKeys = [
"abavorana.frogeye.fr:rcKZ9gwaIQLcst/vbhbF7meUQD5sveT2QQN4a+Zo1BM=" "abavorana.frogeye.fr:rcKZ9gwaIQLcst/vbhbF7meUQD5sveT2QQN4a+Zo1BM="
"ludwig.clowncar.frogeye.fr:jTlN0fCOLU49M3LQw5j/u++Gmwrsv3m9RGs0slSg6r0=" "ludwig.clowncar.frogeye.fr:jTlN0fCOLU49M3LQw5j/u++Gmwrsv3m9RGs0slSg6r0="
]; ];
# MANU pass vivarium/lemmy/remote-builds/cache | nix key convert-secret-to-public | cat
in in
{ {
config = { config = {
nix.settings = { system.activationScripts.diff = {
trusted-public-keys = publicKeys; supportsDryActivation = true;
text = ''
mkdir -p /root/.ssh
cat ${pkgs.writeText "root-ssh-config" (lib.strings.concatLines (builtins.map (builder: ''
Host ${builder.hostName}
Port 2278
'') vivariumBuilders)) } > /root/.ssh/config
'';
};
nix = {
buildMachines = builtins.map (vivariumBuilder: vivariumBuilderDefault // vivariumBuilder) vivariumBuilders;
distributedBuilds = true;
settings = {
builders-use-substitutes = true;
trusted-public-keys = publicKeys;
};
}; };
}; };
} }
# TODO Make it work. I think it just doesn't like non-standard SSH ports.