blob: e700cb49e13b6eac9d9e59a6d6e4afba682ee034 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
|
# nixos-config - My current NixOS configuration
#
# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de>
# SPDX-License-Identifier: GPL-3.0-or-later
#
# This file is part of my nixos-config.
#
# You should have received a copy of the License along with this program.
# If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
{
lib,
pkgs,
baseLib,
...
}: {
imports = [
./hardware.nix
];
soispha = {
services.backup = {
# Apzu should be regularly synced with Tiamat, which performs updates.
enable = false;
};
bluetooth.enable = true;
laptop = {
backlight = "intel_backlight";
enable = true;
};
programs = {
yambar = {
laptop = true;
backlight = "intel_backlight";
};
river.init = {
mappings = {
layout = "dvorak-modified";
keymap =
{
# Focus change
"<Meta-T>" = {command = ["focus-view" "next"];};
"<Meta-N>" = {command = ["focus-view" "previous"];};
"<Meta+Ctrl-T>" = {command = ["focus-output" "next"];};
"<Meta+Ctrl-N>" = {command = ["focus-output" "previous"];};
# Standard programs
"<Meta-<ENTER>>" = {command = ["spawn" "${lib.getExe pkgs.alacritty}"];};
"<Meta+Shift-q>" = {command = ["exit"];};
"<Meta-L>" = {command = ["spawn" "${lib.getExe pkgs.lock}"];};
# Screenshot
"<PRINTSCREEN>" = {command = ["spawn" "${lib.getExe pkgs.screenshot_persistent}"];};
# Audio
"<MEDIA_RAISEVOLUME>" = {
command = ["spawn" "${lib.getExe' pkgs.wireplumber "wpctl"} set-volume @DEFAULT_SINK@ 5%+"];
modes = ["normal" "locked"];
};
"<MEDIA_LOWERVOLUME>" = {
command = ["spawn" "${lib.getExe' pkgs.wireplumber "wpctl"} set-volume @DEFAULT_SINK@ 5%-"];
modes = ["normal" "locked"];
};
"<MEDIA_MUTEVOLUME>" = {
command = ["spawn" "${lib.getExe pkgs.mpc} toggle"];
modes = ["normal" "locked"];
};
# Launcher
"<Meta-R>" = {command = ["spawn" "${lib.getExe pkgs.rofi} -show combi -modes combi -combi-modes 'window, drun, run' -show-icons"];};
"<Meta-<F1>>" = {command = ["spawn" "${lib.getExe pkgs.tskm} open select"];};
"<Meta-<F2>>" = {command = ["spawn" "${lib.getExe pkgs.keepassxc}"];};
"<Meta-<F3>>" = {command = ["spawn" "${lib.getExe pkgs.signal-desktop}"];};
# "<Meta-<F4>>" = {command = ["spawn" "${lib.getExe pkgs.steam}"];};
# Client
"<Meta-f>" = {command = ["toggle-fullscreen"];};
"<Meta+Shift-c>" = {command = ["close"];};
"<Meta+Ctrl- >" = {command = ["toggle-float"];};
"<Meta+Ctrl-<ENTER>>" = {command = ["zoom"];};
"<Meta-o>" = {command = ["send-to-output" "next"];};
"<Meta+Shift-T>" = {command = ["swap" "next"];};
"<Meta+Shift-N>" = {command = ["swap" "previous"];};
# Toggle all tags
"<Meta-0>" = {command = ["set-focused-tags" (builtins.toString ((baseLib.pow 2 32) - 1))];};
"<Meta+Shift-0>" = {command = ["set-view-tags" (builtins.toString ((baseLib.pow 2 32) - 1))];};
# Mouse
"<Meta-<MOUSE_LEFT>>" = {
command = ["move-view"];
map_mode = "MapMouse";
};
"<Meta-<MOUSE_RIGHT>>" = {
command = ["resize-view"];
map_mode = "MapMouse";
};
}
// (
builtins.foldl' (acc: elem: acc // elem) {} (
builtins.map (index: let
num = builtins.toString index;
index2tag = input: builtins.toString (baseLib.pow 2 (input - 1));
in {
"<Meta-${num}>" = {command = ["set-focused-tags" (index2tag index)];};
"<Meta+Shift-${num}>" = {command = ["set-view-tags" (index2tag index)];};
"<Meta+Shift+Ctrl-${num}>" = {command = ["toggle-view-tags" (index2tag index)];};
}) (builtins.genList (i: i + 1) 9)
)
);
};
screenSetupCode = {};
};
};
locale.enable = true;
networking = {
enable = true;
hostName = "apzu";
mode = "NetworkManager";
};
services.unison.foreign.address = "tiamat.fritz.box";
nixpkgs = {
enable = true;
systemName = "x86_64-linux";
};
users = {
enable = true;
enableDeprecatedPlugdev = true;
hashedPassword = "$y$jFT$3qI9MYLDHPUdGKsVa8skV0$TOjX0SFHWuj52zd7/kmkNtG5EqQwYcqv0FKXWbLaro6";
};
};
system.stateVersion = "23.05";
}
|