mirror of
https://github.com/tomasriveral/nixos.git
synced 2026-10-12 17:30:55 +02:00
Compare commits
67
Commits
laptop
...
98bc46e67f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
98bc46e67f | ||
|
|
d0b7183849 | ||
|
|
cea0d0e3f8 | ||
|
|
a4c66b4aff | ||
|
|
56a9bba86b | ||
|
|
1dab571e12 | ||
|
|
93f7328a3b | ||
|
|
07c2293f77 | ||
|
|
0e222a9c50 | ||
|
|
d1125d1571 | ||
|
|
550413c6b1 | ||
|
|
b4537796a2 | ||
|
|
4c0fbc5f0e | ||
|
|
d0a9511ff7 | ||
|
|
262476404e | ||
|
|
9f9906d423 | ||
|
|
0d616266ff | ||
|
|
7f74878433 | ||
|
|
6b282b5344 | ||
|
|
19fd3ec35d | ||
|
|
324d54683c | ||
|
|
0030034418 | ||
|
|
fb7be79e86 | ||
|
|
5db8135dd5 | ||
|
|
2107d23209 | ||
|
|
c235a0a724 | ||
|
|
77f4b0fc5f | ||
|
|
1642dc97ca | ||
|
|
2b59031896 | ||
|
|
3fc66623f2 | ||
|
|
d323e9f702 | ||
|
|
25813d8ab5 | ||
|
|
05ef065d75 | ||
|
|
2722840919 | ||
|
|
9e862337ca | ||
|
|
876ec4ce21 | ||
|
|
e2b7fd8a64 | ||
|
|
752957818b | ||
|
|
1c600dbf3c | ||
|
|
4a648b7f7c | ||
|
|
67d21671c5 | ||
|
|
b8d8ef1aa8 | ||
|
|
2d16f3893b | ||
|
|
2a0c85275f | ||
|
|
23a9fdd4e8 | ||
|
|
246412ae4b | ||
|
|
88eb91c780 | ||
|
|
3b73438d4f | ||
|
|
8088f78f05 | ||
|
|
3b89cf7b35 | ||
|
|
89eb25ca7d | ||
|
|
3ea36fa6bb | ||
|
|
3d468572d5 | ||
|
|
d23c6979f9 | ||
|
|
552d898680 | ||
|
|
5b7c43c8f9 | ||
|
|
f1e9c76d02 | ||
|
|
37f76a4439 | ||
|
|
143f699365 | ||
|
|
d20f0d87d5 | ||
|
|
45639e2531 | ||
|
|
2d2d4fd4a8 | ||
|
|
d49c7ba99e | ||
|
|
29554e41ca | ||
|
|
2a318bdced | ||
|
|
763bbbacd4 | ||
|
|
99f1dd3ec8 |
No files matched your search
Generated
+19
-19
@@ -11,11 +11,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1780375472,
|
"lastModified": 1781239472,
|
||||||
"narHash": "sha256-Q8RAJoYlakA6B2I5DVcuxzNbhCNU1nnIjqQZYP1KGrM=",
|
"narHash": "sha256-WFL8jZMWNH1tx3UwaJ9aa9NN25uOEJ9mbKPRNQJY/xM=",
|
||||||
"owner": "caelestia-dots",
|
"owner": "caelestia-dots",
|
||||||
"repo": "cli",
|
"repo": "cli",
|
||||||
"rev": "d1c8c8fc09738d1b40576e97c274b4a11a2e0ac7",
|
"rev": "3f3229aed4f36752a02fd870fd6cad94bd76555f",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -34,11 +34,11 @@
|
|||||||
"quickshell": "quickshell"
|
"quickshell": "quickshell"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1781178648,
|
"lastModified": 1781408632,
|
||||||
"narHash": "sha256-z6V1T7MHShM7TfFIMCDp94Bi1Wk9LJfK96vm8YFGY5M=",
|
"narHash": "sha256-kYVf3Jye4UhyBrtubYcSrmVyFv9uqOY2JvjmElFiZHE=",
|
||||||
"owner": "caelestia-dots",
|
"owner": "caelestia-dots",
|
||||||
"repo": "shell",
|
"repo": "shell",
|
||||||
"rev": "a16c957a8bd13e0cfd09928ca0a22fecd3681e44",
|
"rev": "f86c359cd90530bacc800e94e35ffbebecd3f58f",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -164,11 +164,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1780928816,
|
"lastModified": 1781373243,
|
||||||
"narHash": "sha256-s4wU4nfs8xsXvwPtD0yebTPaOgmtDesmEvWuKFES6cE=",
|
"narHash": "sha256-CpZ5FEU1BtW6K4FywtCCE2wJs6R/Ifps3etRDh8NJ9w=",
|
||||||
"owner": "tomasriveral",
|
"owner": "tomasriveral",
|
||||||
"repo": "nix-git-cherry-picker",
|
"repo": "nix-git-cherry-picker",
|
||||||
"rev": "785b747ebca67f3e11b49ef5a85f9d3635bfe85d",
|
"rev": "9865dba535620831ae7cab395bf404f8f464df0e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -179,11 +179,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1780902259,
|
"lastModified": 1781216227,
|
||||||
"narHash": "sha256-q8yYEC5f1mFlQO9RGna4LTc9QrcvWunX6FYp83munkQ=",
|
"narHash": "sha256-9mUW6gNwoN2SWc/l0fW4svPNOulXLl8ijqKyeSOGgJE=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "bd0ff2d3eac24699c3664d5966b9ef36f388e2ca",
|
"rev": "a0374025a863d007d98e3297f6aa46cc3141c2f0",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -233,11 +233,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-unstable": {
|
"nixpkgs-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1781268102,
|
"lastModified": 1781328464,
|
||||||
"narHash": "sha256-Zn5KTggEmUB3lXn/ccERNcBdddE6IaOFber9dWViWDg=",
|
"narHash": "sha256-j9uBlHI0eJ9zWU9IlF6SlBBPdeJu30hcvar31IRKHpw=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "49a4bd0573c376468dd7996ddb6f9fa31d8c4d97",
|
"rev": "5a722a7155bfc9fbe657f28d26b71860d95324bc",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -302,11 +302,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1780303737,
|
"lastModified": 1781053488,
|
||||||
"narHash": "sha256-7HgdJBG4BgAPDyHKKxWtxj7nziqsQo6zQCXtwy+L9fs=",
|
"narHash": "sha256-P4WEBaKgl8flRckHxXGHzT0potPvB3x8ZFIp9gLEAMY=",
|
||||||
"ref": "refs/heads/master",
|
"ref": "refs/heads/master",
|
||||||
"rev": "b66495fcc5022681b56b61f928c7acbe910e722c",
|
"rev": "d99d87d5e5ec4e696815348692fdaaf0b6be1b2c",
|
||||||
"revCount": 821,
|
"revCount": 822,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://git.outfoxxed.me/outfoxxed/quickshell"
|
"url": "https://git.outfoxxed.me/outfoxxed/quickshell"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -70,7 +70,8 @@
|
|||||||
"steam"
|
"steam"
|
||||||
"steam-unwrapped"
|
"steam-unwrapped"
|
||||||
"cheatsheet.nvim"
|
"cheatsheet.nvim"
|
||||||
"zoom-us" "zoom"
|
"zoom-us"
|
||||||
|
"zoom"
|
||||||
];
|
];
|
||||||
mkUnfreePredicate = pkg:
|
mkUnfreePredicate = pkg:
|
||||||
builtins.elem (inputs.nixpkgs.lib.getName pkg) unfreePkgs;
|
builtins.elem (inputs.nixpkgs.lib.getName pkg) unfreePkgs;
|
||||||
|
|||||||
@@ -164,6 +164,10 @@
|
|||||||
install_url = "https://addons.mozilla.org/firefox/downloads/file/4790089/consumer_rights_wiki-latest.xpi";
|
install_url = "https://addons.mozilla.org/firefox/downloads/file/4790089/consumer_rights_wiki-latest.xpi";
|
||||||
installation_mode = "force_installed";
|
installation_mode = "force_installed";
|
||||||
};
|
};
|
||||||
|
"archivebox@tjhorner.dev" = {
|
||||||
|
install_url = "https://addons.mozilla.org/firefox/downloads/file/4820668/archivebox_exporter-latest.xpi";
|
||||||
|
installation_mode = "force_installed";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
DisableTelemetry = true;
|
DisableTelemetry = true;
|
||||||
DisableFirefoxStudies = true;
|
DisableFirefoxStudies = true;
|
||||||
@@ -344,12 +348,6 @@
|
|||||||
keyword = "nixpkgs tracker";
|
keyword = "nixpkgs tracker";
|
||||||
url = "https://nixpk.gs/pr-tracker.html";
|
url = "https://nixpk.gs/pr-tracker.html";
|
||||||
}
|
}
|
||||||
{
|
|
||||||
name = "fahrlehrer";
|
|
||||||
tags = ["theorie" "fahrlehrer" "conduite"];
|
|
||||||
keyword = "fahrlehrer24";
|
|
||||||
url = "https://app.fahrlehrer24.ch/";
|
|
||||||
}
|
|
||||||
{
|
{
|
||||||
name = "cogito";
|
name = "cogito";
|
||||||
tags = ["cogito" "esprit" "critique"];
|
tags = ["cogito" "esprit" "critique"];
|
||||||
@@ -398,6 +396,12 @@
|
|||||||
keyword = "rryan-tm logs";
|
keyword = "rryan-tm logs";
|
||||||
url = "https://nixpkgs-update-logs.nix-community.org";
|
url = "https://nixpkgs-update-logs.nix-community.org";
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
name = "Nix function search";
|
||||||
|
tags = ["nixpkgs" "nix" "search"];
|
||||||
|
keyword = "nix function search";
|
||||||
|
url = "https://noogle.dev";
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
search = {
|
search = {
|
||||||
|
|||||||
@@ -57,14 +57,13 @@
|
|||||||
"if [ -e \"/home/tomasr/icloudSync.sh\" ]; then /home/tomasr/icloudSync.sh; else notify-send \"icloudSync.sh doesn't exist\" \"See ~/nixos/modules/applications/hyprland.nix for more information\"; fi"
|
"if [ -e \"/home/tomasr/icloudSync.sh\" ]; then /home/tomasr/icloudSync.sh; else notify-send \"icloudSync.sh doesn't exist\" \"See ~/nixos/modules/applications/hyprland.nix for more information\"; fi"
|
||||||
# my icloud account uses an email that I don't want to make public. So the script isnt pushed to github. The script looks like:
|
# my icloud account uses an email that I don't want to make public. So the script isnt pushed to github. The script looks like:
|
||||||
/*
|
/*
|
||||||
#!/etc/profiles/per-user/tomasr/bin/zsh
|
#!/etc/profiles/per-user/tomasr/bin/zsh
|
||||||
if ! icloudpd --auth-only --username tomas.rivera_2009@icloud.com --dry-run; then
|
if ! icloudpd --auth-only --username tomas.rivera_2009@icloud.com --dry-run; then
|
||||||
notify-send "icloudpd is not logged in" "Please run icloudpd icloudpd --username my@email.address --password my_password --auth-only"
|
notify-send "icloudpd is not logged in" "Please run icloudpd icloudpd --username my@email.address --password my_password --auth-only"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
icloudpd --directory ~/hdd/kdrive/Photo/IPhone/icloudpd-backup --username tomas.rivera_2009@icloud.com --watch-with-interval 3600 --no-progress-bar
|
icloudpd --directory ~/hdd/kdrive/Photo/IPhone/icloudpd-backup --username tomas.rivera_2009@icloud.com --watch-with-interval 3600 --no-progress-bar
|
||||||
*/
|
*/
|
||||||
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -289,7 +288,6 @@
|
|||||||
"custom-checkKdrive && custom-mountkdrive" # checks if the remote works and mount it
|
"custom-checkKdrive && custom-mountkdrive" # checks if the remote works and mount it
|
||||||
#"waybar"
|
#"waybar"
|
||||||
"custom-gitnotify"
|
"custom-gitnotify"
|
||||||
"custom-checkMatrix" # checks if matrix-commander-rs is connected which is important for other stuff
|
|
||||||
#"custom-obsidianbackup" # backups the obsidian notes to kdrive and to a timed hidden dir (~/.Notes.backup/)
|
#"custom-obsidianbackup" # backups the obsidian notes to kdrive and to a timed hidden dir (~/.Notes.backup/)
|
||||||
#"QS-notifycache" # builds the cache that will be used for the notification history
|
#"QS-notifycache" # builds the cache that will be used for the notification history
|
||||||
"sleep 4 & caelestia-shell" #works better if it sleeps a bit before
|
"sleep 4 & caelestia-shell" #works better if it sleeps a bit before
|
||||||
|
|||||||
@@ -35,8 +35,8 @@
|
|||||||
CPUWeight = 1; # minimum relative CPU share
|
CPUWeight = 1; # minimum relative CPU share
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
systemd.user.timers.kdrive-sync = {
|
systemd.user.timers.kdrive-sync = {
|
||||||
wantedBy = [ "timers.target" ];
|
wantedBy = ["timers.target"];
|
||||||
timerConfig = {
|
timerConfig = {
|
||||||
OnBootSec = "10m";
|
OnBootSec = "10m";
|
||||||
OnUnitActiveSec = "1h";
|
OnUnitActiveSec = "1h";
|
||||||
@@ -48,11 +48,12 @@
|
|||||||
name = "custom-checkKdrive";
|
name = "custom-checkKdrive";
|
||||||
runtimeInputs = with pkgs; [
|
runtimeInputs = with pkgs; [
|
||||||
rclone
|
rclone
|
||||||
matrix-commander-rs
|
curl
|
||||||
libnotify
|
libnotify
|
||||||
];
|
];
|
||||||
text = ''
|
text = ''
|
||||||
|
# shellcheck disable=SC1091
|
||||||
|
source /run/agenix/ntfy
|
||||||
# waits for an internet connection. It pings both Google DNS and Cloudfare dns in case one of them is down
|
# waits for an internet connection. It pings both Google DNS and Cloudfare dns in case one of them is down
|
||||||
until ping -c1 -W1 1.1.1.1 >/dev/null 2>&1 || \
|
until ping -c1 -W1 1.1.1.1 >/dev/null 2>&1 || \
|
||||||
ping -c1 -W1 8.8.8.8 >/dev/null 2>&1
|
ping -c1 -W1 8.8.8.8 >/dev/null 2>&1
|
||||||
@@ -72,9 +73,11 @@
|
|||||||
else
|
else
|
||||||
echo "kdrive rclone failed with error: $output"
|
echo "kdrive rclone failed with error: $output"
|
||||||
notify-send "rclone kdrive failed" "$output"
|
notify-send "rclone kdrive failed" "$output"
|
||||||
matrix-commander-rs --verbose -m "rclone kdrive failed.<br>Error: <pre>$output</pre><br><a href=\"https://matrix.to/#/@notificationbot_0000:matrix.org\">@notificationbot_0000</a>" \
|
curl \
|
||||||
--html \
|
-u ":$NTFY_TOKEN" \
|
||||||
-r "\!BXRRokBmEdNOyYdfOF:matrix.org"
|
-d "Rclone couldnt access kdrive (rclone lsd kdrive). Error: $output" \
|
||||||
|
-H "Title: Rclone kdrive" \
|
||||||
|
"$NTFY_SERVER/Alerts"
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -53,6 +53,8 @@ _: {
|
|||||||
pkgs-unstable.vimPlugins.nvim-treesitter-parsers.printf
|
pkgs-unstable.vimPlugins.nvim-treesitter-parsers.printf
|
||||||
pkgs-unstable.vimPlugins.nvim-treesitter-parsers.python
|
pkgs-unstable.vimPlugins.nvim-treesitter-parsers.python
|
||||||
pkgs-unstable.vimPlugins.nvim-treesitter-parsers.sparql
|
pkgs-unstable.vimPlugins.nvim-treesitter-parsers.sparql
|
||||||
|
pkgs-unstable.vimPlugins.lean-nvim
|
||||||
|
pkgs-unstable.vimPlugins.vim-ledger
|
||||||
pkgs-unstable.vimPlugins.telescope-nvim
|
pkgs-unstable.vimPlugins.telescope-nvim
|
||||||
pkgs-unstable.vimPlugins.nvim-scrollbar
|
pkgs-unstable.vimPlugins.nvim-scrollbar
|
||||||
pkgs-unstable.vimPlugins.promise-async
|
pkgs-unstable.vimPlugins.promise-async
|
||||||
@@ -371,7 +373,7 @@ _: {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.lsp.enable({ "lua_ls", "clangd", "pylsp", "texlab", "nixd", "ltex"})
|
vim.lsp.enable({ "lua_ls", "clangd", "pylsp", "texlab", "nixd", "ltex", "leanls"})
|
||||||
-- =========================
|
-- =========================
|
||||||
-- DASHBOARD
|
-- DASHBOARD
|
||||||
-- =========================
|
-- =========================
|
||||||
@@ -474,7 +476,12 @@ _: {
|
|||||||
-- =========================
|
-- =========================
|
||||||
require('lualine').setup { options = { theme = "gruvbox_dark" } }
|
require('lualine').setup { options = { theme = "gruvbox_dark" } }
|
||||||
|
|
||||||
|
-- ==================
|
||||||
|
-- lean
|
||||||
|
-- ==================
|
||||||
|
require('lean').setup({
|
||||||
|
mappings = true,
|
||||||
|
})
|
||||||
--==================0
|
--==================0
|
||||||
-- Some utils
|
-- Some utils
|
||||||
--==================
|
--==================
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{inputs, ...}: {
|
{inputs, ...}: {
|
||||||
flake.homeModules.notewrapper = {pkgs, ...}: {
|
flake.homeModules.laptop-notewrapper = {pkgs, ...}: {
|
||||||
home.packages = [
|
home.packages = [
|
||||||
inputs.notewrapper.packages.${pkgs.system}.default
|
inputs.notewrapper.packages.${pkgs.system}.default
|
||||||
];
|
];
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
force = true;
|
force = true;
|
||||||
text = ''
|
text = ''
|
||||||
{
|
{
|
||||||
"directory": ["~/Documents/Notes/", "~/test/"],
|
"directory": ["~/kdrive/Notes/"],
|
||||||
"render": true,
|
"render": true,
|
||||||
"jumpToEndOfFileOnLaunch": true,
|
"jumpToEndOfFileOnLaunch": true,
|
||||||
"editor": "neovim",
|
"editor": "neovim",
|
||||||
@@ -16,7 +16,36 @@
|
|||||||
"dateEntry": "# %Y %m %d %a",
|
"dateEntry": "# %Y %m %d %a",
|
||||||
"newLineOnOpening": true,
|
"newLineOnOpening": true,
|
||||||
"backup": {
|
"backup": {
|
||||||
"enable": true,
|
"enable": false,
|
||||||
|
"directory": {
|
||||||
|
"~/Documents/Notes/": "~/kdrive/Notes/",
|
||||||
|
"~/test/": "~/backupTest/"
|
||||||
|
},
|
||||||
|
"interval": "daily",
|
||||||
|
"rsyncArgs": ["-Lqah", "--update"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
flake.homeModules.desktop-notewrapper = {pkgs, ...}: {
|
||||||
|
home.packages = [
|
||||||
|
inputs.notewrapper.packages.${pkgs.system}.default
|
||||||
|
];
|
||||||
|
home.file.".config/notewrapper/config.json" = {
|
||||||
|
enable = true;
|
||||||
|
force = true;
|
||||||
|
text = ''
|
||||||
|
{
|
||||||
|
"directory": ["~/hdd/kdrive/Notes/"],
|
||||||
|
"render": true,
|
||||||
|
"jumpToEndOfFileOnLaunch": true,
|
||||||
|
"editor": "neovim",
|
||||||
|
"journalRegex": ".*journal.*",
|
||||||
|
"dateEntry": "# %Y %m %d %a",
|
||||||
|
"newLineOnOpening": true,
|
||||||
|
"backup": {
|
||||||
|
"enable": false,
|
||||||
"directory": {
|
"directory": {
|
||||||
"~/Documents/Notes/": "~/kdrive/Notes/",
|
"~/Documents/Notes/": "~/kdrive/Notes/",
|
||||||
"~/test/": "~/backupTest/"
|
"~/test/": "~/backupTest/"
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
_: {
|
||||||
|
|
||||||
|
flake.homeModules.tmux = _: {
|
||||||
|
programs.tmux = {
|
||||||
|
enable = true;
|
||||||
|
clock24 = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -50,7 +50,7 @@ _: {
|
|||||||
command cat "$@"
|
command cat "$@"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
custom-eza() { # behaves differently if we just call it or if we pipe initContent
|
custom-eza() { # behaves differently if we just call it or if we pipe initContent
|
||||||
if [[ -t 1 ]]; then
|
if [[ -t 1 ]]; then
|
||||||
eza -hlF -aa --color=always --hyperlink --group-directories-first --show-symlinks --icons=always --git --no-permissions "$@"
|
eza -hlF -aa --color=always --hyperlink --group-directories-first --show-symlinks --icons=always --git --no-permissions "$@"
|
||||||
|
|||||||
@@ -36,7 +36,8 @@
|
|||||||
services.system76-scheduler.settings.cfsProfiles.enable = true; # Better scheduling for CPU cycles - thanks System76!!!
|
services.system76-scheduler.settings.cfsProfiles.enable = true; # Better scheduling for CPU cycles - thanks System76!!!
|
||||||
services.thermald.enable = false; # Enable thermald, the temperature management daemon. (only necessary if on Intel CPUs)
|
services.thermald.enable = false; # Enable thermald, the temperature management daemon. (only necessary if on Intel CPUs)
|
||||||
services.power-profiles-daemon.enable = true; # ppd is recommended over tlp for framework 16
|
services.power-profiles-daemon.enable = true; # ppd is recommended over tlp for framework 16
|
||||||
/*services.tlp = {
|
/*
|
||||||
|
services.tlp = {
|
||||||
enable = true; # Enable TLP (better than gnomes internal power manager)
|
enable = true; # Enable TLP (better than gnomes internal power manager)
|
||||||
settings = {
|
settings = {
|
||||||
CPU_BOOST_ON_AC = 1;
|
CPU_BOOST_ON_AC = 1;
|
||||||
@@ -51,7 +52,8 @@
|
|||||||
PLATFORM_PROFILE_ON_BAT = "powersave";
|
PLATFORM_PROFILE_ON_BAT = "powersave";
|
||||||
STOP_CHARGE_THRESH_BAT1 = 80;
|
STOP_CHARGE_THRESH_BAT1 = 80;
|
||||||
};
|
};
|
||||||
};*/
|
};
|
||||||
|
*/
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
self.packages.${pkgs.system}.custom-performance
|
self.packages.${pkgs.system}.custom-performance
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{self, ...}: {
|
{self, ...}: {
|
||||||
flake.nixosModules.performance-desktop = {pkgs,...}: {
|
flake.nixosModules.performance-desktop = {pkgs, ...}: {
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
self.packages.${pkgs.system}.custom-performance
|
self.packages.${pkgs.system}.custom-performance
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -30,19 +30,21 @@
|
|||||||
games
|
games
|
||||||
hardware-configuration-desktop
|
hardware-configuration-desktop
|
||||||
hdd
|
hdd
|
||||||
|
hledger
|
||||||
|
hledger-desktop
|
||||||
hyprland
|
hyprland
|
||||||
IO
|
IO
|
||||||
kdrive-desktop # we will setup this later
|
kdrive-desktop # we will setup this later
|
||||||
latex
|
latex
|
||||||
ly
|
ly
|
||||||
mathematics
|
mathematics
|
||||||
mullvad
|
#mullvad #temporarly broken
|
||||||
networking
|
networking
|
||||||
nixUtils
|
nixUtils
|
||||||
notifications
|
notifications
|
||||||
nvidia
|
nvidia
|
||||||
office
|
office
|
||||||
#ollama
|
ollama
|
||||||
otherUtils
|
otherUtils
|
||||||
performance-desktop
|
performance-desktop
|
||||||
printer
|
printer
|
||||||
@@ -66,10 +68,10 @@
|
|||||||
hyprland-desktop
|
hyprland-desktop
|
||||||
kitty
|
kitty
|
||||||
librewolf
|
librewolf
|
||||||
mullvad
|
#mullvad #temporarly broken
|
||||||
neovim
|
neovim
|
||||||
nix-git-cherry-picker-desktop
|
nix-git-cherry-picker-desktop
|
||||||
notewrapper
|
desktop-notewrapper
|
||||||
oh-my-zsh
|
oh-my-zsh
|
||||||
ripgrep
|
ripgrep
|
||||||
rofi
|
rofi
|
||||||
@@ -78,6 +80,7 @@
|
|||||||
swaync # used in performance mode
|
swaync # used in performance mode
|
||||||
thunderbird
|
thunderbird
|
||||||
tomasr
|
tomasr
|
||||||
|
tmux
|
||||||
vivify
|
vivify
|
||||||
waybar-minimal # used in performance mode
|
waybar-minimal # used in performance mode
|
||||||
zoxide
|
zoxide
|
||||||
|
|||||||
@@ -31,13 +31,15 @@
|
|||||||
gitBackup
|
gitBackup
|
||||||
hardware-configuration-laptop
|
hardware-configuration-laptop
|
||||||
hardwareUtils-laptop
|
hardwareUtils-laptop
|
||||||
|
hledger
|
||||||
|
hledger-laptop
|
||||||
hyprland
|
hyprland
|
||||||
IO
|
IO
|
||||||
kdrive-laptop
|
kdrive-laptop
|
||||||
latex
|
latex
|
||||||
ly
|
ly
|
||||||
mathematics
|
mathematics
|
||||||
mullvad
|
#mullvad #temporarly broken
|
||||||
networking
|
networking
|
||||||
nixUtils-laptop
|
nixUtils-laptop
|
||||||
nixUtils
|
nixUtils
|
||||||
@@ -67,10 +69,10 @@
|
|||||||
hyprland-laptop
|
hyprland-laptop
|
||||||
kitty
|
kitty
|
||||||
librewolf
|
librewolf
|
||||||
mullvad
|
#mullvad #temporarly broken
|
||||||
neovim
|
neovim
|
||||||
nix-git-cherry-picker-laptop
|
nix-git-cherry-picker-laptop
|
||||||
notewrapper
|
laptop-notewrapper
|
||||||
oh-my-zsh
|
oh-my-zsh
|
||||||
ripgrep
|
ripgrep
|
||||||
rofi
|
rofi
|
||||||
@@ -78,6 +80,7 @@
|
|||||||
ssh
|
ssh
|
||||||
swaync # used in performance mode
|
swaync # used in performance mode
|
||||||
thunderbird
|
thunderbird
|
||||||
|
tmux
|
||||||
tomasr
|
tomasr
|
||||||
vivify
|
vivify
|
||||||
waybar-minimal # used in performance mode
|
waybar-minimal # used in performance mode
|
||||||
@@ -128,6 +131,8 @@
|
|||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
EDITOR = "neovim";
|
EDITOR = "neovim";
|
||||||
TERMINAL = "kitty";
|
TERMINAL = "kitty";
|
||||||
|
SYSTEMD_PAGER = "cat";
|
||||||
|
PAGER = "cat";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Required for Home Manager
|
# Required for Home Manager
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
{inputs, ...}: {
|
||||||
|
flake.nixosModules.agenix = {pkgs, ...}: {
|
||||||
|
environment.systemPackages = [
|
||||||
|
inputs.agenix.packages.${pkgs.system}.default
|
||||||
|
pkgs.age
|
||||||
|
];
|
||||||
|
age.identityPaths = [
|
||||||
|
"/etc/ssh/ssh_host_ed25519_key"
|
||||||
|
];
|
||||||
|
age.secrets.ntfy = {
|
||||||
|
file = ../../secrets/ntfy.age;
|
||||||
|
owner = "tomasr";
|
||||||
|
group = "users";
|
||||||
|
mode = "0400";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -19,6 +19,8 @@
|
|||||||
self.packages.${pkgs.system}.custom-changeAudioOutput
|
self.packages.${pkgs.system}.custom-changeAudioOutput
|
||||||
kdePackages.okular
|
kdePackages.okular
|
||||||
kdePackages.dolphin
|
kdePackages.dolphin
|
||||||
|
kdePackages.dolphin-plugins
|
||||||
|
kdePackages.ark
|
||||||
pulseaudio # sound server
|
pulseaudio # sound server
|
||||||
playerctl # controls media player
|
playerctl # controls media player
|
||||||
pavucontrol # PulseAudio Volume Control
|
pavucontrol # PulseAudio Volume Control
|
||||||
|
|||||||
@@ -2,8 +2,12 @@
|
|||||||
flake.nixosModules.autoCleanup-laptop = {
|
flake.nixosModules.autoCleanup-laptop = {
|
||||||
pkgs,
|
pkgs,
|
||||||
pkgs-unstable,
|
pkgs-unstable,
|
||||||
|
config,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
|
age.secrets.ntfy = {
|
||||||
|
file = ../../secrets/ntfy.age;
|
||||||
|
};
|
||||||
# Ensure your script is available system-wide
|
# Ensure your script is available system-wide
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
self.packages.${pkgs.system}.custom-cleanNix-laptop
|
self.packages.${pkgs.system}.custom-cleanNix-laptop
|
||||||
@@ -17,6 +21,9 @@
|
|||||||
description = "NixOS configuration auto cleanup";
|
description = "NixOS configuration auto cleanup";
|
||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
|
Environment = [
|
||||||
|
"NTFY_SECRET=${config.age.secrets.ntfy.path}"
|
||||||
|
];
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
|
|
||||||
ExecStart = "/run/current-system/sw/bin/custom-cleanNix";
|
ExecStart = "/run/current-system/sw/bin/custom-cleanNix";
|
||||||
@@ -54,8 +61,12 @@
|
|||||||
flake.nixosModules.autoCleanup-desktop = {
|
flake.nixosModules.autoCleanup-desktop = {
|
||||||
pkgs,
|
pkgs,
|
||||||
pkgs-unstable,
|
pkgs-unstable,
|
||||||
|
config,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
|
age.secrets.ntfy = {
|
||||||
|
file = ../../secrets/ntfy.age;
|
||||||
|
};
|
||||||
# Ensure your script is available system-wide
|
# Ensure your script is available system-wide
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
self.packages.${pkgs.system}.custom-cleanNix-desktop
|
self.packages.${pkgs.system}.custom-cleanNix-desktop
|
||||||
@@ -69,6 +80,9 @@
|
|||||||
description = "NixOS configuration auto cleanup";
|
description = "NixOS configuration auto cleanup";
|
||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
|
Environment = [
|
||||||
|
"NTFY_SECRET=${config.age.secrets.ntfy.path}"
|
||||||
|
];
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
|
|
||||||
ExecStart = "/run/current-system/sw/bin/custom-cleanNix";
|
ExecStart = "/run/current-system/sw/bin/custom-cleanNix";
|
||||||
@@ -108,14 +122,18 @@
|
|||||||
runtimeInputs = with pkgs; [
|
runtimeInputs = with pkgs; [
|
||||||
git
|
git
|
||||||
nixos-rebuild
|
nixos-rebuild
|
||||||
matrix-commander-rs
|
curl
|
||||||
libnotify
|
libnotify
|
||||||
alejandra
|
alejandra
|
||||||
deadnix
|
deadnix
|
||||||
|
statix
|
||||||
];
|
];
|
||||||
|
|
||||||
text = ''
|
text = ''
|
||||||
set -e
|
set -ex
|
||||||
|
|
||||||
|
# shellcheck disable=SC1090
|
||||||
|
source "$NTFY_SECRET"
|
||||||
|
|
||||||
FLAKE_DIR="/home/tomasr/nixos"
|
FLAKE_DIR="/home/tomasr/nixos"
|
||||||
FLAKE="$FLAKE_DIR#laptop"
|
FLAKE="$FLAKE_DIR#laptop"
|
||||||
@@ -139,7 +157,7 @@
|
|||||||
alejandra "$FLAKE_DIR" # formats the config
|
alejandra "$FLAKE_DIR" # formats the config
|
||||||
echo "--------------------------------------------------------------"
|
echo "--------------------------------------------------------------"
|
||||||
|
|
||||||
if sudo /run/current-system/sw/bin/nixos-rebuild switch --flake "$FLAKE" 2> "$ERROR_FILE"; then # use /run/.../bin/ uses the sudoless rule
|
if /run/wrappers/bin/sudo /run/current-system/sw/bin/nixos-rebuild switch --flake "$FLAKE" 2> "$ERROR_FILE"; then # use /run/.../bin/ uses the sudoless rule
|
||||||
|
|
||||||
if ! git -C "$FLAKE_DIR" diff --quiet HEAD; then
|
if ! git -C "$FLAKE_DIR" diff --quiet HEAD; then
|
||||||
git -C "$FLAKE_DIR" add -A
|
git -C "$FLAKE_DIR" add -A
|
||||||
@@ -148,9 +166,11 @@
|
|||||||
|
|
||||||
notify-send "Nix auto cleanup" "Everything OK"
|
notify-send "Nix auto cleanup" "Everything OK"
|
||||||
|
|
||||||
matrix-commander-rs --verbose -m "Nix auto cleanup. Everything OK.<br><a href=\"https://matrix.to/#/@notificationbot_0000:matrix.org\">@notificationbot_0000</a>" \
|
curl \
|
||||||
--html \
|
-u ":$NTFY_TOKEN" \
|
||||||
-r "\!BXRRokBmEdNOyYdfOF:matrix.org"
|
-d "Everything OK" \
|
||||||
|
-H "Title: Laptop Nix auto cleanup" \
|
||||||
|
"$NTFY_SERVER/Alerts"
|
||||||
else
|
else
|
||||||
notify-send "Nix auto cleanup" "No changes"
|
notify-send "Nix auto cleanup" "No changes"
|
||||||
git -C "$FLAKE_DIR" push
|
git -C "$FLAKE_DIR" push
|
||||||
@@ -161,9 +181,11 @@
|
|||||||
|
|
||||||
notify-send -u critical "Nix auto cleanup" "FAILED"
|
notify-send -u critical "Nix auto cleanup" "FAILED"
|
||||||
|
|
||||||
matrix-commander-rs --verbose -m "Nix auto cleanup failed.<br>Error: <pre>$ERROR_MSG</pre><br><a href=\"https://matrix.to/#/@notificationbot_0000:matrix.org\">@notificationbot_0000</a>" \
|
curl \
|
||||||
--html \
|
-u ":$NTFY_TOKEN" \
|
||||||
-r "\!BXRRokBmEdNOyYdfOF:matrix.org"
|
-d "Nix auto cleanup failed. Error: $ERROR_MSG" \
|
||||||
|
-H "Title: Laptop Nix auto cleanup" \
|
||||||
|
"$NTFY_SERVER/Alerts"
|
||||||
|
|
||||||
git -C "$FLAKE_DIR" reset --hard "pre-cleanup-$TIME"
|
git -C "$FLAKE_DIR" reset --hard "pre-cleanup-$TIME"
|
||||||
fi
|
fi
|
||||||
@@ -178,14 +200,18 @@
|
|||||||
runtimeInputs = with pkgs; [
|
runtimeInputs = with pkgs; [
|
||||||
git
|
git
|
||||||
nixos-rebuild
|
nixos-rebuild
|
||||||
matrix-commander-rs
|
curl
|
||||||
libnotify
|
libnotify
|
||||||
alejandra
|
alejandra
|
||||||
deadnix
|
deadnix
|
||||||
|
statix
|
||||||
];
|
];
|
||||||
|
|
||||||
text = ''
|
text = ''
|
||||||
set -e
|
set -ex
|
||||||
|
|
||||||
|
# shellcheck disable=SC1090
|
||||||
|
source "$NTFY_SECRET"
|
||||||
|
|
||||||
FLAKE_DIR="/home/tomasr/nixos"
|
FLAKE_DIR="/home/tomasr/nixos"
|
||||||
FLAKE="$FLAKE_DIR#desktop"
|
FLAKE="$FLAKE_DIR#desktop"
|
||||||
@@ -209,7 +235,7 @@
|
|||||||
alejandra "$FLAKE_DIR" # formats the config
|
alejandra "$FLAKE_DIR" # formats the config
|
||||||
echo "--------------------------------------------------------------"
|
echo "--------------------------------------------------------------"
|
||||||
|
|
||||||
if sudo /run/current-system/sw/bin/nixos-rebuild switch --flake "$FLAKE" 2> "$ERROR_FILE"; then # use /run/.../bin/ uses the sudoless rule
|
if /run/wrappers/bin/sudo /run/current-system/sw/bin/nixos-rebuild switch --flake "$FLAKE" 2> "$ERROR_FILE"; then # use /run/.../bin/ uses the sudoless rule
|
||||||
|
|
||||||
if ! git -C "$FLAKE_DIR" diff --quiet HEAD; then
|
if ! git -C "$FLAKE_DIR" diff --quiet HEAD; then
|
||||||
git -C "$FLAKE_DIR" add -A
|
git -C "$FLAKE_DIR" add -A
|
||||||
@@ -218,9 +244,11 @@
|
|||||||
|
|
||||||
notify-send "Nix auto cleanup" "Everything OK"
|
notify-send "Nix auto cleanup" "Everything OK"
|
||||||
|
|
||||||
matrix-commander-rs --verbose -m "Nix auto cleanup. Everything OK.<br><a href=\"https://matrix.to/#/@notificationbot_0000:matrix.org\">@notificationbot_0000</a>" \
|
curl \
|
||||||
--html \
|
-u ":$NTFY_TOKEN" \
|
||||||
-r "\!BXRRokBmEdNOyYdfOF:matrix.org"
|
-d "Everything OK" \
|
||||||
|
-H "Title: Desktop Nix auto cleanup" \
|
||||||
|
"$NTFY_SERVER/Alerts"
|
||||||
else
|
else
|
||||||
notify-send "Nix auto cleanup" "No changes"
|
notify-send "Nix auto cleanup" "No changes"
|
||||||
git -C "$FLAKE_DIR" push
|
git -C "$FLAKE_DIR" push
|
||||||
@@ -231,9 +259,11 @@
|
|||||||
|
|
||||||
notify-send -u critical "Nix auto cleanup" "FAILED"
|
notify-send -u critical "Nix auto cleanup" "FAILED"
|
||||||
|
|
||||||
matrix-commander-rs --verbose -m "Nix auto cleanup failed.<br>Error: <pre>$ERROR_MSG</pre><br><a href=\"https://matrix.to/#/@notificationbot_0000:matrix.org\">@notificationbot_0000</a>" \
|
curl \
|
||||||
--html \
|
-u ":$NTFY_TOKEN" \
|
||||||
-r "\!BXRRokBmEdNOyYdfOF:matrix.org"
|
-d "Nix auto cleanup failed. Error: $ERROR_MSG" \
|
||||||
|
-H "Title: Desktop Nix auto cleanup" \
|
||||||
|
"$NTFY_SERVER/Alerts"
|
||||||
|
|
||||||
git -C "$FLAKE_DIR" reset --hard "pre-cleanup-$TIME"
|
git -C "$FLAKE_DIR" reset --hard "pre-cleanup-$TIME"
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -1,5 +1,12 @@
|
|||||||
{self, ...}: {
|
{self, ...}: {
|
||||||
flake.nixosModules.autoUpdate-laptop = {pkgs, ...}: {
|
flake.nixosModules.autoUpdate-laptop = {
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
age.secrets.ntfy = {
|
||||||
|
file = ../../secrets/ntfy.age;
|
||||||
|
};
|
||||||
# Ensure your script is available system-wide
|
# Ensure your script is available system-wide
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
self.packages.${pkgs.system}.custom-autoupdate-laptop
|
self.packages.${pkgs.system}.custom-autoupdate-laptop
|
||||||
@@ -46,7 +53,14 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
## desktop
|
## desktop
|
||||||
flake.nixosModules.autoUpdate-desktop = {pkgs, ...}: {
|
flake.nixosModules.autoUpdate-desktop = {
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
age.secrets.ntfy = {
|
||||||
|
file = ../../secrets/ntfy.age;
|
||||||
|
};
|
||||||
# Ensure your script is available system-wide
|
# Ensure your script is available system-wide
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
self.packages.${pkgs.system}.custom-autoupdate-desktop
|
self.packages.${pkgs.system}.custom-autoupdate-desktop
|
||||||
@@ -103,6 +117,8 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
text = ''
|
text = ''
|
||||||
|
# shellcheck disable=SC1090
|
||||||
|
source "$NTFY_SECRET"
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
FLAKE_DIR="/home/tomasr/nixos"
|
FLAKE_DIR="/home/tomasr/nixos"
|
||||||
@@ -128,9 +144,11 @@
|
|||||||
|
|
||||||
notify-send "Flake autoupdate" "Rebuild OK"
|
notify-send "Flake autoupdate" "Rebuild OK"
|
||||||
|
|
||||||
matrix-commander-rs --verbose -m "Flake rebuild succesfull.<br><a href=\"https://matrix.to/#/@notificationbot_0000:matrix.org\">@notificationbot_0000</a>" \
|
curl \
|
||||||
--html \
|
-u ":$NTFY_TOKEN" \
|
||||||
-r "\!BXRRokBmEdNOyYdfOF:matrix.org"
|
-d "Laptop Flake rebuild successful" \
|
||||||
|
-H "Title: Flake autoupdate" \
|
||||||
|
"$NTFY_SERVER/Alerts"
|
||||||
else
|
else
|
||||||
notify-send "Flake autoupdate" "No changes"
|
notify-send "Flake autoupdate" "No changes"
|
||||||
git -C "$FLAKE_DIR" push
|
git -C "$FLAKE_DIR" push
|
||||||
@@ -141,9 +159,12 @@
|
|||||||
|
|
||||||
notify-send -u critical "Flake autoupdate" "FAILED"
|
notify-send -u critical "Flake autoupdate" "FAILED"
|
||||||
|
|
||||||
matrix-commander-rs --verbose -m "Flake rebuild failed.<br>Error: <pre>$ERROR_MSG</pre><br><a href=\"https://matrix.to/#/@notificationbot_0000:matrix.org\">@notificationbot_0000</a>" \
|
curl \
|
||||||
--html \
|
-u ":$NTFY_TOKEN" \
|
||||||
-r "\!BXRRokBmEdNOyYdfOF:matrix.org"
|
-d "Laptop Flake rebuild failed. Error: $ERROR_MSG" \
|
||||||
|
-H "Title: Flake autoupdate FAILED" \
|
||||||
|
-H "Priority: urgent" \
|
||||||
|
"$NTFY_SERVER/Alerts"
|
||||||
|
|
||||||
git -C "$FLAKE_DIR" reset --hard "pre-autoupdate-$TIME"
|
git -C "$FLAKE_DIR" reset --hard "pre-autoupdate-$TIME"
|
||||||
fi
|
fi
|
||||||
@@ -189,9 +210,12 @@
|
|||||||
|
|
||||||
notify-send "Flake autoupdate" "Rebuild OK"
|
notify-send "Flake autoupdate" "Rebuild OK"
|
||||||
|
|
||||||
matrix-commander-rs --verbose -m "Flake rebuild succesfull.<br><a href=\"https://matrix.to/#/@notificationbot_0000:matrix.org\">@notificationbot_0000</a>" \
|
curl \
|
||||||
--html \
|
-u ":$NTFY_TOKEN" \
|
||||||
-r "\!BXRRokBmEdNOyYdfOF:matrix.org"
|
-d "Flake rebuild successful" \
|
||||||
|
-H "Title: Desktop Flake autoupdate" \
|
||||||
|
"$NTFY_SERVER/Alerts"
|
||||||
|
|
||||||
else
|
else
|
||||||
notify-send "Flake autoupdate" "No changes"
|
notify-send "Flake autoupdate" "No changes"
|
||||||
git -C "$FLAKE_DIR" push
|
git -C "$FLAKE_DIR" push
|
||||||
@@ -202,9 +226,12 @@
|
|||||||
|
|
||||||
notify-send -u critical "Flake autoupdate" "FAILED"
|
notify-send -u critical "Flake autoupdate" "FAILED"
|
||||||
|
|
||||||
matrix-commander-rs --verbose -m "Flake rebuild failed.<br>Error: <pre>$ERROR_MSG</pre><br><a href=\"https://matrix.to/#/@notificationbot_0000:matrix.org\">@notificationbot_0000</a>" \
|
curl \
|
||||||
--html \
|
-u ":$NTFY_TOKEN" \
|
||||||
-r "\!BXRRokBmEdNOyYdfOF:matrix.org"
|
-d "Flake rebuild failed. Error: $ERROR_MSG" \
|
||||||
|
-H "Title: Desktop Flake autoupdate FAILED" \
|
||||||
|
-H "Priority: urgent" \
|
||||||
|
"$NTFY_SERVER/Alerts"
|
||||||
|
|
||||||
git -C "$FLAKE_DIR" reset --hard "pre-autoupdate-$TIME"
|
git -C "$FLAKE_DIR" reset --hard "pre-autoupdate-$TIME"
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
_: {
|
||||||
|
flake.nixosModules.hledger = {pkgs, ...}: {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
hledger
|
||||||
|
hledger-ui
|
||||||
|
hledger-web
|
||||||
|
asciinema # used for some hledger demos
|
||||||
|
];
|
||||||
|
};
|
||||||
|
flake.nixosModules.hledger-laptop = _: {
|
||||||
|
environment.variables = {
|
||||||
|
LEDGER_FILE = "/home/tomasr/kdrive/Budget/hledger.journal";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
flake.nixosModules.hledger-desktop = _: {
|
||||||
|
environment.variables = {
|
||||||
|
LEDGER_FILE = "/home/tomasr/hdd/kdrive/Budget/hledger.journal";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -3,44 +3,26 @@
|
|||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
libnotify # Library that sends desktop notifications to a notification daemon
|
libnotify # Library that sends desktop notifications to a notification daemon
|
||||||
socat # Utility for bidirectional data transfer between two independent data channels (used to communicate between hyprland and awww to change wallpapers dinamically)
|
socat # Utility for bidirectional data transfer between two independent data channels (used to communicate between hyprland and awww to change wallpapers dinamically)
|
||||||
matrix-commander-rs # matrix client used to send notifications from scripts to my phone
|
|
||||||
# battery notifications
|
# battery notifications
|
||||||
self.packages.${pkgs.system}.custom-batterynotify
|
self.packages.${pkgs.system}.custom-batterynotify
|
||||||
self.packages.${pkgs.system}.custom-batterywarning
|
self.packages.${pkgs.system}.custom-batterywarning
|
||||||
# checks if matrix-commander-rs is installed and logged in
|
|
||||||
self.packages.${pkgs.system}.custom-checkMatrix
|
|
||||||
self.packages.${pkgs.system}.custom-gitnotify # checks if git is set up
|
self.packages.${pkgs.system}.custom-gitnotify # checks if git is set up
|
||||||
self.packages.${pkgs.system}.custom-checkKdrive # check if kdrive is set up with rclone
|
self.packages.${pkgs.system}.custom-checkKdrive # check if kdrive is set up with rclone
|
||||||
zoom-us
|
zoom-us
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
perSystem = {pkgs, ...}: {
|
perSystem = {pkgs, ...}: {
|
||||||
packages.custom-checkMatrix = pkgs.writeShellApplication {
|
|
||||||
name = "custom-checkMatrix";
|
|
||||||
|
|
||||||
runtimeInputs = with pkgs; [
|
|
||||||
matrix-commander-rs
|
|
||||||
libnotify
|
|
||||||
];
|
|
||||||
|
|
||||||
text = ''
|
|
||||||
expected="@totorile1:unredacted.org"
|
|
||||||
|
|
||||||
current="$(matrix-commander-rs --whoami | tr -d '\n')"
|
|
||||||
|
|
||||||
if [ "$current" != "$expected" ]; then
|
|
||||||
notify-send "matrix-commander-rs" \
|
|
||||||
"You are not logged in as @totorile1:unredacted.org\nLog:\n$current"
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
packages.custom-gitnotify = pkgs.writeShellApplication {
|
packages.custom-gitnotify = pkgs.writeShellApplication {
|
||||||
name = "custom-gitnotify";
|
name = "custom-gitnotify";
|
||||||
runtimeInputs = with pkgs; [
|
runtimeInputs = with pkgs; [
|
||||||
git
|
git
|
||||||
libnotify
|
libnotify
|
||||||
|
curl
|
||||||
];
|
];
|
||||||
text = ''
|
text = ''
|
||||||
|
# shellcheck disable=SC1091
|
||||||
|
source /run/agenix/ntfy
|
||||||
|
|
||||||
# Check if git is installed
|
# Check if git is installed
|
||||||
if ! command -v git >/dev/null 2>&1; then
|
if ! command -v git >/dev/null 2>&1; then
|
||||||
exit 0
|
exit 0
|
||||||
@@ -53,9 +35,10 @@
|
|||||||
notify-send \
|
notify-send \
|
||||||
"Git not configured" \
|
"Git not configured" \
|
||||||
"Set your identity\n or remove this warning by removing the custom-gitnotify line in\n ~/nixos/modules/applications/hyprland.nix"
|
"Set your identity\n or remove this warning by removing the custom-gitnotify line in\n ~/nixos/modules/applications/hyprland.nix"
|
||||||
matrix-commander-rs --verbose -m "Git not configured.<br>Set your identify or remove this warning by removing the custom-gitnotify in ~/nixos/modules/applications/hyprland.nix<br><a href=\"https://matrix.to/#/@notificationbot_0000:matrix.org\">@notificationbot_0000</a>" \
|
curl \
|
||||||
--html \
|
-u ":$NTFY_TOKEN" \
|
||||||
-r "\!BXRRokBmEdNOyYdfOF:matrix.org"
|
-d "Git not configured" \
|
||||||
|
"$NTFY_SERVER/Alerts"
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,5 +1,12 @@
|
|||||||
{self, ...}: {
|
{self, ...}: {
|
||||||
flake.nixosModules.gitBackup = {pkgs, ...}: {
|
flake.nixosModules.gitBackup = {
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
age.secrets.ntfy = {
|
||||||
|
file = ../../secrets/ntfy.age;
|
||||||
|
};
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
self.packages.${pkgs.system}.custom-gitBackup
|
self.packages.${pkgs.system}.custom-gitBackup
|
||||||
];
|
];
|
||||||
@@ -9,6 +16,9 @@
|
|||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
|
Environment = [
|
||||||
|
"NTFY_SECRET=${config.age.secrets.ntfy.path}"
|
||||||
|
];
|
||||||
|
|
||||||
ExecStart = "/run/current-system/sw/bin/custom-gitBackup";
|
ExecStart = "/run/current-system/sw/bin/custom-gitBackup";
|
||||||
|
|
||||||
@@ -41,11 +51,14 @@
|
|||||||
name = "custom-gitBackup";
|
name = "custom-gitBackup";
|
||||||
runtimeInputs = with pkgs; [
|
runtimeInputs = with pkgs; [
|
||||||
rsync
|
rsync
|
||||||
matrix-commander-rs
|
curl
|
||||||
libnotify
|
libnotify
|
||||||
self.packages.${pkgs.system}.custom-checkKdrive
|
self.packages.${pkgs.system}.custom-checkKdrive
|
||||||
];
|
];
|
||||||
text = ''
|
text = ''
|
||||||
|
# shellcheck disable=SC1090
|
||||||
|
source "$NTFY_SECRET"
|
||||||
|
|
||||||
# checks if kdrive is available
|
# checks if kdrive is available
|
||||||
custom-checkKdrive
|
custom-checkKdrive
|
||||||
|
|
||||||
@@ -69,9 +82,11 @@
|
|||||||
notify_error() {
|
notify_error() {
|
||||||
local message="$1"
|
local message="$1"
|
||||||
notify-send "Git Backup Failed" "$message"
|
notify-send "Git Backup Failed" "$message"
|
||||||
matrix-commander-rs --verbose -m "Git Backup Failed: $message <br><a href=\"https://matrix.to/#/@notificationbot_0000:matrix.org\">@notificationbot_0000</a>" \
|
curl \
|
||||||
--html \
|
-u ":$NTFY_TOKEN" \
|
||||||
-r "\!BXRRokBmEdNOyYdfOF:matrix.org"
|
-d "Git backup failed. Error: $message" \
|
||||||
|
-H "Title: Git Backup" \
|
||||||
|
"$NTFY_SERVER/Alerts"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,12 @@ _: {
|
|||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
libreoffice
|
libreoffice
|
||||||
birdtray
|
birdtray
|
||||||
|
kdePackages.korganizer
|
||||||
|
#needed for korganizer
|
||||||
|
kdePackages.akonadi
|
||||||
|
kdePackages.akonadi-calendar
|
||||||
|
kdePackages.akonadi-calendar-tools
|
||||||
];
|
];
|
||||||
|
programs.kde-pim.kontact = true; # needed for korganizer
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
_: {
|
_: {
|
||||||
flake.nixosModules.rss = {pkgs, ...}: {
|
flake.nixosModules.rss = {pkgs, ...}: {
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
nom
|
newsflash
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
Binary file not shown.
@@ -0,0 +1,9 @@
|
|||||||
|
let
|
||||||
|
backupAgeKey = "age1y4lhpk7awhjyu42p46ulg5q2c49r2lnwu8tyyk4ejj6jztd64uksfhd670";
|
||||||
|
laptopHostKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJCsewl8ZXXMjRyO20cBIiuW2gA4mGoMkxQ0dcMyNidR root@nixos";
|
||||||
|
in {
|
||||||
|
"ntfy.age".publicKeys = [
|
||||||
|
backupAgeKey
|
||||||
|
laptopHostKey
|
||||||
|
];
|
||||||
|
}
|
||||||
Reference in new issue
Block a user