Compare commits

..

28 commits
teste ... main

Author SHA1 Message Date
Leonardo Eugênio 3773beab41 factorio: auto backup the game saves 2025-01-29 22:46:04 -03:00
Leonardo Eugênio c39cf51646 update 2025-01-28 10:24:22 -03:00
Leonardo Eugênio 42855e7213 home: fix btop gpu support 2025-01-25 18:48:02 -03:00
Leonardo Eugênio 1336203f52 amdgpu: remove manual fan control 2025-01-25 14:28:33 -03:00
Leonardo Eugênio 22d0342233 flake: add treefmt 2025-01-24 11:44:08 -03:00
lelgenio 7fe58549d7 kak-lsp: add intelephense stubs 2025-01-24 11:44:08 -03:00
lelgenio a506e0470d rainbow: update gitlab concurrent runners 2025-01-23 16:08:06 -03:00
Leonardo Eugênio ffd977ef39 amdgpu: update fan controller 2025-01-20 00:31:05 -03:00
Leonardo Eugênio 1d49339612 update 2025-01-19 23:40:19 -03:00
Leonardo Eugênio 2ae616758b amdgpu: update fan controller 2025-01-17 20:29:22 -03:00
Leonardo Eugênio 72dfd33750 phantom: add mastodon storage device 2025-01-17 00:34:11 -03:00
Leonardo Eugênio a36385a4d2 docker: block external connections 2025-01-10 11:06:58 -03:00
Leonardo Eugênio e1601a0aef update 2025-01-08 21:25:01 -03:00
Leonardo Eugênio 8012d3835d OpenTabletDriver: fix shortcuts and revert draw-area to fullscreen 2025-01-08 21:23:37 -03:00
Leonardo Eugênio cf2cc34311 sway: don't force steam into floating window 2025-01-08 21:23:18 -03:00
Leonardo Eugênio eda788a912 monolith: revert to LTS kernel 2025-01-08 21:22:29 -03:00
Leonardo Eugênio 26e013d88f factorio: wait for network connection before starting 2025-01-08 21:21:11 -03:00
Leonardo Eugênio d84480a40d amdgpu: always restart the fan control script 2025-01-08 21:20:45 -03:00
Leonardo Eugênio f98e1ef0b7 amdgpu: remove semingly useless configurations
OBS was causing gpu panics
2025-01-08 21:20:08 -03:00
Leonardo Eugênio 5ff7906392 update 2024-12-30 21:25:58 -03:00
Leonardo Eugênio 56b1f8133e update 2024-12-22 01:21:40 -03:00
Leonardo Eugênio 5d4cfc70a7 factorio: 2.0.23 -> 2.0.28 2024-12-22 01:21:36 -03:00
Leonardo Eugênio 4fecc91b73 chat: switch do vesktop -> discordcanary 2024-12-20 12:51:37 -03:00
lelgenio fad066b258 git: add clean-deleted-remotes command 2024-12-17 16:12:37 -03:00
Leonardo Eugênio b6fd1a25b3 update: 24.11 2024-12-12 21:57:09 -03:00
Leonardo Eugênio f755ab3172 phantom: add lemmy 2024-12-08 19:13:16 -03:00
Leonardo Eugênio 7506219a1e firefox: remove mastodon simplified federation 2024-12-08 18:55:43 -03:00
Leonardo Eugênio 6d5cb05722 tablet: reduce drawing area 2024-12-08 18:55:00 -03:00
35 changed files with 395 additions and 228 deletions

View file

