This commit is contained in:
Tao Tien 2024-06-12 14:32:40 -07:00
parent 0a0abf8339
commit a5a40bb010
7 changed files with 37 additions and 761 deletions

37
flake.lock generated
View file

@ -28,11 +28,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1717770040, "lastModified": 1718008439,
"narHash": "sha256-eq9gP060TqWqRf2k4WO5FrG49rVq5Jy3Ptusg0CFdds=", "narHash": "sha256-nlh/2uD5p2SAdkn6Zuey20yaR5FFWvhL3poapDGNE4Y=",
"owner": "nix-community", "owner": "nix-community",
"repo": "disko", "repo": "disko",
"rev": "398acc470f7c2d68621db01900f053e6000129c4", "rev": "c1cfbfad7cb45f0c177b35b59ba67d1b5fc7ca82",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -85,11 +85,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1717525419, "lastModified": 1718141734,
"narHash": "sha256-5z2422pzWnPXHgq2ms8lcCfttM0dz+hg+x1pCcNkAws=", "narHash": "sha256-cA+6l8ZCZ7MXGijVuY/1f55+wF/RT4PlTR9+g4bx86w=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "a7117efb3725e6197dd95424136f79147aa35e5b", "rev": "892f76bd0aa09a0f7f73eb41834b8a904b6d0fad",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -128,11 +128,11 @@
"nixpkgs-stable": "nixpkgs-stable" "nixpkgs-stable": "nixpkgs-stable"
}, },
"locked": { "locked": {
"lastModified": 1717810515, "lastModified": 1718234935,
"narHash": "sha256-sLgNRYimDh5nRRzp/h4tENlRm2PDzPoy4YQA16aMH1o=", "narHash": "sha256-BAuDrBRTWC+HBtcNaLko6kiwlPy1VK16FfoPDqM2nMM=",
"owner": "lilyinstarlight", "owner": "lilyinstarlight",
"repo": "nixos-cosmic", "repo": "nixos-cosmic",
"rev": "65c027f7903b7cfb203d5267bc58c1c86e304b13", "rev": "c3d488a1b261a559791dbb944582330d17350efc",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -143,15 +143,16 @@
}, },
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1717828156, "lastModified": 1718207430,
"narHash": "sha256-YvstO0lobf3JWQuAfZCLYRTROC2ZDEgtWeQtWbO49p4=", "narHash": "sha256-/eO2NTRvrrdYWMI06plS8ANDGOhTZBA+C3H3KwbBI1w=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "057a7996d012f342a38a26261ee529cebb1755ef", "rev": "9e848e173ca83adf884815c66edc08652ef9ade8",
"type": "github" "type": "github"
}, },
"original": { "original": {
"id": "nixos-hardware", "id": "nixos-hardware",
"ref": "master",
"type": "indirect" "type": "indirect"
} }
}, },
@ -173,11 +174,11 @@
}, },
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1717696253, "lastModified": 1717952948,
"narHash": "sha256-1+ua0ggXlYYPLTmMl3YeYYsBXDSCqT+Gw3u6l4gvMhA=", "narHash": "sha256-mJi4/gjiwQlSaxjA6AusXBN/6rQRaPCycR7bd8fydnQ=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "9b5328b7f761a7bbdc0e332ac4cf076a3eedb89b", "rev": "2819fffa7fa42156680f0d282c60d81e8fb185b7",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -189,11 +190,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1717786204, "lastModified": 1718160348,
"narHash": "sha256-4q0s6m0GUcN7q+Y2DqD27iLvbcd1G50T2lv08kKxkSI=", "narHash": "sha256-9YrUjdztqi4Gz8n3mBuqvCkMo4ojrA6nASwyIKWMpus=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "051f920625ab5aabe37c920346e3e69d7d34400e", "rev": "57d6973abba7ea108bac64ae7629e7431e0199b6",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -8,6 +8,10 @@
url = "github:ryantm/agenix"; url = "github:ryantm/agenix";
inputs.darwin.follows = ""; inputs.darwin.follows = "";
}; };
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = { home-manager = {
url = "github:nix-community/home-manager"; url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
@ -44,6 +48,7 @@
nixpkgs, nixpkgs,
nixos-hardware, nixos-hardware,
agenix, agenix,
disko,
home-manager, home-manager,
plasma-manager, plasma-manager,
# helix, # helix,
@ -103,6 +108,18 @@
./extras/uwuraid.nix ./extras/uwuraid.nix
]; ];
}; };
NOserver-minecraft = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {inherit inputs;};
modules = [
agenix.nixosModules.default
disko.nixosModules.disko
{disko.devices.disk.disk1.device = "/dev/vda";}
./systems/NOserver.nix
./extras/disk-config.nix
./extras/minecraft-server.nix
];
};
}; };
}; };
} }

