mirror of
https://forge.katzen.cafe/schrottkatze/nix-configs.git
synced 2025-11-17 09:09:42 +01:00
Compare commits
10 commits
07a58afaff
...
4488cbcf1b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4488cbcf1b |
||
|
|
ac251e6d90 |
||
|
|
4c74dd5024 |
||
|
|
ab35ec8d34 |
||
|
|
0162bcefd3 |
||
|
|
2de0639d54 |
||
|
|
38ace717a7 |
||
|
|
2b8634a56a |
||
|
|
66c22f7a13 |
||
|
|
3ac8ca1f5e |
12 changed files with 98 additions and 74 deletions
10
flake.nix
10
flake.nix
|
|
@ -54,18 +54,8 @@
|
||||||
combine [
|
combine [
|
||||||
complete.toolchain
|
complete.toolchain
|
||||||
];
|
];
|
||||||
# rs-platform = pkgs.makeRustPlatform {
|
|
||||||
# cargo = rs-toolchain;
|
|
||||||
# rustc = rs-toolchain;
|
|
||||||
# };
|
|
||||||
crane-lib = (crane.mkLib nixpkgs.legacyPackages.${system}).overrideToolchain rs-toolchain;
|
crane-lib = (crane.mkLib nixpkgs.legacyPackages.${system}).overrideToolchain rs-toolchain;
|
||||||
rs-programs = final: prev: {
|
rs-programs = final: prev: {
|
||||||
# s10e-jrnl = rs-platform.buildRustPackage {
|
|
||||||
# pname = "jrnl";
|
|
||||||
# version = "0.0.1";
|
|
||||||
# src = ./programs/jrnl;
|
|
||||||
# cargoLock.lockFile = ./programs/jrnl/Cargo.lock;
|
|
||||||
# };
|
|
||||||
s10e-jrnl = crane-lib.buildPackage {
|
s10e-jrnl = crane-lib.buildPackage {
|
||||||
pname = "s10e-bs";
|
pname = "s10e-bs";
|
||||||
version = "0.0.1";
|
version = "0.0.1";
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@
|
||||||
imports = [
|
imports = [
|
||||||
./audio.nix
|
./audio.nix
|
||||||
./eduroam.nix
|
./eduroam.nix
|
||||||
./xdg-portals.nix
|
|
||||||
./home
|
./home
|
||||||
./media
|
./media
|
||||||
./dm.nix
|
./dm.nix
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{...}: {
|
{...}: {
|
||||||
programs.niri.enable = true;
|
programs.niri.enable = true;
|
||||||
home-manager.users.jade = {...}: {
|
home-manager.users.jade = {pkgs, ...}: {
|
||||||
imports = [
|
imports = [
|
||||||
./notifications.nix
|
./notifications.nix
|
||||||
./terminal.nix
|
./terminal.nix
|
||||||
|
|
@ -17,6 +17,10 @@
|
||||||
services.network-manager-applet.enable = true;
|
services.network-manager-applet.enable = true;
|
||||||
xsession.enable = true;
|
xsession.enable = true;
|
||||||
|
|
||||||
|
home.packages = [
|
||||||
|
pkgs.fluent-reader
|
||||||
|
];
|
||||||
|
|
||||||
services.gpg-agent = {
|
services.gpg-agent = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableNushellIntegration = true;
|
enableNushellIntegration = true;
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@
|
||||||
(box
|
(box
|
||||||
:halign "end"
|
:halign "end"
|
||||||
; (label :text "${iceData.speed}km/h")
|
; (label :text "${iceData.speed}km/h")
|
||||||
(iceTacho)
|
(mullvadThing)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
@ -47,14 +47,26 @@
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
(deflisten mullvad
|
||||||
|
:initial "{\"state\":\"init\"}"
|
||||||
|
`mullvad status -j listen`
|
||||||
|
)
|
||||||
|
|
||||||
|
(defwidget mullvadThing []
|
||||||
|
(box
|
||||||
|
:class "container"
|
||||||
|
(button
|
||||||
|
:height 16
|
||||||
|
:width 16
|
||||||
|
:class "mullvad-state-${mullvad.state}"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
(defwidget iceTacho []
|
(defwidget iceTacho []
|
||||||
(box
|
(box
|
||||||
:class "iceTacho"
|
:class "iceTacho"
|
||||||
:tooltip "Tz${iceTachoData.tzn} (BR ${iceTachoData.br})"
|
:tooltip "Tz${iceTachoData.tzn} (BR ${iceTachoData.br})"
|
||||||
(circular-progress
|
|
||||||
:value { iceTachoData.frac * 60 + 20 }
|
|
||||||
:thickness 3
|
|
||||||
)
|
|
||||||
(label :text "${iceTachoData.speed} km/h")
|
(label :text "${iceTachoData.speed} km/h")
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -33,4 +33,20 @@ label {
|
||||||
|
|
||||||
.traveldingsWindow {
|
.traveldingsWindow {
|
||||||
border-radius: 15px;
|
border-radius: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mullvad-state-connected {
|
||||||
|
background-color: #98971a
|
||||||
|
}
|
||||||
|
|
||||||
|
.mullvad-state-connecting {
|
||||||
|
background-color: #d79921
|
||||||
|
}
|
||||||
|
|
||||||
|
.mullvad-state-disconnected {
|
||||||
|
background-color: #cc241d
|
||||||
|
}
|
||||||
|
|
||||||
|
.mullvad-state-init {
|
||||||
|
background-color: #458588
|
||||||
}
|
}
|
||||||
|
|
@ -54,15 +54,15 @@
|
||||||
"Mod+7".action.focus-workspace = 7;
|
"Mod+7".action.focus-workspace = 7;
|
||||||
"Mod+8".action.focus-workspace = 8;
|
"Mod+8".action.focus-workspace = 8;
|
||||||
"Mod+9".action.focus-workspace = 9;
|
"Mod+9".action.focus-workspace = 9;
|
||||||
"Mod+Shift+1".action.move-column-to-workspace = 1;
|
"Mod+Ctrl+1".action.move-column-to-workspace = 1;
|
||||||
"Mod+Shift+2".action.move-column-to-workspace = 2;
|
"Mod+Ctrl+2".action.move-column-to-workspace = 2;
|
||||||
"Mod+Shift+3".action.move-column-to-workspace = 3;
|
"Mod+Ctrl+3".action.move-column-to-workspace = 3;
|
||||||
"Mod+Shift+4".action.move-column-to-workspace = 4;
|
"Mod+Ctrl+4".action.move-column-to-workspace = 4;
|
||||||
"Mod+Shift+5".action.move-column-to-workspace = 5;
|
"Mod+Ctrl+5".action.move-column-to-workspace = 5;
|
||||||
"Mod+Shift+6".action.move-column-to-workspace = 6;
|
"Mod+Ctrl+6".action.move-column-to-workspace = 6;
|
||||||
"Mod+Shift+7".action.move-column-to-workspace = 7;
|
"Mod+Ctrl+7".action.move-column-to-workspace = 7;
|
||||||
"Mod+Shift+8".action.move-column-to-workspace = 8;
|
"Mod+Ctrl+8".action.move-column-to-workspace = 8;
|
||||||
"Mod+Shift+9".action.move-column-to-workspace = 9;
|
"Mod+Ctrl+9".action.move-column-to-workspace = 9;
|
||||||
|
|
||||||
# column editing stuffs
|
# column editing stuffs
|
||||||
"Mod+BracketLeft".action.consume-or-expel-window-left = [];
|
"Mod+BracketLeft".action.consume-or-expel-window-left = [];
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,8 @@
|
||||||
./input.nix
|
./input.nix
|
||||||
./binds.nix
|
./binds.nix
|
||||||
./style.nix
|
./style.nix
|
||||||
|
./privacy.nix
|
||||||
|
./quirks.nix
|
||||||
];
|
];
|
||||||
programs.niri.settings = {
|
programs.niri.settings = {
|
||||||
outputs."eDP-1" = {
|
outputs."eDP-1" = {
|
||||||
|
|
@ -12,9 +14,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
spawn-at-startup = [
|
spawn-at-startup = [
|
||||||
{
|
{command = ["eww" "open-many" "topBar" "bottomBar"];}
|
||||||
command = ["eww" "open-many" "topBar" "bottomBar"];
|
|
||||||
}
|
|
||||||
{
|
{
|
||||||
command = [
|
command = [
|
||||||
"${pkgs.swaybg}/bin/swaybg"
|
"${pkgs.swaybg}/bin/swaybg"
|
||||||
|
|
@ -25,20 +25,5 @@
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
window-rules = [
|
|
||||||
# TODO: privacy screen rules
|
|
||||||
{
|
|
||||||
matches = [
|
|
||||||
{
|
|
||||||
app-id = "steam";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
open-focused = false;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
# fix electron apps not doing wayland
|
|
||||||
environment.ELECTRON_OZONE_PLATFORM_HINT = "auto";
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
21
modules/desktop-environment/home/niri/privacy.nix
Normal file
21
modules/desktop-environment/home/niri/privacy.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
{...}: {
|
||||||
|
programs.niri.settings = {
|
||||||
|
layer-rules = [
|
||||||
|
{
|
||||||
|
matches = [
|
||||||
|
{namespace = "notifications";}
|
||||||
|
];
|
||||||
|
block-out-from = "screen-capture";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
window-rules = [
|
||||||
|
{
|
||||||
|
matches = [
|
||||||
|
{app-id = "^signal|Element|org\.gnome\.Evolution$";}
|
||||||
|
{title = "^.*(Discord|Beispiel Screenshare block Bug).*$";}
|
||||||
|
];
|
||||||
|
block-out-from = "screen-capture";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
18
modules/desktop-environment/home/niri/quirks.nix
Normal file
18
modules/desktop-environment/home/niri/quirks.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
{...}: {
|
||||||
|
programs.niri.settings = {
|
||||||
|
window-rules = [
|
||||||
|
# handle steam grabbing focus 1000 times on startup
|
||||||
|
{
|
||||||
|
matches = [
|
||||||
|
{
|
||||||
|
app-id = "steam";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
open-focused = false;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
# fix electron apps not doing wayland
|
||||||
|
environment.ELECTRON_OZONE_PLATFORM_HINT = "auto";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
{pkgs, ...}: {
|
|
||||||
services.gnome.gnome-keyring.enable = true;
|
|
||||||
xdg.portal = {
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
config.common = {
|
|
||||||
default = ["gtk"];
|
|
||||||
"org.freedesktop.impl.portal.Screencast" = ["gnome"];
|
|
||||||
"org.freedesktop.impl.portal.Secret" = ["gnome-keyring"];
|
|
||||||
};
|
|
||||||
|
|
||||||
extraPortals = [
|
|
||||||
pkgs.xdg-desktop-portal-gnome
|
|
||||||
pkgs.xdg-desktop-portal-gtk
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -16,6 +16,8 @@ alias cl = cargo clippy;
|
||||||
alias cb = cargo build;
|
alias cb = cargo build;
|
||||||
alias cch = cargo check;
|
alias cch = cargo check;
|
||||||
|
|
||||||
|
alias jb = just build;
|
||||||
|
|
||||||
alias togglecaps = xdotool key Caps_Lock;
|
alias togglecaps = xdotool key Caps_Lock;
|
||||||
alias TOGGLECAPS = togglecaps;
|
alias TOGGLECAPS = togglecaps;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,4 @@
|
||||||
#![feature(iter_array_chunks)]
|
#![feature(pattern, iter_array_chunks, round_char_boundary, iter_collect_into)]
|
||||||
#![feature(round_char_boundary)]
|
|
||||||
#![feature(iter_collect_into)]
|
|
||||||
#![feature(pattern)]
|
|
||||||
|
|
||||||
use std::{
|
use std::{
|
||||||
io::{Read, Write},
|
io::{Read, Write},
|
||||||
|
|
@ -17,17 +14,16 @@ const BOOLS: &[[&str; 2]] = &[
|
||||||
["no", "yes"],
|
["no", "yes"],
|
||||||
];
|
];
|
||||||
|
|
||||||
fn main() {
|
fn main() -> std::io::Result<()> {
|
||||||
let mut input = String::new();
|
let mut input = String::new();
|
||||||
let mut stdin = std::io::stdin();
|
let mut stdin = std::io::stdin();
|
||||||
let mut stdout = std::io::stdout();
|
let mut stdout = std::io::stdout();
|
||||||
|
|
||||||
stdin.read_to_string(&mut input).unwrap();
|
stdin.read_to_string(&mut input)?;
|
||||||
|
|
||||||
let bool_locs = find_bools(&input);
|
let bool_locs = find_bools(&input);
|
||||||
stdout
|
|
||||||
.write_all(replace_bools(&mut input, bool_locs).as_bytes())
|
stdout.write_all(replace_bools(&mut input, bool_locs).as_bytes())
|
||||||
.unwrap();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type BoolLocs = [[Vec<usize>; 2]; BOOL_COUNT];
|
type BoolLocs = [[Vec<usize>; 2]; BOOL_COUNT];
|
||||||
|
|
@ -96,14 +92,12 @@ fn find_bools(input: &str) -> [[Vec<usize>; 2]; BOOL_COUNT] {
|
||||||
&& char_guard(
|
&& char_guard(
|
||||||
input[it.1.floor_char_boundary(it.0 - 1)..it.0]
|
input[it.1.floor_char_boundary(it.0 - 1)..it.0]
|
||||||
.chars()
|
.chars()
|
||||||
.last()
|
.last()?,
|
||||||
.unwrap(),
|
|
||||||
)
|
)
|
||||||
&& char_guard(
|
&& char_guard(
|
||||||
input[(last_idx)..(input.ceil_char_boundary(last_idx + 1))]
|
input[(last_idx)..(input.ceil_char_boundary(last_idx + 1))]
|
||||||
.chars()
|
.chars()
|
||||||
.last()
|
.last()?,
|
||||||
.unwrap(),
|
|
||||||
))
|
))
|
||||||
.then_some(it.0)
|
.then_some(it.0)
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue