Compare commits
2 Commits
978664a761
...
c198489f59
| Author | SHA1 | Date | |
|---|---|---|---|
| c198489f59 | |||
| 647f1754d0 |
@@ -5,6 +5,7 @@
|
||||
# https://github.com/nixos/nixpkgs
|
||||
nixpkgs-test.url = "github:NixOS/nixpkgs/refs/pull/379645/merge"; # for testing
|
||||
nixpkgs-edge.url = "https://nixos.org/channels/nixos-unstable/nixexprs.tar.xz"; # len("edge") == 4
|
||||
# remember to update ./profiles/auto-upgrade.nix
|
||||
nixpkgs-2511.url = "https://nixos.org/channels/nixos-25.11/nixexprs.tar.xz";
|
||||
nixpkgs-2505.url = "https://nixos.org/channels/nixos-25.05/nixexprs.tar.xz";
|
||||
nixpkgs-2411.url = "https://nixos.org/channels/nixos-24.11/nixexprs.tar.xz"; # for old docs
|
||||
@@ -231,6 +232,7 @@
|
||||
{ pkgs, lib, ... }:
|
||||
let
|
||||
# TODO: by-name
|
||||
# TODO: this filterAttrs seems to force the inputs to download
|
||||
pbsdspkgs = lib.filterAttrs (_: lib.isDerivation) (
|
||||
pkgs.appendOverlays
|
||||
[
|
||||
@@ -320,7 +322,7 @@
|
||||
inherit (input-views.inputs-edge.system-manager-edge.packages.${system}) system-manager;
|
||||
inherit (self.packages.${system}) nom-system-manager;
|
||||
envrc-pkgs = [
|
||||
self.packages.${system}.nom-nixos-rebuild
|
||||
# self.packages.${system}.nom-nixos-rebuild
|
||||
self.packages.${system}.nom-nixos-rebuild-ng
|
||||
# self.packages.${system}.nom-home-manager
|
||||
pkgs.nix-output-monitor
|
||||
|
||||
@@ -10,15 +10,6 @@
|
||||
# zramSwap.enable = true;
|
||||
# zramSwap.memoryPercent = 20;
|
||||
|
||||
# amdgpu audio fix when at 4k@60fps
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
services.displayManager.autoLogin.enable = true;
|
||||
services.displayManager.autoLogin.user = "pbsds";
|
||||
# tmp: https://github.com/NixOS/nixpkgs/issues/103746#issuecomment-945091229
|
||||
systemd.services."getty@tty1".enable = false;
|
||||
systemd.services."autovt@tty1".enable = false;
|
||||
|
||||
# for testing only, not for building
|
||||
# boot.binfmt.addEmulatedSystemsToNixSandbox = false;
|
||||
# boot.binfmt.emulatedSystems = [
|
||||
@@ -29,6 +20,9 @@
|
||||
# "x86_64-windows"
|
||||
# ];
|
||||
|
||||
# amdgpu audio fix when at 4k@60fps
|
||||
# boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
inputs.nixos-hardware.nixosModules.common-pc
|
||||
|
||||
16
justfile
16
justfile
@@ -19,7 +19,7 @@ export FZF_DEFAULT_OPTS := "--height 15 --cycle --bind 'ctrl-a:toggle-all' " + e
|
||||
set -x; nix eval --log-format raw ".#nixosConfigurations.\"$hostname\".pkgs.$attrpath" --show-trace "${@:3}"
|
||||
|
||||
repl $hostname=`just _a_host`:
|
||||
NIX_NO_NOM=1 nixos-rebuild-ng --flake .#"$hostname" repl
|
||||
NIX_NO_NOM=1 nixos-rebuild --flake .#"$hostname" repl
|
||||
|
||||
why-depends $hostname $attrpath:
|
||||
nix why-depends .#nixosConfigurations."$hostname".config.system.build.toplevel .#nixosConfigurations."$hostname".pkgs."$attrpath"
|
||||
@@ -67,7 +67,7 @@ build $hostname="" *_:
|
||||
echo >&2 "WARNING(just): 'hostname' starts with '-', moving it to nix args..."
|
||||
set -- "" "$@"; hostname=""
|
||||
fi
|
||||
set -x; nixos-rebuild-ng build --accept-flake-config --show-trace --flake .#"$hostname" "${@:2}"
|
||||
set -x; nixos-rebuild build --accept-flake-config --show-trace --flake .#"$hostname" "${@:2}"
|
||||
|
||||
build-vm hostname=`just _a_host` *_:
|
||||
#!/usr/bin/env -S bash -euo pipefail
|
||||
@@ -75,7 +75,7 @@ build-vm hostname=`just _a_host` *_:
|
||||
echo >&2 "WARNING(just): 'hostname' starts with '-', moving it to nix args..."
|
||||
set -- "" "$@"; hostname=""
|
||||
fi
|
||||
set -x; nixos-rebuild-ng build-vm --accept-flake-config --show-trace --flake .#"$hostname" "${@:2}"
|
||||
set -x; nixos-rebuild build-vm --accept-flake-config --show-trace --flake .#"$hostname" "${@:2}"
|
||||
|
||||
build-vm-and-run $hostname=`just _a_host` *_:
|
||||
#!/usr/bin/env -S bash -euo pipefail
|
||||
@@ -109,7 +109,7 @@ test *_:
|
||||
elif [[ $# -gt 0 && "${1::1}" != "-" ]]; then
|
||||
echo >&2 "WARNING(just): first arg does not start with "-", is it a hostname?"
|
||||
fi
|
||||
set -x; sudo nixos-rebuild-ng test --accept-flake-config --show-trace --flake . "$@"
|
||||
set -x; sudo nixos-rebuild test --accept-flake-config --show-trace --flake . "$@"
|
||||
|
||||
switch *_:
|
||||
#!/usr/bin/env -S bash -euo pipefail
|
||||
@@ -118,7 +118,7 @@ switch *_:
|
||||
elif [[ $# -gt 0 && "${1::1}" != "-" ]]; then
|
||||
echo >&2 "WARNING(just): first arg does not start with "-", is it a hostname?"
|
||||
fi
|
||||
set -x; sudo nixos-rebuild-ng switch --accept-flake-config --show-trace --flake . "$@"
|
||||
set -x; sudo nixos-rebuild switch --accept-flake-config --show-trace --flake . "$@"
|
||||
|
||||
boot *_:
|
||||
#!/usr/bin/env -S bash -euo pipefail
|
||||
@@ -127,7 +127,7 @@ boot *_:
|
||||
elif [[ $# -gt 0 && "${1::1}" != "-" ]]; then
|
||||
echo >&2 "WARNING(just): first arg does not start with "-", is it a hostname?"
|
||||
fi
|
||||
set -x; sudo nixos-rebuild-ng boot --accept-flake-config --show-trace --flake . "$@"
|
||||
set -x; sudo nixos-rebuild boot --accept-flake-config --show-trace --flake . "$@"
|
||||
|
||||
boot-and-reboot *_:
|
||||
#!/usr/bin/env -S bash -euo pipefail
|
||||
@@ -137,10 +137,10 @@ boot-and-reboot *_:
|
||||
echo >&2 "WARNING(just): first arg does not start with "-", is it a hostname?"
|
||||
fi
|
||||
set -x
|
||||
sudo nixos-rebuild-ng boot --accept-flake-config --show-trace --flake . "$@"
|
||||
sudo nixos-rebuild boot --accept-flake-config --show-trace --flake . "$@"
|
||||
sudo reboot # TODO: can i somehow ensure that the sudo hasn't timed out by this time?
|
||||
|
||||
# TODO: nixos-rebuild-ng
|
||||
# TODO: does this support nixos-rebuild-ng?
|
||||
push $hostname=`just _a_host` cmd=`gum choose test switch boot --header "Select mode..."`:
|
||||
#!/usr/bin/env -S bash -euo pipefail
|
||||
remote_sudo=1
|
||||
|
||||
@@ -79,11 +79,16 @@ in
|
||||
#"--update-input" "nixpkgs-edge" # deprecated in nix 2.22, removed in lix 2.90
|
||||
# "--override-input" "nixpkgs-edge" "github:NixOS/nixpkgs/nixos-unstable"
|
||||
] ++ (lib.pipe inputUrls [
|
||||
# TODO: i keep forgetting to update this, perhaps use a blacklist instead?
|
||||
(lib.filterAttrs (key: _: builtins.elem key [
|
||||
"nixpkgs-edge"
|
||||
"nixpkgs-2411"
|
||||
"nixpkgs-2511"
|
||||
"nixpkgs-2505"
|
||||
# "nixpkgs-2411"
|
||||
"home-manager-edge"
|
||||
"home-manager-2411"
|
||||
"home-manager-2511"
|
||||
"home-manager-2505"
|
||||
# "home-manager-2411"
|
||||
"nix-index-database"
|
||||
"nixos-hardware"
|
||||
]))
|
||||
|
||||
Reference in New Issue
Block a user