Implement nixgl and ghostty

This commit is contained in:
Arnie 2025-01-04 01:17:25 +01:00
parent a6999d5663
commit 217bc72a6a
6 changed files with 115 additions and 46 deletions

View File

@ -0,0 +1 @@
alias hm-switch="home-manager switch --flake ~/.config/nix"

View File

@ -0,0 +1,2 @@
# Impure because of nixgl wrapper
alias hm-switch="home-manager switch --impure --flake ~/.config/nix"

View File

@ -14,6 +14,9 @@ in
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
nixGL.packages = pkgs.nixgl;
nixGL.defaultWrapper = "nvidia";
home.username = username;
home.homeDirectory = homedir;
@ -33,6 +36,40 @@ in
nix-direnv.enable = true;
};
programs.git = {
enable = true;
userName = "Arnie";
userEmail = "i@cechis.cz";
ignores = [
".vscode"
".direnv"
".devenv"
".envrc"
];
extraConfig = {
core = {
autocrlf = "input";
# TODO: Provide through nix
hooksPath = "~/.git/hooks";
editor = "vim";
};
pull.rebase = false;
init.defaultBranch = "main";
};
};
programs.ghostty = {
enable = true;
installVimSyntax = true;
enableZshIntegration = true;
package = config.lib.nixGL.wrap pkgs.ghostty;
};
programs.zsh = {
enable = true;
@ -78,30 +115,6 @@ in
'';
};
programs.git = {
enable = true;
userName = "Arnie";
userEmail = "i@cechis.cz";
ignores = [
".vscode"
".direnv"
".devenv"
".envrc"
];
extraConfig = {
core = {
autocrlf = "input";
# TODO: Provide through nix
hooksPath = "~/.git/hooks";
editor = "vim";
};
pull.rebase = false;
init.defaultBranch = "main";
};
};
home.sessionVariables = {
EDITOR = "vim";
GO111MODULE = "on";

View File

@ -10,6 +10,9 @@ let
zshSourceCommon = ../.zsh/common;
in
{
nixGL.packages = pkgs.nixgl;
nixGL.defaultWrapper = "nvidia";
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
@ -31,25 +34,6 @@ in
nix-direnv.enable = true;
};
programs.zsh = {
enable = true;
dirHashes = {
mac = "${homedir}/.macshare";
};
initExtra = ''
for file in ${zshSourceCommon}/*.zsh; do
source "$file"
done
autoload -U +X bashcompinit && bashcompinit
source <(kubectl completion zsh)
complete -C '/usr/local/bin/aws_completer' aws
'';
};
programs.git = {
enable = true;
userName = "Lukas Cech";
@ -74,6 +58,25 @@ in
};
};
programs.zsh = {
enable = true;
dirHashes = {
mac = "${homedir}/.macshare";
};
initExtra = ''
for file in ${zshSourceCommon}/*.zsh; do
source "$file"
done
autoload -U +X bashcompinit && bashcompinit
source <(kubectl completion zsh)
complete -C '/usr/local/bin/aws_completer' aws
'';
};
home.sessionVariables = {
EDITOR = "vim";
GO111MODULE = "on";

View File

@ -1,5 +1,20 @@
{
"nodes": {
"flake-utils": {
"locked": {
"lastModified": 1659877975,
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
@ -40,6 +55,27 @@
"type": "github"
}
},
"nixgl": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1713543440,
"narHash": "sha256-lnzZQYG0+EXl/6NkGpyIz+FEOc/DSEG57AP1VsdeNrM=",
"owner": "nix-community",
"repo": "nixGL",
"rev": "310f8e49a149e4c9ea52f1adf70cdc768ec53f8a",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixGL",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1735821806,
@ -60,6 +96,7 @@
"inputs": {
"home-manager": "home-manager",
"nix-darwin": "nix-darwin",
"nixgl": "nixgl",
"nixpkgs": "nixpkgs"
}
}

View File

@ -8,9 +8,11 @@
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
nixgl.url = "github:nix-community/nixGL";
nixgl.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = inputs@{ self, nix-darwin, nixpkgs, home-manager }:
outputs = inputs@{ self, nix-darwin, nixpkgs, home-manager, nixgl }:
let
darwin-common = { pkgs, ... }:
let
@ -81,13 +83,24 @@
};
in
{
homeConfigurations = {
homeConfigurations = let
pkgs = import nixpkgs {
system = "x86_64-linux";
overlays = [
nixgl.overlay
];
config = {
allowUnfree = true;
};
};
in{
# init with
# nix run home-manager/master -- switch --flake ~/.config/nix
# update with
# home-manager switch --flake ~/.config/nix
"becky@dingleberry" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
# pkgs = nixpkgs.legacyPackages.x86_64-linux;
inherit pkgs;
modules = [
./devices/becky-dingleberry.nix