mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 14:49:14 +00:00
Compare commits
20 commits
0e1f28cf6d
...
6f73ad90fe
| Author | SHA1 | Date | |
|---|---|---|---|
| 6f73ad90fe | |||
| 2dd16cded8 | |||
| 3982973947 | |||
| ad8a114feb | |||
| ecb06aaa84 | |||
| fe93ed4584 | |||
| 9667557cc6 | |||
| 549144ec21 | |||
| 89e137711f | |||
| 5d367843f8 | |||
| 24d514b9fe | |||
| 0d36d5f132 | |||
| a8c5036092 | |||
| a3618b1902 | |||
| 96f4a1aa85 | |||
| eecff000f6 | |||
| 5ca93b040d | |||
| 10066ca81e | |||
| 87bcb693bc | |||
| a1024668db |
10 changed files with 32 additions and 81 deletions
|
|
@ -57,8 +57,11 @@ in
|
||||||
./hydrogen/nixos/misc.nix
|
./hydrogen/nixos/misc.nix
|
||||||
./hydrogen/nixos/programs.nix
|
./hydrogen/nixos/programs.nix
|
||||||
./hydrogen/nixos/connectivity.nix
|
./hydrogen/nixos/connectivity.nix
|
||||||
./hydrogen/nixos/secure_dns.nix
|
|
||||||
|
|
||||||
|
# QUIRK:
|
||||||
|
# Had issue when building the installer as it fails to bootstrap itself
|
||||||
|
# Might be useful to disable for the first build.
|
||||||
|
../nixosModules/extra/secure_dns.nix
|
||||||
../nixosModules/common/disable-command-not-found.nix
|
../nixosModules/common/disable-command-not-found.nix
|
||||||
../nixosModules/common/network.nix
|
../nixosModules/common/network.nix
|
||||||
../nixosModules/common/sudo-conf.nix
|
../nixosModules/common/sudo-conf.nix
|
||||||
|
|
@ -98,6 +101,7 @@ in
|
||||||
../homeModules/common/btop
|
../homeModules/common/btop
|
||||||
../homeModules/common/fish
|
../homeModules/common/fish
|
||||||
../homeModules/common/starship
|
../homeModules/common/starship
|
||||||
|
../homeModules/common/fzf.nix
|
||||||
../homeModules/common/tmux
|
../homeModules/common/tmux
|
||||||
../homeModules/common/vim
|
../homeModules/common/vim
|
||||||
../homeModules/common/direnv.nix
|
../homeModules/common/direnv.nix
|
||||||
|
|
|
||||||
|
|
@ -53,9 +53,6 @@
|
||||||
ripgrep.enable = true;
|
ripgrep.enable = true;
|
||||||
|
|
||||||
btop.enable = true;
|
btop.enable = true;
|
||||||
|
|
||||||
# OCaml fails to build on aarch64-linux
|
|
||||||
git.patdiff.enable = lib.mkForce false;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
|
|
|
||||||
|
|
@ -3,11 +3,6 @@
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
# https://unix.stackexchange.com/questions/592775/how-can-i-enable-apple-ios-fast-charge-support
|
|
||||||
services.udev.extraRules = ''
|
|
||||||
SUBSYSTEM=="usb", ACTION=="add", DRIVER=="apple-mfi-fastcharge", RUN+="/bin/sh -c 'echo Fast > /sys/class/power_supply/apple_mfi_fastcharge/charge_type'"
|
|
||||||
'';
|
|
||||||
|
|
||||||
users.users.root.openssh.authorizedKeys.keys = let
|
users.users.root.openssh.authorizedKeys.keys = let
|
||||||
ids = import ../../../identities.nix;
|
ids = import ../../../identities.nix;
|
||||||
in
|
in
|
||||||
|
|
|
||||||
|
|
@ -13,4 +13,7 @@
|
||||||
|
|
||||||
git.enable = true;
|
git.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Helps with kitty when ssh from remote
|
||||||
|
environment.enableAllTerminfo = true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,6 @@ in
|
||||||
|
|
||||||
./vanadium/nixos/audio.nix
|
./vanadium/nixos/audio.nix
|
||||||
./vanadium/nixos/connectivity.nix
|
./vanadium/nixos/connectivity.nix
|
||||||
./vanadium/nixos/secure_dns.nix
|
|
||||||
./vanadium/nixos/input.nix
|
./vanadium/nixos/input.nix
|
||||||
|
|
||||||
./vanadium/nixos/misc.nix
|
./vanadium/nixos/misc.nix
|
||||||
|
|
@ -108,6 +107,7 @@ in
|
||||||
../nixosModules/common/system-nixconf.nix
|
../nixosModules/common/system-nixconf.nix
|
||||||
../nixosModules/common/xscreensaver.nix
|
../nixosModules/common/xscreensaver.nix
|
||||||
|
|
||||||
|
../nixosModules/extra/secure_dns.nix
|
||||||
../nixosModules/extra/zram.nix
|
../nixosModules/extra/zram.nix
|
||||||
../nixosModules/extra/leana.nix
|
../nixosModules/extra/leana.nix
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,57 +0,0 @@
|
||||||
# https://nixos.wiki/wiki/Encrypted_DNS
|
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
networking = {
|
|
||||||
nameservers = ["127.0.0.1" "::1"];
|
|
||||||
dhcpcd.extraConfig = "nohook resolv.conf";
|
|
||||||
# networkmanager.dns = "none";
|
|
||||||
};
|
|
||||||
|
|
||||||
services.resolved.enable = false;
|
|
||||||
|
|
||||||
services.dnscrypt-proxy2 = {
|
|
||||||
enable = true;
|
|
||||||
# Settings reference:
|
|
||||||
# https://github.com/DNSCrypt/dnscrypt-proxy/blob/master/dnscrypt-proxy/example-dnscrypt-proxy.toml
|
|
||||||
settings = {
|
|
||||||
listen_addresses = ["127.0.0.1:53"];
|
|
||||||
ipv4_servers = true;
|
|
||||||
|
|
||||||
require_dnssec = true;
|
|
||||||
require_nolog = true;
|
|
||||||
require_nofilter = true;
|
|
||||||
|
|
||||||
lb_strategy = "p2";
|
|
||||||
lb_estimator = true;
|
|
||||||
|
|
||||||
# Blocklists are made of one pattern per line.
|
|
||||||
# https://github.com/DNSCrypt/dnscrypt-proxy/blob/fa59f990431a49b6485f63f96601bc7e64017bf8/dnscrypt-proxy/example-dnscrypt-proxy.toml#L583C4-L583C75
|
|
||||||
blocked_names.blocked_names_file = pkgs.concatText "dnsblocklist_combined" [
|
|
||||||
# Prevent building up reliance on chatbots
|
|
||||||
# Gotta preserve that thinking ability of my smoof bwain
|
|
||||||
pkgs.ai_blocklist
|
|
||||||
pkgs.hategroup_blocklist
|
|
||||||
|
|
||||||
# Gotta purify my smoos brain for a while
|
|
||||||
(pkgs.writeText "extra_dns_blocklist" ''
|
|
||||||
instagram.com
|
|
||||||
youtube.com
|
|
||||||
'')
|
|
||||||
];
|
|
||||||
|
|
||||||
# Add this to test if dnscrypt-proxy is actually used to resolve DNS requests
|
|
||||||
# query_log.file = "/var/log/dnscrypt-proxy/query.log";
|
|
||||||
sources.public-resolvers = {
|
|
||||||
urls = [
|
|
||||||
"https://raw.githubusercontent.com/DNSCrypt/dnscrypt-resolvers/master/v3/public-resolvers.md"
|
|
||||||
"https://download.dnscrypt.info/resolvers-list/v3/public-resolvers.md"
|
|
||||||
];
|
|
||||||
cache_file = "/var/cache/dnscrypt-proxy/public-resolvers.md";
|
|
||||||
minisign_key = "RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,12 +1,22 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
# git plugins
|
# git plugins
|
||||||
programs.git = {
|
programs.git = {
|
||||||
lfs.enable = true;
|
lfs.enable = true;
|
||||||
patdiff.enable = true;
|
patdiff.enable = lib.mkMerge [
|
||||||
|
# known to fail on aarch64-linux
|
||||||
|
(lib.mkIf (pkgs.system == "aarch64-linux") (
|
||||||
|
# TODO: investigate this
|
||||||
|
lib.warn "patdiff has been forcibly disabled because it has previously failed to build"
|
||||||
|
lib.mkForce
|
||||||
|
false
|
||||||
|
))
|
||||||
|
(lib.mkDefault true)
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
# 懶惰鬼賴皮
|
# 懶惰鬼賴皮
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,18 @@
|
||||||
{pkgs, ...}: {
|
{pkgs, ...}: {
|
||||||
security.doas.enable = true;
|
|
||||||
security.sudo.enable = false;
|
security.sudo.enable = false;
|
||||||
|
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
pkgs.doas-sudo-shim
|
pkgs.doas-sudo-shim
|
||||||
];
|
];
|
||||||
|
security.doas = {
|
||||||
|
enable = true;
|
||||||
|
extraRules = [
|
||||||
|
{
|
||||||
|
# invoke just with doas directly as a nixos-rebuild helper
|
||||||
|
users = [":wheel"];
|
||||||
|
setEnv = ["PATH"];
|
||||||
|
cmd = "just";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,5 @@
|
||||||
# https://nixos.wiki/wiki/Encrypted_DNS
|
# https://nixos.wiki/wiki/Encrypted_DNS
|
||||||
{
|
{pkgs, ...}: {
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
networking = {
|
networking = {
|
||||||
nameservers = ["127.0.0.1" "::1"];
|
nameservers = ["127.0.0.1" "::1"];
|
||||||
dhcpcd.extraConfig = "nohook resolv.conf";
|
dhcpcd.extraConfig = "nohook resolv.conf";
|
||||||
|
|
@ -1,10 +1,3 @@
|
||||||
final: _: {
|
final: _: {
|
||||||
nix = final.lixPackageSets.stable.lix;
|
nix = final.lixPackageSets.stable.lix;
|
||||||
inherit
|
|
||||||
(final.lixPackageSets.stable)
|
|
||||||
nixpkgs-review
|
|
||||||
nix-eval-jobs
|
|
||||||
nix-fast-build
|
|
||||||
colmena
|
|
||||||
;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue