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

67
flake.lock generated
View file

@ -83,11 +83,11 @@
]
},
"locked": {
"lastModified": 1730600078,
"narHash": "sha256-BoyFmE59HDF3uybBySsWVoyjNuHvz3Wv8row/mSb958=",
"lastModified": 1730878299,
"narHash": "sha256-0VIz/3PKaylSIoRdOE07kkT1tMXgqaybXrfIS2Xz+so=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "4652874d014b82cb746173ffc64f6a70044daa7e",
"rev": "98e7dba87238e4fa4eac609dc44f07dab40661c4",
"type": "github"
},
"original": {
@ -210,11 +210,11 @@
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1730313564,
"narHash": "sha256-1RBs/WOH3gp2ETDruEbM2vq2tPiJmqQ3wrjiKREE5NU=",
"lastModified": 1730790589,
"narHash": "sha256-xJ6bQ4VmdTB7A+dMbmOMaZ8a6erB6rkZkB+yzqD7gd4=",
"owner": "helix-editor",
"repo": "helix",
"rev": "38faf74febf3332fb119302324bfd21229d39e14",
"rev": "b53dafe326d51b7f64a1c52379e3d4150cd2991e",
"type": "github"
},
"original": {
@ -312,11 +312,11 @@
"rust-overlay": "rust-overlay_3"
},
"locked": {
"lastModified": 1730449396,
"narHash": "sha256-EMUiH4wPXSv2xfEygVlxEoPU67EaUYumMCmnclQql94=",
"lastModified": 1730812834,
"narHash": "sha256-pZ8PMNXrI5yvPWjFy2CW0740DwQZuKkEdNeJd/lfnFc=",
"owner": "JakeStanger",
"repo": "ironbar",
"rev": "c7cf896164334206f07647789d5364d90f05862a",
"rev": "e53a9067b03de002a07f85e5302e3774e53521f2",
"type": "github"
},
"original": {
@ -325,6 +325,30 @@
"type": "github"
}
},
"kmonad": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"dir": "nix",
"lastModified": 1730793763,
"narHash": "sha256-m9agq+UNNwAovZj+WS5/1Yc1xoExG4A3SqmVP/e0r9Q=",
"ref": "refs/heads/master",
"rev": "606c488862df6c3be1e4e670f6e1e06008c84732",
"revCount": 875,
"submodules": true,
"type": "git",
"url": "https://github.com/kmonad/kmonad"
},
"original": {
"dir": "nix",
"submodules": true,
"type": "git",
"url": "https://github.com/kmonad/kmonad"
}
},
"lix": {
"flake": false,
"locked": {
@ -417,11 +441,11 @@
},
"nixos-hardware": {
"locked": {
"lastModified": 1730537918,
"narHash": "sha256-GJB1/aaTnAtt9sso/EQ77TAGJ/rt6uvlP0RqZFnWue8=",
"lastModified": 1730919458,
"narHash": "sha256-yMO0T0QJlmT/x4HEyvrCyigGrdYfIXX3e5gWqB64wLg=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "f6e0cd5c47d150c4718199084e5764f968f1b560",
"rev": "e1cc1f6483393634aee94514186d21a4871e78d7",
"type": "github"
},
"original": {
@ -449,11 +473,11 @@
},
"nixpkgs-darwin": {
"locked": {
"lastModified": 1730381317,
"narHash": "sha256-JhEY6lGAdVzpytYgVd80bLeOqqrQ2SwWYEq2RXFnofg=",
"lastModified": 1730891215,
"narHash": "sha256-i85DPrhDuvzgvIWCpJlbfM2UFtNYbapo20MtQXsvay4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "9706f4dd0e516de529fbd15bb8337e4a10d53307",
"rev": "c128e44a249d6180740d0a979b6480d5b795c013",
"type": "github"
},
"original": {
@ -465,11 +489,11 @@
},
"nixpkgs-master": {
"locked": {
"lastModified": 1730671215,
"narHash": "sha256-bCt0uxoFfD8aXjnwz98DZegnEyrH0tBWO/9H+pt8+k4=",
"lastModified": 1730930401,
"narHash": "sha256-jESb/dY9BvYw1kttkMGhiYgkH6G/jvpbeIDpLau0onc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ab272732b148a5f208a2a49612d67695e7fa8abb",
"rev": "2c9461ecb17d46e9a3b7947a8d923f17351bfe92",
"type": "github"
},
"original": {
@ -511,11 +535,11 @@
},
"nixpkgs_4": {
"locked": {
"lastModified": 1730327045,
"narHash": "sha256-xKel5kd1AbExymxoIfQ7pgcX6hjw9jCgbiBjiUfSVJ8=",
"lastModified": 1730741070,
"narHash": "sha256-edm8WG19kWozJ/GqyYx2VjW99EdhjKwbY3ZwdlPAAlo=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "080166c15633801df010977d9d7474b4a6c549d7",
"rev": "d063c1dd113c91ab27959ba540c0d9753409edf3",
"type": "github"
},
"original": {
@ -572,6 +596,7 @@
"imab": "imab",
"impermanence": "impermanence",
"ironbar": "ironbar",
"kmonad": "kmonad",
"lix-module": "lix-module",
"lolpizza": "lolpizza",
"miro": "miro",

View file

@ -39,6 +39,11 @@
url = "github:nicolasavru/swaymonad";
inputs.nixpkgs.follows = "nixpkgs"; # not mandatory but recommended
};
kmonad = {
url = "git+https://github.com/kmonad/kmonad?submodules=1&dir=nix";
inputs.nixpkgs.follows = "nixpkgs";
};
## editor stuff
# nixd.url = "github:nix-community/nixd";
@ -96,6 +101,7 @@
, xynoblog
, lolpizza
, lix-module
, kmonad
, x
, ...
}:
@ -133,6 +139,7 @@
agenix.nixosModules.age
impermanence.nixosModules.impermanence
home-manager.nixosModules.home-manager
kmonad.nixosModules.default
xynoblog.nixosModule
lolpizza.nixosModule
x.nixosModule

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; }))
];
}