@ -28,11 +28,11 @@
"systems": "systems"
},
"locked": {
"lastModified": 1723293904,
"narHash": "sha256-b+uqzj+Wa6xgMS9aNbX4I+sXeb5biPDi39VgvSFqFvU=",
"lastModified": 1736955230,
"narHash": "sha256-uenf8fv2eG5bKM8C/UvFaiJMZ4IpUFaQxk9OH5t/1gA=",
"owner": "ryantm",
"repo": "agenix",
"rev": "f6291c5935fdc4e0bef208cfc0dcab7e3f7a1c41",
"rev": "e600439ec4c273cf11e06fe4d9d906fb98fa097c",
"type": "github"
},
"original": {
@ -166,9 +166,7 @@
"advisory-db": "advisory-db",
"crane": "crane",
"flake-utils": "flake-utils_2",
"nixpkgs": [
"nixpkgs"
]
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1693509848,
@ -188,9 +186,7 @@
"inputs": {
"fenix": "fenix",
"flake-utils": "flake-utils_3",
"nixpkgs": [
"nixpkgs"
]
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1659395338,
@ -213,11 +209,11 @@
]
},
"locked": {
"lastModified": 1730190761,
"narHash": "sha256-o5m5WzvY6cGIDupuOvjgNSS8AN6yP2iI9MtUC6q/uos=",
"lastModified": 1737038063,
"narHash": "sha256-rMEuiK69MDhjz1JgbaeQ9mBDXMJ2/P8vmOYRbFndXsk=",
"owner": "nix-community",
"repo": "disko",
"rev": "3979285062d6781525cded0f6c4ff92e71376b55",
"rev": "bf0abfde48f469c256f2b0f481c6281ff04a5db2",
"type": "github"
},
"original": {
@ -228,16 +224,14 @@
},
"dzgui-nix": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1727831626,
"narHash": "sha256-Gvt5lapgNRRTL95gFH8vm48f8gjsk7GYM4Qo5aUOzzo=",
"lastModified": 1737831696,
"narHash": "sha256-+MiZ0DmokNycjvoFBddlzPw16GlSHEH7fARWB9RzTas=",
"owner": "lelgenio",
"repo": "dzgui-nix",
"rev": "38cf2b507d75cc36ec127b21fc5a4144fc821525",
"rev": "0f3bc9ab6a2d3afe93007ec742afb71bc8f03f75",
"type": "github"
},
"original": {
@ -371,7 +365,7 @@
},
"flake-utils_5": {
"inputs": {
"systems": "systems_6"
"systems": "systems_5"
},
"locked": {
"lastModified": 1681202837,
@ -389,7 +383,7 @@
},
"flake-utils_6": {
"inputs": {
"systems": "systems_7"
"systems": "systems_6"
},
"locked": {
"lastModified": 1681202837,
@ -407,7 +401,7 @@
},
"flake-utils_7": {
"inputs": {
"systems": "systems_8"
"systems": "systems_7"
},
"locked": {
"lastModified": 1710146030,
@ -446,16 +440,16 @@
]
},
"locked": {
"lastModified": 1726989464,
"narHash": "sha256-Vl+WVTJwutXkimwGprnEtXc/s/s8sMuXzqXaspIGlwM=",
"lastModified": 1736373539,
"narHash": "sha256-dinzAqCjenWDxuy+MqUQq0I4zUSfaCvN9rzuCmgMZJY=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "2f23fa308a7c067e52dfcc30a0758f47043ec176",
"rev": "bd65bc3cde04c16755955630b344bc9e35272c56",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-24.05",
"ref": "release-24.11",
"repo": "home-manager",
"type": "github"
}
@ -464,9 +458,7 @@
"inputs": {
"crane": "crane_2",
"flake-utils": "flake-utils_4",
"nixpkgs": [
"nixpkgs"
]
"nixpkgs": "nixpkgs_4"
},
"locked": {
"lastModified": 1728159958,
@ -489,11 +481,11 @@
]
},
"locked": {
"lastModified": 1729999765,
"narHash": "sha256-LYsavZXitFjjyETZoij8usXjTa7fa9AIF3Sk3MJSX+Y=",
"lastModified": 1737861961,
"narHash": "sha256-LIRtMvAwLGb8pBoamzgEF67oKlNPz4LuXiRPVZf+TpE=",
"owner": "Mic92",
"repo": "nix-index-database",
"rev": "0e3a8778c2ee218eff8de6aacf3d2fa6c33b2d4f",
"rev": "79b7b8eae3243fc5aa9aad34ba6b9bbb2266f523",
"type": "github"
},
"original": {
@ -509,48 +501,61 @@
"nixpkgs": [
"nixpkgs"
],
"nixpkgs-24_05": [
"nixpkgs"
],
"utils": "utils"
"nixpkgs-24_11": "nixpkgs-24_11"
},
"locked": {
"lastModified": 1718084203,
"narHash": "sha256-Cx1xoVfSMv1XDLgKg08CUd1EoTYWB45VmB9XIQzhmzI=",
"lastModified": 1737201600,
"narHash": "sha256-JBh5+g8oQteQdQqbO07dGHBRQo/NGI61JPlTjdfQ1pk=",
"owner": "simple-nixos-mailserver",
"repo": "nixos-mailserver",
"rev": "29916981e7b3b5782dc5085ad18490113f8ff63b",
"rev": "ade37b2765032f83d2d4bd50b6204a40a4c05eb4",
"type": "gitlab"
},
"original": {
"owner": "simple-nixos-mailserver",
"ref": "nixos-24.05",
"ref": "master",
"repo": "nixos-mailserver",
"type": "gitlab"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1730137625,
"narHash": "sha256-9z8oOgFZiaguj+bbi3k4QhAD6JabWrnv7fscC/mt0KE=",
"lastModified": 1684425776,
"narHash": "sha256-eXzSIXkzXa9EecoDF9xCsoim0vd++8dvYU7QOuQMO8A=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "64b80bfb316b57cdb8919a9110ef63393d74382a",
"rev": "8dc174d8b768893172eb3e52008f10f48dfbd5cf",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "release-22.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-24_11": {
"locked": {
"lastModified": 1734083684,
"narHash": "sha256-5fNndbndxSx5d+C/D0p/VF32xDiJCJzyOqorOYW4JEo=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "314e12ba369ccdb9b352a4db26ff419f7c49fa84",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-24.05",
"ref": "nixos-24.11",
"type": "indirect"
}
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1729880355,
"narHash": "sha256-RP+OQ6koQQLX5nw0NmcDrzvGL8HDLnyXt/jHhL1jwjM=",
"lastModified": 1737885589,
"narHash": "sha256-Zf0hSrtzaM1DEz8//+Xs51k/wdSajticVrATqDrfQjg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "18536bf04cd71abd345f9579158841376fdd0c5a",
"rev": "852ff1d9e153d8875a83602e03fdef8a63f0ecf8",
"type": "github"
},
"original": {
@ -559,6 +564,115 @@
"type": "indirect"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1659219666,
"narHash": "sha256-pzYr5fokQPHv7CmUXioOhhzDy/XyWOIXP4LZvv/T7Mk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "7b9be38c7250b22d829ab6effdee90d5e40c6e5c",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-unstable",
"type": "indirect"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1732812356,
"narHash": "sha256-LNcgjOLArRlx2W6XSi0yc0xwLjrK3KF9LxAMqUgFDgw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "581d7e4d23b91daf2afa0005a5d3d01d6a8884fe",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixpkgs-unstable",
"type": "indirect"
}
},
"nixpkgs_4": {
"locked": {
"lastModified": 1719010183,
"narHash": "sha256-8HMWaqpyjbVeEsmy/A2H6VFtW/Wr71vkPLnpTiAXu+8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "0f620ca71fa69abb411a6c78739a9b171a0a95a6",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "release-24.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_5": {
"locked": {
"lastModified": 1737885640,
"narHash": "sha256-GFzPxJzTd1rPIVD4IW+GwJlyGwBDV1Tj5FLYwDQQ9sM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "4e96537f163fad24ed9eb317798a79afc85b51b7",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-24.11",
"type": "indirect"
}
},
"nixpkgs_6": {
"locked": {
"lastModified": 1735554305,
"narHash": "sha256-zExSA1i/b+1NMRhGGLtNfFGXgLtgo+dcuzHzaWA6w3Q=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "0e82ab234249d8eee3e8c91437802b32c74bb3fd",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_7": {
"locked": {
"lastModified": 1719010183,
"narHash": "sha256-8HMWaqpyjbVeEsmy/A2H6VFtW/Wr71vkPLnpTiAXu+8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "0f620ca71fa69abb411a6c78739a9b171a0a95a6",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "release-24.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_8": {
"locked": {
"lastModified": 1714091391,
"narHash": "sha256-68n3GBvlm1MIeJXadPzQ3v8Y9sIW3zmv8gI5w5sliC8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "4c86138ce486d601d956a165e2f7a0fc029a03c1",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"plymouth-themes": {
"flake": false,
"locked": {
@ -578,11 +692,11 @@
"ranger-icons": {
"flake": false,
"locked": {
"lastModified": 1713564482,
"narHash": "sha256-sijO9leDXgnjgcVlh5fKYalhjOupwFMRyH0xh2g/rEQ=",
"lastModified": 1736375293,
"narHash": "sha256-ck53eG+mGIQ706sUnEHbJ6vY1/LYnRcpq94JXzwnGTQ=",
"owner": "alexanderjeurissen",
"repo": "ranger_devicons",
"rev": "a8d626485ca83719e1d8d5e32289cd96a097c861",
"rev": "f227f212e14996fbb366f945ec3ecaf5dc5f44b0",
"type": "github"
},
"original": {
@ -604,12 +718,13 @@
"made-you-look": "made-you-look",
"nix-index-database": "nix-index-database",
"nixos-mailserver": "nixos-mailserver",
"nixpkgs": "nixpkgs",
"nixpkgs": "nixpkgs_5",
"nixpkgs-unstable": "nixpkgs-unstable",
"plymouth-themes": "plymouth-themes",
"ranger-icons": "ranger-icons",
"tlauncher": "tlauncher",
"tomater": "tomater",
"treefmt-nix": "treefmt-nix",
"vpsadminos": "vpsadminos",
"warthunder-leak-counter": "warthunder-leak-counter",
"wl-crosshair": "wl-crosshair",
@ -765,21 +880,6 @@
"type": "github"
}
},
"systems_8": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"tlauncher": {
"inputs": {
"flake-utils": "flake-utils_5",
@ -788,11 +888,11 @@
]
},
"locked": {
"lastModified": 1684504342,
"narHash": "sha256-rJ0eH7BuPizvXPc+LjVtovse4gWEuxP2WiyNdXjPNL4=",
"lastModified": 1734044605,
"narHash": "sha256-CeCYv3JFJIySSf2eX9ceEOF1FqNGeJnzEuO5f+OvioQ=",
"ref": "refs/heads/main",
"rev": "add4df7220bd0b85177a1938c02b60c966c5eb71",
"revCount": 3,
"rev": "6a68f2cda0aa2fbb399a4c43b445e8c1a2df0634",
"revCount": 4,
"type": "git",
"url": "https://git.lelgenio.xyz/lelgenio/tlauncher-nix"
},
@ -817,31 +917,31 @@
"url": "https://git.lelgenio.com/lelgenio/tomater"
}
},
"utils": {
"treefmt-nix": {
"inputs": {
"systems": "systems_5"
"nixpkgs": "nixpkgs_6"
},
"locked": {
"lastModified": 1709126324,
"narHash": "sha256-q6EQdSeUZOG26WelxqkmR7kArjgWCdw5sfJVHPH/7j8=",
"lastModified": 1737483750,
"narHash": "sha256-5An1wq5U8sNycOBBg3nsDDgpwBmR9liOpDGlhliA6Xo=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "d465f4819400de7c8d874d50b982301f28a84605",
"repo": "treefmt-nix",
"rev": "f2cc121df15418d028a59c9737d38e3a90fbaf8f",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"repo": "treefmt-nix",
"type": "github"
}
},
"vpsadminos": {
"locked": {
"lastModified": 1730290190,
"narHash": "sha256-a+op2lnWrCytuEhLOE24SKR/irRfjwDEHkpLyAL5P90=",
"lastModified": 1737943400,
"narHash": "sha256-2BqPlxdK4vvZYtYL+wVhch+U9/ZJrue5/t+VJsWqc+8=",
"owner": "vpsfreecz",
"repo": "vpsadminos",
"rev": "63ac771b9667b45ab2ea87363f69ca7f85668e9b",
"rev": "bced91cd0b47d61e648d1c254351206a3395c08a",
"type": "github"
},
"original": {
@ -854,9 +954,7 @@
"inputs": {
"crane": "crane_3",
"flake-utils": "flake-utils_6",
"nixpkgs": [
"nixpkgs"
]
"nixpkgs": "nixpkgs_7"
},
"locked": {
"lastModified": 1719076817,
@ -875,9 +973,7 @@
"wl-crosshair": {
"inputs": {
"flake-utils": "flake-utils_7",
"nixpkgs": [
"nixpkgs"
]
"nixpkgs": "nixpkgs_8"
},
"locked": {
"lastModified": 1715216838,

View file

@ -1,10 +1,10 @@
{
description = "My system config";
inputs = {
nixpkgs.url = "nixpkgs/nixos-24.05";
nixpkgs.url = "nixpkgs/nixos-24.11";
nixpkgs-unstable.url = "nixpkgs/nixos-unstable";
home-manager.url = "github:nix-community/home-manager/release-24.05";
home-manager.url = "github:nix-community/home-manager/release-24.11";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
vpsadminos.url = "github:vpsfreecz/vpsadminos";
@ -27,45 +27,30 @@
};
nixos-mailserver = {
url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-24.05";
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";
inputs.nixpkgs.follows = "nixpkgs";
};
dzgui-nix.url = "github:lelgenio/dzgui-nix";
tlauncher = {
url = "git+https://git.lelgenio.xyz/lelgenio/tlauncher-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
disko.url = "github:nix-community/disko";
disko.inputs.nixpkgs.follows = "nixpkgs";
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
treefmt-nix.url = "github:numtide/treefmt-nix";
# my stuff
dhist = {
url = "github:lelgenio/dhist";
inputs.nixpkgs.follows = "nixpkgs";
};
demoji = {
url = "github:lelgenio/demoji";
inputs.nixpkgs.follows = "nixpkgs";
};
wl-crosshair = {
url = "github:lelgenio/wl-crosshair";
inputs.nixpkgs.follows = "nixpkgs";
};
warthunder-leak-counter = {
url = "git+https://git.lelgenio.com/lelgenio/warthunder-leak-counter";
inputs.nixpkgs.follows = "nixpkgs";
};
made-you-look = {
url = "git+https://git.lelgenio.com/lelgenio/made-you-look";
inputs.nixpkgs.follows = "nixpkgs";
};
dhist.url = "github:lelgenio/dhist";
demoji.url = "github:lelgenio/demoji";
wl-crosshair.url = "github:lelgenio/wl-crosshair";
warthunder-leak-counter.url = "git+https://git.lelgenio.com/lelgenio/warthunder-leak-counter";
made-you-look.url = "git+https://git.lelgenio.com/lelgenio/made-you-look";
catboy-spinner = {
url = "git+https://git.lelgenio.com/lelgenio/catboy-spinner";
flake = false;
@ -115,7 +100,6 @@
{ login-manager.greetd.enable = desktop == "sway"; }
inputs.agenix.nixosModules.default
inputs.dzgui-nix.nixosModules.default
inputs.home-manager.nixosModules.home-manager
inputs.disko.nixosModules.disko
{
@ -194,6 +178,7 @@
packages.${system} = pkgs // packages;
formatter.${system} = pkgs.nixfmt-rfc-style;
# formatter.${system} = pkgs.nixfmt-rfc-style;
formatter.${system} = (inputs.treefmt-nix.lib.evalModule pkgs ./treefmt.nix).config.build.wrapper;
};
}

View file

@ -37,7 +37,8 @@ in
options = [ "subvol=@" ] ++ btrfs_options ++ btrfs_ssd;
};
boot.initrd.luks.devices."luks-d6573cf8-25f0-4ffc-8046-ac3a4db1e964".device = "/dev/disk/by-uuid/d6573cf8-25f0-4ffc-8046-ac3a4db1e964";
boot.initrd.luks.devices."luks-d6573cf8-25f0-4ffc-8046-ac3a4db1e964".device =
"/dev/disk/by-uuid/d6573cf8-25f0-4ffc-8046-ac3a4db1e964";
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/97EB-7DB5";

View file

@ -1,4 +1,4 @@
{ pkgs, lib, ... }:
{ pkgs, ... }:
let
undervoltGpu = pkgs.writeShellScript "undervolt-gpu" ''
set -xe
@ -13,29 +13,14 @@ in
{
boot.initrd.kernelModules = [ "amdgpu" ];
boot.kernelParams = [
"amdgpu.dcdebugmask=0x10" # amdgpu undervolting bug
"video=DP-1:1920x1080@144"
"amdgpu.ppfeaturemask=0xfffd7fff" # enable undervolting
];
systemd.services.amd-fan-control = {
script = ''
${lib.getExe pkgs.amd-fan-control} /sys/class/drm/card1/device 60 85
'';
wantedBy = [ "multi-user.target" ];
};
hardware.graphics.enable32Bit = true;
hardware.opengl.driSupport = true;
# # For 32 bit applications
hardware.opengl.driSupport32Bit = true;
hardware.opengl.extraPackages = with pkgs; [
hardware.graphics.extraPackages = with pkgs; [
libva
libvdpau
vaapiVdpau
rocm-opencl-icd
rocm-opencl-runtime
rocmPackages.rocm-smi
];
services.udev.extraRules = ''

View file

@ -35,9 +35,11 @@ in
"sd_mod"
];
hardware.opentabletdriver.enable = true;
boot.kernelPackages = pkgs.linuxPackages_latest;
hardware.opentabletdriver = {
enable = true;
# TODO: remove this once otd gets updated
package = pkgs.unstable.opentabletdriver;
};
boot.extraModulePackages = with config.boot.kernelPackages; [ zenpower ];

View file

@ -1,4 +1,9 @@
{ config, pkgs, ... }:
{
config,
pkgs,
lib,
...
}:
{
services.factorio = {
enable = true;
@ -10,6 +15,33 @@
extraSettingsFile = config.age.secrets.factorio-settings.path;
};
systemd.services.factorio = {
after = [ "network-online.target" ];
wants = [ "network-online.target" ];
};
systemd.services.factorio-backup-save = {
description = "Backup factorio saves";
script = ''
${lib.getExe pkgs.rsync} \
-av \
--chown=lelgenio \
/var/lib/factorio/saves/default.zip \
~lelgenio/Documentos/GameSaves/factorio_saves/space-age-$(date --iso=seconds).zip
'';
serviceConfig.Type = "oneshot";
wantedBy = [ "multi-user.target" ];
};
systemd.timers.factorio-backup-save = {
timerConfig = {
OnCalendar = "*-*-* 18:00:00";
Persistent = true;
Unit = "factorio-backup-save.service";
};
wantedBy = [ "timers.target" ];
};
age.secrets.factorio-settings = {
file = ../../secrets/factorio-settings.age;
mode = "777";

View file

@ -11,6 +11,7 @@
../../system/nix.nix
./hardware-config.nix
./mastodon.nix
./lemmy.nix
./nextcloud.nix
./nginx.nix
./syncthing.nix

View file

@ -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 = [
{

18
hosts/phantom/lemmy.nix Normal file
View file

@ -0,0 +1,18 @@
{ pkgs, ... }:
{
services.lemmy = {
enable = true;
settings = {
hostname = "lemmy.lelgenio.com";
};
database.createLocally = true;
nginx.enable = true;
};
services.pict-rs.package = pkgs.pict-rs;
services.nginx.virtualHosts."lemmy.lelgenio.com" = {
enableACME = true;
forceSSL = true;
};
}

View file

@ -7,7 +7,7 @@
{
services.nextcloud = {
enable = true;
package = pkgs.nextcloud29;
package = pkgs.nextcloud30;
hostName = "cloud.lelgenio.com";
https = true;
config = {

View file

@ -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=";
};
})

View file

@ -5,7 +5,6 @@
wrapGAppsHook,
gtk3,
gobject-introspection,
gnome,
}:
let

View 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

View file

@ -1,50 +0,0 @@
#!/usr/bin/env bash
set -e
DEVICE="$1" # eg: /sys/class/drm/card1/device
HWMON=$(echo "$DEVICE"/hwmon/hwmon*)
exit() {
echo "Setting controll to auto" >&2
echo 2 > "$HWMON/pwm1_enable"
}
trap exit EXIT INT
bail() {
echo "Error: $@" >&2
echo "Exiting..." >&2
exit 1
}
if ! [ -d $HWMON ]; then
bail "Invalid HWMON"
fi
TEMP_INPUT="$HWMON/temp2_input"
if ! [ -f $TEMP_INPUT ]; then
bail "Invalid TEMP_INPUT"
fi
MIN="$2"
MAX="$3"
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) ))
if [ "$PWM" -gt 255 ]; then
PWM=255
elif [ "$PWM" -lt 0 ]; then
PWM=0
fi
echo 1 > "$HWMON/pwm1_enable"
echo "$PWM" > "$HWMON/pwm1"
sleep .1s
done

View file

@ -23,7 +23,6 @@
in
with final;
createScripts {
amd-fan-control = [ bash ];
br = [ ];
bmenu = [
bemenu
@ -125,6 +124,12 @@
zbar
wl-clipboard
];
git_clean_remote_deleted = [
git
gnugrep
gawk
findutils
];
pint-fmt = [ ];
powerplay-led-idle = [
bash
@ -133,6 +138,12 @@
];
vrr-fullscreen = [ ];
controller-battery = [ ];
_docker-block-external-connections = [
iptables
gawk
gnugrep
iproute2
];
}
// lib.mapAttrs importScript {
wdmenu = ./wdmenu.nix;

View file

@ -0,0 +1,6 @@
#!/bin/sh
git branch -vv \
| grep ': gone]' \
| awk '{print $1}' \
| xargs git branch -D

View file

@ -43,7 +43,7 @@
glib # gsettings
usbutils
# dracula-theme # gtk theme
gnome3.adwaita-icon-theme # default gnome cursors
adwaita-icon-theme # default gnome cursors
];
services.geoclue2.enable = true;

View file

@ -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;

View file

@ -3,7 +3,7 @@
fonts.enableDefaultPackages = true;
fonts.packages = with pkgs; [
noto-fonts
noto-fonts-cjk
noto-fonts-cjk-sans
noto-fonts-emoji
nerdfonts_fira_hack
];

View file

@ -44,7 +44,7 @@ in
];
};
extraOptions = ''
experimental-features = nix-command flakes repl-flake
experimental-features = nix-command flakes
'';
};
}

View file

@ -12,7 +12,7 @@ in
virtualisation.docker.enable = true;
services.gitlab-runner = {
enable = true;
settings.concurrent = 1;
settings.concurrent = 6;
services = {
thoreb-telemetria-nix = mkNixRunner config.age.secrets.gitlab-runner-thoreb-telemetria-registrationConfigFile.path;
thoreb-itinerario-nix = mkNixRunner config.age.secrets.rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.path;

View file

@ -1,6 +1,5 @@
{ pkgs, ... }:
{
sound.enable = true;
hardware.pulseaudio.enable = false;
services.pipewire = {
enable = true;

View file

@ -31,7 +31,6 @@
environment.systemPackages = with pkgs; [
protontricks
bottles
inputs.dzgui-nix.packages.${pkgs.system}.default
];
programs.dzgui.enable = true;
}

8
treefmt.nix Normal file
View file

@ -0,0 +1,8 @@
{ pkgs, ... }:
{
projectRootFile = "flake.nix";
programs.nixfmt.enable = true;
programs.nixfmt.package = pkgs.nixfmt-rfc-style;
settings.on-unmatched = "debug";
}

View file

@ -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
];
}

View file

@ -61,11 +61,6 @@ in
hash = "sha256-ApCc+MNmW9Wd/5seV6npePQVEaszT/rhD9EB7HGiUb8=";
})
(pkgs.fetchFirefoxAddon {
name = "mastodon_simplified_federation";
url = "https://addons.mozilla.org/firefox/downloads/file/4215691/mastodon_simplified_federation-2.2.xpi";
hash = "sha256-4iU25chpjsdsMTPaa0yQOTWc9V9q1qFz6YV0lYtNjLA=";
})
(pkgs.fetchFirefoxAddon {
name = "substitoot";
url = "https://addons.mozilla.org/firefox/downloads/file/4236602/substitoot-0.7.2.0.xpi";
@ -128,6 +123,7 @@ in
if desktop == "sway" then
''
#titlebar { display: none !important; }
#TabsToolbar { display: none !important; }
#sidebar-header { display: none !important; }
''
else

View file

@ -13,7 +13,36 @@ in
enable = true;
lfs.enable = true;
extraConfig = {
user = {
name = username;
email = mail.personal.user;
};
init.defaultBranch = "main";
commit.verbose = true;
push.autoSetupRemote = true;
pull.rebase = true;
merge.conflictStyle = "diff3";
rerere.enabled = true;
rebase = {
abbreviateCommands = true;
autoSquash = true;
autoStash = true;
};
pager = {
log = "${pkgs._diffr}/bin/_diffr | ${pkgs.kak-pager}/bin/kak-pager";
show = "${pkgs._diffr}/bin/_diffr | ${pkgs.kak-pager}/bin/kak-pager";
diff = "${pkgs._diffr}/bin/_diffr | ${pkgs.kak-pager}/bin/kak-pager";
};
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
];
};
}

View file

@ -10,7 +10,7 @@ lib.mkIf (config.my.desktop == "gnome") {
home.pointerCursor = {
name = "Adwaita";
size = 24;
package = pkgs.gnome.adwaita-icon-theme;
package = pkgs.adwaita-icon-theme;
gtk.enable = true;
};
@ -42,7 +42,7 @@ lib.mkIf (config.my.desktop == "gnome") {
qt6Packages.qtstyleplugin-kvantum
];
services.gpg-agent.pinentryPackage = pkgs.pinentry-gnome3;
services.gpg-agent.pinentryPackage = pkgs.pinentry-gnome;
xdg.defaultApplications = {
enable = lib.mkForce false;

View file

@ -75,7 +75,7 @@
comma
# System monitors
(btop.override { cudaSupport = true; })
(btop.override { rocmSupport = true; })
amdgpu_top
inxi
dmidecode

View file

@ -127,7 +127,7 @@ in
ranger
bmenu
kak-lsp
unstable.kak-tree-sitter
kak-tree-sitter
kak-pager
kak-man-pager

View file

@ -104,6 +104,19 @@ files.exclude = [
"**/bower_components/**",
"**/resources/views/**"
]
stubs = [
"apache", "bcmath", "bz2", "calendar", "com_dotnet", "Core", "ctype",
"curl", "date", "dba", "dom", "enchant", "exif", "FFI", "fileinfo", "filter",
"fpm", "ftp", "gd", "gettext", "gmp", "hash", "iconv", "imagick", "imap",
"intl", "json", "ldap", "libxml", "mbstring", "meta", "mysqli", "oci8",
"odbc", "openssl", "pcntl", "pcre", "PDO", "pdo_ibm", "pdo_mysql", "pdo_pgsql",
"pdo_sqlite", "pgsql", "Phar", "posix", "pspell", "readline", "Reflection",
"session", "shmop", "SimpleXML", "snmp", "soap", "sockets", "sodium",
"SPL", "sqlite3", "standard", "superglobals", "sysvmsg", "sysvsem", "sysvshm",
"tidy", "tokenizer", "xml", "xmlreader", "xmlrpc", "xmlwriter", "xsl",
"Zend OPcache", "zip", "zlib",
]
[language_server.rust-analyzer]
filetypes = ["rust"]

View file

@ -76,7 +76,7 @@
"Settings": [
{
"Property": "Keys",
"Value": "Control+O"
"Value": "Control+Shift+Z"
}
],
"Enable": true

View file

@ -58,7 +58,6 @@ in
{ app_id = "wdisplays"; }
{ app_id = "pavucontrol"; }
{ app_id = ".*[Hh]elvum.*"; }
{ workspace = "9"; }
];
};
};

View file

@ -166,7 +166,8 @@ let
other_binds = {
"${mod}+p" = "exec ${pkgs.wpass}/bin/wpass";
"${mod}+s" = "exec ${menu}";
"${mod}+g" = "exec ${pkgs.demoji}/bin/demoji --lang pt --fallback --copy -- ${pkgs.wdmenu}/bin/wdmenu";
"${mod}+g" =
"exec ${pkgs.demoji}/bin/demoji --lang pt --fallback --copy -- ${pkgs.wdmenu}/bin/wdmenu";
"${mod}+c" = "exec ${pkgs.color_picker}/bin/color_picker";
"${mod}+Return" = "exec ${terminal}";
"${mod}+Ctrl+Return" = "exec thunar";

View file

@ -12,8 +12,11 @@
};
home.file = {
"${config.home.homeDirectory}/.config/VSCodium/User/keybindings.json".source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/projects/nixos-config/user/vscode/keybindings.json";
"${config.home.homeDirectory}/.config/VSCodium/User/settings.json".source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/projects/nixos-config/user/vscode/settings.json";
"${config.home.homeDirectory}/.config/VSCodium/product.json".source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/projects/nixos-config/user/vscode/product.json";
"${config.home.homeDirectory}/.config/VSCodium/User/keybindings.json".source =
config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/projects/nixos-config/user/vscode/keybindings.json";
"${config.home.homeDirectory}/.config/VSCodium/User/settings.json".source =
config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/projects/nixos-config/user/vscode/settings.json";
"${config.home.homeDirectory}/.config/VSCodium/product.json".source =
config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/projects/nixos-config/user/vscode/product.json";
};
}