From 7c0a2bf02217461317d779a0973a300ee2505881 Mon Sep 17 00:00:00 2001 From: Tibo De Peuter Date: Wed, 27 Mar 2024 16:28:39 +0100 Subject: [PATCH 1/2] Restructure dotfiles --- nixos/users/tdpeuter/dotfiles.nix | 192 +++++++++++++++--------------- 1 file changed, 99 insertions(+), 93 deletions(-) diff --git a/nixos/users/tdpeuter/dotfiles.nix b/nixos/users/tdpeuter/dotfiles.nix index d1d1dc5..cfce3e7 100644 --- a/nixos/users/tdpeuter/dotfiles.nix +++ b/nixos/users/tdpeuter/dotfiles.nix @@ -1,5 +1,7 @@ { config, lib, pkgs, pkgs-unstable, ... }: +# Does basically the same thing that stow does, but using Nix. + let cfg = config.sisyphus.users.tdpeuter; user = config.users.users.tdpeuter.name; @@ -8,99 +10,103 @@ in { config = lib.mkIf cfg.enable { home-manager.users.tdpeuter = lib.mkIf config.sisyphus.programs.home-manager.enable { home = { - file = { - ".config/alacritty" = { - source = ../../../stow/alacritty/.config/alacritty; - }; - ".config/dunst" = { - enable = config.sisyphus.desktop.sway.enable; - source = ../../../stow/dunst/.config/dunst; - }; - ".config/fuzzel" = { - source = ../../../stow/fuzzel/.config/fuzzel; - recursive = true; - }; - ".config/git" = { - source = ../../../stow/git/.config/git; - recursive = true; - }; - ".config/kitty" = { - source = ../../../stow/kitty/.config/kitty; - recursive = true; - }; - ".config/mako" = { - source = ../../../stow/mako/.config/mako; - }; - ".config/mpv" = { - source = ../../../stow/mpv/.config/mpv; - }; - ".config/OpenRGB" = { - enable = config.sisyphus.services.openrgb.enable; - source = ../../../stow/openrgb/.config/OpenRGB; - recursive = true; - }; - ".config/sway" = { - enable = config.sisyphus.desktop.sway.enable; - source = ../../../stow/sway/.config/sway; - }; - ".config/swayidle" = { - enable = config.sisyphus.desktop.sway.enable; - source = ../../../stow/swayidle/.config/swayidle; - }; - ".config/swaylock" = { - enable = config.sisyphus.desktop.sway.enable; - source = ../../../stow/swaylock/.config/swaylock; - }; - ".config/vifm" = { - source = ../../../stow/vifm/.config/vifm; - recursive = true; # Fix history and all working - }; - ".config/waybar" = { - enable = config.sisyphus.desktop.sway.enable; - source = ../../../stow/waybar/.config/waybar; - }; - ".config/zellij" = { - source = ../../../stow/zellij/.config/zellij; - }; - ".oh-my-zsh" = { - enable = (config.users.users.tdpeuter.shell == pkgs.zsh); - source = "${pkgs.oh-my-zsh}/share/oh-my-zsh"; - recursive = true; - }; - ".oh-my-zsh/themes/tdpeuter.zsh-theme" = { - enable = (config.users.users.tdpeuter.shell == pkgs.zsh); - source = ../../../stow/zsh/.oh-my-zsh/themes/tdpeuter.zsh-theme; - }; - ".ssh/config" = lib.mkIf config.sisyphus.programs.ssh.enable { - source = ../../../stow/ssh/.ssh/config; - }; - ".vim" = { - source = ../../../stow/vim/.vim; - recursive = true; - }; - ".vim/autoload/plug.vim" = { - source = "${pkgs.vimPlugins.vim-plug}/plug.vim"; - }; - ".vimrc" = { - source = ../../../stow/vim/.vimrc; - }; - ".zshrc" = { - enable = (config.users.users.tdpeuter.shell == pkgs.zsh); - source = ../../../stow/zsh/.zshrc; - }; - ".zsh/plugins/cmdtime/cmdtime.plugin.zsh" = { - enable = (config.users.users.tdpeuter.shell == pkgs.zsh); - source = "${pkgs.cmdtime}/share/cmdtime/cmdtime.plugin.zsh"; - }; - ".zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh" = { - enable = (config.users.users.tdpeuter.shell == pkgs.zsh); - source = "${pkgs.zsh-autosuggestions}/share/zsh-autosuggestions/zsh-autosuggestions.zsh"; - }; - ".zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" = { - enable = (config.users.users.tdpeuter.shell == pkgs.zsh); - source = "${pkgs.zsh-syntax-highlighting}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"; - }; - }; + file = lib.mkMerge [ + { + ".config/alacritty" = { + enable = false; + source = ../../../stow/alacritty/.config/alacritty; + }; + ".config/dunst" = { + inherit (config.sisyphus.desktop.sway) enable; + source = ../../../stow/dunst/.config/dunst; + }; + ".config/fuzzel" = { + recursive = true; + source = ../../../stow/fuzzel/.config/fuzzel; + }; + ".config/git" = { + recursive = true; + source = ../../../stow/git/.config/git; + }; + ".config/kitty" = { + enable = false; + recursive = true; + source = ../../../stow/kitty/.config/kitty; + }; + ".config/mako" = { + enable = false; + source = ../../../stow/mako/.config/mako; + }; + ".config/mpv" = { + source = ../../../stow/mpv/.config/mpv; + }; + ".config/OpenRGB" = { + inherit (config.sisyphus.services.openrgb) enable; + recursive = true; + source = ../../../stow/openrgb/.config/OpenRGB; + }; + ".config/sway" = { + inherit (config.sisyphus.desktop.sway) enable; + source = ../../../stow/sway/.config/sway; + }; + ".config/swayidle" = { + inherit (config.sisyphus.desktop.sway) enable; + source = ../../../stow/swayidle/.config/swayidle; + }; + ".config/swaylock" = { + inherit (config.sisyphus.desktop.sway) enable; + source = ../../../stow/swaylock/.config/swaylock; + }; + ".config/vifm" = { + recursive = true; # Fix history and all working + source = ../../../stow/vifm/.config/vifm; + }; + ".config/waybar" = { + inherit (config.sisyphus.desktop.sway) enable; + source = ../../../stow/waybar/.config/waybar; + }; + ".config/zellij" = { + source = ../../../stow/zellij/.config/zellij; + }; + ".oh-my-zsh" = { + enable = config.users.users.tdpeuter.shell == pkgs.zsh; + source = "${pkgs.oh-my-zsh}/share/oh-my-zsh"; + recursive = true; + }; + ".oh-my-zsh/themes/tdpeuter.zsh-theme" = { + enable = config.users.users.tdpeuter.shell == pkgs.zsh; + source = ../../../stow/zsh/.oh-my-zsh/themes/tdpeuter.zsh-theme; + }; + ".ssh/config" = lib.mkIf config.sisyphus.programs.ssh.enable { + inherit (config.sisyphus.programs.ssh) enable; + source = ../../../stow/ssh/.ssh/config; + }; + ".vim" = { + recursive = true; + source = ../../../stow/vim/.vim; + }; + ".vim/autoload/plug.vim" = { + source = "${pkgs.vimPlugins.vim-plug}/plug.vim"; + }; + ".vimrc" = { + source = ../../../stow/vim/.vimrc; + }; + } + (lib.mkIf (config.users.users.tdpeuter.shell == pkgs.zsh) { + ".zshrc" = { + source = ../../../stow/zsh/.zshrc; + }; + ".zsh/plugins/cmdtime/cmdtime.plugin.zsh" = { + source = "${pkgs.cmdtime}/share/cmdtime/cmdtime.plugin.zsh"; + }; + ".zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh" = { + source = "${pkgs.zsh-autosuggestions}/share/zsh-autosuggestions/zsh-autosuggestions.zsh"; + }; + ".zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" = { + source = "${pkgs.zsh-syntax-highlighting}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"; + }; + }) + ]; }; }; }; From ceda87452c5aca6b79504eaf2dedcc68f734f069 Mon Sep 17 00:00:00 2001 From: Tibo De Peuter Date: Wed, 27 Mar 2024 16:29:15 +0100 Subject: [PATCH 2/2] Update monero config --- nixos/modules/services/monero/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/nixos/modules/services/monero/default.nix b/nixos/modules/services/monero/default.nix index 1ca5c58..fc49b91 100644 --- a/nixos/modules/services/monero/default.nix +++ b/nixos/modules/services/monero/default.nix @@ -11,22 +11,24 @@ in { ]; services = { + # Choose to run a node or not. monero.enable = true; + xmrig = { enable = true; settings = { autosave = true; background = true; pause-on-battery = true; - pasue-on-active = true; + pause-on-active = 60; donate-level = 5; cpu = true; opencl = false; cuda = true; pools = [ { - # url = "monerohash.com:9999"; - url = "127.0.0.1:18081"; # Local node + url = "monerohash.com:9999"; + # url = "127.0.0.1:18081"; # Local node user = "44FjmmLn1k1GC1AFTLSdWDZ17CHB2h3eRCnfkfTQBucHaKX1AGS5oLERR1FEaHxPQcUNwrbEfsgbY4Y6bYJm6ZrdCYGwg7b"; keepalive = true; tls = true;