Compare commits
9
Commits
fd4bc1eaee
..
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7351194fee
|
||
|
|
6aa799c05d
|
||
|
|
ddb6d43b0c
|
||
|
|
8af0ecbf39
|
||
|
|
ce60b83151
|
||
|
|
23609e180e
|
||
|
|
0a566d99b1
|
||
|
|
ff3e201261
|
||
|
|
87c5a25123
|
Generated
+6
-6
@@ -60,11 +60,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1789235087,
|
"lastModified": 1791642191,
|
||||||
"narHash": "sha256-6hZ6Gy8isRQsWdI4l81Egag/PUIh68nSmFr2maInUNg=",
|
"narHash": "sha256-0bK0A59rVUn1SRZzo4cNi4VSqAe7vR1gL2/MZl53Frw=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "fe48612c5321a2cc09b0f563757a9c9733d641f8",
|
"rev": "c58f54c733a7894d84fa2fdff26cc12088c4b78c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -135,11 +135,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1789149629,
|
"lastModified": 1791594108,
|
||||||
"narHash": "sha256-H6GwaZzZf+4npqv0tph94w9tZddSjFjmQrVsW0z78uk=",
|
"narHash": "sha256-XK4KceonkwD8LuMAt/vNrz982mXJM5jeHAxMwsUXXAQ=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "eaad089433ca2bb662274377d33df3d0e51ef28b",
|
"rev": "6510408d147d8c5e6d76043e899e9251756f6a75",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
@@ -5,11 +5,11 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
shellInit = "set fish_greeting";
|
shellInit = "set fish_greeting";
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
# Replace ls with exa
|
# Replace ls with eza
|
||||||
ls = "exa -al --color=always --group-directories-first --icons"; # preferred listing
|
ls = "eza -al --color=always --group-directories-first --icons=always"; # preferred listing
|
||||||
la = "exa -a --color=always --group-directories-first --icons"; # all files and dirs
|
la = "eza -a --color=always --group-directories-first --icons=always"; # all files and dirs
|
||||||
ll = "exa -l --color=always --group-directories-first --icons"; # long format
|
ll = "eza -l --color=always --group-directories-first --icons=always"; # long format
|
||||||
lt = "exa -aT --color=always --group-directories-first --icons"; # tree listing
|
lt = "eza -aT --color=always --group-directories-first --icons=always"; # tree listing
|
||||||
"l." = "exa -a | rg '^\.'"; # show only dotfiles
|
"l." = "exa -a | rg '^\.'"; # show only dotfiles
|
||||||
|
|
||||||
# Replace cat with bat
|
# Replace cat with bat
|
||||||
|
|||||||
@@ -31,6 +31,10 @@
|
|||||||
intel-media-driver # LIBVA_DRIVER_NAME=iHD
|
intel-media-driver # LIBVA_DRIVER_NAME=iHD
|
||||||
];
|
];
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
lmstudio
|
||||||
|
];
|
||||||
|
|
||||||
networking.hostName = "Yura-PC"; # Define your hostname.
|
networking.hostName = "Yura-PC"; # Define your hostname.
|
||||||
networking.hostId = "110a2814"; # Required for ZFS.
|
networking.hostId = "110a2814"; # Required for ZFS.
|
||||||
|
|
||||||
|
|||||||
@@ -82,7 +82,6 @@
|
|||||||
# https://github.com/flatpak/flatpak/issues/2861
|
# https://github.com/flatpak/flatpak/issues/2861
|
||||||
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
||||||
|
|
||||||
workarounds.flatpak.enable = true;
|
|
||||||
fonts.packages = with pkgs; [
|
fonts.packages = with pkgs; [
|
||||||
fantasque-sans-mono
|
fantasque-sans-mono
|
||||||
nerd-fonts.fantasque-sans-mono
|
nerd-fonts.fantasque-sans-mono
|
||||||
|
|||||||
@@ -14,12 +14,12 @@
|
|||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" =
|
||||||
{ device = "/dev/disk/by-uuid/f222513b-ded1-49fa-b591-20ce86a2fe7f";
|
{ device = "/dev/disk/by-uuid/0dec41bf-aba0-4b7b-9f61-bbb572e5bd1e";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" =
|
||||||
{ device = "/dev/disk/by-uuid/12CE-A600";
|
{ device = "/dev/disk/by-uuid/9F5E-672F";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
options = [ "fmask=0022" "dmask=0022" ];
|
options = [ "fmask=0022" "dmask=0022" ];
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -70,7 +70,6 @@
|
|||||||
# https://github.com/flatpak/flatpak/issues/2861
|
# https://github.com/flatpak/flatpak/issues/2861
|
||||||
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
||||||
|
|
||||||
# workarounds.flatpak.enable = true;
|
|
||||||
fonts.packages = with pkgs; [
|
fonts.packages = with pkgs; [
|
||||||
noto-fonts-cjk-sans
|
noto-fonts-cjk-sans
|
||||||
noto-fonts-cjk-serif
|
noto-fonts-cjk-serif
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
{ ... }: {
|
{ ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
./opts
|
./opts
|
||||||
./workarounds
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ in
|
|||||||
|
|
||||||
boot.loader.timeout = 2;
|
boot.loader.timeout = 2;
|
||||||
boot.loader.systemd-boot.configurationLimit = 5;
|
boot.loader.systemd-boot.configurationLimit = 5;
|
||||||
boot.kernelPackages = pkgs.linuxKernel.packages.linux_6_12;
|
boot.kernelPackages = pkgs.linuxKernel.packages.linux_6_18;
|
||||||
boot.growPartition = true;
|
boot.growPartition = true;
|
||||||
|
|
||||||
# Enable the X11 windowing system.
|
# Enable the X11 windowing system.
|
||||||
|
|||||||
@@ -54,17 +54,17 @@ in
|
|||||||
enable_dnssec = true;
|
enable_dnssec = true;
|
||||||
bootstrap_dns = [ "1.1.1.1" "9.9.9.9" ];
|
bootstrap_dns = [ "1.1.1.1" "9.9.9.9" ];
|
||||||
upstream_dns = [
|
upstream_dns = [
|
||||||
# Default upstreams
|
|
||||||
"quic://p0.freedns.controld.com"
|
|
||||||
"tls://one.one.one.one"
|
|
||||||
"tls://dns.quad9.net"
|
|
||||||
|
|
||||||
# Adguard uses upstream and not rewrite rules to resolve cname rewrites,
|
# Adguard uses upstream and not rewrite rules to resolve cname rewrites,
|
||||||
# and obviously my sysdomain entries don't exist in cloudflare.
|
# and obviously my sysdomain entries don't exist in cloudflare.
|
||||||
"[/${sysdomain}/][::1]" # Sys domains to self (for cname rewrites)
|
"[/${sysdomain}/][::1]" # Sys domains to self (for cname rewrites)
|
||||||
|
|
||||||
"[/${ldomain}/][::1]:1053" # Local domains to Knot (ddns)
|
"[/${ldomain}/][::1]:1053" # Local domains to Knot (ddns)
|
||||||
"[/home/][${ifs.lan.ulaPrefix}::250]" # .home domains to opnsense (temporary)
|
"[/home/][${ifs.lan.ulaPrefix}::250]" # .home domains to opnsense (temporary)
|
||||||
|
|
||||||
|
# Default upstreams
|
||||||
|
"quic://p0.freedns.controld.com"
|
||||||
|
"tls://one.one.one.one"
|
||||||
|
"tls://dns.quad9.net"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
# https://adguard-dns.io/kb/general/dns-filtering-syntax/
|
# https://adguard-dns.io/kb/general/dns-filtering-syntax/
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ in
|
|||||||
udp . 48425 : ${vars.extra.opnsense.addr4} . 48425,
|
udp . 48425 : ${vars.extra.opnsense.addr4} . 48425,
|
||||||
# Amnezia VPN server
|
# Amnezia VPN server
|
||||||
udp . 37138 : ${vars.extra.amnezia.addr4} . 37138,
|
udp . 37138 : ${vars.extra.amnezia.addr4} . 37138,
|
||||||
|
tcp . 38247 : ${vars.extra.amnezia.addr4} . 22,
|
||||||
# Minecruft server
|
# Minecruft server
|
||||||
tcp . 25565 : ${vars.extra.minecruft.addr4} . 25565,
|
tcp . 25565 : ${vars.extra.minecruft.addr4} . 25565,
|
||||||
udp . 25565 : ${vars.extra.minecruft.addr4} . 25565,
|
udp . 25565 : ${vars.extra.minecruft.addr4} . 25565,
|
||||||
|
|||||||
@@ -52,6 +52,9 @@ in
|
|||||||
# since my WAN and LAN20 are technically bridged.
|
# since my WAN and LAN20 are technically bridged.
|
||||||
# https://networkengineering.stackexchange.com/questions/83071/why-linux-answers-arp-requests-for-ips-that-belong-to-different-network-interfac
|
# https://networkengineering.stackexchange.com/questions/83071/why-linux-answers-arp-requests-for-ips-that-belong-to-different-network-interfac
|
||||||
boot.kernel.sysctl."net.ipv4.conf.default.arp_filter" = 1;
|
boot.kernel.sysctl."net.ipv4.conf.default.arp_filter" = 1;
|
||||||
|
# Later I discovered that rp_filter might also be good to set
|
||||||
|
# Strict mode (1) drops packets if the src ip isn't a local route on the interface
|
||||||
|
boot.kernel.sysctl."net.ipv4.conf.default.rp_filter" = 1;
|
||||||
|
|
||||||
# It is impossible to do multiple prefix requests with networkd,
|
# It is impossible to do multiple prefix requests with networkd,
|
||||||
# so I use dhcpcd for this
|
# so I use dhcpcd for this
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
age-encryption.org/v1
|
||||||
|
-> ssh-ed25519 D2MY/A txjDSEsRr2CJtC9rDIiY9H8aX0us53vhnqJStt+XvlA
|
||||||
|
vjmrx5ByEhbHE/hBEQq3gRqY8b5/mjHLs+He3D/27LM
|
||||||
|
--- rp66vDf9qnM7f9S5YD/X/99YsufPWmvz+V8z8htB2Ow
|
||||||
|
9‡Ài¨*¡-oš·}Ć(Š5[¬[ÕyKr)¾-cùäóŽù¼R0?Ë8`Èô×{
|
||||||
@@ -29,10 +29,12 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
# https://wiki.nixos.org/wiki/Grafana#Declarative_configuration
|
# https://wiki.nixos.org/wiki/Grafana#Declarative_configuration
|
||||||
|
secrix.services.grafana.secrets.security-key.encrypted.file = ./secrets/grafana-secret-key.age;
|
||||||
services.grafana = {
|
services.grafana = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
security.allow_embedding = true;
|
security.allow_embedding = true;
|
||||||
|
security.secret_key = "$__file{${config.secrix.services.grafana.secrets.security-key.decrypted.path}}";
|
||||||
server = {
|
server = {
|
||||||
http_port = 3001;
|
http_port = 3001;
|
||||||
domain = "grouter.${domain}";
|
domain = "grouter.${domain}";
|
||||||
@@ -57,8 +59,8 @@ in
|
|||||||
services.caddy = {
|
services.caddy = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.caddy.withPlugins {
|
package = pkgs.caddy.withPlugins {
|
||||||
plugins = [ "github.com/caddy-dns/cloudflare@v0.2.1" ];
|
plugins = [ "github.com/caddy-dns/cloudflare@v0.2.4" ];
|
||||||
hash = "sha256-F7d4HwM4oCkQrFMr4SFSC0r52ONxY+PW6z5BJawW8Ok=";
|
hash = "sha256-xRJ5evsAJ2akg47j3Bt6YDXJOgX88B/rKNP50KSVyNY=";
|
||||||
};
|
};
|
||||||
virtualHosts."*.${domain}".extraConfig = ''
|
virtualHosts."*.${domain}".extraConfig = ''
|
||||||
encode
|
encode
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
imports = [
|
|
||||||
./flatpak.nix
|
|
||||||
];
|
|
||||||
}
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
# https://github.com/knightpp/nixos-cfg/blob/main/modules/workarounds/flatpak.nix
|
|
||||||
{
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
cfg = config.workarounds.flatpak;
|
|
||||||
in {
|
|
||||||
options = {
|
|
||||||
workarounds.flatpak = {
|
|
||||||
enable = lib.mkEnableOption "flatpak workaround";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
system.fsPackages = [pkgs.bindfs];
|
|
||||||
fileSystems = let
|
|
||||||
mkRoSymBind = path: {
|
|
||||||
device = path;
|
|
||||||
fsType = "fuse.bindfs";
|
|
||||||
options = ["ro" "resolve-symlinks" "x-gvfs-hide"];
|
|
||||||
};
|
|
||||||
aggregated = pkgs.buildEnv {
|
|
||||||
name = "system-fonts-and-icons";
|
|
||||||
paths = builtins.attrValues {
|
|
||||||
inherit (pkgs.kdePackages) breeze;
|
|
||||||
inherit
|
|
||||||
(pkgs)
|
|
||||||
noto-fonts
|
|
||||||
noto-fonts-color-emoji
|
|
||||||
noto-fonts-cjk-sans
|
|
||||||
noto-fonts-cjk-serif
|
|
||||||
;
|
|
||||||
};
|
|
||||||
pathsToLink = ["/share/fonts" "/share/icons"];
|
|
||||||
};
|
|
||||||
in {
|
|
||||||
# Create an FHS mount to support flatpak host icons/fonts
|
|
||||||
"/usr/share/icons" = mkRoSymBind "${aggregated}/share/icons";
|
|
||||||
"/usr/share/fonts" = mkRoSymBind "${aggregated}/share/fonts";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user