Implement nixgl and ghostty
This commit is contained in:
parent
a6999d5663
commit
217bc72a6a
1
.zsh/common/05-home-manager.zsh
Normal file
1
.zsh/common/05-home-manager.zsh
Normal file
@ -0,0 +1 @@
|
|||||||
|
alias hm-switch="home-manager switch --flake ~/.config/nix"
|
||||||
2
.zsh/dingleberry/05-home-manager.zsh
Normal file
2
.zsh/dingleberry/05-home-manager.zsh
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Impure because of nixgl wrapper
|
||||||
|
alias hm-switch="home-manager switch --impure --flake ~/.config/nix"
|
||||||
@ -14,6 +14,9 @@ in
|
|||||||
# Let Home Manager install and manage itself.
|
# Let Home Manager install and manage itself.
|
||||||
programs.home-manager.enable = true;
|
programs.home-manager.enable = true;
|
||||||
|
|
||||||
|
nixGL.packages = pkgs.nixgl;
|
||||||
|
nixGL.defaultWrapper = "nvidia";
|
||||||
|
|
||||||
home.username = username;
|
home.username = username;
|
||||||
|
|
||||||
home.homeDirectory = homedir;
|
home.homeDirectory = homedir;
|
||||||
@ -33,6 +36,40 @@ in
|
|||||||
nix-direnv.enable = true;
|
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 = {
|
programs.zsh = {
|
||||||
enable = true;
|
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 = {
|
home.sessionVariables = {
|
||||||
EDITOR = "vim";
|
EDITOR = "vim";
|
||||||
GO111MODULE = "on";
|
GO111MODULE = "on";
|
||||||
|
|||||||
@ -10,6 +10,9 @@ let
|
|||||||
zshSourceCommon = ../.zsh/common;
|
zshSourceCommon = ../.zsh/common;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
nixGL.packages = pkgs.nixgl;
|
||||||
|
nixGL.defaultWrapper = "nvidia";
|
||||||
|
|
||||||
# Let Home Manager install and manage itself.
|
# Let Home Manager install and manage itself.
|
||||||
programs.home-manager.enable = true;
|
programs.home-manager.enable = true;
|
||||||
|
|
||||||
@ -31,25 +34,6 @@ in
|
|||||||
nix-direnv.enable = true;
|
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 = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
userName = "Lukas Cech";
|
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 = {
|
home.sessionVariables = {
|
||||||
EDITOR = "vim";
|
EDITOR = "vim";
|
||||||
GO111MODULE = "on";
|
GO111MODULE = "on";
|
||||||
|
|||||||
37
flake.lock
37
flake.lock
@ -1,5 +1,20 @@
|
|||||||
{
|
{
|
||||||
"nodes": {
|
"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": {
|
"home-manager": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
@ -40,6 +55,27 @@
|
|||||||
"type": "github"
|
"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": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1735821806,
|
"lastModified": 1735821806,
|
||||||
@ -60,6 +96,7 @@
|
|||||||
"inputs": {
|
"inputs": {
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"nix-darwin": "nix-darwin",
|
"nix-darwin": "nix-darwin",
|
||||||
|
"nixgl": "nixgl",
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
19
flake.nix
19
flake.nix
@ -8,9 +8,11 @@
|
|||||||
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
|
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
home-manager.url = "github:nix-community/home-manager";
|
home-manager.url = "github:nix-community/home-manager";
|
||||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
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
|
let
|
||||||
darwin-common = { pkgs, ... }:
|
darwin-common = { pkgs, ... }:
|
||||||
let
|
let
|
||||||
@ -81,13 +83,24 @@
|
|||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
homeConfigurations = {
|
homeConfigurations = let
|
||||||
|
pkgs = import nixpkgs {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
overlays = [
|
||||||
|
nixgl.overlay
|
||||||
|
];
|
||||||
|
config = {
|
||||||
|
allowUnfree = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
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;
|
# pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||||
|
inherit pkgs;
|
||||||
|
|
||||||
modules = [
|
modules = [
|
||||||
./devices/becky-dingleberry.nix
|
./devices/becky-dingleberry.nix
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user