Compare commits
15 commits
update-24.
...
main
Author | SHA1 | Date | |
---|---|---|---|
2ae616758b | |||
72dfd33750 | |||
a36385a4d2 | |||
e1601a0aef | |||
8012d3835d | |||
cf2cc34311 | |||
eda788a912 | |||
26e013d88f | |||
d84480a40d | |||
f98e1ef0b7 | |||
5ff7906392 | |||
56b1f8133e | |||
5d4cfc70a7 | |||
4fecc91b73 | |||
lelgenio | fad066b258 |
75
flake.lock
75
flake.lock
|
@ -209,11 +209,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1733168902,
|
||||
"narHash": "sha256-8dupm9GfK+BowGdQd7EHK5V61nneLfr9xR6sc5vtDi0=",
|
||||
"lastModified": 1736199437,
|
||||
"narHash": "sha256-TdU0a/x8048rbbJmkKWzSY1CtsbbGKNkIJcMdr8Zf4Q=",
|
||||
"owner": "nix-community",
|
||||
"repo": "disko",
|
||||
"rev": "785c1e02c7e465375df971949b8dcbde9ec362e5",
|
||||
"rev": "49f8aa791f81ff2402039b3efe0c35b9386c4bcf",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -227,11 +227,11 @@
|
|||
"nixpkgs": "nixpkgs_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1733974299,
|
||||
"narHash": "sha256-fPvJ/ZsQGVqGJqYL2gKotalQUoG1wpUYTJkRKG2BrwA=",
|
||||
"lastModified": 1735940463,
|
||||
"narHash": "sha256-qrjv3UrlcFQf8zFjV4lMDmcBnlow/sqyyjGFAXp8mLk=",
|
||||
"owner": "lelgenio",
|
||||
"repo": "dzgui-nix",
|
||||
"rev": "580022e73efedb17ddf640115539cb9bd1423d44",
|
||||
"rev": "fccedf1386f484375570e0195c7a08d7687b1df6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -440,11 +440,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1733951536,
|
||||
"narHash": "sha256-Zb5ZCa7Xj+0gy5XVXINTSr71fCfAv+IKtmIXNrykT54=",
|
||||
"lastModified": 1735344290,
|
||||
"narHash": "sha256-oJDtWPH1oJT34RJK1FSWjwX4qcGOBRkcNQPD0EbSfNM=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "1318c3f3b068cdcea922fa7c1a0a1f0c96c22f5f",
|
||||
"rev": "613691f285dad87694c2ba1c9e6298d04736292d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -481,11 +481,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1733629314,
|
||||
"narHash": "sha256-U0vivjQFAwjNDYt49Krevs1murX9hKBFe2Ye0cHpgbU=",
|
||||
"lastModified": 1736047960,
|
||||
"narHash": "sha256-hutd85FA1jUJhhqBRRJ+u7UHO9oFGD/RVm2x5w8WjVQ=",
|
||||
"owner": "Mic92",
|
||||
"repo": "nix-index-database",
|
||||
"rev": "f1e477a7dd11e27e7f98b646349cd66bbabf2fb8",
|
||||
"rev": "816a6ae88774ba7e74314830546c29e134e0dffb",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -501,16 +501,14 @@
|
|||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"nixpkgs-24_05": [
|
||||
"nixpkgs"
|
||||
]
|
||||
"nixpkgs-24_11": "nixpkgs-24_11"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1722877200,
|
||||
"narHash": "sha256-qgKDNJXs+od+1UbRy62uk7dYal3h98I4WojfIqMoGcg=",
|
||||
"lastModified": 1735230346,
|
||||
"narHash": "sha256-zgR8NTiNDPVNrfaiOlB9yHSmCqFDo7Ks2IavaJ2dZo4=",
|
||||
"owner": "simple-nixos-mailserver",
|
||||
"repo": "nixos-mailserver",
|
||||
"rev": "af7d3bf5daeba3fc28089b015c0dd43f06b176f2",
|
||||
"rev": "dc0569066e79ae96184541da6fa28f35a33fbf7b",
|
||||
"type": "gitlab"
|
||||
},
|
||||
"original": {
|
||||
|
@ -536,13 +534,28 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-unstable": {
|
||||
"nixpkgs-24_11": {
|
||||
"locked": {
|
||||
"lastModified": 1733759999,
|
||||
"narHash": "sha256-463SNPWmz46iLzJKRzO3Q2b0Aurff3U1n0nYItxq7jU=",
|
||||
"lastModified": 1734083684,
|
||||
"narHash": "sha256-5fNndbndxSx5d+C/D0p/VF32xDiJCJzyOqorOYW4JEo=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "a73246e2eef4c6ed172979932bc80e1404ba2d56",
|
||||
"rev": "314e12ba369ccdb9b352a4db26ff419f7c49fa84",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"ref": "nixos-24.11",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"nixpkgs-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1736012469,
|
||||
"narHash": "sha256-/qlNWm/IEVVH7GfgAIyP6EsVZI6zjAx1cV5zNyrs+rI=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "8f3e1f807051e32d8c95cd12b9b421623850a34d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -568,11 +581,11 @@
|
|||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1733749988,
|
||||
"narHash": "sha256-+5qdtgXceqhK5ZR1YbP1fAUsweBIrhL38726oIEAtDs=",
|
||||
"lastModified": 1732812356,
|
||||
"narHash": "sha256-LNcgjOLArRlx2W6XSi0yc0xwLjrK3KF9LxAMqUgFDgw=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "bc27f0fde01ce4e1bfec1ab122d72b7380278e68",
|
||||
"rev": "581d7e4d23b91daf2afa0005a5d3d01d6a8884fe",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -599,11 +612,11 @@
|
|||
},
|
||||
"nixpkgs_5": {
|
||||
"locked": {
|
||||
"lastModified": 1733808091,
|
||||
"narHash": "sha256-KWwINTQelKOoQgrXftxoqxmKFZb9pLVfnRvK270nkVk=",
|
||||
"lastModified": 1736061677,
|
||||
"narHash": "sha256-DjkQPnkAfd7eB522PwnkGhOMuT9QVCZspDpJJYyOj60=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "a0f3e10d94359665dba45b71b4227b0aeb851f8e",
|
||||
"rev": "cbd8ec4de4469333c82ff40d057350c30e9f7d36",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -889,11 +902,11 @@
|
|||
},
|
||||
"vpsadminos": {
|
||||
"locked": {
|
||||
"lastModified": 1733157322,
|
||||
"narHash": "sha256-lN6AY1zxZ0mQzpvLIfpdHdZ7oThHOlWFb2HUeOVcCJQ=",
|
||||
"lastModified": 1734458258,
|
||||
"narHash": "sha256-xZEbuwAAbxwujrGtuydDNBjzMLnE9YOcuLv3hdudZe4=",
|
||||
"owner": "vpsfreecz",
|
||||
"repo": "vpsadminos",
|
||||
"rev": "8ba8b0885526f484da44c0aeb4894dbaf548e61f",
|
||||
"rev": "83ddccf4462f155f12596af773e9291d7ebc37a3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
nixos-mailserver = {
|
||||
url = "gitlab:simple-nixos-mailserver/nixos-mailserver/master";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.nixpkgs-24_05.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
dzgui-nix.url = "github:lelgenio/dzgui-nix";
|
||||
|
|
|
@ -13,7 +13,6 @@ in
|
|||
{
|
||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||
boot.kernelParams = [
|
||||
"amdgpu.dcdebugmask=0x10" # amdgpu undervolting bug
|
||||
"video=DP-1:1920x1080@144"
|
||||
"amdgpu.ppfeaturemask=0xfffd7fff" # enable undervolting
|
||||
];
|
||||
|
@ -22,6 +21,10 @@ in
|
|||
script = ''
|
||||
${lib.getExe pkgs.amd-fan-control} /sys/class/drm/card1/device 60 85
|
||||
'';
|
||||
serviceConfig = {
|
||||
Restart = "always";
|
||||
RestartSec = 10;
|
||||
};
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
};
|
||||
|
||||
|
@ -29,10 +32,6 @@ in
|
|||
|
||||
hardware.graphics.extraPackages = with pkgs; [
|
||||
libva
|
||||
libvdpau
|
||||
vaapiVdpau
|
||||
rocmPackages.clr
|
||||
rocmPackages.rocm-smi
|
||||
];
|
||||
|
||||
services.udev.extraRules = ''
|
||||
|
|
|
@ -41,8 +41,6 @@ in
|
|||
package = pkgs.unstable.opentabletdriver;
|
||||
};
|
||||
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
boot.extraModulePackages = with config.boot.kernelPackages; [ zenpower ];
|
||||
|
||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||
|
|
|
@ -10,6 +10,11 @@
|
|||
extraSettingsFile = config.age.secrets.factorio-settings.path;
|
||||
};
|
||||
|
||||
systemd.services.factorio = {
|
||||
after = [ "network-online.target" ];
|
||||
wants = [ "network-online.target" ];
|
||||
};
|
||||
|
||||
age.secrets.factorio-settings = {
|
||||
file = ../../secrets/factorio-settings.age;
|
||||
mode = "777";
|
||||
|
|
|
@ -1,15 +1,14 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
fileSystems."/var/lib/syncthing-data" = {
|
||||
device = "172.16.130.7:/nas/5749/syncthinng_data";
|
||||
fsType = "nfs";
|
||||
options = [ "nofail" ];
|
||||
};
|
||||
fileSystems."/var/lib/mastodon" = {
|
||||
device = "172.16.130.7:/nas/5749/mastodon";
|
||||
fsType = "nfs";
|
||||
options = [ "nofail" ];
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
{ factorio-headless, pkgs }:
|
||||
|
||||
factorio-headless.overrideAttrs (_: rec {
|
||||
version = "2.0.23";
|
||||
version = "2.0.28";
|
||||
src = pkgs.fetchurl {
|
||||
name = "factorio_headless_x64-${version}.tar.xz";
|
||||
url = "https://www.factorio.com/get-download/${version}/headless/linux64";
|
||||
hash = "sha256-6Bn8mtbfBhv51L/8kZiN0Y0OOYLIscIsBSXXi9o+8hY=";
|
||||
hash = "sha256-6pk3tq3HoY4XpOHmSZLsOJQHSXs25oKAuxT83UyITdM=";
|
||||
};
|
||||
})
|
||||
|
|
33
scripts/_docker-block-external-connections
Executable file
33
scripts/_docker-block-external-connections
Executable file
|
@ -0,0 +1,33 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Create the DOCKER-USER chain if it doesn't exist
|
||||
iptables -N DOCKER-USER || true
|
||||
|
||||
# Flush existing rules in the DOCKER-USER chain
|
||||
iptables -F DOCKER-USER
|
||||
|
||||
# Get all external network interfaces
|
||||
interfaces=$(
|
||||
ip -o -f inet addr show |
|
||||
awk '{print $2}' |
|
||||
grep -E '^(enp|eth|wlan|wlp)' |
|
||||
sort -u
|
||||
)
|
||||
|
||||
for iface in $interfaces; do
|
||||
# Allow traffic from LAN
|
||||
iptables -A DOCKER-USER -i "$iface" -s 127.0.0.1 -j ACCEPT
|
||||
iptables -A DOCKER-USER -i "$iface" -s 10.0.0.0/8 -j ACCEPT
|
||||
iptables -A DOCKER-USER -i "$iface" -s 192.168.0.0/16 -j ACCEPT
|
||||
|
||||
# Allow established and related connections
|
||||
iptables -A DOCKER-USER -i "$iface" -m state --state RELATED,ESTABLISHED -j ACCEPT
|
||||
|
||||
# Drop all other traffic
|
||||
iptables -A DOCKER-USER -i "$iface" -j DROP
|
||||
|
||||
echo "iptables rules have been set up for interface: $iface"
|
||||
done
|
||||
|
||||
# Return to the previous chain
|
||||
iptables -A DOCKER-USER -j RETURN
|
|
@ -18,7 +18,7 @@ bail() {
|
|||
exit 1
|
||||
}
|
||||
|
||||
if ! [ -d $HWMON ]; then
|
||||
if ! [ -d "$HWMON" ]; then
|
||||
bail "Invalid HWMON"
|
||||
fi
|
||||
|
||||
|
@ -28,20 +28,31 @@ if ! [ -f $TEMP_INPUT ]; then
|
|||
bail "Invalid TEMP_INPUT"
|
||||
fi
|
||||
|
||||
MIN="$2"
|
||||
MAX="$3"
|
||||
TEMP_MIN="$2"
|
||||
TEMP_MAX="$3"
|
||||
|
||||
if [ -z "$TEMP_MIN" ];then
|
||||
bail "No minimum temperature provided"
|
||||
fi
|
||||
|
||||
if [ -z "$TEMP_MAX" ];then
|
||||
bail "No maximum temperature provided"
|
||||
fi
|
||||
|
||||
PWM_MIN=0
|
||||
PWM_MAX=255
|
||||
|
||||
echo "Running..." >&2
|
||||
while true; do
|
||||
TEMPERATURE_RAW=$(cat "$TEMP_INPUT")
|
||||
TEMPERATURE="$(( $TEMPERATURE_RAW / 1000 ))"
|
||||
# Remap from a number between 60_000..90_000 to 0..255
|
||||
PWM=$(( ($TEMPERATURE - $MIN) * 255 / ($MAX - $MIN) ))
|
||||
PWM=$(( ($TEMPERATURE - $TEMP_MIN) * $PWM_MAX / ($TEMP_MAX - $TEMP_MIN) ))
|
||||
|
||||
if [ "$PWM" -gt 255 ]; then
|
||||
PWM=255
|
||||
elif [ "$PWM" -lt 0 ]; then
|
||||
PWM=0
|
||||
if [ "$PWM" -gt $PWM_MAX ]; then
|
||||
PWM=$PWM_MAX
|
||||
elif [ "$PWM" -lt $PWM_MIN ]; then
|
||||
PWM=$PWM_MIN
|
||||
fi
|
||||
|
||||
echo 1 > "$HWMON/pwm1_enable"
|
||||
|
|
|
@ -125,6 +125,12 @@
|
|||
zbar
|
||||
wl-clipboard
|
||||
];
|
||||
git_clean_remote_deleted = [
|
||||
git
|
||||
gnugrep
|
||||
gawk
|
||||
findutils
|
||||
];
|
||||
pint-fmt = [ ];
|
||||
powerplay-led-idle = [
|
||||
bash
|
||||
|
@ -133,6 +139,12 @@
|
|||
];
|
||||
vrr-fullscreen = [ ];
|
||||
controller-battery = [ ];
|
||||
_docker-block-external-connections = [
|
||||
iptables
|
||||
gawk
|
||||
gnugrep
|
||||
iproute2
|
||||
];
|
||||
}
|
||||
// lib.mapAttrs importScript {
|
||||
wdmenu = ./wdmenu.nix;
|
||||
|
|
6
scripts/git_clean_remote_deleted
Executable file
6
scripts/git_clean_remote_deleted
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
git branch -vv \
|
||||
| grep ': gone]' \
|
||||
| awk '{print $1}' \
|
||||
| xargs git branch -D
|
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, ... }:
|
||||
{ pkgs, lib, ... }:
|
||||
{
|
||||
services.flatpak.enable = true;
|
||||
|
||||
|
@ -22,6 +22,8 @@
|
|||
};
|
||||
};
|
||||
|
||||
networking.firewall.extraCommands = lib.getExe pkgs._docker-block-external-connections;
|
||||
|
||||
programs.extra-container.enable = true;
|
||||
|
||||
programs.firejail.enable = true;
|
||||
|
|
|
@ -9,15 +9,15 @@
|
|||
wayland.windowManager.sway = {
|
||||
extraConfig = ''
|
||||
exec thunderbird
|
||||
exec vesktop
|
||||
exec discordcanary
|
||||
exec telegram-desktop
|
||||
'';
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
tdesktop
|
||||
vesktop
|
||||
discord-canary
|
||||
thunderbird
|
||||
element-desktop-wayland
|
||||
element-desktop
|
||||
];
|
||||
}
|
||||
|
|
|
@ -36,8 +36,13 @@ in
|
|||
alias = {
|
||||
graph = "log --graph --oneline --branches";
|
||||
root = "rev-parse --show-toplevel";
|
||||
clean-deleted-remotes = "!" + (lib.getExe pkgs.git_clean_remote_deleted);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
git_clean_remote_deleted
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -127,7 +127,7 @@ in
|
|||
ranger
|
||||
bmenu
|
||||
kak-lsp
|
||||
unstable.kak-tree-sitter
|
||||
kak-tree-sitter
|
||||
kak-pager
|
||||
kak-man-pager
|
||||
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
"Filters": [],
|
||||
"AbsoluteModeSettings": {
|
||||
"Display": {
|
||||
"Width": 960.0,
|
||||
"Height": 540.0,
|
||||
"Width": 1920.0,
|
||||
"Height": 1080.0,
|
||||
"X": 960.0,
|
||||
"Y": 540.0,
|
||||
"Rotation": 0.0
|
||||
|
@ -76,7 +76,7 @@
|
|||
"Settings": [
|
||||
{
|
||||
"Property": "Keys",
|
||||
"Value": "Control+O"
|
||||
"Value": "Control+Shift+Z"
|
||||
}
|
||||
],
|
||||
"Enable": true
|
||||
|
|
|
@ -58,7 +58,6 @@ in
|
|||
{ app_id = "wdisplays"; }
|
||||
{ app_id = "pavucontrol"; }
|
||||
{ app_id = ".*[Hh]elvum.*"; }
|
||||
{ workspace = "9"; }
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue