routine push

This commit is contained in:
Aubrey 2025-03-31 23:26:52 -06:00
parent 7a57f431aa
commit 925a200584
No known key found for this signature in database
6 changed files with 155 additions and 36 deletions

View file

@ -2,6 +2,7 @@
config,
lib,
pkgs,
unstablePkgs,
inputs,
...
}: let
@ -18,7 +19,7 @@ in {
nix.settings.experimental-features = ["nix-command" "flakes"];
boot.kernelPackages = pkgs.linuxPackages_zen;
boot.kernelPackages = unstablePkgs.linuxPackages_zen;
boot.supportedFilesystems = ["btrfs"];
hardware.enableAllFirmware = true;
@ -59,6 +60,7 @@ in {
};
};
services.desktopManager.plasma6.enable = true;
hardware.graphics.enable = true;
services.printing.enable = true;
services.pipewire = {

View file

@ -11,7 +11,7 @@
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "thunderbolt" "usbhid" "usb_storage" "sd_mod"];
boot.initrd.kernelModules = [];
boot.initrd.kernelModules = ["amdgpu"];
boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = [];

View file

@ -1,13 +1,10 @@
{pkgs, ...}: let
{
pkgs,
_010editor,
extensions,
...
}: let
system = pkgs.system;
extensions =
(import (builtins.fetchGit {
url = "https://github.com/nix-community/nix-vscode-extensions";
ref = "refs/heads/master";
rev = "bcf7577daac02aa1a7dfaddc79324b7c6ca4af81";
}))
.extensions
.${system};
vscodeExtensions = with pkgs;
with extensions.vscode-marketplace; [
trag1c.gleam-theme
@ -30,6 +27,10 @@
surendrajat.apklab
loyieking.smalise
denoland.vscode-deno
pbkit.vscode-pbkit
ms-python.python
haskell.haskell
justusadam.language-haskell
];
in {
fonts.packages = with pkgs; [
@ -106,8 +107,10 @@ in {
binwalk
qpwgraph
dig
signal-desktop
_010editor
OVMFFull
(builtins.getFlake "github:Sanae6/010editor-flake").packages."${system}".default
(unstable.vscode-with-extensions.override {inherit vscodeExtensions;})
];
}

View file

@ -1,12 +1,90 @@
{
"nodes": {
"editor-010": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1734048621,
"narHash": "sha256-moFobF/xtV35nQ2xt8ftFNUQ0+KNFn+vEiq23O5FWko=",
"owner": "Sanae6",
"repo": "010editor-flake",
"rev": "1bc4f01f835bfaf5be6e611a9325ddc9d83466a6",
"type": "github"
},
"original": {
"owner": "Sanae6",
"repo": "010editor-flake",
"type": "github"
}
},
"extensions": {
"inputs": {
"flake-utils": "flake-utils_2",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1741772639,
"narHash": "sha256-u6jSqRGsfm4Af+tUKJsJ346XwJuomL6Qxiu/BZieowU=",
"owner": "nix-community",
"repo": "nix-vscode-extensions",
"rev": "2f079586510bc77bac539cf330edaebb9d51e0e0",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nix-vscode-extensions",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems_2"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1739357830,
"narHash": "sha256-9xim3nJJUFbVbJCz48UP4fGRStVW5nv4VdbimbKxJ3I=",
"lastModified": 1741600792,
"narHash": "sha256-yfDy6chHcM7pXpMF4wycuuV+ILSTG486Z/vLx/Bdi6Y=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "0ff09db9d034a04acd4e8908820ba0b410d7a33a",
"rev": "ebe2788eafd539477f83775ef93c3c7e244421d3",
"type": "github"
},
"original": {
@ -18,11 +96,11 @@
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1739214665,
"narHash": "sha256-26L8VAu3/1YRxS8MHgBOyOM8xALdo6N0I04PgorE7UM=",
"lastModified": 1741513245,
"narHash": "sha256-7rTAMNTY1xoBwz0h7ZMtEcd8LELk9R5TzBPoHuhNSCk=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "64e75cd44acf21c7933d61d7721e812eac1b5a0a",
"rev": "e3e32b642a31e6714ec1b712de8c91a3352ce7e1",
"type": "github"
},
"original": {
@ -34,9 +112,41 @@
},
"root": {
"inputs": {
"editor-010": "editor-010",
"extensions": "extensions",
"nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_2": {
"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",

View file

@ -4,17 +4,30 @@ rec {
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
extensions.url = "github:nix-community/nix-vscode-extensions";
extensions.inputs.nixpkgs.follows = "nixpkgs";
editor-010.url = "github:Sanae6/010editor-flake";
editor-010.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = {
self,
nixpkgs,
...
nixpkgs-unstable,
editor-010,
extensions,
} @ inputs: {
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.alejandra;
extensions = extensions.extensions.x86_64-linux;
nixosConfigurations.aubrey-laptop-nixos = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs;};
specialArgs = {
inherit inputs;
unstablePkgs = nixpkgs-unstable.legacyPackages.x86_64-linux;
_010editor = editor-010.packages.x86_64-linux.default;
extensions = extensions.extensions.x86_64-linux;
};
modules = [./configuration/configuration.nix];
};
};

View file

@ -1,36 +1,27 @@
#!/usr/bin/env nu
def "get hostname" [hostname?: string] { $hostname | default (hostname) };
def --wrapped rebuild [subcmd: string, hostname: string, ...rest] {
def --wrapped rebuild [subcmd: string, ...rest] {
nix fmt
git add -A # make sure the goddamn files are added because nix stores won't include unchecked files
if $hostname == (hostname) {
sudo nixos-rebuild --flake $".#(hostname)" --impure $subcmd ...$rest
} else {
let r = echo ...$rest | into string;
nix-shell -p nixos-rebuild --command $"nixos-rebuild --flake .#($hostname) --target-host ($hostname) --use-remote-sudo ($subcmd) ($r)";
}
nix-shell -p nixos-rebuild --command $"sudo nixos-rebuild --flake . ($subcmd) ($r)";
};
def --wrapped "main switch" [
--hostname (-h): string, # the hostname of the machine to push to
...rest
] {
let hostname = (get hostname $hostname);
rebuild switch $hostname ...$rest
rebuild switch ...$rest
}
def --wrapped "main boot" [
--restart (-r) # restart after building
--hostname (-h): string, # the hostname of the machine to push to
...rest
] {
let hostname = (get hostname $hostname);
rebuild boot $hostname ...$rest
rebuild boot ...$rest
if $restart {
ssh $hostname -t "sudo reboot now"
sudo reboot now
}
}
def main [] {
main switch -h (hostname)
main switch
}