tmux: initial configuration
This commit is contained in:
parent
f1c6a62468
commit
2b2ebd9e0b
37
flake.lock
37
flake.lock
@ -20,6 +20,27 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"utils": "utils"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1673343300,
|
||||
"narHash": "sha256-5Xdj6kpXYMie0MlnGwqK5FaMdsedxvyuakWtyKB3zaQ=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "176e455371a8371586e8a3ff0d56ee9f3ca2324e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1673345971,
|
||||
@ -55,9 +76,25 @@
|
||||
"root": {
|
||||
"inputs": {
|
||||
"agenix": "agenix",
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs-unstable": "nixpkgs-unstable"
|
||||
}
|
||||
},
|
||||
"utils": {
|
||||
"locked": {
|
||||
"lastModified": 1667395993,
|
||||
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
|
@ -5,11 +5,14 @@
|
||||
|
||||
agenix.url = "github:ryantm/agenix";
|
||||
agenix.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
home-manager.url = "github:nix-community/home-manager";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
description = "Hillion Nix flake";
|
||||
|
||||
outputs = { self, nixpkgs, nixpkgs-unstable, agenix }@inputs: {
|
||||
outputs = { self, nixpkgs, nixpkgs-unstable, agenix, home-manager }@inputs: {
|
||||
nixosConfigurations =
|
||||
let
|
||||
fqdns = builtins.attrNames (builtins.readDir ./hosts);
|
||||
@ -21,6 +24,7 @@
|
||||
modules = [
|
||||
./hosts/${fqdn}/default.nix
|
||||
agenix.nixosModule
|
||||
home-manager.nixosModule
|
||||
{
|
||||
system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev;
|
||||
}
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
{
|
||||
imports = [
|
||||
../home/default.nix
|
||||
./shell.nix
|
||||
./ssh.nix
|
||||
./tailscale.nix
|
||||
@ -28,7 +29,6 @@
|
||||
users."jake" = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" ]; # enable sudo
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -1,6 +1,8 @@
|
||||
{ lib, config, ... }:
|
||||
{ pkgs, lib, config, ... }:
|
||||
|
||||
{
|
||||
config.users.defaultUserShell = pkgs.zsh;
|
||||
|
||||
config.programs.zsh = {
|
||||
enable = true;
|
||||
histSize = 100000;
|
||||
@ -9,12 +11,6 @@
|
||||
syntaxHighlighting = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
autosuggestions = {
|
||||
enable = true;
|
||||
highlightStyle = "fg=5";
|
||||
strategy = [ "match_prev_cmd" "completion" "history" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
15
modules/home/default.nix
Normal file
15
modules/home/default.nix
Normal file
@ -0,0 +1,15 @@
|
||||
{ pkgs, lib, config, ... }:
|
||||
|
||||
{
|
||||
home-manager.users.root.home.stateVersion = "22.11";
|
||||
home-manager.users.jake.home.stateVersion = "22.11";
|
||||
|
||||
imports = [
|
||||
./tmux/default.nix
|
||||
];
|
||||
|
||||
## Set an empty ZSH config and defer to the global one
|
||||
## This is particularly important for root on tmpfs
|
||||
home-manager.users.root.programs.zsh.enable = true;
|
||||
home-manager.users.jake.programs.zsh.enable = true;
|
||||
}
|
10
modules/home/tmux/.tmux.conf
Normal file
10
modules/home/tmux/.tmux.conf
Normal file
@ -0,0 +1,10 @@
|
||||
setw -g mouse on
|
||||
|
||||
# Bindings
|
||||
bind C-Y set-window-option synchronize-panes
|
||||
bind -n C-k clear-history
|
||||
|
||||
# New panes in the same directory
|
||||
bind '"' split-window -c "#{pane_current_path}"
|
||||
bind % split-window -h -c "#{pane_current_path}"
|
||||
bind c new-window -c "#{pane_current_path}"
|
8
modules/home/tmux/default.nix
Normal file
8
modules/home/tmux/default.nix
Normal file
@ -0,0 +1,8 @@
|
||||
{ pkgs, lib, config, ... }:
|
||||
|
||||
{
|
||||
home-manager.users.jake.programs.tmux = {
|
||||
enable = true;
|
||||
extraConfig = lib.readFile ./.tmux.conf;
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user