refactor: clean up home

This commit is contained in:
Mohammad Rafiq 2025-03-27 04:12:43 +08:00
parent 3d04d338d1
commit 68047c894e
No known key found for this signature in database
5 changed files with 67 additions and 63 deletions

View file

@ -3,9 +3,9 @@
./ags.nix
./clipse.nix
./comma.nix
./zsh.nix
./direnv.nix
./dunst.nix
./editorconfig.nix
./firefox.nix
./fuzzel.nix
./fzf.nix
@ -23,5 +23,6 @@
./yazi.nix
./zellij.nix
./zoxide.nix
./zsh.nix
];
}

View file

@ -0,0 +1,23 @@
{
home-manager.users.rafiq = {
editorconfig = {
enable = true;
settings = {
"*" = {
end_of_line = "lf";
insert_final_newline = true;
trim_trailing_whitespace = true;
charset = "utf-8";
indent_style = "space";
indent_size = 2;
};
"package.json" = {
indent_style = "unset";
};
"*.lock" = {
indent_size = "unset";
};
};
};
};
}

View file

@ -1,4 +1,9 @@
{ inputs, ... }:
{
imports = [
inputs.sops-nix.nixosModules.sops
];
sops = {
defaultSopsFile = ./secrets/secrets.yaml;
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];

View file

@ -6,17 +6,23 @@
...
}:
{
imports = [
inputs.home-manager.nixosModules.home-manager
./scripts
./programs
];
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = specialArgs;
};
users.mutableUsers = false; # Always reset users on system activation
time.timeZone = "Asia/Singapore";
i18n.defaultLocale = "en_SG.UTF-8";
users.mutableUsers = false; # Always reset users on system activation
users.users.rafiq = {
isNormalUser = true;
description = "rafiq";
@ -29,36 +35,8 @@
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILdsZyY3gu8IGB8MzMnLdh+ClDxQQ2RYG9rkeetIKq8n"
];
};
imports = [
./scripts
./programs
];
home-manager.users.rafiq.imports = [
{
# This enables using home-manager from the command line.
programs.home-manager.enable = true;
editorconfig = {
enable = true;
settings = {
"*" = {
end_of_line = "lf";
insert_final_newline = true;
trim_trailing_whitespace = true;
charset = "utf-8";
indent_style = "space";
indent_size = 2;
};
"package.json" = {
indent_style = "unset";
};
"*.lock" = {
indent_size = "unset";
};
};
};
home-manager.users.rafiq = {
home = {
username = "rafiq";
homeDirectory = "/home/rafiq";
@ -89,6 +67,5 @@
wl-clipboard # provides cli copy and paste commands
];
};
}
];
};
}

View file

@ -22,8 +22,6 @@
specialArgs = args;
modules = [
./configs
inputs.home-manager.nixosModules.home-manager
inputs.sops-nix.nixosModules.sops
];
};
};