From 937cf528ab126a27bb69a364428fad8a68f41d41 Mon Sep 17 00:00:00 2001 From: Mans Ziesel Date: Tue, 6 Jun 2023 18:41:09 +0200 Subject: [PATCH] i3 test --- home-manager/home.nix | 5 ++- home-manager/i3.nix | 59 +++++++++++++++++---------------- home-manager/i3status-rust.toml | 2 ++ nixos/configuration.nix | 4 +-- 4 files changed, 39 insertions(+), 31 deletions(-) create mode 100644 home-manager/i3status-rust.toml diff --git a/home-manager/home.nix b/home-manager/home.nix index 5b78d78..4538db4 100644 --- a/home-manager/home.nix +++ b/home-manager/home.nix @@ -9,6 +9,7 @@ # You can also split up your configuration and import pieces of it here: # ./nvim.nix + ./i3.nix ]; nixpkgs = { @@ -41,7 +42,9 @@ # Add stuff for your user as you see fit: programs.neovim.enable = true; - # home.packages = with pkgs; [ steam ]; + home.packages = with pkgs; [ + steam + ]; # Enable home-manager and git programs.home-manager.enable = true; diff --git a/home-manager/i3.nix b/home-manager/i3.nix index bf3b4ac..cd1609a 100644 --- a/home-manager/i3.nix +++ b/home-manager/i3.nix @@ -3,41 +3,44 @@ let mod = "Mod1"; in { - xsession.windowManager.i3 = { + xsession = { enable = true; - config = { - modifier = mod; + windowManager.i3 = { + enable = true; + config = { + modMask = mod; - fonts = ["DejaVu Sans Mono, FontAwesome 6"]; + # fonts = ["DejaVu Sans Mono, FontAwesome 6"]; - keybindings = lib.mkOptionDefault { - "${mod}+p" = "exec ${pkgs.dmenu}/bin/dmenu_run"; - "${mod}+x" = "exec sh -c '${pkgs.maim}/bin/maim -s | xclip -selection clipboard -t image/png'"; - "${mod}+Shift+x" = "exec sh -c '${pkgs.i3lock}/bin/i3lock -c 222222 & sleep 5 && xset dpms force of'"; + # keybindings = lib.mkOptionDefault { + # "${mod}+p" = "exec ${pkgs.dmenu}/bin/dmenu_run"; + # "${mod}+x" = "exec sh -c '${pkgs.maim}/bin/maim -s | xclip -selection clipboard -t image/png'"; + # "${mod}+Shift+x" = "exec sh -c '${pkgs.i3lock}/bin/i3lock -c 222222 & sleep 5 && xset dpms force of'"; - # Focus - "${mod}+j" = "focus left"; - "${mod}+k" = "focus down"; - "${mod}+l" = "focus up"; - "${mod}+semicolon" = "focus right"; + # # Focus + # "${mod}+j" = "focus left"; + # "${mod}+k" = "focus down"; + # "${mod}+l" = "focus up"; + # "${mod}+semicolon" = "focus right"; - # Move - "${mod}+Shift+j" = "move left"; - "${mod}+Shift+k" = "move down"; - "${mod}+Shift+l" = "move up"; - "${mod}+Shift+semicolon" = "move right"; + # # Move + # "${mod}+Shift+j" = "move left"; + # "${mod}+Shift+k" = "move down"; + # "${mod}+Shift+l" = "move up"; + # "${mod}+Shift+semicolon" = "move right"; - # My multi monitor setup - "${mod}+m" = "move workspace to output DP-2"; - "${mod}+Shift+m" = "move workspace to output DP-5"; + # # My multi monitor setup + # # "${mod}+m" = "move workspace to output DP-2"; + # # "${mod}+Shift+m" = "move workspace to output DP-5"; + # }; + + # bars = [ + # { + # position = "bottom"; + # statusCommand = "${pkgs.i3status-rust}/bin/i3status-rs ${./i3status-rust.toml}"; + # } + # ]; }; - - bars = [ - { - position = "bottom"; - statusCommand = "${pkgs.i3status-rust}/bin/i3status-rs ${./i3status-rust.toml}"; - } - ]; }; }; } diff --git a/home-manager/i3status-rust.toml b/home-manager/i3status-rust.toml new file mode 100644 index 0000000..8555dff --- /dev/null +++ b/home-manager/i3status-rust.toml @@ -0,0 +1,2 @@ +theme = "gruvgox-dark" +icons = "awesome" diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 7139196..ef0726a 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -133,9 +133,9 @@ enable = true; settings = { # Forbid root login through SSH. - permitRootLogin = "yes"; + PermitRootLogin = "yes"; # Use keys only. Remove if you want to SSH using password (not recommended) - passwordAuthentication = false; + PasswordAuthentication = false; }; };