cleanup nu

This commit is contained in:
Tao Tien 2025-11-13 08:21:25 -08:00
commit 5d3d1e0587
3 changed files with 50 additions and 68 deletions

78
flake.lock generated
View file

@ -30,12 +30,12 @@
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1762741923,
"narHash": "sha256-mmqjU8EPtjc3sWQfFC5Gr+aYb2MtilYjKBkhj5dmGHE=",
"rev": "5ac54c7bc6144bd8d02644b7f8f141df49f1462c",
"revCount": 313,
"lastModified": 1762970173,
"narHash": "sha256-sEdTVZblVsdwLNRGKShu+Aq9uYUYVgM57bsVaIDlmw4=",
"rev": "fb09415ca153b81a9c361c5fae7a056e04b69f21",
"revCount": 314,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/DeterminateSystems/determinate/0.1.313%2Brev-5ac54c7bc6144bd8d02644b7f8f141df49f1462c/019a6b9f-6940-7698-a852-e310292a81e0/source.tar.gz"
"url": "https://api.flakehub.com/f/pinned/DeterminateSystems/determinate/0.1.314%2Brev-fb09415ca153b81a9c361c5fae7a056e04b69f21/019a793a-c701-7c15-b726-80548b98ed5b/source.tar.gz"
},
"original": {
"type": "tarball",
@ -45,37 +45,37 @@
"determinate-nixd-aarch64-darwin": {
"flake": false,
"locked": {
"narHash": "sha256-r3uNzqD9AGA3nTGFKD3MV4KrTA/03cwCxRqEiDcNJlQ=",
"narHash": "sha256-Xkp+uzaXBuZ4czEpKa2EPTUtGq71R9JTum3rkdA3gLI=",
"type": "file",
"url": "https://install.determinate.systems/determinate-nixd/tag/v3.13.0/macOS"
"url": "https://install.determinate.systems/determinate-nixd/tag/v3.13.1/macOS"
},
"original": {
"type": "file",
"url": "https://install.determinate.systems/determinate-nixd/tag/v3.13.0/macOS"
"url": "https://install.determinate.systems/determinate-nixd/tag/v3.13.1/macOS"
}
},
"determinate-nixd-aarch64-linux": {
"flake": false,
"locked": {
"narHash": "sha256-d+ROqaHkq8sRbmQ4t2vMj8TQ9sdTZLKL1qGuxbaqwTE=",
"narHash": "sha256-+1oyvQ0EOK8chhs/ghPwcx3pJQeBXkwNwM3F+nVFQnk=",
"type": "file",
"url": "https://install.determinate.systems/determinate-nixd/tag/v3.13.0/aarch64-linux"
"url": "https://install.determinate.systems/determinate-nixd/tag/v3.13.1/aarch64-linux"
},
"original": {
"type": "file",
"url": "https://install.determinate.systems/determinate-nixd/tag/v3.13.0/aarch64-linux"
"url": "https://install.determinate.systems/determinate-nixd/tag/v3.13.1/aarch64-linux"
}
},
"determinate-nixd-x86_64-linux": {
"flake": false,
"locked": {
"narHash": "sha256-quPa8LsFCK7YoTXV1+UJsuYlxTUAWoXdRgKjeNjxhkA=",
"narHash": "sha256-XxThMTITG0L8/yrCPC//CmRDmFQxkb5/tcBYkxzZ2bo=",
"type": "file",
"url": "https://install.determinate.systems/determinate-nixd/tag/v3.13.0/x86_64-linux"
"url": "https://install.determinate.systems/determinate-nixd/tag/v3.13.1/x86_64-linux"
},
"original": {
"type": "file",
"url": "https://install.determinate.systems/determinate-nixd/tag/v3.13.0/x86_64-linux"
"url": "https://install.determinate.systems/determinate-nixd/tag/v3.13.1/x86_64-linux"
}
},
"disko": {
@ -169,11 +169,11 @@
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1762716787,
"narHash": "sha256-YfcY28igFL5ZPCTtVBaVUvnhcWg8tyiBVSlULpXEIeQ=",
"lastModified": 1762914453,
"narHash": "sha256-AVc35rhjWimNIBr+kQvjX6tYJNKlm/RA/X2mfPZ+BhM=",
"owner": "helix-editor",
"repo": "helix",
"rev": "a79292b630ae4a0e6e37814ad21411ab50926c73",
"rev": "24b187a4bc4fed3c11541f6f4bd4f3a887842394",
"type": "github"
},
"original": {
@ -210,11 +210,11 @@
]
},
"locked": {
"lastModified": 1762721397,
"narHash": "sha256-E428EuouA4nFTNlLuqlL4lVR78X+EbBIqDqsBFnB79w=",
"lastModified": 1762964643,
"narHash": "sha256-RYHN8O/Aja59XDji6WSJZPkJpYVUfpSkyH+PEupBJqM=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "b8645b18b0f5374127bbade6de7381ef0b3d5720",
"rev": "827f2a23373a774a8805f84ca5344654c31f354b",
"type": "github"
},
"original": {
@ -274,12 +274,12 @@
"nixpkgs-regression": "nixpkgs-regression"
},
"locked": {
"lastModified": 1762723967,
"narHash": "sha256-QrkPq3v5Px8rdl4+FoONC8FwiIw48Jrgk4cbucbyhyw=",
"rev": "42a402fc873de408a4c00017b134759093be2d8c",
"revCount": 23226,
"lastModified": 1762967009,
"narHash": "sha256-uqYmH0KA8caQqX5u4BMarZsuDlC+71HRsH3h4f3DPCA=",
"rev": "ef054dc06e9701597bce0b0572af18cb4c7e7277",
"revCount": 23243,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/DeterminateSystems/nix-src/3.13.0/019a6aa6-4d79-7277-9d03-50c554d0792e/source.tar.gz"
"url": "https://api.flakehub.com/f/pinned/DeterminateSystems/nix-src/3.13.1/019a7931-26b0-77ae-a450-8aa6f7f95774/source.tar.gz"
},
"original": {
"type": "tarball",
@ -319,11 +319,11 @@
},
"nixos-hardware": {
"locked": {
"lastModified": 1762463231,
"narHash": "sha256-hv1mG5j5PTbnWbtHHomzTus77pIxsc4x8VrMjc7+/YE=",
"lastModified": 1762847253,
"narHash": "sha256-BWWnUUT01lPwCWUvS0p6Px5UOBFeXJ8jR+ZdLX8IbrU=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "52113c4f5cfd1e823001310e56d9c8d0699a6226",
"rev": "899dc449bc6428b9ee6b3b8f771ca2b0ef945ab9",
"type": "github"
},
"original": {
@ -397,12 +397,12 @@
},
"nixpkgs_3": {
"locked": {
"lastModified": 1762156382,
"narHash": "sha256-Yg7Ag7ov5+36jEFC1DaZh/12SEXo6OO3/8rqADRxiqs=",
"rev": "7241bcbb4f099a66aafca120d37c65e8dda32717",
"revCount": 888688,
"lastModified": 1762482733,
"narHash": "sha256-g/da4FzvckvbiZT075Sb1/YDNDr+tGQgh4N8i5ceYMg=",
"rev": "e1ebeec86b771e9d387dd02d82ffdc77ac753abc",
"revCount": 890836,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/DeterminateSystems/nixpkgs-weekly/0.1.888688%2Brev-7241bcbb4f099a66aafca120d37c65e8dda32717/019a4d5f-1342-7012-9c08-5af5fe8439c0/source.tar.gz"
"url": "https://api.flakehub.com/f/pinned/DeterminateSystems/nixpkgs-weekly/0.1.890836%2Brev-e1ebeec86b771e9d387dd02d82ffdc77ac753abc/019a716b-6ca7-7ecb-96bb-198e1651382f/source.tar.gz"
},
"original": {
"type": "tarball",
@ -411,11 +411,11 @@
},
"nixpkgs_4": {
"locked": {
"lastModified": 1762596750,
"narHash": "sha256-rXXuz51Bq7DHBlfIjN7jO8Bu3du5TV+3DSADBX7/9YQ=",
"lastModified": 1762844143,
"narHash": "sha256-SlybxLZ1/e4T2lb1czEtWVzDCVSTvk9WLwGhmxFmBxI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "b6a8526db03f735b89dd5ff348f53f752e7ddc8e",
"rev": "9da7f1cf7f8a6e2a7cb3001b048546c92a8258b4",
"type": "github"
},
"original": {
@ -484,11 +484,11 @@
]
},
"locked": {
"lastModified": 1762748864,
"narHash": "sha256-YgQ80R6TW9GxS0Ozaqe9mTVewuOWqwRmMUhRUpKsoCs=",
"lastModified": 1762903129,
"narHash": "sha256-4vxtwKSBiiJ950ccLo8kQvBGwyNjhglOgWI5b/sjGXY=",
"owner": "0xc000022070",
"repo": "zen-browser-flake",
"rev": "02bb5919dab81a3fea4d8d4663ea67922a463cd3",
"rev": "d03a5917aef22219df1f97b6da6fe5b8039be8de",
"type": "github"
},
"original": {

View file

@ -58,7 +58,6 @@ def bump [...rest] {
}
let r = jj log -r @ --no-pager --no-graph --template 'change_id'
sudo nix flake update
# rc2nix | save -f /home/tao/projects/NOflake/users/tao/plasma.nix;
if (rebuild boot) {
jj desc -r $r -m $"bump (date now | format date "%Y-%m-%d")"
} else {

View file

@ -39,43 +39,26 @@ def "snapper clear" [] {
snapper delete $"($first.number)-($last.number)"
}
def quiet [] {
def "fans" [duty?: int] {
match (hostname) {
"NOcomputer" => {
let mode_path: path = (glob "/sys/devices/platform/nct6775.656/hwmon/hwmon*/pwm2_enable" | get 0)
sudo -- nu -c $"5 o> ($mode_path)"
match $duty {
100 => { sudo -- nu -c $"0 o> ($mode_path)" }
_ => { sudo -- nu -c $"5 o> ($mode_path)" }
}
}
"NOlaptop" => {
sudo ectool fanduty 42
}
}
}
def loud [] {
match (hostname) {
"NOcomputer" => {
let mode_path: path = (glob "/sys/devices/platform/nct6775.656/hwmon/hwmon*/pwm2_enable" | get 0)
sudo -- nu -c $"5 o> ($mode_path)"
}
"NOlaptop" => {
sudo ectool autofanctrl
}
}
}
def louder [] {
match (hostname) {
"NOcomputer" => {
let mode_path: path = (glob "/sys/devices/platform/nct6775.656/hwmon/hwmon*/pwm2_enable" | get 0)
sudo -- nu -c $"0 o> ($mode_path)"
}
"NOlaptop" => {
sudo ectool fanduty 100
match $duty {
null => { sudo ectool autofanctl }
_ => { sudo ectool fanduty $duty }
}
}
}
}
alias "fans max" = fans 100
alias "fans quiet" = fans 42
def asciicam [] {
$env.DISPLAY = null