suf
This commit is contained in:
parent
90d3fecdc7
commit
01abe6ae00
6 changed files with 36 additions and 11 deletions
|
|
@ -1,4 +1,9 @@
|
||||||
{pkgs, ...}: {
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
programs.qgroundcontrol.enable = true;
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
# keep-sorted start
|
# keep-sorted start
|
||||||
# act
|
# act
|
||||||
|
|
@ -133,7 +138,14 @@
|
||||||
|
|
||||||
virtualisation.docker = {
|
virtualisation.docker = {
|
||||||
enable = true;
|
enable = true;
|
||||||
storageDriver = "btrfs";
|
# storageDriver =
|
||||||
|
# if lib.strings.hasPrefix "NOlaptop" (builtins.readFile /etc/hostname)
|
||||||
|
# then "bcachefs"
|
||||||
|
# else "btrfs";
|
||||||
|
storageDriver =
|
||||||
|
if lib.strings.hasPrefix "NOcomputer" (builtins.readFile /etc/hostname)
|
||||||
|
then "btrfs"
|
||||||
|
else null;
|
||||||
};
|
};
|
||||||
# virtualisation.docker.rootless = {
|
# virtualisation.docker.rootless = {
|
||||||
# enable = true;
|
# enable = true;
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,7 @@
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}: {
|
||||||
{
|
|
||||||
# nixpkgs.overlays = [
|
# nixpkgs.overlays = [
|
||||||
# (final: prev: {
|
# (final: prev: {
|
||||||
# libinput = prev.libinput.overrideAttrs (old: {
|
# libinput = prev.libinput.overrideAttrs (old: {
|
||||||
|
|
@ -47,12 +46,6 @@
|
||||||
services.xserver.videoDrivers = [
|
services.xserver.videoDrivers = [
|
||||||
"amdgpu"
|
"amdgpu"
|
||||||
];
|
];
|
||||||
hardware.graphics.extraPackages = with pkgs; [
|
|
||||||
amdvlk
|
|
||||||
];
|
|
||||||
hardware.graphics.extraPackages32 = with pkgs; [
|
|
||||||
driversi686Linux.amdvlk
|
|
||||||
];
|
|
||||||
|
|
||||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
boot.kernelParams = [
|
boot.kernelParams = [
|
||||||
|
|
@ -75,6 +68,17 @@
|
||||||
"nixos-test"
|
"nixos-test"
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
hostName = "localhost";
|
||||||
|
systems = ["x86_64-linux" "i686-linux"];
|
||||||
|
supportedFeatures = [
|
||||||
|
"benchmark"
|
||||||
|
"big-parallel"
|
||||||
|
"gccarch-znver4"
|
||||||
|
"kvm"
|
||||||
|
"nixos-test"
|
||||||
|
];
|
||||||
|
}
|
||||||
];
|
];
|
||||||
nix.extraOptions = ''
|
nix.extraOptions = ''
|
||||||
builders-use-substitutes = true
|
builders-use-substitutes = true
|
||||||
|
|
|
||||||
|
|
@ -73,4 +73,5 @@ def cpedit [file: path] {
|
||||||
mv $file $"($file).sym"; cp $"($file).sym" $file; chmod +w $file
|
mv $file $"($file).sym"; cp $"($file).sym" $file; chmod +w $file
|
||||||
}
|
}
|
||||||
|
|
||||||
|
alias core-job = job
|
||||||
alias job = job list
|
alias job = job list
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,13 @@ def ns [...packages: string] {
|
||||||
# }
|
# }
|
||||||
|
|
||||||
def rebuild [subcommand, --builders: string] {
|
def rebuild [subcommand, --builders: string] {
|
||||||
|
if (
|
||||||
|
df -h | detect columns --guess | where "Mounted on" == "/" or "Mounted on" == "/boot" | get Use% | each {parse "{usage}%" | get usage | into int} | flatten | all {$in < 99}
|
||||||
|
) {
|
||||||
|
print "not enough disk space!"
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
mut builders = $builders;
|
mut builders = $builders;
|
||||||
if (open /etc/hostname --raw) == "NOlaptop\n" and ($builders != "") {
|
if (open /etc/hostname --raw) == "NOlaptop\n" and ($builders != "") {
|
||||||
if (ping -c1 -W1 nocomputer | complete | $in.exit_code == 0) {
|
if (ping -c1 -W1 nocomputer | complete | $in.exit_code == 0) {
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ def "fans" [duty?: int] {
|
||||||
}
|
}
|
||||||
"NOlaptop" => {
|
"NOlaptop" => {
|
||||||
match $duty {
|
match $duty {
|
||||||
null => { sudo ectool autofanctl }
|
null => { sudo ectool autofanctrl }
|
||||||
_ => { sudo ectool fanduty $duty }
|
_ => { sudo ectool fanduty $duty }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -78,5 +78,6 @@ alias ts = tailscale status
|
||||||
alias tu = tailscale up
|
alias tu = tailscale up
|
||||||
alias td = tailscale down
|
alias td = tailscale down
|
||||||
alias ta = tailscale exit-node suggest
|
alias ta = tailscale exit-node suggest
|
||||||
|
alias tt = tailscale switch --list | detect columns | input list -d Tailnet | get ID | t switch $in
|
||||||
|
|
||||||
alias wno = ssh root@whyfi "etherwake -i br-lan 04:42:1A:E7:62:C3"
|
alias wno = ssh root@whyfi "etherwake -i br-lan 04:42:1A:E7:62:C3"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue