From 981c4251a611b777b91900311c853c05da5d7b7d Mon Sep 17 00:00:00 2001 From: matt1432 Date: Thu, 4 Jan 2024 03:39:14 -0500 Subject: [PATCH] chore: add TODOs and small refactor --- common/default.nix | 14 ++++++++++---- common/home/bash/default.nix | 1 + common/home/neovim/base.vim | 1 + common/home/neovim/default.nix | 6 +++--- common/modules/locate.nix | 1 + common/pkgs/discommit/flake.nix | Bin 1322 -> 1370 bytes devices/binto/config/ags/config.js | 1 + devices/servivi/modules/minecraft.nix | 10 ++++------ flake.lock | Bin 39885 -> 39905 bytes flake.nix | Bin 7526 -> 7534 bytes home/firefox/firefox-gx/default.nix | 2 +- home/theme.nix | 5 +++-- modules/ags/default.nix | 1 - modules/greetd/regreet.nix | 1 + modules/tailscale.nix | 23 ++++++++++++++--------- 15 files changed, 40 insertions(+), 26 deletions(-) diff --git a/common/default.nix b/common/default.nix index 2267555b..00a835a4 100644 --- a/common/default.nix +++ b/common/default.nix @@ -1,6 +1,5 @@ { config, - lib, home-manager, nh, nix-melt, @@ -58,6 +57,9 @@ }; home-manager.users = let + mainUser = config.vars.user; + mainUserConf = config.home-manager.users.${mainUser}; + default = { imports = [ # Make the vars be the same on Nix and HM @@ -79,11 +81,15 @@ ++ (with config.nur.repos.rycee; [ mozilla-addons-to-nix ]); - home.stateVersion = lib.mkDefault "23.05"; }; in { - root = default; + root = + default + // { + home.stateVersion = mainUserConf.home.stateVersion; + }; + # TODO: make user an array? - ${config.vars.user} = default; + ${mainUser} = default; }; } diff --git a/common/home/bash/default.nix b/common/home/bash/default.nix index 7fa08c67..6dcd0432 100644 --- a/common/home/bash/default.nix +++ b/common/home/bash/default.nix @@ -3,6 +3,7 @@ programs = { starship = let + # TODO: have different colors depending on host textColor = "#e3e5e5"; firstColor = "#bd93f9"; secondColor = "#715895"; diff --git a/common/home/neovim/base.vim b/common/home/neovim/base.vim index a65ba78a..8692073d 100644 --- a/common/home/neovim/base.vim +++ b/common/home/neovim/base.vim @@ -21,6 +21,7 @@ autocmd FileType scss setl iskeyword+=@-@ set number set relativenumber +" TODO: make this work for nix-on-droid set undofile set undodir=/home/matt/.cache/nvim/ diff --git a/common/home/neovim/default.nix b/common/home/neovim/default.nix index c965f54b..56ed1cf5 100644 --- a/common/home/neovim/default.nix +++ b/common/home/neovim/default.nix @@ -3,14 +3,14 @@ pkgs, lib, coc-stylelintplus-flake, - tree-sitter-hypr-flake, + tree-sitter-hyprlang-flake, ... }: with lib; let nvimIde = config.vars.neovimIde; javaSdk = pkgs.temurin-bin-17; - nvim-treesitter-hypr = tree-sitter-hypr-flake.packages.${pkgs.system}.default; + nvim-treesitter-hyprlang = tree-sitter-hyprlang-flake.packages.${pkgs.system}.default; coc-stylelintplus = coc-stylelintplus-flake.packages.${pkgs.system}.default; in { home = optionalAttrs nvimIde { @@ -237,7 +237,7 @@ in { ++ (with pkgs.vimPlugins; [ nvim-treesitter-context nvim-treesitter-textobjects - nvim-treesitter-hypr + nvim-treesitter-hyprlang { type = "viml"; config = fileContents ./plugins/treesitter.vim; diff --git a/common/modules/locate.nix b/common/modules/locate.nix index c28bdb0c..8b4e9f37 100644 --- a/common/modules/locate.nix +++ b/common/modules/locate.nix @@ -25,6 +25,7 @@ in { locateGroup ]; + # TODO: add timer systemd.services.locate = { wantedBy = ["default.target"]; serviceConfig = { diff --git a/common/pkgs/discommit/flake.nix b/common/pkgs/discommit/flake.nix index ad260c72b546852cbb8378d5a5be05fd5c1cec06..d91a7f4e301ed9b1df97e5ddd12969bd984b6bc3 100644 GIT binary patch delta 58 zcmZ3*b&JcenoB`JSs}#V#otOHH!(X^p(G=-SRpg7Bwry>p`bJ=Co@?gJ+maEG)W;b Nxg;|`ZzH27D*zhM67v86 delta 10 Rcmcb`wTg?edZVExD*zOk10?_e diff --git a/devices/binto/config/ags/config.js b/devices/binto/config/ags/config.js index 9ab9fe2a..665cd1f9 100644 --- a/devices/binto/config/ags/config.js +++ b/devices/binto/config/ags/config.js @@ -14,6 +14,7 @@ exec(`sassc ${scss} ${css}`) const closeWinDelay = 800;; +// TODO: add OSD, workspace indicator / overview and current window indicator export default { style: css, diff --git a/devices/servivi/modules/minecraft.nix b/devices/servivi/modules/minecraft.nix index 97823b10..b0ed6ee2 100644 --- a/devices/servivi/modules/minecraft.nix +++ b/devices/servivi/modules/minecraft.nix @@ -7,6 +7,10 @@ imports = [nms.nixosModules.default]; services = { + borgbackup.configs.mc = { + paths = ["/var/lib/minecraft"]; + }; + modded-minecraft-servers = { eula = true; user = config.vars.user; @@ -116,11 +120,5 @@ }; }; }; - - borgbackup.configs.mc = { - paths = [ - "/var/lib/minecraft" - ]; - }; }; } diff --git a/flake.lock b/flake.lock index cf97e2b0e18f7ac9307b1125b106560f36baf830..b3889ccd2fe404ad99f5226af5ce1f69a9660bfa 100644 GIT binary patch delta 1630 zcmbVM%WGU!9HupomR4H~G-;)wR-0#=Iq!3i*hOY0k9lM!^GGI{YTJA6IcFxx%p~({ z5=7dCZUkvP;7W^vOVO5DR7H1UaZz2lPnLp0{R0F~(t=wNE|>fI?sv}jeZTL?qoeze zjy`yKyca`Ap?z2!o>*t`ripYglm(vLT?VX3LJI8X?Lqt5 z@~bvJF=W3U?;kaR3^?$))_@U%B%>;T#t$HeJn)e(Jcy;#c3&r-;~w`BBp~l;ycZ+J*ukDB8|ea4+sma^ zJ(Q?;TQPuJ*o%YBRK3vIj81pLnU&aDyw>T&N_PJQw|i`Si~<%=-vjPMxkOwk3JuYO z39K-rj$LtI6V!$L(<4q_!G)bJ3{QmfL1wlw@6RnV zf1MhhsNqDhvb_y6Iqc9enC3iP4sW)Xv~E?BTh&Y^h;3t4pKjXy$e{gs+8dFIJG66! zAf%j=PzHuUjIadUmr@EWm2?{D1@}3$f6k6|pM<~d=|z+i?~pV!gllkBlT8Sm1?Zw&-&vs;n<m|PtFf?f0_U0WFN+W0AYQ0ezMwZgo?7TR1D9NLNT@@BN5On#;a;09#2MP zBuv`HIZ{c@%9%qOpI+;?XCnjlldH!^14@vQ3K1jRC}`y~#WluGe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@bGML32$irNxZy-`rv1W`{XgXG zks-e%U~XUiZ^UhPyMh+aF;;|3#KAwQ???kNsWb)^O!;oW$25uTpr+d4_ ziBcz?tCwIQoNuEVpd7N@?PZ-5E6bszg(8PKV+OkS3TNHhbH`(bqku{o5JUwgoKXsG zC?O`)KSda(Ku7@)+CkoMN9RWSPv?F*I)nfu!cDB6h;JpP^BF>S8cjH7%SF6epHI*C zOrn-b?=DQCt<`2{u~$n~(MoM#;#W6D+)vL5$rRI}u-mjlz|wW_)YCS_4sw6}p?f-gG=I zbUI&A715F_tk`Rkjm@Ha@JZ4O8_WU&6!GTO*5W`*$owY+^W2r-T1aB0dzRJxr#BY& z|6j4wYyUwE@+J3tZPT4v8SdY``TLxELwh}@>iF3lR1?v_^J z;_@V1?y!m6F7M>aC?W&OFU!ZyE2{-D2KvZShKO&SAYjH4pag}1CR`XvfpDLHnDRk8 z?OvAO@y0sm9#xtLFcj|D*^}coDohkKC)I|nZ+3d!X0@5mimmCH1m~!o;w?ZsQHz*b z(LFyR+%MI!Sbz=IG=K^b4In@oBh9f<#&QU}A7Ka(hvv;uf314W=v@Ds+U0}8h+r(< z^aPKl@pkrl{(6O)dRwzX*(58;<;-d^lgUNghWSt}^=6uh75AV#<}PpX7#5NdORWk` zsJX91twSW0ViZso`ZmzYfB;b+qA_=~akPJb>$fBCUkdB0X3uP#!L_R@Bx)w0p0 za&If@-~RNU(V@YAw+64eziu@~fH$e;} zs^xk$wMkN9GS%AI9`xw!ZIYKmBU-@V`GV0z&`* diff --git a/flake.nix b/flake.nix index 22815f701889a44a205d07db1137bdd814224e9e..7e72d84123d3bec5d8069d7a941c89daf1083bb2 100644 GIT binary patch delta 39 tcmaE6_0DQTx*%sxVqUs#T25m2WJ4aE$uk5ESU@6^FACXgW)Vu_1^_Ns4c!0$ delta 26 icmaE7^~`ERx*)4=T25m2WJ4aE$#Vn^HeV2&#|;3E4+-i3 diff --git a/home/firefox/firefox-gx/default.nix b/home/firefox/firefox-gx/default.nix index ed71e57f..e8e4bc23 100644 --- a/home/firefox/firefox-gx/default.nix +++ b/home/firefox/firefox-gx/default.nix @@ -29,7 +29,7 @@ in ''; meta = with lib; { - description = "Firefox Theme CSS to Opera GX Lovers "; + description = "Firefox Theme CSS to Opera GX Lovers"; homepage = "https://github.com/Godiesc/firefox-gx"; license = licenses.mspl; }; diff --git a/home/theme.nix b/home/theme.nix index 25e5c42d..91de4e59 100644 --- a/home/theme.nix +++ b/home/theme.nix @@ -49,10 +49,11 @@ "${pkgs.dracula-theme}/xres"; xdg.configFile = let + fontSize = lib.strings.floatToString config.vars.fontSize; qtconf = '' [Fonts] - fixed="Sans Serif,${lib.strings.floatToString config.vars.fontSize},-1,5,50,0,0,0,0,0" - general="Sans Serif,${lib.strings.floatToString config.vars.fontSize},-1,5,50,0,0,0,0,0" + fixed="Sans Serif,${fontSize},-1,5,50,0,0,0,0,0" + general="Sans Serif,${fontSize},-1,5,50,0,0,0,0,0" [Appearance] icon_theme=Flat-Remix-Violet-Dark diff --git a/modules/ags/default.nix b/modules/ags/default.nix index 7e4dccf0..8e7248be 100644 --- a/modules/ags/default.nix +++ b/modules/ags/default.nix @@ -4,7 +4,6 @@ pkgs, ... }: let - isNvidia = config.hardware.nvidia.modesetting.enable; isTouchscreen = config.hardware.sensor.iio.enable; in { services.upower.enable = true; diff --git a/modules/greetd/regreet.nix b/modules/greetd/regreet.nix index 1867c7ca..a7324fe6 100644 --- a/modules/greetd/regreet.nix +++ b/modules/greetd/regreet.nix @@ -1,4 +1,5 @@ {pkgs, ...}: { + # TODO: try other greeters https://git.sr.ht/~kennylevinsen/gtkgreet programs.regreet = { package = pkgs.greetd.regreet.overrideAttrs (self: super: rec { version = "0.1.1-patched"; diff --git a/modules/tailscale.nix b/modules/tailscale.nix index 9ebe6f7c..9da372f5 100644 --- a/modules/tailscale.nix +++ b/modules/tailscale.nix @@ -2,6 +2,7 @@ services = { tailscale = { enable = true; + # TODO: add authKeyFile to get extraUpFlags to work extraUpFlags = [ "--login-server https://headscale.nelim.org" "--operator=matt" @@ -9,16 +10,20 @@ }; }; - home-manager.users.${config.vars.user}.programs.bash.shellAliases = { - tup = "tailscale up --login-server https://headscale.nelim.org"; + home-manager.users.${config.vars.user} = let + hostName = config.vars.hostName; + in { + programs.bash.shellAliases = { + tup = "tailscale up --login-server https://headscale.nelim.org"; - pc = "ssh -t matt@binto 'tmux -2u new -At ${config.vars.hostName}'"; - oksys = "ssh -t matt@oksys 'tmux -2u new -At ${config.vars.hostName}'"; - servivi = "ssh -t matt@servivi 'tmux -2u new -At ${config.vars.hostName}'"; - pve = "ssh -t matt@pve 'tmux -2u new -At ${config.vars.hostName}'"; + pc = "ssh -t matt@binto 'tmux -2u new -At ${hostName}'"; + oksys = "ssh -t matt@oksys 'tmux -2u new -At ${hostName}'"; + servivi = "ssh -t matt@servivi 'tmux -2u new -At ${hostName}'"; + pve = "ssh -t matt@pve 'tmux -2u new -At ${hostName}'"; - pod = "mosh matt@pve -- ssh -t -p 6768 matt@10.0.0.122 'tmux -2u new -At ${config.vars.hostName}'"; - jelly = "mosh matt@pve -- ssh -t matt@10.0.0.123 'tmux -2u new -At ${config.vars.hostName}'"; - qbit = "mosh matt@pve -- ssh -t matt@10.0.0.128 'tmux -2u new -At ${config.vars.hostName}'"; + pod = "mosh matt@pve -- ssh -t -p 6768 matt@10.0.0.122 'tmux -2u new -At ${hostName}'"; + jelly = "mosh matt@pve -- ssh -t matt@10.0.0.123 'tmux -2u new -At ${hostName}'"; + qbit = "mosh matt@pve -- ssh -t matt@10.0.0.128 'tmux -2u new -At ${hostName}'"; + }; }; }