From a1d0ca2d653abc0bd4b1dca1e082703d5dd2619e Mon Sep 17 00:00:00 2001 From: Ivan Kirilov Dimitrov Date: Fri, 2 Aug 2024 06:54:15 +0200 Subject: [PATCH] refactoring and cleanup --- home/configs/default.nix | 1 - home/modules/default.nix | 86 +++++++++++++++------------------------- 2 files changed, 33 insertions(+), 54 deletions(-) diff --git a/home/configs/default.nix b/home/configs/default.nix index 9c58a4e..89dcda2 100644 --- a/home/configs/default.nix +++ b/home/configs/default.nix @@ -14,7 +14,6 @@ toplevel@{ inputs, withSystem, config, ... }: util swayland web - work ]; }); } diff --git a/home/modules/default.nix b/home/modules/default.nix index fefd417..e4d4d45 100644 --- a/home/modules/default.nix +++ b/home/modules/default.nix @@ -2,21 +2,9 @@ toplevel@{ moduleWithSystem, ... }: { flake.homeManagerModules = { base = moduleWithSystem ( top@{ ... }: - perSystem@{ pkgs, config, ... }: { + perSystem@{ config, ... }: { programs.home-manager.enable = true; - home = { - stateVersion = toplevel.config.flake.stateVersion; - username = "ivand"; - homeDirectory = "/home/ivand"; - sessionVariables = { - EDITOR = "nvim"; - PAGER = "bat"; - TERM = "screen-256color"; - MAKEFLAGS = "-j 4"; - }; - pointerCursor = with pkgs; { name = "catppuccin-mocha-green-cursors"; package = catppuccin-cursors.mochaGreen; size = 24; gtk.enable = true; }; - packages = with pkgs; [ transmission_4 speedtest-cli nvim ]; - }; + home.stateVersion = toplevel.config.flake.stateVersion; xdg = { enable = true; userDirs = with config; { @@ -47,6 +35,13 @@ toplevel@{ moduleWithSystem, ... }: { ivand = moduleWithSystem ( top@{ ... }: perSystem@{ pkgs, config, ... }: { + home = { + username = "ivand"; + homeDirectory = "/home/ivand"; + sessionVariables = { EDITOR = "nvim"; PAGER = "bat"; TERM = "screen-256color"; MAKEFLAGS = "-j 4"; }; + pointerCursor = with pkgs; { name = "catppuccin-mocha-green-cursors"; package = catppuccin-cursors.mochaGreen; size = 24; gtk.enable = true; }; + packages = with pkgs; [ transmission_4 speedtest-cli nvim ]; + }; programs = { password-store = { enable = true; package = pkgs.pass.withExtensions (e: with e; [ pass-otp pass-file ]); settings = { PASSWORD_STORE_DIR = "${config.home.homeDirectory}/.password-store"; }; }; git = { @@ -60,22 +55,36 @@ toplevel@{ moduleWithSystem, ... }: { }; ssh = { enable = true; - matchBlocks = { - vpsfree = { - hostname = "37.205.13.29"; - user = "ivand"; - }; - vpsfree-root = { - hostname = "37.205.13.29"; - user = "root"; - }; - }; + matchBlocks = { vpsfree = { hostname = "37.205.13.29"; user = "ivand"; }; vpsfree-root = { hostname = "37.205.13.29"; user = "root"; }; }; }; gpg.enable = true; }; services = { gpg-agent = { enable = true; enableBashIntegration = true; enableZshIntegration = true; enableNushellIntegration = true; pinentryPackage = pkgs.pinentry-qt; }; }; } ); + util = moduleWithSystem ( + top@{ ... }: + perSystem@{ ... }: { + programs = { + tealdeer = { + enable = true; + settings = { display = { compact = true; }; updates = { auto_update = true; }; }; + }; + bottom = { + enable = true; + settings = { + flags = { rate = "250ms"; }; + row = [ + { ratio = 40; child = [{ type = "cpu"; } { type = "mem"; } { type = "net"; }]; } + { ratio = 35; child = [{ type = "temp"; } { type = "disk"; }]; } + { ratio = 40; child = [{ type = "proc"; default = true; }]; } + ]; + }; + }; + bat.enable = true; + }; + } + ); shell = moduleWithSystem ( top@{ ... }: perSystem@{ pkgs, ... }: { @@ -157,29 +166,6 @@ toplevel@{ moduleWithSystem, ... }: { }; } ); - util = moduleWithSystem ( - top@{ ... }: - perSystem@{ ... }: { - programs = { - tealdeer = { - enable = true; - settings = { display = { compact = true; }; updates = { auto_update = true; }; }; - }; - bottom = { - enable = true; - settings = { - flags = { rate = "250ms"; }; - row = [ - { ratio = 40; child = [{ type = "cpu"; } { type = "mem"; } { type = "net"; }]; } - { ratio = 35; child = [{ type = "temp"; } { type = "disk"; }]; } - { ratio = 40; child = [{ type = "proc"; default = true; }]; } - ]; - }; - }; - bat.enable = true; - }; - } - ); swayland = moduleWithSystem ( top@{ ... }: perSystem@{ pkgs, config, ... }: { @@ -506,11 +492,5 @@ toplevel@{ moduleWithSystem, ... }: { }; } ); - work = moduleWithSystem ( - top@{ ... }: - perSystem@{ pkgs, ... }: { - programs.chromium = { enable = true; package = pkgs.ungoogled-chromium; }; - } - ); }; }