Skip to content

Commit d2ad0e7

Browse files
committed
bunch of changes
1 parent 212fb27 commit d2ad0e7

File tree

16 files changed

+13388
-1108
lines changed

16 files changed

+13388
-1108
lines changed

flake.lock

Lines changed: 12631 additions & 1060 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
inputs = {
44
flake-utils.url = "github:numtide/flake-utils";
55
nix.url = "github:NixOS/nix/2.8.0";
6-
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
6+
nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.05";
77
nixpkgs-2111.follows = "cardano-node/haskellNix/nixpkgs-2111";
88
nixpkgs-2105.follows = "cardano-node/haskellNix/nixpkgs-2105";
9-
cardano-node.url = "github:input-output-hk/cardano-node/karknu/fix_localrootpeers";
9+
cardano-node.url = "github:input-output-hk/cardano-node/1.35.0-rc4";
1010
#cardano-node.inputs.nixpkgs.follows = "haskellNix/nixpkgs-2105";
1111
#cardano-addresses.url = "github:input-output-hk/cardano-addresses";
1212
haskellNix.url = "github:input-output-hk/haskell.nix/14f740c7c8f535581c30b1697018e389680e24cb";
1313
#cardano-db-sync.url = "github:input-output-hk/cardano-db-sync";
14-
#adawallet.url = "github:input-output-hk/adawallet";
14+
adawallet.url = "github:input-output-hk/adawallet";
1515
#adawallet.inputs.cardano-addresses.follows = "cardano-addresses";
1616
#adawallet.inputs.haskellNix.follows = "haskellNix";
1717
cncli.url = "github:AndrewWestberg/cncli";
@@ -24,6 +24,7 @@
2424
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
2525
styx.url = "github:disassembler/styx";
2626
neovim-flake.url = "github:disassembler/neovim-flake";
27+
vivarium.url = "github:nrdxp/vivarium";
2728
};
2829
outputs = { ... } @ args: import ./outputs.nix args;
2930
}

