feat: zsh loginExtra

This commit is contained in:
Laureηt 2022-12-21 22:37:21 +01:00
parent 5da8b87fc8
commit 3ad0fd30ff
Signed by: Laurent
SSH key fingerprint: SHA256:kZEpW8cMJ54PDeCvOhzreNr4FSh6R13CMGH/POoO8DI
3 changed files with 22 additions and 27 deletions

View file

@ -213,7 +213,9 @@
}, },
"home-manager": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs", "nixpkgs": [
"nixpkgs"
],
"utils": "utils" "utils": "utils"
}, },
"locked": { "locked": {
@ -263,15 +265,15 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1671200928, "lastModified": 1671359686,
"narHash": "sha256-mZfzDyzojwj6I0wyooIjGIn81WtGVnx6+avU5Wv+VKU=", "narHash": "sha256-3MpC6yZo+Xn9cPordGz2/ii6IJpP2n8LE8e/ebUXLrs=",
"owner": "nixos", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "757b82211463dd5ba1475b6851d3731dfe14d377", "rev": "04f574a1c0fde90b51bf68198e2297ca4e7cccf4",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nixos", "owner": "NixOS",
"ref": "nixos-unstable", "ref": "nixos-unstable",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
@ -296,22 +298,6 @@
} }
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": {
"lastModified": 1671359686,
"narHash": "sha256-3MpC6yZo+Xn9cPordGz2/ii6IJpP2n8LE8e/ebUXLrs=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "04f574a1c0fde90b51bf68198e2297ca4e7cccf4",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1670507980, "lastModified": 1670507980,
"narHash": "sha256-riNZa0xzM1it3pzxciwALeMs+0CsBMWIW2FqulzK8vM=", "narHash": "sha256-riNZa0xzM1it3pzxciwALeMs+0CsBMWIW2FqulzK8vM=",
@ -374,7 +360,7 @@
"root": { "root": {
"inputs": { "inputs": {
"home-manager": "home-manager", "home-manager": "home-manager",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs",
"webcord": "webcord" "webcord": "webcord"
} }
}, },
@ -413,7 +399,7 @@
"webcord": { "webcord": {
"inputs": { "inputs": {
"dream2nix": "dream2nix", "dream2nix": "dream2nix",
"nixpkgs": "nixpkgs_3", "nixpkgs": "nixpkgs_2",
"webcord": "webcord_2" "webcord": "webcord_2"
}, },
"locked": { "locked": {

View file

@ -3,12 +3,16 @@
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
home-manager.url = "github:nix-community/home-manager";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
webcord.url = "github:fufexan/webcord-flake"; webcord.url = "github:fufexan/webcord-flake";
}; };
outputs = { nixpkgs, webcord, home-manager, ... }@inputs: { outputs = { nixpkgs, home-manager, ... }@inputs: {
# colmena # colmena
colmena = { colmena = {
meta = { meta = {

View file

@ -151,6 +151,11 @@ in {
path = "$HOME/.zsh_history"; path = "$HOME/.zsh_history";
extended = true; extended = true;
}; };
loginExtra = ''
if [[ "$(tty)" == "/dev/tty1" ]]; then
exec sway
fi
'';
initExtra = '' initExtra = ''
bindkey -e bindkey -e
bindkey "^[[1;5C" forward-word bindkey "^[[1;5C" forward-word
@ -185,7 +190,7 @@ in {
]; ];
}; };
programs.direnv = { programs.direnv = { # TODO: use github:numtide/devshell ?
enable = true; enable = true;
nix-direnv.enable = true; nix-direnv.enable = true;
}; };