This commit is contained in:
Lucy Hochkamp 2024-11-10 23:55:03 +01:00
parent a7c7406e11
commit 25483265e1
9 changed files with 508 additions and 60 deletions

View file

@ -71,6 +71,14 @@ in
# Immutable users due to tmpfs
users.mutableUsers = false;
users.users.nia = {
createHome = true;
isNormalUser = true;
extraGroups = [ "docker" "podman" ];
openssh.authorizedKeys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDq+jk1Bi8/x0lYDiVi/iVnp9nEleocoQ+xHmlpDt9Qs"
];
};
users.users.bzzt = {
description = "bzzt server service user";
home = "/var/lib/bzzt";
@ -87,7 +95,7 @@ in
group = "minecraft";
};
users.groups.minecraft = { };
environment.systemPackages = [ pkgs.jdk pkgs.jdk17 pkgs.borgbackup pkgs.docker-compose pkgs.docker ];
environment.systemPackages = [ pkgs.jdk17 pkgs.borgbackup ];
services.smartd = {
enable = true;
@ -224,7 +232,7 @@ in
agenix.secrets."desec" = { };
user.enable = true;
persist.enable = true;
persist.extraDirectories = [ "/var/lib/syncthing" "/var/lib/minecraft" "/var/lib/bzzt" "/var/lib/rancher" "/etc/rancher" "/root/.cache" ];
persist.extraDirectories = [ "/home/nia" "/var/lib/syncthing" "/var/lib/minecraft" "/var/lib/bzzt" "/var/lib/rancher" "/etc/rancher" "/root/.cache" ];
services = {
caddy.enable = true;

89
hosts/theseus/builtin.kbd Normal file
View file

@ -0,0 +1,89 @@
(defcfg
;; ** For Linux **
input (device-file "/dev/input/by-id/usb-04d9_USB-HID_Keyboard-event-kbd")
;; input (device-file "/dev/input/by-path/platform-i8042-serio-0-event-kbd")
output (uinput-sink "KMonad output")
;; ** For Windows **
;; input (low-level-hook)
;; output (send-event-sink)
;; ** For MacOS **
;; input (iokit-name "my-keyboard-product-string")
;; output (kext)
fallthrough true
)
(defsrc
esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12
grv 1 2 3 4 5 6 7 8 9 0 - = bspc
tab q w e r t y u i o p [ ]
caps a s d f g h j k l ; ' \ ret
lsft 102d z x c v b n m , . / rsft
lctl lmet lalt spc ralt rmet cmp rctl
)
(defalias
ext (layer-toggle extend) ;; Bind 'ext' to the Extend Layer
)
(defalias
cpy C-c
pst C-v
cut C-x
udo C-z
all C-a
fnd C-f
bk Back
fw Forward
)
(defalias
num (layer-toggle num)
)
(deflayer colemak-dh
esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12
grv 1 2 3 4 5 6 7 8 9 0 - = bspc
tab (tap-hold-next-release 200 q @num) w f p b j l u y (tap-hold-next-release 200 ; @num) [ ]
esc (tap-hold-next-release 200 a lctrl) (tap-hold-next-release 200 r ralt) (tap-hold-next-release 200 s lmet) t g m n (tap-hold-next-release 200 e rmet) (tap-hold-next-release 200 i lalt) (tap-hold-next-release 200 o rctrl) ' \\ ret
lsft z x c d v 102d k h , . / rsft
lctl lmet lalt spc ralt rmet _ _
)
(deflayer num
esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12
grv 1 2 3 4 5 6 7 8 9 0 - = bspc
tab q w f p b j l u y ; [ ]
esc 1 2 3 4 5 6 7 8 9 0 ' \\ ret
lsft z x c d v 102d k h , . / rsft
lctl lmet lalt spc ralt rmet _ _
)
(deflayer colemak-dhk
esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12
grv 1 2 3 4 5 6 7 8 9 0 - = bspc
tab q w f p b j l u y ; [ ]
@ext a r s t g k n e i o ' \\ ret
lsft z x c d v 102d m h , . / rsft
lctl lmet lalt spc ralt rmet _ _
)
(deflayer extend
_ play rewind previoussong nextsong ejectcd refresh brdn brup www mail prog1 prog2
_ f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 _
_ esc @bk @fnd @fw ins pgup home up end menu prnt slck
_ lalt lmet lsft lctl ralt pgdn lft down rght del caps _ _
_ @udo @cut @cpy tab @pst _ pgdn bks lsft lctl comp _
_ _ _ ret _ _ _ _
)
(deflayer empty
_ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _
)

View file

@ -3,6 +3,7 @@
imports =
[
./hardware-configuration.nix
./kmonad.nix
../../nixos-modules/networking/tailscale.nix
../../nixos-modules/services/ssh.nix
@ -16,23 +17,32 @@
boot.initrd.luks.devices.cryptroot.device = "/dev/disk/by-uuid/4cd8dbb3-8eea-48ff-87b1-92945be291ac";
programs.fuse.userAllowOther = true;
programs.sway.enable = true;
programs.nix-ld.enable = true;
services.power-profiles-daemon.enable = true;
programs.sway.extraSessionCommands = ''
export NIXOS_OZONE_WL=1
'';
xdg.portal = {
wlr.enable = true;
enable = true;
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
};
# start bt
hardware.bluetooth.enable = true;
services.blueman.enable = true;
# end bt
programs.light.enable = true;
networking.networkmanager.enable = true;
networking.networkmanager.wifi.backend = "iwd";
services.displayManager.sddm.enable = true;
services.displayManager.sddm.wayland.enable = true;
# services.displayManager.defaultSession = "river";
services.upower.enable = true;
users.users.ragon.extraGroups = [ "networkmanager" "video" ];
programs.kde-pim = { enable = true; kmail = true; kontact = true; merkuro = true; };
environment.systemPackages = [
pkgs.wezterm
pkgs.qt6.qtwayland
];
fonts.packages = [
pkgs.nerdfonts
@ -42,6 +52,12 @@
pulse.enable = true;
};
services.fwupd.enable = true;
programs.steam = {
enable = true;
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
# dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers
};
home-manager.users.ragon = { pkgs, lib, inputs, config, ... }: {
imports = [
@ -50,6 +66,7 @@
../../hm-modules/zellij
../../hm-modules/cli.nix
./swaycfg.nix
./work.nix
./river.nix
./kanshi.nix
../../hm-modules/files.nix
@ -57,29 +74,37 @@
ragon.helix.enable = true;
ragon.nushell.enable = true;
ragon.zellij.enable = true;
services.gnome-keyring.enable = true;
home.file.".config/wezterm/wezterm.lua".text = ''
local wezterm = require 'wezterm'
local wezterm = require 'wezterm'
-- This will hold the configuration.
local config = wezterm.config_builder()
-- This will hold the configuration.
local config = wezterm.config_builder()
config.default_prog = { 'zellij', 'attach', '-c' }
config.hide_tab_bar_if_only_one_tab = true
config.max_fps = 144
config.default_prog = { 'zellij', 'attach', '-c' }
config.hide_tab_bar_if_only_one_tab = true
config.max_fps = 144
-- This is where you actually apply your config choices
-- This is where you actually apply your config choices
-- For example, changing the color scheme:
config.color_scheme = 'Gruvbox Dark (Gogh)'
-- For example, changing the color scheme:
config.color_scheme = 'Gruvbox Dark (Gogh)'
-- and finally, return the configuration to wezterm
return config
'';
home.packages = with pkgs; [
wezterm
element-desktop # this is not a place of honor
unstable.signal-desktop
plexamp
firefox
gnome.seahorse
obsidian
thunderbird
];
-- and finally, return the configuration to wezterm
return config
'';
home.packages = [
pkgs.element-desktop # this is not a place of honor
pkgs.plexamp
pkgs.firefox
];
# home.persistence."/persistent/home/ragon" =

View file

@ -15,7 +15,7 @@ in
{
criteria = "eDP-1";
adaptiveSync = true;
scale = 1.25;
scale = 1.5;
mode = "2880x1920@120Hz";
}
];

12
hosts/theseus/kmonad.nix Normal file
View file

@ -0,0 +1,12 @@
{ pkgs, lib, ... }: {
services.kmonad = {
enable = true;
keyboards = {
builtin= {
device = "/dev/input/by-path/platform-i8042-serio-0-event-kbd";
config = builtins.readFile ./builtin.kbd;
};
};
};
}

View file

@ -1,14 +1,16 @@
{ lib, pkgs, config, inputs, ... }: {
home.packages = with pkgs; [
kanshi
helvum
brightnessctl
dconf
pwvucontrol
];
dconf = {
enable = true;
settings = {
"org/gnome/desktop/interface" = {
gtk-theme = "Adwaita-dark";
color-scheme = "prefer-dark";
};
};
@ -16,45 +18,310 @@
gtk = {
enable = true;
gtk4.extraConfig.gtk-application-prefer-dark-theme = 1;
theme = {
name = "Adwaita-dark";
package = pkgs.gnome.gnome-themes-extra;
};
iconTheme = {
name = "Adwaita";
package = pkgs.gnome.adwaita-icon-theme;
};
cursorTheme = {
name = "Adwaita";
package = pkgs.gnome.adwaita-icon-theme;
};
qt = {
enable = true;
platformTheme.name = "Adwaita-dark";
style = {
name = "Adwaita-dark";
package = pkgs.adwaita-qt;
};
};
# qt = {
# enable = true;
# platformTheme = "gnome";
# style = "adwaita-dark";
# };
xdg.portal = {
enable = true;
extraPortals = with pkgs; [ xdg-desktop-portal-gtk ];
configPackages = with pkgs; [ xdg-desktop-portal-gtk ];
};
programs.waybar = {
enable = true;
systemd.enable = true;
style = ''
* {
/* `otf-font-awesome` is required to be installed for icons */
font-family: "Source Sans Pro Nerd Font";
font-size: 13px;
}
window#waybar {
/* background-color: rgba(43, 48, 59, 0.5);
border-bottom: 3px solid rgba(100, 114, 125, 0.5);*/
color: #a89984;
background-color: #282828;
/* transition-property: background-color;
transition-duration: .5s;*/
}
window#waybar.hidden {
opacity: 0.2;
}
/*
window#waybar.empty {
background-color: transparent;
}
window#waybar.solo {
background-color: #FFFFFF;
}
*/
/*window#waybar.termite {
background-color: #3F3F3F;
}
window#waybar.chromium {
background-color: #000000;
border: none;
}*/
#tags button {
padding: 0 5px;
background-color: #282828;
color: #ebdbb2;
/* Use box-shadow instead of border so the text isn't offset */
box-shadow: inset 0 -3px transparent;
/* Avoid rounded borders under each workspace name */
border: none;
border-radius: 0;
}
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
#workspaces button:hover {
background: rgba(0, 0, 0, 0.2);
/* box-shadow: inset 0 -3px #fbf1c7;
*/
background-color: #3c3836;
}
#tags button.focused {
/* box-shadow: inset 0 -3px #fbf1c7;
*/
background-color: #3c3836;
color: #ebdbb2;
}
#tags button.occupied {
color: #d3869b;
}
#tags button.urgent {
background-color: #cc241d;
color: #ebdbb2;
}
#mode {
background-color: #64727D;
border-bottom: 3px solid #fbf1c7;
}
#clock,
#battery,
#cpu,
#memory,
#disk,
#temperature,
#backlight,
#network,
#pulseaudio,
#custom-media,
#tray,
#mode,
#idle_inhibitor,
#custom-poweroff,
#custom-suspend,
#mpd {
padding: 0 5px;
background-color: #282828;
color: #ebdbb2;
}
#window,
#workspaces,
#tags {
margin: 0 4px;
}
/* If workspaces is the leftmost module, omit left margin */
.modules-left > widget:first-child > #workspaces {
margin-left: 0;
}
/* If workspaces is the rightmost module, omit right margin */
.modules-right > widget:last-child > #workspaces {
margin-right: 0;
}
#clock {
color: #8ec07c;
}
#battery {
color: #d3869b;
}
#battery.charging, #battery.plugged {
color: #d3869b;
}
@keyframes blink {
to {
background-color: #fbf1c7;
color: #df3f71;
}
}
#battery.critical:not(.charging) {
background-color: #282828;
color: #d3869b;
animation-name: blink;
animation-duration: 0.5s;
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
}
label:focus {
background-color: #000000;
}
#backlight {
color: #458588;
}
#temperature {
color: #fabd2f;
}
#temperature.critical {
background-color: #fbf1c7;
color: #b57614;
}
#memory {
color: #b8bb26;
}
#network {
color: #fb4934;
}
#network.disconnected {
background-color: #fbf1c7;
color: #9d0006;
}
/*#disk {
background-color: #964B00;
}*/
#pulseaudio {
color: #fe8019;
}
#pulseaudio.muted {
background-color: #fbf1c7;
color: #af3a03;
}
#tray {
}
#tray > .needs-attention {
background-color: #fbf1c7;
color: #3c3836;
}
#idle_inhibitor {
background-color: #282828;
color: #ebdbb2;
}
#idle_inhibitor.activated {
background-color: #fbf1c7;
color: #3c3836;
}
#custom-media {
background-color: #66cc99;
color: #2a5c45;
min-width: 100px;
}
#custom-media.custom-spotify {
background-color: #66cc99;
}
#custom-media.custom-vlc {
background-color: #ffa000;
}
#mpd {
background-color: #66cc99;
color: #2a5c45;
}
#mpd.disconnected {
background-color: #f53c3c;
}
#mpd.stopped {
background-color: #90b1b1;
}
#mpd.paused {
background-color: #51a37a;
}
#language {
background: #00b093;
color: #740864;
padding: 0 5px;
margin: 0 5px;
min-width: 16px;
}
#keyboard-state {
background: #97e1ad;
color: #000000;
padding: 0 0px;
margin: 0 5px;
min-width: 16px;
}
#keyboard-state > label {
padding: 0 5px;
}
#keyboard-state > label.locked {
background: rgba(0, 0, 0, 0.2);
}
'';
settings = {
mainBar = {
layer = "top";
position = "top";
height = 20;
modules-left = [ "river/tags" "river/mode" "river/layout" ];
height = 15;
modules-left = [ "river/tags" "river/layout" ];
modules-center = [ "river/window" ];
modules-right = [ "wireplumber" "upower" "backlight" "cpu" "temperature" "memory" "disk" "network" "clock" ];
modules-right = [ "tray" "wireplumber" "upower" "backlight" "cpu" "temperature" "memory" "disk" "network" "clock" ];
wireplumber = {
"format" = "{volume}% {icon}";
"format-muted" = "";
"on-click" = "helvum";
"on-click" = "${pkgs.pwvucontrol}/bin/pwvucontrol";
"format-icons" = [ "" "" "" ];
};
"backlight" = {
"device" = "amdgpu_bl1";
"format" = "{percent}% {icon}";
"format-icons" = [ "" "" ];
"on-scroll-up" = "${pkgs.brightnessctl}/bin/brightnessctl s +10";
"on-scroll-down" = "${pkgs.brightnessctl}/bin/brightnessctl s 10-";
};
"cpu" = {
"interval" = 10;
@ -98,6 +365,8 @@
settings = {
map = {
normal = {
"Super+Shift Space" = "spawn 'rofi -show drun'";
"Super+Shift Return" = "spawn 'wezterm'";
"Super Q" = "close";
"Super J" = "focus-view next";
"Super K" = "focus-view previous";
@ -209,6 +478,10 @@
};
extraConfig = ''
rivertile -view-padding 3 -outer-padding 3 &
swayidle \
timeout 300 'exec swaylock -c 000000' \
before-sleep 'exec swaylock -c 000000' &
kanshi &
'';
};
}

9
hosts/theseus/work.nix Normal file
View file

@ -0,0 +1,9 @@
{ config, pkgs, lib, ... }: {
home.packages = [
pkgs.dotnet-sdk_8
pkgs.jetbrains.rider
pkgs.jetbrains.datagrip
(pkgs.firefox-devedition.overrideAttrs (super: self: { meta.priority = 1; }))
];
}