refactoring and cleanup

This commit is contained in:
Ivan Kirilov Dimitrov 2024-08-02 06:54:15 +02:00
parent 588190e7b6
commit a1d0ca2d65
No known key found for this signature in database
GPG Key ID: 0BDAD4B211C49294
2 changed files with 33 additions and 54 deletions

View File

@ -14,7 +14,6 @@ toplevel@{ inputs, withSystem, config, ... }:
util
swayland
web
work
];
});
}

View File

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