From 24603f6a7f931c277a461741c7bcbdd5a71bcd73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Gro=C3=9Fmann?= Date: Wed, 8 Feb 2023 19:52:31 +0100 Subject: [PATCH] FEAT: Implemented devShell --- data/herbstluftwm/xinitrc | 1 - flake.lock | 12 ++++++------ flake.nix | 14 +++++++++++++- users/common/autorandr.nix | 5 +++++ users/common/fish.nix | 19 ++++++++++--------- users/common/herbstluftwm.nix | 35 +++++++++++++++++------------------ users/common/rofi.nix | 3 +++ users/patrick.nix | 2 ++ 8 files changed, 56 insertions(+), 35 deletions(-) create mode 100644 users/common/rofi.nix diff --git a/data/herbstluftwm/xinitrc b/data/herbstluftwm/xinitrc index 77a0265..ff931d7 100755 --- a/data/herbstluftwm/xinitrc +++ b/data/herbstluftwm/xinitrc @@ -12,5 +12,4 @@ xsetroot -solid '#000000' # #touchegg & #dunst & -polybar & exec dbus-launch --sh-syntax --exit-with-session -- herbstluftwm --locked diff --git a/flake.lock b/flake.lock index 2b2d279..def3114 100644 --- a/flake.lock +++ b/flake.lock @@ -66,11 +66,11 @@ "utils": "utils" }, "locked": { - "lastModified": 1675637696, - "narHash": "sha256-tilJS8zCS3PaDfVOfsBZ4zspuam8tc7IMZxtGa/K/uo=", + "lastModified": 1675855108, + "narHash": "sha256-KSiF7aTXTLlocFjMj+61USedaaiscD1ek6f/anFqr3Q=", "owner": "nix-community", "repo": "home-manager", - "rev": "c43d4a3d6d9ef8ddbe2438362f5c775b4186000b", + "rev": "e631d78ddfbf808fd1cfc4d79039a1b3acda5bed", "type": "github" }, "original": { @@ -81,11 +81,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1675673983, - "narHash": "sha256-8hzNh1jtiPxL5r3ICNzSmpSzV7kGb3KwX+FS5BWJUTo=", + "lastModified": 1675763311, + "narHash": "sha256-bz0Q2H3mxsF1CUfk26Sl9Uzi8/HFjGFD/moZHz1HebU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "5a350a8f31bb7ef0c6e79aea3795a890cf7743d4", + "rev": "fab09085df1b60d6a0870c8a89ce26d5a4a708c2", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 910451e..71411eb 100644 --- a/flake.nix +++ b/flake.nix @@ -45,7 +45,19 @@ ]; }; } - // flake-utils.lib.eachSystem [system] (localSystem: { + // flake-utils.lib.eachSystem [system] (localSystem: rec { + pkgs = import nixpkgs { + inherit localSystem; + }; apps = import ./apps/rekey.nix inputs localSystem; + devShells.default = pkgs.mkShell { + name = "patricks tolle nix config"; + + packages = with pkgs; [ + alejandra + statix + update-nix-fetchgit + ]; + }; }); } diff --git a/users/common/autorandr.nix b/users/common/autorandr.nix index 745692d..f7e0b1a 100644 --- a/users/common/autorandr.nix +++ b/users/common/autorandr.nix @@ -43,6 +43,11 @@ }; in { enable = true; + + hooks.postswitch = { + "reload_wm" = "herbstclient reload"; + }; + profiles.AStA_links = asta_conf { # AStA linker arbeitsplatz linker Monitor DP-1-1 = "00ffffffffffff000472ed0688687101111e010380351e782aa135a35b4fa327115054b30c00714f818081c081009500b300d1c001012a4480a070382740082098040f282100001a023a801871382d40582c45000f282100001e000000fd00304b1e5512000a202020202020000000fc00423234375920430a202020202001cf020327f14b9002030411121300001f01230907078301000065030c001000681a00000101304be6023a801871382d40582c45000f282100001e8c0ad08a20e02d10103e96000f2821000018011d007251d01e206e2855000f282100001e8c0ad090204031200c4055000f282100001800000000000000000000000000000000d0"; diff --git a/users/common/fish.nix b/users/common/fish.nix index b9dbf43..92518f2 100644 --- a/users/common/fish.nix +++ b/users/common/fish.nix @@ -21,15 +21,15 @@ "$git_commit" "$git_state" "$git_status" - "$nix_shell" "$character" ]; right_format = lib.concatStrings [ - "$cmd_duration" + "$nix_shell" + "( $cmd_duration)" "$status" "$jobs" - "$time" + " $time" ]; username = { @@ -79,6 +79,7 @@ nix_shell = { heuristic = true; + format = "[$symbol$state( \($name\))]($style)"; }; cmd_duration = { @@ -114,12 +115,12 @@ set -g FZF_COMPLETE 2 '') (lib.mkAfter '' - bind \cr _atuin_search - # prefix search for up and down arrow - bind -k up history-prefix-search-backward - bind -k down history-prefix-search-forward - #Include atuin auto completions - atuin gen-completions --shell fish | source + bind \cr _atuin_search + # prefix search for up and down arrow + bind \e\[A history-prefix-search-backward + bind \e\[B history-prefix-search-forward + #Include atuin auto completions + atuin gen-completions --shell fish | source '') ]; plugins = [ diff --git a/users/common/herbstluftwm.nix b/users/common/herbstluftwm.nix index 356ec06..c2e27e7 100644 --- a/users/common/herbstluftwm.nix +++ b/users/common/herbstluftwm.nix @@ -17,25 +17,24 @@ in { doCheck = false; }); extraConfig = '' - herbstclient set auto_detect_monitors 1 - autorandr -c - herbstclient detect_monitors - herbstclient merge_tag default + herbstclient set auto_detect_monitors 1 + killall polybar + polybar & - herbstclient attr theme.tiling.reset 1 - herbstclient attr theme.floating.reset 1 - herbstclient attr theme.active.color "#9fbc00" - herbstclient attr theme.normal.color "#454545" - herbstclient attr theme.urgent.color orange - herbstclient attr theme.inner_width 1 - herbstclient attr theme.inner_color black - herbstclient attr theme.border_width 3 - herbstclient attr theme.floating.border_width 4 - herbstclient attr theme.floating.outer_width 1 - herbstclient attr theme.floating.outer_color black - herbstclient attr theme.active.inner_color "#3E4A00" - herbstclient attr theme.active.outer_color "#3E4A00" - herbstclient attr theme.background_color "#141414" + herbstclient attr theme.tiling.reset 1 + herbstclient attr theme.floating.reset 1 + herbstclient attr theme.active.color "#9fbc00" + herbstclient attr theme.normal.color "#454545" + herbstclient attr theme.urgent.color orange + herbstclient attr theme.inner_width 1 + herbstclient attr theme.inner_color black + herbstclient attr theme.border_width 3 + herbstclient attr theme.floating.border_width 4 + herbstclient attr theme.floating.outer_width 1 + herbstclient attr theme.floating.outer_color black + herbstclient attr theme.active.inner_color "#3E4A00" + herbstclient attr theme.active.outer_color "#3E4A00" + herbstclient attr theme.background_color "#141414" ''; tags = TAGS; diff --git a/users/common/rofi.nix b/users/common/rofi.nix new file mode 100644 index 0000000..0f1fecd --- /dev/null +++ b/users/common/rofi.nix @@ -0,0 +1,3 @@ +{...}: { + programs.rofi.enable = true; +} diff --git a/users/patrick.nix b/users/patrick.nix index eaa4cad..e9905ad 100644 --- a/users/patrick.nix +++ b/users/patrick.nix @@ -9,6 +9,7 @@ common/autorandr.nix common/desktop.nix common/polybar.nix + common/rofi.nix ]; home = { @@ -20,6 +21,7 @@ nextcloud-client signal-desktop spotify + xdragon ]; };