From 3ad0fd30ff458c950d4f5a4bd6135d7daaacc1fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laure=CE=B7t?= Date: Wed, 21 Dec 2022 22:37:21 +0100 Subject: [PATCH] feat: zsh loginExtra --- flake.lock | 34 +++++++++---------------------- flake.nix | 8 ++++++-- hosts/neodymium/configuration.nix | 7 ++++++- 3 files changed, 22 insertions(+), 27 deletions(-) diff --git a/flake.lock b/flake.lock index 8ef1b60..2984dbf 100644 --- a/flake.lock +++ b/flake.lock @@ -213,7 +213,9 @@ }, "home-manager": { "inputs": { - "nixpkgs": "nixpkgs", + "nixpkgs": [ + "nixpkgs" + ], "utils": "utils" }, "locked": { @@ -263,15 +265,15 @@ }, "nixpkgs": { "locked": { - "lastModified": 1671200928, - "narHash": "sha256-mZfzDyzojwj6I0wyooIjGIn81WtGVnx6+avU5Wv+VKU=", - "owner": "nixos", + "lastModified": 1671359686, + "narHash": "sha256-3MpC6yZo+Xn9cPordGz2/ii6IJpP2n8LE8e/ebUXLrs=", + "owner": "NixOS", "repo": "nixpkgs", - "rev": "757b82211463dd5ba1475b6851d3731dfe14d377", + "rev": "04f574a1c0fde90b51bf68198e2297ca4e7cccf4", "type": "github" }, "original": { - "owner": "nixos", + "owner": "NixOS", "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" @@ -296,22 +298,6 @@ } }, "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": { "lastModified": 1670507980, "narHash": "sha256-riNZa0xzM1it3pzxciwALeMs+0CsBMWIW2FqulzK8vM=", @@ -374,7 +360,7 @@ "root": { "inputs": { "home-manager": "home-manager", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs", "webcord": "webcord" } }, @@ -413,7 +399,7 @@ "webcord": { "inputs": { "dream2nix": "dream2nix", - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_2", "webcord": "webcord_2" }, "locked": { diff --git a/flake.nix b/flake.nix index 9a11c6f..4832c21 100644 --- a/flake.nix +++ b/flake.nix @@ -3,12 +3,16 @@ inputs = { 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"; }; - outputs = { nixpkgs, webcord, home-manager, ... }@inputs: { + outputs = { nixpkgs, home-manager, ... }@inputs: { # colmena colmena = { meta = { diff --git a/hosts/neodymium/configuration.nix b/hosts/neodymium/configuration.nix index 4b9bb39..5ceed98 100644 --- a/hosts/neodymium/configuration.nix +++ b/hosts/neodymium/configuration.nix @@ -151,6 +151,11 @@ in { path = "$HOME/.zsh_history"; extended = true; }; + loginExtra = '' + if [[ "$(tty)" == "/dev/tty1" ]]; then + exec sway + fi + ''; initExtra = '' bindkey -e bindkey "^[[1;5C" forward-word @@ -185,7 +190,7 @@ in { ]; }; - programs.direnv = { + programs.direnv = { # TODO: use github:numtide/devshell ? enable = true; nix-direnv.enable = true; };