Compare commits
8 Commits
003c3cc41a
...
mt7927
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5c2b0d8c2f | ||
|
|
9550032c08 | ||
|
|
d46c2a0225 | ||
|
|
6430b1cc77 | ||
|
|
157d4e4c94 | ||
|
|
075a4b8262 | ||
|
|
d62b3d8a62 | ||
|
|
ee4794859a |
@@ -1,16 +1,9 @@
|
|||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
|
||||||
alias_nix_pin_revision = pkgs.writeShellScriptBin "nix-pin-revision" ''
|
|
||||||
# Usage: nix-pin-revision nixpkgs 'github:NixOS/nixpkgs/00c21e4c93d963c50d4c0c89bfa84ed6e0694df2'
|
|
||||||
exec nix flake lock --override-input "''${@}"
|
|
||||||
'';
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./roles/2ship2harkinian
|
./roles/2ship2harkinian
|
||||||
@@ -147,10 +140,6 @@ in
|
|||||||
};
|
};
|
||||||
nix.settings.auto-optimise-store = !config.me.buildingPortable;
|
nix.settings.auto-optimise-store = !config.me.buildingPortable;
|
||||||
|
|
||||||
environment.systemPackages = [
|
|
||||||
alias_nix_pin_revision
|
|
||||||
];
|
|
||||||
|
|
||||||
environment.persistence."/persist" = lib.mkIf (config.me.mountPersistence) {
|
environment.persistence."/persist" = lib.mkIf (config.me.mountPersistence) {
|
||||||
hideMounts = true;
|
hideMounts = true;
|
||||||
directories = [
|
directories = [
|
||||||
@@ -236,16 +225,9 @@ in
|
|||||||
[
|
[
|
||||||
(disableTests "coreutils")
|
(disableTests "coreutils")
|
||||||
(disableTests "coreutils-full")
|
(disableTests "coreutils-full")
|
||||||
(disableTests "deno") # Tests use too much disk space
|
|
||||||
(disableTests "libuv")
|
(disableTests "libuv")
|
||||||
(final: prev: {
|
(final: prev: {
|
||||||
inherit (final.unoptimized)
|
inherit (final.unoptimized) libtpms libjxl;
|
||||||
libtpms
|
|
||||||
libjxl
|
|
||||||
ddrescueview
|
|
||||||
deno
|
|
||||||
mesa
|
|
||||||
;
|
|
||||||
})
|
})
|
||||||
(disableOptimizationsPython3 "scipy")
|
(disableOptimizationsPython3 "scipy")
|
||||||
# Works but probably sets python2's scipy to be python3:
|
# Works but probably sets python2's scipy to be python3:
|
||||||
|
|||||||
12
nix/configuration/flake.lock
generated
12
nix/configuration/flake.lock
generated
@@ -22,11 +22,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1776613567,
|
"lastModified": 1769524058,
|
||||||
"narHash": "sha256-gC9Cp5ibBmGD5awCA9z7xy6MW6iJufhazTYJOiGlCUI=",
|
"narHash": "sha256-zygdD6X1PcVNR2PsyK4ptzrVEiAdbMqLos7utrMDEWE=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "disko",
|
"repo": "disko",
|
||||||
"rev": "32f4236bfc141ae930b5ba2fb604f561fed5219d",
|
"rev": "71a3fc97d80881e91710fe721f1158d3b96ae14d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -164,11 +164,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1777268161,
|
"lastModified": 1770197578,
|
||||||
"narHash": "sha256-bxrdOn8SCOv8tN4JbTF/TXq7kjo9ag4M+C8yzzIRYbE=",
|
"narHash": "sha256-AYqlWrX09+HvGs8zM6ebZ1pwUqjkfpnv8mewYwAo+iM=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "1c3fe55ad329cbcb28471bb30f05c9827f724c76",
|
"rev": "00c21e4c93d963c50d4c0c89bfa84ed6e0694df2",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
@@ -28,6 +28,7 @@
|
|||||||
url = "github:nix-community/disko";
|
url = "github:nix-community/disko";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
mt7927.url = "github:cmspam/mt7927-nixos";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs =
|
outputs =
|
||||||
@@ -37,6 +38,7 @@
|
|||||||
disko,
|
disko,
|
||||||
impermanence,
|
impermanence,
|
||||||
lanzaboote,
|
lanzaboote,
|
||||||
|
mt7927,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
@@ -78,6 +80,7 @@
|
|||||||
impermanence.nixosModules.impermanence
|
impermanence.nixosModules.impermanence
|
||||||
lanzaboote.nixosModules.lanzaboote
|
lanzaboote.nixosModules.lanzaboote
|
||||||
disko.nixosModules.disko
|
disko.nixosModules.disko
|
||||||
|
mt7927.nixosModules.default
|
||||||
./configuration.nix
|
./configuration.nix
|
||||||
(./. + "/hosts/${hostname}")
|
(./. + "/hosts/${hostname}")
|
||||||
(./. + "/formats/${format}.nix")
|
(./. + "/formats/${format}.nix")
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ IFS=$'\n\t'
|
|||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
: "${JOBS:="1"}"
|
: "${JOBS:="1"}"
|
||||||
|
: "${NOM:="true"}"
|
||||||
|
|
||||||
for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done
|
for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done
|
||||||
|
|
||||||
|
|||||||
@@ -164,7 +164,7 @@
|
|||||||
me.zsh.enable = true;
|
me.zsh.enable = true;
|
||||||
|
|
||||||
me.sm64ex.enable = true;
|
me.sm64ex.enable = true;
|
||||||
me.shipwright.enable = false;
|
me.shipwright.enable = true;
|
||||||
me.ship2harkinian.enable = true;
|
me.ship2harkinian.enable = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
./power_management.nix
|
./power_management.nix
|
||||||
./waybar.nix
|
./waybar.nix
|
||||||
|
./wifi.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
@@ -159,7 +160,7 @@
|
|||||||
me.zsh.enable = true;
|
me.zsh.enable = true;
|
||||||
|
|
||||||
me.sm64ex.enable = true;
|
me.sm64ex.enable = true;
|
||||||
me.shipwright.enable = false;
|
me.shipwright.enable = true;
|
||||||
me.ship2harkinian.enable = true;
|
me.ship2harkinian.enable = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
20
nix/configuration/hosts/quark/wifi.nix
Normal file
20
nix/configuration/hosts/quark/wifi.nix
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [ ];
|
||||||
|
|
||||||
|
config = {
|
||||||
|
hardware.mediatek-mt7927 = {
|
||||||
|
enable = true;
|
||||||
|
enableWifi = true;
|
||||||
|
enableBluetooth = true;
|
||||||
|
# Highly recommended to fix upload speed issues
|
||||||
|
disableAspm = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -14,12 +14,6 @@ let
|
|||||||
cleanup_temporary_files = (
|
cleanup_temporary_files = (
|
||||||
patchScriptBin "cleanup_temporary_files" (builtins.readFile ./files/cleanup_temporary_files.bash)
|
patchScriptBin "cleanup_temporary_files" (builtins.readFile ./files/cleanup_temporary_files.bash)
|
||||||
);
|
);
|
||||||
decode_jwt = (patchScriptBin "decode_jwt" (builtins.readFile ./files/decode_jwt.bash));
|
|
||||||
git_find_merged_branches = (
|
|
||||||
patchScriptBin "git_find_merged_branches" (builtins.readFile ./files/git_find_merged_branches.bash)
|
|
||||||
);
|
|
||||||
git_fix_author = (patchScriptBin "git_fix_author" (builtins.readFile ./files/git_fix_author.bash));
|
|
||||||
rsync_clone = (patchScriptBin "rsync_clone" (builtins.readFile ./files/rsync_clone.bash));
|
|
||||||
alias_rga = pkgs.writeShellScriptBin "rga" ''
|
alias_rga = pkgs.writeShellScriptBin "rga" ''
|
||||||
exec ${pkgs.ripgrep}/bin/rg -uuu "''${@}"
|
exec ${pkgs.ripgrep}/bin/rg -uuu "''${@}"
|
||||||
'';
|
'';
|
||||||
@@ -65,12 +59,8 @@ in
|
|||||||
nix-output-monitor # For better view into nixos-rebuild
|
nix-output-monitor # For better view into nixos-rebuild
|
||||||
# nix-serve-ng # Serve nix store over http
|
# nix-serve-ng # Serve nix store over http
|
||||||
cleanup_temporary_files
|
cleanup_temporary_files
|
||||||
decode_jwt
|
|
||||||
jq
|
jq
|
||||||
inetutils # For whois
|
inetutils # For whois
|
||||||
git_find_merged_branches
|
|
||||||
git_fix_author
|
|
||||||
rsync_clone
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,4 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
#
|
#
|
||||||
# Delete temporary files on entire disk
|
# Delete temporary files on entire disk
|
||||||
set -euo pipefail
|
find / -type f '(' -name '*.orig' -or -name '*~' -or -name '*.core' ')' -delete -print 2>/dev/null
|
||||||
IFS=$'\n\t'
|
|
||||||
|
|
||||||
exec find / -type f '(' -name '*.orig' -or -name '*~' -or -name '*.core' ')' -delete -print 2>/dev/null
|
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
#
|
|
||||||
# Decode the contents of a JWT
|
|
||||||
set -euo pipefail
|
|
||||||
IFS=$'\n\t'
|
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
|
|
||||||
exec jq -R 'split(".") | .[0],.[1] | gsub("-"; "+") | gsub("_"; "/") | gsub("%3D"; "=")| @base64d | fromjson'
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
#
|
|
||||||
# Find local branches that have been merged
|
|
||||||
set -euo pipefail
|
|
||||||
IFS=$'\n\t'
|
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
|
|
||||||
: ${MAIN_BRANCH:="main"}
|
|
||||||
|
|
||||||
git checkout -q ${MAIN_BRANCH} && git for-each-ref refs/heads/ "--format=%(refname:short)" | while read branch; do mergeBase=$(git merge-base ${MAIN_BRANCH} $branch) && [[ $(git cherry ${MAIN_BRANCH} $(git commit-tree $(git rev-parse "$branch^{tree}") -p $mergeBase -m _)) == "-"* ]] && echo "$branch"; done
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
#
|
|
||||||
set -euo pipefail
|
|
||||||
IFS=$'\n\t'
|
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
|
|
||||||
git filter-branch --env-filter '
|
|
||||||
WRONG_EMAIL="old@email.foo"
|
|
||||||
NEW_NAME="New Name"
|
|
||||||
NEW_EMAIL="new@email.bar"
|
|
||||||
|
|
||||||
if [ "$GIT_COMMITTER_EMAIL" = "$WRONG_EMAIL" ]
|
|
||||||
then
|
|
||||||
export GIT_COMMITTER_NAME="$NEW_NAME"
|
|
||||||
export GIT_COMMITTER_EMAIL="$NEW_EMAIL"
|
|
||||||
fi
|
|
||||||
if [ "$GIT_AUTHOR_EMAIL" = "$WRONG_EMAIL" ]
|
|
||||||
then
|
|
||||||
export GIT_AUTHOR_NAME="$NEW_NAME"
|
|
||||||
export GIT_AUTHOR_EMAIL="$NEW_EMAIL"
|
|
||||||
fi
|
|
||||||
' --tag-name-filter cat --commit-filter 'git commit-tree -S "$@";' -- --branches --tags
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
#
|
|
||||||
# Wrapper to set rsync flags for cloning a folder preserving attributes
|
|
||||||
set -euo pipefail
|
|
||||||
IFS=$'\n\t'
|
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
|
|
||||||
exec rsync -aHAXS "$@"
|
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
mesa-demos # for glxgears
|
mesa-demos # for glxgears
|
||||||
vulkan-tools # for vkcube
|
vulkan-tools # for vkcube
|
||||||
xeyes # to test which windows are using x11
|
xorg.xeyes # to test which windows are using x11
|
||||||
];
|
];
|
||||||
hardware.graphics.enable = true;
|
hardware.graphics.enable = true;
|
||||||
# hardware.graphics.enable32Bit = true;
|
# hardware.graphics.enable32Bit = true;
|
||||||
|
|||||||
@@ -79,15 +79,9 @@
|
|||||||
in
|
in
|
||||||
{
|
{
|
||||||
linux_me = addConfig {
|
linux_me = addConfig {
|
||||||
# Server | No preemption - Run until the next tick. Highest throughput but can cause stutter.
|
# Full preemption
|
||||||
# PREEMPT = lib.mkOverride 60 lib.kernel.no;
|
|
||||||
# Desktop | Preempt kernel threads only at pre-defined places that call cond_resched().
|
|
||||||
PREEMPT_VOLUNTARY = lib.mkOverride 60 lib.kernel.no;
|
|
||||||
# Low-latency desktop | Full preemption - Kernel threads can be preempted unless they hold a spinlock or are in a no-preemption section.
|
|
||||||
PREEMPT = lib.mkOverride 60 lib.kernel.yes;
|
PREEMPT = lib.mkOverride 60 lib.kernel.yes;
|
||||||
# RT - All kernel code is preemptible except for a few critical sections.
|
PREEMPT_VOLUNTARY = lib.mkOverride 60 lib.kernel.no;
|
||||||
# Middle ground | Real-time tasks preempt immediately like FULL, normal tasks run until the next tick.
|
|
||||||
PREEMPT_LAZY = lib.mkOverride 90 lib.kernel.no;
|
|
||||||
|
|
||||||
# Google's BBRv3 TCP congestion Control
|
# Google's BBRv3 TCP congestion Control
|
||||||
TCP_CONG_BBR = lib.kernel.yes;
|
TCP_CONG_BBR = lib.kernel.yes;
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
}
|
}
|
||||||
(lib.mkIf config.me.graphical {
|
(lib.mkIf config.me.graphical {
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
#ddrescueview
|
ddrescueview
|
||||||
];
|
];
|
||||||
})
|
})
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -53,8 +53,6 @@ in
|
|||||||
rpcs3
|
rpcs3
|
||||||
];
|
];
|
||||||
|
|
||||||
allowedUnfree = [ "rpcs3" ];
|
|
||||||
|
|
||||||
security.pam.loginLimits = [
|
security.pam.loginLimits = [
|
||||||
{
|
{
|
||||||
domain = "@wheel";
|
domain = "@wheel";
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
# If you want to use JACK applications, uncomment this
|
# If you want to use JACK applications, uncomment this
|
||||||
#jack.enable = true;
|
#jack.enable = true;
|
||||||
|
|
||||||
extraLadspaPackages = [ pkgs.rnnoise-plugin.ladspa ];
|
extraLv2Packages = [ pkgs.rnnoise-plugin ];
|
||||||
configPackages = [
|
configPackages = [
|
||||||
(pkgs.writeTextDir "share/pipewire/pipewire.conf.d/99-input-denoising.conf" ''
|
(pkgs.writeTextDir "share/pipewire/pipewire.conf.d/99-input-denoising.conf" ''
|
||||||
context.modules = [
|
context.modules = [
|
||||||
@@ -43,7 +43,7 @@
|
|||||||
{
|
{
|
||||||
type = ladspa
|
type = ladspa
|
||||||
name = rnnoise
|
name = rnnoise
|
||||||
plugin = "librnnoise_ladspa"
|
plugin = "${pkgs.rnnoise-plugin}/lib/ladspa/librnnoise_ladspa.so"
|
||||||
label = noise_suppressor_mono
|
label = noise_suppressor_mono
|
||||||
control = {
|
control = {
|
||||||
"VAD Threshold (%)" = 50.0
|
"VAD Threshold (%)" = 50.0
|
||||||
|
|||||||
Reference in New Issue
Block a user