refactor more

This commit is contained in:
2025-12-11 20:07:46 +00:00
parent b85728470c
commit 07c39081bb
15 changed files with 190 additions and 195 deletions

View File

@@ -1,22 +0,0 @@
{
pkgs,
lib,
...
}: let
setWallpaperScript = import ./darwin-wallpaper.nix {inherit pkgs;};
in {
imports = [
./darwin-ghostty.nix
];
home = {
packages = pkgs.callPackage ./darwin-packages.nix {};
activation = {
"setWallpaper" =
lib.hm.dag.entryAfter ["revealHomeLibraryDirectory"] ''
echo "[+] Setting wallpaper"
${setWallpaperScript}/bin/set-wallpaper-script
'';
};
};
}

View File

@@ -1,10 +0,0 @@
{pkgs}:
with pkgs; [
_1password-gui
dockutil
mas
raycast
tailscale
# whatsapp-for-mac
xcodes
]

View File

@@ -1,22 +1,9 @@
{
config,
constants,
inputs,
pkgs,
user,
...
}: {
imports = [
./core.nix
./syncthing.nix
./tailscale.nix
./darwin-dock.nix
./darwin-homebrew.nix
./darwin-syncthing.nix
./darwin-system.nix
inputs.sops-nix.darwinModules.sops
];
system = {
primaryUser = user;
stateVersion = constants.stateVersions.darwin;
@@ -38,42 +25,5 @@
shell = pkgs.fish;
};
home-manager = {
useGlobalPkgs = true;
users.${user} = {
pkgs,
config,
lib,
...
}: {
_module.args = {inherit user constants inputs;};
imports = [
inputs.nixvim.homeModules.nixvim
./home.nix
./darwin-home.nix
];
fonts.fontconfig.enable = true;
};
};
local = {
dock = {
enable = true;
username = user;
entries = [
{path = "/Applications/Helium.app/";}
{path = "${config.users.users.${user}.home}/Applications/Home Manager Apps/Ghostty.app/";}
{path = "/System/Applications/Calendar.app/";}
{path = "/System/Applications/Mail.app/";}
{path = "/System/Applications/Notes.app/";}
{path = "/System/Applications/Music.app/";}
{path = "/System/Applications/System Settings.app/";}
{
path = "${config.users.users.${user}.home}/Downloads";
section = "others";
options = "--sort name --view grid --display stack";
}
];
};
};
home-manager.useGlobalPkgs = true;
}

View File

@@ -2,6 +2,7 @@
config,
pkgs,
lib,
user,
...
}:
with lib; let
@@ -36,13 +37,27 @@ in {
};
};
});
readOnly = true;
default = [
{path = "/Applications/Helium.app/";}
{path = "${config.users.users.${user}.home}/Applications/Home Manager Apps/Ghostty.app/";}
{path = "/System/Applications/Calendar.app/";}
{path = "/System/Applications/Mail.app/";}
{path = "/System/Applications/Notes.app/";}
{path = "/System/Applications/Music.app/";}
{path = "/System/Applications/System Settings.app/";}
{
path = "${config.users.users.${user}.home}/Downloads";
section = "others";
options = "--sort name --view grid --display stack";
}
];
};
username =
mkOption {
description = "Username to apply the dock settings to";
type = types.str;
default = user;
};
};
};

View File

@@ -1,37 +1,23 @@
{
pkgs,
lib,
constants,
inputs,
...
}: {
imports = [
./atuin.nix
./bash.nix
./bat.nix
./direnv.nix
./eza.nix
./fish.nix
./fzf.nix
./git.nix
./jjui.nix
./jujutsu.nix
./lazygit.nix
./mise.nix
./neovim
./opencode.nix
./ripgrep.nix
./ssh.nix
./starship.nix
./zellij.nix
./zk.nix
./zoxide.nix
./zsh.nix
];
}: let
setWallpaperScript = import ./wallpaper.nix {inherit pkgs;};
in {
programs.home-manager.enable = true;
home = {
packages = pkgs.callPackage ./packages.nix {inherit inputs;};
stateVersion = constants.stateVersions.homeManager;
activation = lib.mkIf pkgs.stdenv.isDarwin {
"setWallpaper" =
lib.hm.dag.entryAfter ["revealHomeLibraryDirectory"] ''
echo "[+] Setting wallpaper"
${setWallpaperScript}/bin/set-wallpaper-script
'';
};
};
}

View File

@@ -1,6 +0,0 @@
{pkgs}:
with pkgs; [
gcc15
lm_sensors
ghostty.terminfo
]

View File

@@ -1,16 +1,9 @@
{
pkgs,
inputs,
user,
constants,
...
}: {
imports = [
./core.nix
./tailscale.nix
inputs.sops-nix.nixosModules.sops
];
security.sudo.enable = true;
system.stateVersion = constants.stateVersions.nixos;
@@ -61,18 +54,5 @@
};
};
home-manager = {
useGlobalPkgs = true;
users.${user} = {
pkgs,
config,
lib,
...
}: {
_module.args = {inherit user constants inputs;};
imports = [
inputs.nixvim.homeModules.nixvim
];
};
};
home-manager.useGlobalPkgs = true;
}

View File

@@ -3,40 +3,54 @@
inputs,
...
}:
with pkgs; [
(callPackage ./open-project.nix {})
age
alejandra
ast-grep
bun
delta
devenv
dig
docker
docker-compose
fastfetch
fd
gh
git
gnumake
gnupg
hledger
htop
hyperfine
jq
killall
lsof
nurl
openssh
postgresql_17
sd
sops
sqlite
tokei
tree
tree-sitter
unzip
vivid
ov
zip
]
with pkgs;
[
(callPackage ./open-project.nix {})
age
alejandra
ast-grep
bun
delta
devenv
dig
docker
docker-compose
fastfetch
fd
gh
git
gnumake
gnupg
hledger
htop
hyperfine
jq
killall
lsof
nurl
openssh
postgresql_17
sd
sops
sqlite
tokei
tree
tree-sitter
unzip
vivid
ov
zip
]
++ lib.optionals stdenv.isDarwin [
_1password-gui
dockutil
mas
raycast
tailscale
xcodes
]
++ lib.optionals stdenv.isLinux [
gcc15
lm_sensors
ghostty.terminfo
]