Big updates
This commit is contained in:
parent
aa7fd15924
commit
5751958cad
@ -1,2 +0,0 @@
|
|||||||
# Impure because of nixgl wrapper
|
|
||||||
alias hm-switch="home-manager switch --impure --flake ~/.config/nix"
|
|
||||||
@ -1,2 +0,0 @@
|
|||||||
# Impure because of nixgl wrapper
|
|
||||||
alias hm-switch="darwin-rebuild switch --flake ~/.config/nix"
|
|
||||||
@ -7,17 +7,16 @@ let
|
|||||||
username = "becky";
|
username = "becky";
|
||||||
homedir = "/home/${username}";
|
homedir = "/home/${username}";
|
||||||
|
|
||||||
zshSourceCommon = ../.zsh/common;
|
zshSourceDirs = [
|
||||||
zshSourceUser = ../.zsh/dingleberry;
|
../modules/zsh/dingleberry
|
||||||
|
];
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
# Let Home Manager install and manage itself.
|
#targets.genericLinux.enable = true;
|
||||||
programs.home-manager.enable = true;
|
|
||||||
|
|
||||||
# Enable XDG for non terminal apps
|
# Enable XDG for non terminal apps
|
||||||
# https://github.com/nix-community/home-manager/issues/1439
|
# https://github.com/nix-community/home-manager/issues/1439
|
||||||
#programs.bash.enable = true;
|
#programs.bash.enable = true;
|
||||||
#targets.genericLinux.enable = true;
|
|
||||||
#xdg = {
|
#xdg = {
|
||||||
# enable = true;
|
# enable = true;
|
||||||
# mime = {
|
# mime = {
|
||||||
@ -35,7 +34,6 @@ in
|
|||||||
home.stateVersion = "24.11";
|
home.stateVersion = "24.11";
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
bat
|
|
||||||
nixd
|
nixd
|
||||||
# TODO: Move from system to nix
|
# TODO: Move from system to nix
|
||||||
# awscli2
|
# awscli2
|
||||||
@ -72,25 +70,27 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
programs.ghostty = {
|
programs.ghostty = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
installBatSyntax = true;
|
||||||
installVimSyntax = true;
|
installVimSyntax = true;
|
||||||
enableZshIntegration = true;
|
enableZshIntegration = true;
|
||||||
|
|
||||||
package = config.lib.nixGL.wrap pkgs.ghostty;
|
package = config.lib.nixGL.wrap pkgs.ghostty;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
theme = "catppuccin-mocha";
|
||||||
|
font-size = 10;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
autocd = true;
|
|
||||||
|
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
cat = "bat --paging=never";
|
hm-switch = "home-manager switch --impure --flake ~/.config/nix";
|
||||||
};
|
};
|
||||||
|
|
||||||
dirHashes = {
|
dirHashes = {
|
||||||
mac = "${homedir}/storage/.macshare";
|
mac = "${homedir}/storage/.macshare";
|
||||||
nix = "${homedir}/.config/nix";
|
nix = "${homedir}/.config/nix";
|
||||||
@ -119,13 +119,13 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
initExtra = ''
|
initExtra = ''
|
||||||
for file in ${zshSourceCommon}/*.zsh; do
|
${builtins.concatStringsSep "\n" (
|
||||||
source "$file"
|
builtins.map (dir: ''
|
||||||
done
|
for file in ${dir}/*.zsh; do
|
||||||
|
|
||||||
for file in ${zshSourceUser}/*.zsh; do
|
|
||||||
source "$file"
|
source "$file"
|
||||||
done
|
done
|
||||||
|
'') zshSourceDirs
|
||||||
|
)}
|
||||||
|
|
||||||
autoload -U +X bashcompinit && bashcompinit
|
autoload -U +X bashcompinit && bashcompinit
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
{
|
{
|
||||||
config,
|
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
@ -9,13 +8,10 @@ let
|
|||||||
|
|
||||||
zshSourceDirs = [
|
zshSourceDirs = [
|
||||||
../.zsh/common
|
../.zsh/common
|
||||||
../.zsh/macos
|
../modules/zsh/macos
|
||||||
];
|
];
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
# Let Home Manager install and manage itself.
|
|
||||||
programs.home-manager.enable = true;
|
|
||||||
|
|
||||||
home.username = username;
|
home.username = username;
|
||||||
|
|
||||||
home.homeDirectory = homedir;
|
home.homeDirectory = homedir;
|
||||||
@ -24,7 +20,6 @@ in
|
|||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
awscli2
|
awscli2
|
||||||
bat
|
|
||||||
k9s
|
k9s
|
||||||
kubectl
|
kubectl
|
||||||
nixd
|
nixd
|
||||||
@ -64,29 +59,20 @@ in
|
|||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
autocd = true;
|
|
||||||
|
|
||||||
shellAliases = {
|
|
||||||
cat = "bat --paging=never";
|
|
||||||
};
|
|
||||||
|
|
||||||
dirHashes = {
|
dirHashes = {
|
||||||
mac = "${homedir}/storage/.macshare";
|
mac = "${homedir}/storage/.macshare";
|
||||||
nix = "${homedir}/.config/nix";
|
nix = "${homedir}/.config/nix";
|
||||||
};
|
};
|
||||||
|
|
||||||
initExtra = ''
|
initExtra = ''
|
||||||
${builtins.concatStringsSep "\n"
|
${builtins.concatStringsSep "\n" (
|
||||||
(builtins.map (dir:
|
builtins.map (dir: ''
|
||||||
''
|
|
||||||
for file in ${dir}/*.zsh; do
|
for file in ${dir}/*.zsh; do
|
||||||
source "$file"
|
source "$file"
|
||||||
done
|
done
|
||||||
''
|
'') zshSourceDirs
|
||||||
) zshSourceDirs)
|
)}
|
||||||
}
|
|
||||||
|
|
||||||
# ${pkgs.keepassxc}
|
|
||||||
autoload -U +X bashcompinit && bashcompinit
|
autoload -U +X bashcompinit && bashcompinit
|
||||||
|
|
||||||
source <(kubectl completion zsh)
|
source <(kubectl completion zsh)
|
||||||
@ -101,7 +87,6 @@ in
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# TODO: launchd timers
|
# TODO: launchd timers
|
||||||
|
|
||||||
# <?xml version="1.0" encoding="UTF-8"?>
|
# <?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|||||||
37
flake.nix
37
flake.nix
@ -14,7 +14,8 @@
|
|||||||
nixgl.inputs.nixpkgs.follows = "nixpkgs";
|
nixgl.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs@{
|
outputs =
|
||||||
|
inputs@{
|
||||||
self,
|
self,
|
||||||
home-manager,
|
home-manager,
|
||||||
mac-app-util,
|
mac-app-util,
|
||||||
@ -23,7 +24,14 @@
|
|||||||
nixpkgs,
|
nixpkgs,
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
darwin-common = { pkgs, ... }:
|
systems = nixpkgs.lib.genAttrs [
|
||||||
|
"x86_64-linux"
|
||||||
|
"aarch64-linux"
|
||||||
|
"aarch64-darwin"
|
||||||
|
];
|
||||||
|
|
||||||
|
darwin-common =
|
||||||
|
{ pkgs, ... }:
|
||||||
let
|
let
|
||||||
custom-key-mapping = {
|
custom-key-mapping = {
|
||||||
# AI Instructions
|
# AI Instructions
|
||||||
@ -115,7 +123,24 @@
|
|||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
homeConfigurations = let
|
lib = {
|
||||||
|
forAllSystems =
|
||||||
|
function:
|
||||||
|
systems (
|
||||||
|
system:
|
||||||
|
function (
|
||||||
|
import nixpkgs {
|
||||||
|
inherit system;
|
||||||
|
config.allowUnfreePredicate = (pkg: builtins.elem (nixpkgs.lib.getName pkg) [ "nvidia" ]);
|
||||||
|
}
|
||||||
|
)
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
formatter = self.lib.forAllSystems (pkgs: pkgs.nixfmt-rfc-style);
|
||||||
|
|
||||||
|
homeConfigurations =
|
||||||
|
let
|
||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
overlays = [
|
overlays = [
|
||||||
@ -125,16 +150,17 @@
|
|||||||
allowUnfree = true;
|
allowUnfree = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
# init with
|
# init with
|
||||||
# nix run home-manager/master -- switch --flake ~/.config/nix
|
# nix run home-manager/master -- switch --flake ~/.config/nix
|
||||||
# update with
|
# update with
|
||||||
# home-manager switch --flake ~/.config/nix
|
# home-manager switch --flake ~/.config/nix
|
||||||
"becky@dingleberry" = home-manager.lib.homeManagerConfiguration {
|
"becky@dingleberry" = home-manager.lib.homeManagerConfiguration {
|
||||||
# pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
|
|
||||||
modules = [
|
modules = [
|
||||||
|
./modules/common.nix
|
||||||
./devices/becky-dingleberry.nix
|
./devices/becky-dingleberry.nix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
@ -159,6 +185,7 @@
|
|||||||
"keepassxc"
|
"keepassxc"
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
./modules/common.nix
|
||||||
home-manager.darwinModules.home-manager
|
home-manager.darwinModules.home-manager
|
||||||
{
|
{
|
||||||
home-manager = {
|
home-manager = {
|
||||||
|
|||||||
50
modules/common.nix
Normal file
50
modules/common.nix
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
zshSourceCommon = ./zsh/common;
|
||||||
|
|
||||||
|
isDarwin = pkgs.stdenv.hostPlatform.isDarwin;
|
||||||
|
isLinux = pkgs.stdenv.hostPlatform.isLinux;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
|
||||||
|
# Let Home Manager install and manage itself.
|
||||||
|
programs.home-manager.enable = true;
|
||||||
|
|
||||||
|
programs.bat = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.zsh = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
autocd = lib.mkDefault true;
|
||||||
|
|
||||||
|
shellAliases =
|
||||||
|
{
|
||||||
|
cat = lib.mkDefault "bat --paging=never";
|
||||||
|
nixfix = lib.mkDefault "nix fmt ./**/*.nix";
|
||||||
|
}
|
||||||
|
// (
|
||||||
|
if isDarwin then
|
||||||
|
{
|
||||||
|
hm-switch = lib.mkDefault "darwin-rebuild switch --flake ~/.config/nix";
|
||||||
|
}
|
||||||
|
else if isLinux then
|
||||||
|
{
|
||||||
|
hm-switch = lib.mkDefault "home-manager switch --flake ~/.config/nix";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{ }
|
||||||
|
);
|
||||||
|
|
||||||
|
initExtra = ''
|
||||||
|
for file in ${zshSourceCommon}/*.zsh; do
|
||||||
|
source "$file"
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user