modules/modules-list.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
./roles/base.nix
66
./profiles/xapps.nix
77
./profiles/tmux
8+
./profiles/vivarium
89
./profiles/prometheus-surfboard-exporter/service.nix
910
./profiles/hledger/service.nix
1011
./profiles/weechat.nix
12+
./services/omadad
1113
]
Lines changed: 279 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,279 @@
1+
2+
[global-config]
3+
# Options: alt, ctrl, logo, mod2, mod3
4+
# This key can be referenced in custom keybindings as `meta`
5+
meta-key = "logo"
6+
7+
focus-follows-mouse = true
8+
9+
# One workspace with each name is generated automatically. Each workspace receives layouts
10+
# as defined in the [[layout]] list below. You can configure keybindings to switch to
11+
# workspaces by name, or to move windows between them.
12+
workspace-names = ["main", "2", "3", "4", "5", "6", "7", "8", "9"]
13+
14+
# Autogenerate keybinds to switch to workspaces, specifically:
15+
# - Bind meta-$N to switch to workspace number N, for each number key $N,
16+
# - Bind meta-shift-$N to move the active window to workspace number N, for each number key $N
17+
# You can also/alternatively create these bindings via custom [[keybind]]s below.
18+
# Set this to false to disable automatic keybind generation and leave the keybinds all to you.
19+
bind-workspaces-to-numbers = true
20+
21+
# Cursor button used to drag windows around (also making them floating) when meta is held
22+
win-move-cursor-button = "left"
23+
24+
# Cursor button used to resize windows (also making them floating) when meta is held
25+
win-resize-cursor-button = "right"
26+
27+
# Window border configuration
28+
border-width = 1 # pixels
29+
active-border-colour = [1.0, 0.0, 0.7, 1.0] # rgba
30+
inactive-border-colour = [0.6, 0.6, 0.9, 1.0] # rgba
31+
32+
# Gap distance between windows
33+
gap-width = 4 # pixels
34+
35+
# Allow views to enter fullscreen state. If allowed this bypasses the current layout.
36+
allow-fullscreen = true
37+
38+
# Desktop background colour. Note this is overridden by the [background] if set.
39+
clear-colour = [0.73, 0.73, 0.73, 1.0]
40+
41+
### XKB-CONFIG ###
42+
# These all accept standard xkb syntax and options, e.g. as you would pass to `setxkbmap`
43+
# run from a shell.
44+
[xkb-config]
45+
# model = "pc104"
46+
# layout = "us"
47+
# variant = "basic"
48+
# options = "ctrl:nocaps"
49+
50+
### BAR ###
51+
# Options for configuring a bar program. The desktop bar (if any) is often used to display
52+
# information such as current workspaces, system information, and open windows.
53+
[bar]
54+
command = "waybar" # note this is a command to execute: this program must be installed to work
55+
update-signal-number = 1
56+
57+
### IPC ###
58+
# Inter-process communication settings.
59+
[ipc]
60+
# The filename to which Vivarium will write workspace state information whenever something changes.
61+
# Programs can watch this file to display the workspace status.
62+
# This is a hacky solution that will be deprecated at some point.
63+
# workspaces-filename = "/path/to/some/file.txt"
64+
65+
### LAYOUTS ###
66+
# Configure any number of layouts. Each workspace gets an independent copy of each layout.
67+
# The following options are available for each layout:
68+
# - name : The layout name to display in bar programs and logs, can be anything
69+
# Defaults to matching the `layout` option.
70+
# - layout : The name of the Vivarium layout function to use.
71+
# Run `vivarium -h` to get a list of available layout names.
72+
# - show-borders : If true, draw borders around windows. Defaults to true.
73+
# - ignore-excluded-regions : If true, tile windows across the full workspace regardless of
74+
# space reserved for bars, system tray etc.
75+
#
76+
# Run `vivarium --list-config-options` to get a list of available layouts.
77+
78+
[[layout]]
79+
name = "Tall"
80+
layout = "fibonacci_spiral"
81+
show-borders = true
82+
83+
[[layout]]
84+
name = "Fullscreen No Borders"
85+
layout = "fullscreen"
86+
show-borders = false
87+
88+
### KEYBINDS ###
89+
# Configure any number of keybinds. The following options are available for each one:
90+
# - modifiers : List of strings, not compulsory, defaults to ["meta"]
91+
# - keysym : Keysym to bind to. The keysym is the value of the key as interpreted by your keyboard layout.
92+
# You may not bind to both keysym and keycode in the same binding.
93+
# - keycode : Keycode to bind to. The keycode is the numerical identifier of the hardware key.
94+
# It always has the same value for a given physical key regardless of your keyboard layout.
95+
# - action : Any Vivarium action.
96+
# Run `vivarium -h` to show documentation of all available actions, or see examples below.
97+
# - <action-arguments> : Arguments for the `action`, if applicable.
98+
# See action documentation for available arguments.
99+
#
100+
# To find the keysym or keycode of a given key, use tools like `wev` or `xev`.
101+
#
102+
# Run `vivarium --list-config-options` to get a list of available keybind actions
103+
104+
[[keybind]]
105+
keysym = "Q"
106+
action = "terminate"
107+
108+
[[keybind]]
109+
keysym = "T"
110+
action = "do_exec"
111+
executable = "wezterm"
112+
113+
[[keybind]]
114+
modifiers = ["meta", "shift"]
115+
keysym = "Return"
116+
action = "do_exec"
117+
executable = "wezterm"
118+
119+
[[keybind]]
120+
keysym = "l"
121+
action = "increment_divide"
122+
increment = 0.05
123+
124+
[[keybind]]
125+
keysym = "h"
126+
action = "increment_divide"
127+
increment = -0.05
128+
129+
[[keybind]]
130+
keysym = "comma"
131+
action = "increment_counter"
132+
increment = 1
133+
134+
[[keybind]]
135+
keysym = "period"
136+
action = "increment_counter"
137+
increment = -1
138+
139+
[[keybind]]
140+
keysym = "j"
141+
action = "next_window"
142+
143+
[[keybind]]
144+
keysym = "k"
145+
action = "prev_window"
146+
147+
[[keybind]]
148+
keysym = "J"
149+
action = "shift_active_window_down"
150+
151+
[[keybind]]
152+
keysym = "K"
153+
action = "shift_active_window_up"
154+
155+
[[keybind]]
156+
keysym = "t"
157+
action = "tile_window"
158+
159+
[[keybind]]
160+
keysym = "e"
161+
action = "right_output"
162+
163+
[[keybind]]
164+
keysym = "w"
165+
action = "left_output"
166+
167+
[[keybind]]
168+
keysym = "space"
169+
action = "next_layout"
170+
171+
[[keybind]]
172+
keysym = "f"
173+
action = "next_layout"
174+
175+
[[keybind]]
176+
keysym = "E"
177+
action = "shift_active_window_to_right_output"
178+
179+
[[keybind]]
180+
keysym = "W"
181+
action = "shift_active_window_to_left_output"
182+
183+
[[keybind]]
184+
keysym = "C"
185+
action = "close_window"
186+
187+
[[keybind]]
188+
keysym = "Return"
189+
action = "make_window_main"
190+
191+
[[keybind]]
192+
keysym = "R"
193+
action = "reload_config"
194+
195+
[[keybind]]
196+
keysym = "o"
197+
action = "do_shell"
198+
command = "wofi"
199+
200+
[[keybind]]
201+
modifiers = [ "meta", "ctrl" ]
202+
keysym = "e"
203+
action = "do_shell"
204+
command = "wofi-emoji"
205+
206+
[[keybind]]
207+
keysym = "b"
208+
action = "do_exec"
209+
executable = "qutebrowser"
210+
211+
[[keybind]]
212+
modifiers = []
213+
keysym = "XF86AudioMute"
214+
action = "do_shell"
215+
command = "pactl set-sink-mute @DEFAULT_SINK@ toggle"
216+
217+
[[keybind]]
218+
modifiers = []
219+
keysym = "XF86AudioMicMute"
220+
action = "do_shell"
221+
command = "pactl set-source-mute @DEFAULT_SOURCE@ toggle"
222+
223+
[[keybind]]
224+
modifiers = []
225+
keysym = "XF86AudioLowerVolume"
226+
action = "do_shell"
227+
command = "pactl set-sink-volume @DEFAULT_SINK@ -5%"
228+
229+
[[keybind]]
230+
modifiers = []
231+
keysym = "XF86AudioRaiseVolume"
232+
action = "do_shell"
233+
command = "pactl set-sink-volume @DEFAULT_SINK@ +5%"
234+
235+
### LIBINPUT CONFIG ###
236+
# Create any number of libinput configurations. The following options are available for each libinput config:
237+
# - device-name : A string to match libinput devices that should have your rules applied.
238+
# - scroll-method : One of "no-scroll", "2-finger", "edge" or "scroll-button".
239+
# - scroll-button : An integer representing the libinput button index to use for scrolling.
240+
# Has no effect unless scroll-method="scroll-button".
241+
# - middle-emulation : If true, emulate middle click events when clicking left and right simultaneously.
242+
# Defaults to false.
243+
# - left-handed : If true, switch left and right buttons. Defaults to false.
244+
# - natural-scroll : If true, switch the scrolling direction from default style (scroll down => go down)
245+
# to so-called "natural" style (scroll down => go up). Defaults to false.
246+
# - disable-while-typing : If true, disables the device while typing. Defaults to false
247+
# - click-method : Method for determining which button is being clicked.
248+
# One of "none", "areas" or "fingers". Defaults to "none"
249+
250+
[[libinput-config]]
251+
# Example libinput-config for a popular trackball:
252+
device-name = "Logitech USB Trackball"
253+
scroll-method = "scroll-button"
254+
scroll-button = 8
255+
middle-emulation = true
256+
left-handed = false
257+
natural-scroll = false
258+
disable-while-typing = false
259+
click-method = "none"
260+
261+
### DEBUG ###
262+
# Vivarium debug options included for completion. You will want to leave these with their
263+
# default values under normal operation.
264+
[debug]
265+
# Draw a graphical indicator of what shell (XDG, XWayland, Layer) is providing each window surface.
266+
mark-views-by-shell = false
267+
268+
# Draw a graphical indicator of what shell (i.e. normally what monitor) is currently active.
269+
mark-active-output = false
270+
271+
# Damage tracking: "none" to draw every frame, "frame" to draw only damaged frames, "full"
272+
# to draw only damaged regions of damaged frames
273+
damage-tracking-mode = "none"
274+
275+
# Draw the background red before drawing damaged regions, so only damaged regions are rendered
276+
mark-undamaged-regions = false
277+
278+
# Draw a small square that cycles through red/green/blue each time a frame is drawn
279+
mark-frame-draws = false
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{
2+
inputs,
3+
config,
4+
pkgs,
5+
lib,
6+
...
7+
}: let
8+
cfg = config.profiles.vivarium;
9+
configFile = pkgs.writeText "config.toml" ''
10+
${builtins.readFile ./config.toml}
11+
12+
### BACKGROUND ###
13+
# The background options are displayed using `swaybg`. Make sure you have this installed
14+
# if you want to use them.
15+
[background]
16+
colour = "#bbbbbb"
17+
image = "/home/sam/photos/20170503_183237.jpg"
18+
mode = "fill"
19+
'';
20+
21+
vivarium =
22+
pkgs.vivarium.overrideAttrs
23+
(self: {
24+
nativeBuildInputs = self.nativeBuildInputs ++ [pkgs.makeWrapper];
25+
postInstall =
26+
self.postInstall
27+
+ ''
28+
wrapProgram "$out/bin/vivarium" \
29+
--add-flags '--config ${configFile}'
30+
'';
31+
});
32+
in {
33+
options.profiles.vivarium = with lib; {
34+
enable = mkEnableOption "enable vivarium profile";
35+
dev = mkOption {
36+
type = types.bool;
37+
default = false;
38+
description = "Whether to enable development plugins like haskell/js";
39+
};
40+
};
41+
config = lib.mkIf cfg.enable {
42+
43+
environment.systemPackages = [
44+
vivarium
45+
pkgs.swaybg
46+
pkgs.bemenu
47+
pkgs.wofi
48+
pkgs.wofi-emoji
49+
];
50+
51+
nixpkgs.overlays = [inputs.vivarium.overlay];
52+
53+
#services.xserver.displayManager.sessionPackages = [vivarium];
54+
55+
services.blueman.enable = true;
56+
};
57+
}

modules/profiles/zsh.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ in
6161
alias ssht="TERM=screen-256color ssh"
6262
alias nshell="nix-shell --run zsh"
6363
alias vi="nvim"
64+
alias jvim="${pkgs.vim}/bin/vim"
6465
alias cpf="${pkgs.coreutils}/bin/cp"
6566
fasd_cache="$HOME/.fasd-init-bash"
6667
if [ "$(command -v fasd)" -nt "$fasd_cache" -o ! -s "$fasd_cache" ]; then

0 commit comments

Comments
 (0)