View file

@ -1,235 +0,0 @@
{
"nodes": {
"agenix": {
"inputs": {
"darwin": [],
"home-manager": "home-manager",
"nixpkgs": "nixpkgs",
"systems": "systems"
},
"locked": {
"lastModified": 1716561646,
"narHash": "sha256-UIGtLO89RxKt7RF2iEgPikSdU53r6v/6WYB0RW3k89I=",
"owner": "ryantm",
"repo": "agenix",
"rev": "c2fc0762bbe8feb06a2e59a364fa81b3a57671c9",
"type": "github"
},
"original": {
"owner": "ryantm",
"repo": "agenix",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1717312683,
"narHash": "sha256-FrlieJH50AuvagamEvWMIE6D2OAnERuDboFDYAED/dE=",
"owner": "nix-community",
"repo": "flake-compat",
"rev": "38fd3954cf65ce6faf3d0d45cd26059e059f07ea",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "flake-compat",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
"agenix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1703113217,
"narHash": "sha256-7ulcXOk63TIT2lVDSExj7XzFx09LpdSAPtvgtM7yQPE=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "3bfaacf46133c037bb356193bd2f1765d9dc82c1",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"home-manager_2": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1717525419,
"narHash": "sha256-5z2422pzWnPXHgq2ms8lcCfttM0dz+hg+x1pCcNkAws=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "a7117efb3725e6197dd95424136f79147aa35e5b",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"home-manager_3": {
"inputs": {
"nixpkgs": [
"plasma-manager",
"nixpkgs"
]
},
"locked": {
"lastModified": 1714377222,
"narHash": "sha256-UsDsjWCKlWn8vbXi8Zza9Hkq3xyk8fpvFNo2VM5S74E=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "2af7c78b7bb9cf18406a193eba13ef9f99388f49",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"nixos-cosmic": {
"inputs": {
"flake-compat": "flake-compat",
"nixpkgs": [
"nixpkgs"
],
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1717684035,
"narHash": "sha256-c11jn4cJq7+Dsv8BrTRCFiw/pXqAX8lMcFjYOSjko4c=",
"owner": "lilyinstarlight",
"repo": "nixos-cosmic",
"rev": "94de8d686ffdadb3741c39009d05d8a660d1faea",
"type": "github"
},
"original": {
"owner": "lilyinstarlight",
"repo": "nixos-cosmic",
"type": "github"
}
},
"nixos-hardware": {
"locked": {
"lastModified": 1717574423,
"narHash": "sha256-cz3P5MZffAHwL2IQaNzsqUBsJS+u0J/AAwArHMAcCa0=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "d6c6cf6f5fead4057d8fb2d5f30aa8ac1727f177",
"type": "github"
},
"original": {
"id": "nixos-hardware",
"ref": "master",
"type": "indirect"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1703013332,
"narHash": "sha256-+tFNwMvlXLbJZXiMHqYq77z/RfmpfpiI3yjL6o/Zo9M=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "54aac082a4d9bb5bbc5c4e899603abfb76a3f6d6",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1717555607,
"narHash": "sha256-WZ1s48OODmRJ3DHC+I/DtM3tDRuRJlNqMvxvAPTD7ec=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "0b8e7a1ae5a94da2e1ee3f3030a32020f6254105",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-24.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1717196966,
"narHash": "sha256-yZKhxVIKd2lsbOqYd5iDoUIwsRZFqE87smE2Vzf6Ck0=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "57610d2f8f0937f39dbd72251e9614b1561942d8",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-unstable",
"type": "indirect"
}
},
"plasma-manager": {
"inputs": {
"home-manager": "home-manager_3",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1717666468,
"narHash": "sha256-SKPMh/Apjk3DhY0B/SqTvmt1/UFf2AHwoVPTGA6Md9c=",
"owner": "pjones",
"repo": "plasma-manager",
"rev": "d982fe0063be13bbe57a0c4ace8b406236812b94",
"type": "github"
},
"original": {
"owner": "pjones",
"repo": "plasma-manager",
"type": "github"
}
},
"root": {
"inputs": {
"agenix": "agenix",
"home-manager": "home-manager_2",
"nixos-cosmic": "nixos-cosmic",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_2",
"plasma-manager": "plasma-manager"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

View file

@ -1,125 +0,0 @@
{
description = "we say NO to shitty OSes";
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
nixos-hardware.url = "nixos-hardware";
agenix = {
url = "github:ryantm/agenix";
inputs.darwin.follows = "";
};
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
plasma-manager = {
url = "github:pjones/plasma-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
# helix = {
# url = "github:the-mikedavis/helix";
# inputs.nixpkgs.follows = "nixpkgs";
# };
nixos-cosmic = {
url = "github:lilyinstarlight/nixos-cosmic";
inputs.nixpkgs.follows = "nixpkgs";
};
# prescurve.url = "github:taotien/prescurve";
# prescurve.inputs.nixpkgs.follows = "nixpkgs";
};
nixConfig = {
extra-substituters = [
"https://cosmic.cachix.org/"
# "https://helix.cachix.org/"
];
extra-trusted-public-keys = [
"cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE="
# "helix.cachix.org-1:ejp9KQpR1FBI2onstMQ34yogDm4OgU2ru6lIwPvuCVs="
];
};
outputs = {
self,
nixpkgs,
nixos-hardware,
agenix,
disko,
home-manager,
plasma-manager,
# helix,
nixos-cosmic,
...
} @ inputs: {
nixosConfigurations = {
NOcomputer = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {inherit inputs;};
modules = [
nixos-hardware.nixosModules.common-cpu-amd
nixos-hardware.nixosModules.common-cpu-amd-pstate
nixos-hardware.nixosModules.common-gpu-nvidia-nonprime
agenix.nixosModules.default
home-manager.nixosModules.home-manager
./systems/BASED.nix
./systems/NOcomputer.nix
./users/tao.nix
./extras/uwuraid.nix
./extras/dev.nix
./extras/gaming.nix
./extras/folding.nix
nixos-cosmic.nixosModules.default
./extras/cosmic.nix
];
};
NOlaptop = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {inherit inputs;};
modules = [
nixos-hardware.nixosModules.framework-16-7040-amd
agenix.nixosModules.default
home-manager.nixosModules.home-manager
./systems/BASED.nix
./systems/NOlaptop.nix
./users/tao.nix
./extras/uwuraid.nix
./extras/dev.nix
./extras/gaming.nix
nixos-cosmic.nixosModules.default
./extras/cosmic.nix
];
};
NOmom = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {inherit inputs;};
modules = [
nixos-hardware.nixosModules.common-cpu-intel
# inputs.nixos-hardware.nixosModules.framework-12th-gen-intel
agenix.nixosModules.default
home-manager.nixosModules.home-manager
./systems/BASED.nix
./systems/NOmom.nix
./users/tao.nix
./users/vy.nix
./extras/uwuraid.nix
];
};
NOserver-minecraft = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {inherit inputs;};
modules = [
agenix.nixosModules.default
disko.nixosModules.disko
{disko.devices.disk.disk1.device = "/dev/vda";}
./systems/NOserver.nix
./extras/disk-config.nix
./extras/minecraft-server.nix
];
};
};
};
}

View file

@ -1,235 +0,0 @@
{
"nodes": {
"agenix": {
"inputs": {
"darwin": [],
"home-manager": "home-manager",
"nixpkgs": "nixpkgs",
"systems": "systems"
},
"locked": {
"lastModified": 1716561646,
"narHash": "sha256-UIGtLO89RxKt7RF2iEgPikSdU53r6v/6WYB0RW3k89I=",
"owner": "ryantm",
"repo": "agenix",
"rev": "c2fc0762bbe8feb06a2e59a364fa81b3a57671c9",
"type": "github"
},
"original": {
"owner": "ryantm",
"repo": "agenix",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1717312683,
"narHash": "sha256-FrlieJH50AuvagamEvWMIE6D2OAnERuDboFDYAED/dE=",
"owner": "nix-community",
"repo": "flake-compat",
"rev": "38fd3954cf65ce6faf3d0d45cd26059e059f07ea",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "flake-compat",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
"agenix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1703113217,
"narHash": "sha256-7ulcXOk63TIT2lVDSExj7XzFx09LpdSAPtvgtM7yQPE=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "3bfaacf46133c037bb356193bd2f1765d9dc82c1",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"home-manager_2": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1717525419,
"narHash": "sha256-5z2422pzWnPXHgq2ms8lcCfttM0dz+hg+x1pCcNkAws=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "a7117efb3725e6197dd95424136f79147aa35e5b",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"home-manager_3": {
"inputs": {
"nixpkgs": [
"plasma-manager",
"nixpkgs"
]
},
"locked": {
"lastModified": 1714377222,
"narHash": "sha256-UsDsjWCKlWn8vbXi8Zza9Hkq3xyk8fpvFNo2VM5S74E=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "2af7c78b7bb9cf18406a193eba13ef9f99388f49",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"nixos-cosmic": {
"inputs": {
"flake-compat": "flake-compat",
"nixpkgs": [
"nixpkgs"
],
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1717684035,
"narHash": "sha256-c11jn4cJq7+Dsv8BrTRCFiw/pXqAX8lMcFjYOSjko4c=",
"owner": "lilyinstarlight",
"repo": "nixos-cosmic",
"rev": "94de8d686ffdadb3741c39009d05d8a660d1faea",
"type": "github"
},
"original": {
"owner": "lilyinstarlight",
"repo": "nixos-cosmic",
"type": "github"
}
},
"nixos-hardware": {
"locked": {
"lastModified": 1717574423,
"narHash": "sha256-cz3P5MZffAHwL2IQaNzsqUBsJS+u0J/AAwArHMAcCa0=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "d6c6cf6f5fead4057d8fb2d5f30aa8ac1727f177",
"type": "github"
},
"original": {
"id": "nixos-hardware",
"ref": "master",
"type": "indirect"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1703013332,
"narHash": "sha256-+tFNwMvlXLbJZXiMHqYq77z/RfmpfpiI3yjL6o/Zo9M=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "54aac082a4d9bb5bbc5c4e899603abfb76a3f6d6",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1717555607,
"narHash": "sha256-WZ1s48OODmRJ3DHC+I/DtM3tDRuRJlNqMvxvAPTD7ec=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "0b8e7a1ae5a94da2e1ee3f3030a32020f6254105",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-24.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1717196966,
"narHash": "sha256-yZKhxVIKd2lsbOqYd5iDoUIwsRZFqE87smE2Vzf6Ck0=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "57610d2f8f0937f39dbd72251e9614b1561942d8",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-unstable",
"type": "indirect"
}
},
"plasma-manager": {
"inputs": {
"home-manager": "home-manager_3",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1717666468,
"narHash": "sha256-SKPMh/Apjk3DhY0B/SqTvmt1/UFf2AHwoVPTGA6Md9c=",
"owner": "pjones",
"repo": "plasma-manager",
"rev": "d982fe0063be13bbe57a0c4ace8b406236812b94",
"type": "github"
},
"original": {
"owner": "pjones",
"repo": "plasma-manager",
"type": "github"
}
},
"root": {
"inputs": {
"agenix": "agenix",
"home-manager": "home-manager_2",
"nixos-cosmic": "nixos-cosmic",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_2",
"plasma-manager": "plasma-manager"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

View file

@ -6,6 +6,7 @@
... ...
}: { }: {
users.users.tao.packages = with pkgs; [ users.users.tao.packages = with pkgs; [
cloud-hypervisor
# fractal # fractal
# kdeconnect # kdeconnect
# libsForQt5.kcharselect # libsForQt5.kcharselect

View file

@ -1,148 +0,0 @@
task
alias b = btm
alias cringe = sudo bootctl set-oneshot auto-windows
alias fetch = fastfetch
alias ff = firefox
alias pu = pueue
alias t = task
alias zl = zellij
alias jd = jj diff
alias jc = jj desc
alias js = jj status
alias jp = jj git push
alias jm = jj branch set main
def c [path: path = "~"] {
cd $path
l
}
def l [
--all (-a)
--long (-l)
path: path = "."
] {
if $all and $long {
ls -la $path
} else if $all {
ls -a $path
} else if $long {
ls -l $path
} else {
ls $path
}
| sort-by type name -i -n
}
def srg [pattern] {
sk --ansi -i -c 'rg --color=always --line-number "{}"'
}
alias nd = nix develop
def ns [package] {
nix shell $"nixpkgs#($package)"
}
def nr [package] {
nix search nixpkgs $package
}
def rebuild [subcommand] {
sudo nice -n19 nixos-rebuild $subcommand --flake /home/tao/projects/NOflake/ --impure --verbose
rm -r ~/.config/helix/runtime/grammars/
hx --grammar fetch; hx --grammar build
rustup update
}
def bump [] {
cd /home/tao/projects/NOflake/
jj new -m "bump"
nix flake update
# rc2nix | save -f /home/tao/projects/NOflake/users/tao/plasma.nix;
# sudo nix store ping --store ssh://nocomputer
rebuild boot
jj new
}
alias rb = rebuild boot
alias rs = rebuild switch
alias gc = nh clean all
def tse [exit_node: string = ""] {
if ($exit_node | is-empty) and (ps | find deluge | is-not-empty) {
print "stop summoning first!"
return
} else {
tailscale set --exit-node $exit_node
}
sleep 5sec
http get https://am.i.mullvad.net/json
}
# def tsp [] {
# tailscale exit-node list
# | split row "\n"
# | each {str trim}
# | filter {is-not-empty}
# | skip 1
# | last 19
# | first 17
# | split column -r '\s{2,}'
# | reject column5 column3
# | rename ip addr city
# | par-each {
# insert ping {
# |row| $row.addr
# | str replace "mullvad.ts.net" "relays.mullvad.net"
# | ping -c5 -q $in
# | split row "\n"
# | last
# | split column "/"
# | get column6?
# | get 0
# }
# }
# | sort-by ping -n -r
# }
def tsr [] {
tailscale status --json
| from json
| get Peer
| transpose nodekey node
| get node
| filter {$in.Location?.Country == USA}
| get TailscaleIPs
| each {get 0}
| select (random int 0..($in | length))
| tse $in.0
# tailscale status
http get https://am.i.mullvad.net/json
}
alias ts = tailscale
alias tss = tailscale status
alias tsu = tailscale up
alias tsd = tailscale down
alias tsx = tailscale exit-node list
alias tsp = tailscale exit-node suggest
def "config stuff" [] {
hx ~/projects/NOflake/users/tao/nushell/stuff.nu
}
def deluge-gtk [] {
tsr
deluge-gtk
}
alias deluge = deluge-gtk
def fixme [] {
rg TODO --json
| lines
| each {from json}
| where type == "match"
| get data
| flatten
| each {$"($in.text):($in.line_number)"}
| hx ...$in
}
source ~/.cache/starship/init.nu
source ~/.zoxide.nu