refactor(nix): More split

Also added floorp, but not functional at the moment, it requires 24.11
This commit is contained in:
Ahmad Ansori Palembani 2024-10-18 21:06:26 +07:00
parent 0e80eb3083
commit 98d28abc3f
Signed by: null2264
GPG key ID: BA64F8B60AF3EFB6
8 changed files with 142 additions and 42 deletions

View file

@ -24,7 +24,22 @@ in
inherit pkgs;
extraSpecialArgs = { inherit inputs pkgs home-manager vars; };
modules = [
./ziro.nix
./ziro
./ziro/darwin.nix
];
};
"ziro@potato" =
let
inherit (mkSystem "x86_64-linux" nixpkgs) system pkgs;
in
home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = { inherit inputs pkgs home-manager vars; };
modules = [
./ziro
./ziro/linux.nix
#../modules/home-manager/floorp.nix # FIXME: Added on 24.11
];
};
}

View file

@ -1,33 +0,0 @@
{ pkgs, config, vars, ... }:
let
dirPrefix = if pkgs.stdenv.isDarwin then "/Users/" else "/home/";
in {
home = {
username = "ziro";
homeDirectory = dirPrefix + "ziro";
};
programs = {
browserpass = {
enable = true;
browsers = [ "brave" "chrome" ]; # Arc and Chrome share the same `Application Support` dir, not sure why tbh.
};
};
# Swap CapsLock with Esc for better vi-mode experience.
launchd.agents.CapsEscSwap = {
enable = true;
config = {
ProgramArguments = [
"/usr/bin/hidutil"
"property"
"--set"
"{\"UserKeyMapping\":[{\"HIDKeyboardModifierMappingSrc\":0x700000039,\"HIDKeyboardModifierMappingDst\":0x700000029},{\"HIDKeyboardModifierMappingSrc\":0x700000029,\"HIDKeyboardModifierMappingDst\":0x700000039}]}"
];
RunAtLoad = true;
};
};
home.stateVersion = "24.05";
}

View file

@ -0,0 +1,24 @@
{ pkgs, config, vars, ... }:
{
home.homeDirectory = "/Users/ziro";
programs.browserpass = {
enable = true;
browsers = [ "brave" "chrome" ]; # Arc and Chrome share the same `Application Support` dir, not sure why tbh.
};
# Swap CapsLock with Esc for better vi-mode experience.
launchd.agents.CapsEscSwap = {
enable = true;
config = {
ProgramArguments = [
"/usr/bin/hidutil"
"property"
"--set"
''{"UserKeyMapping":[{"HIDKeyboardModifierMappingSrc":0x700000039,"HIDKeyboardModifierMappingDst":0x700000029},{"HIDKeyboardModifierMappingSrc":0x700000029,"HIDKeyboardModifierMappingDst":0x700000039}]}''
];
RunAtLoad = true;
};
};
}

View file

@ -0,0 +1,9 @@
{ pkgs, config, vars, ... }:
{
home = {
username = "ziro";
};
home.stateVersion = "24.05";
}

View file

@ -0,0 +1,5 @@
{ pkgs, config, vars, ... }:
{
home.homeDirectory = "/home/ziro";
}