Compare commits

..

21 Commits

Author SHA1 Message Date
a78d66fbd3 added qmk for the keyboard config 2025-11-16 13:15:48 +01:00
941c51884d added ollama context length explicitly 2025-11-07 21:40:33 +01:00
ddfde55edf everything just works lets leave it like that 2025-11-06 22:10:41 +01:00
9ba39dbff4 setup local llms with websearch 2025-11-06 12:00:23 +01:00
2cbbbddcab added appindicator to gnome 2025-11-03 12:28:44 +01:00
bf441a6979 do not hibernate 2025-11-03 11:51:26 +01:00
60c764324a use old config stlye in git! 2025-11-03 11:37:16 +01:00
1aa72c7a30 split into tower and laptop config 2025-11-03 11:36:56 +01:00
1e738d598b disable dark mode, update and add firefox+jabref 2025-10-15 15:43:19 +02:00
250caeaf32 normal cursor and brave darkmode 2025-09-20 19:21:24 +02:00
6c4c3d54aa update and drop catppuccin 2025-09-19 15:12:01 +02:00
a6871f94a8 stuff 2025-08-06 11:22:10 +02:00
d50def1368 avoid warnings 2025-07-15 11:20:35 +02:00
ff226f342c better bluetooth integration 2025-07-15 10:45:43 +02:00
16b83b8420 waybar 2025-07-14 01:30:39 +02:00
0fb6806dd1 added docker and libreoffice 2025-07-04 12:02:04 +02:00
16a0d6d6be added docker 2025-07-01 23:29:55 +02:00
02739bcbc2 added shortcut to move window to different workspace 2025-06-30 16:30:34 +02:00
b2670ca3f2 better tmux and alacritty 2025-06-27 15:47:55 +02:00
434615890a added screenshots 2025-06-27 15:15:00 +02:00
1b729fbb85 better scaling and thinkpad keys work 2025-06-27 15:05:51 +02:00
43 changed files with 972 additions and 331 deletions

66
flake.lock generated
View File

@@ -1,23 +1,5 @@
{ {
"nodes": { "nodes": {
"catppuccin": {
"inputs": {
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1749223974,
"narHash": "sha256-/GAQYRW1duU81KG//2wI9ax8EkHVG/e1UOD97NdwLOY=",
"owner": "catppuccin",
"repo": "nix",
"rev": "3a42cd79c647360ee8742659e42aeec0947dd3b4",
"type": "github"
},
"original": {
"owner": "catppuccin",
"repo": "nix",
"type": "github"
}
},
"home-manager": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@@ -25,11 +7,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1749154018, "lastModified": 1758463745,
"narHash": "sha256-gjN3j7joRvT3a8Zgcylnd4NFsnXeDBumqiu4HmY1RIg=", "narHash": "sha256-uhzsV0Q0I9j2y/rfweWeGif5AWe0MGrgZ/3TjpDYdGA=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "7aae0ee71a17b19708b93b3ed448a1a0952bf111", "rev": "3b955f5f0a942f9f60cdc9cacb7844335d0f21c3",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -41,27 +23,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1749794982, "lastModified": 1762233356,
"narHash": "sha256-Kh9K4taXbVuaLC0IL+9HcfvxsSUx8dPB5s5weJcc9pc=", "narHash": "sha256-cGS3lLTYusbEP/IJIWGgnkzIl+FA5xDvtiHyjalGr4k=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "ee930f9755f58096ac6e8ca94a1887e0534e2d81", "rev": "ca534a76c4afb2bdc07b681dbc11b453bab21af8",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1749727998,
"narHash": "sha256-mHv/yeUbmL91/TvV95p+mBVahm9mdQMJoqaTVTALaFw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "fd487183437963a59ba763c0cc4f27e3447dd6dd",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -71,11 +37,27 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-unstable": {
"locked": {
"lastModified": 1762361079,
"narHash": "sha256-lz718rr1BDpZBYk7+G8cE6wee3PiBUpn8aomG/vLLiY=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "ffcdcf99d65c61956d882df249a9be53e5902ea5",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": { "root": {
"inputs": { "inputs": {
"catppuccin": "catppuccin",
"home-manager": "home-manager", "home-manager": "home-manager",
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable"
} }
} }
}, },

View File

@@ -3,8 +3,7 @@
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable";
catppuccin.url = "github:catppuccin/nix";
home-manager = { home-manager = {
url = "github:nix-community/home-manager/release-25.05"; url = "github:nix-community/home-manager/release-25.05";
@@ -13,24 +12,34 @@
}; };
outputs = inputs@{ self, nixpkgs, catppuccin, home-manager, ... }: { outputs = inputs@{ self, nixpkgs, home-manager, ... }:
let
nixosConfigurations = {
segfault-machine = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
specialArgs = { inherit inputs; }; lib = nixpkgs.lib;
pkgs-unstable = import inputs.nixpkgs-unstable {
system = system;
config.allowUnfree = true;
};
in
{
nixosConfigurations = {
segfault-machine = lib.nixosSystem {
inherit system; # inherited it from 'let' block
specialArgs = { inherit pkgs-unstable; };
modules = [ modules = [
./hosts/segfault-machine/configuration.nix ./hosts/segfault-machine/configuration.nix
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager {
{
home-manager.backupFileExtension = "backup"; home-manager.backupFileExtension = "backup";
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
home-manager.users.lukas.imports = [ home-manager.users.lukas.imports = [
./home/lukas/default.nix ./home/lukas/laptop/default.nix
]; ];
home-manager.extraSpecialArgs = { inherit inputs; }; home-manager.extraSpecialArgs = { inherit inputs; };
@@ -38,6 +47,28 @@
} }
]; ];
}; };
segfault-tower = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit pkgs-unstable; };
modules = [
./hosts/segfault-tower/configuration.nix
home-manager.nixosModules.home-manager {
home-manager.backupFileExtension = "backup";
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.lukas.imports = [
./home/lukas/tower/default.nix
];
home-manager.extraSpecialArgs = { inherit inputs; };
}
];
};
}; };
}; };
} }

View File

@@ -1,30 +0,0 @@
{ inputs, pkgs, ... }:
{
imports = [ inputs.catppuccin.homeModules.catppuccin ];
catppuccin = {
accent = "mauve";
flavor = "mocha";
enable = true;
bat.enable = true; # <- installs Catppuccin-Mocha.tmTheme
delta.enable = true; # <- colours delta with your mauve accent
};
gtk = {
enable = true;
catppuccin = {
enable = true;
cursor = {
enable = true;
flavor = "mocha";
accent = "mauve";
};
};
cursorTheme = {
size = 38;
name = "catppuccin-mocha-mauve-cursors";
};
};
}

View File

@@ -0,0 +1,19 @@
{ pkgs, ... }:
{
programs.alacritty = {
enable = true;
settings = {
terminal.shell = {
program = "${pkgs.tmux}/bin/tmux";
args = [ "new-session" "-A" "-s" "main" ];
};
window = {
opacity = 0.85;
};
};
};
}

View File

@@ -2,6 +2,11 @@
programs.brave = { programs.brave = {
enable = true; enable = true;
commandLineArgs = [
"--force-dark-mode"
#"--enable-features=WebContentsForceDark"
];
extensions = [ extensions = [
# Catppuccin for GitHub File Explorer Icons # Catppuccin for GitHub File Explorer Icons
{ id = "lnjaiaapbakfhlbjenjkhffcdpoompki"; } { id = "lnjaiaapbakfhlbjenjkhffcdpoompki"; }

View File

@@ -1,7 +1,7 @@
{ pkgs, ... }: { pkgs, ... }:
let let
grammars = pkgs.emacsPackages.treesit-grammars.with-all-grammars; grammars = pkgs.emacs.pkgs.treesit-grammars.with-all-grammars;
in in
{ {
programs.emacs = { programs.emacs = {

29
home/lukas/common/git.nix Normal file
View File

@@ -0,0 +1,29 @@
let
userPubKey1 = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAII1DsMfyMUK0snbTeVWMmdzLP9NIvPoQ4tjqyREUMHwZ mail@lukas.contact";
userPubKey2 = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPmRbejTJaDOK7SHXz/geA7aDrcjFPR+G6YQLy55hjdR lukas@epple.contact";
in {
home.file.".ssh/allowed_signers".text = ''
* ${userPubKey1}
* ${userPubKey2}
'';
programs.git = {
enable = true;
userName= "Lukas";
userEmail = "mail@lukas.contact";
extraConfig = {
commit.gpgsign = true;
gpg.format = "ssh";
gpg.ssh.allowedSignersFile = "~/.ssh/allowed_signers";
user.signingkey = "~/.ssh/id_ed25519.pub";
pull.rebase = false;
init.defaultBranch = "master";
core.sshCommand = "ssh -4";
};
};
}

View File

@@ -0,0 +1,13 @@
{ pkgs, ... }:
let
libreoffice = pkgs.libreoffice;
in {
home.packages = with pkgs; [
libreoffice
hunspell
hunspellDicts.en_US
hunspellDicts.de_DE
];
}

View File

@@ -7,7 +7,7 @@
syntaxHighlighting.enable = true; syntaxHighlighting.enable = true;
autosuggestion.enable = true; autosuggestion.enable = true;
initContent = "source /etc/nixos/home/lukas/p10k.zsh"; initContent = "source /etc/nixos/home/lukas/common/p10k.zsh";
sessionVariables = { sessionVariables = {
POWERLEVEL9K_DISABLE_CONFIGURATION_WIZARD = "true"; POWERLEVEL9K_DISABLE_CONFIGURATION_WIZARD = "true";
}; };
@@ -28,13 +28,8 @@
la = "eza --icons -a"; # show all dot-files, short la = "eza --icons -a"; # show all dot-files, short
lt = "eza -T --icons --git-ignore --level=4"; # pretty tree, two levels deep lt = "eza -T --icons --git-ignore --level=4"; # pretty tree, two levels deep
gs = "git status --short --branch";
gl = "git log --oneline --graph --decorate";
cat ="bat --style=plain --pager=cat"; # pretty cat cat ="bat --style=plain --pager=cat"; # pretty cat
less ="bat --style=plain --pager=less"; # pretty less less ="bat --style=plain --pager=less"; # pretty less
update = "sudo nixos-rebuild switch --flake /etc/nixos/#segfault-machine";
}; };
}; };

View File

@@ -9,16 +9,16 @@
set-option -g history-limit 50000 set-option -g history-limit 50000
set -g default-shell "${pkgs.zsh}/bin/zsh" set -g default-shell "${pkgs.zsh}/bin/zsh"
set -g default-terminal "tmux-256color" set -g default-terminal "tmux-256color"
# split bindings: prefix+v = vertical split (side-by-side)
bind v split-window -h
# split bindings: prefix+h = horizontal split (top/bottom)
bind h split-window -v
# hide the status bar
set -g status off
''; '';
}; };
programs.alacritty = {
enable = true;
settings.terminal.shell = {
program = "${pkgs.tmux}/bin/tmux";
args = [ "new-session" "-A" "-s" "main" ];
};
};
} }

View File

@@ -1,5 +1,3 @@
{ pkgs, ... }:
{ {
xdg.enable = true; xdg.enable = true;
xdg.mimeApps = { xdg.mimeApps = {

View File

@@ -1,22 +0,0 @@
{ config, pkgs, ... }:
{
imports = [
./brave.nix
./catppuccin.nix
./direnv.nix
./emacs.nix
./git.nix
./packages.nix
./shell.nix
./terminal.nix
./xgd.nix
./hyprland.nix
./rofi.nix
];
home.username = "lukas";
home.homeDirectory = "/home/lukas";
home.stateVersion = "25.05";
}

View File

@@ -1,22 +0,0 @@
{ config, lib, pkgs, ... }:
let
userPubKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAII1DsMfyMUK0snbTeVWMmdzLP9NIvPoQ4tjqyREUMHwZ mail@lukas.contact";
in {
home.file.".ssh/allowed_signers".text = "* ${userPubKey}";
programs.git = {
enable = true;
userName = "Lukas";
userEmail = "mail@lukas.contact";
extraConfig = {
commit.gpgsign = true;
gpg.format = "ssh";
gpg.ssh.allowedSignersFile = "~/.ssh/allowed_signers";
user.signingkey = "~/.ssh/id_ed25519.pub";
};
};
}

View File

@@ -1,81 +0,0 @@
{
wayland.windowManager.hyprland = {
enable = true;
settings = {
"$mod" = "ALT";
exec-once = [
"waybar"
"dunst"
"nm-applet"
"blueman-applet"
"swww-daemon"
];
binds = {
allow_workspace_cycles = true;
};
xwayland = {
force_zero_scaling = true;
};
bind = [
# terminal
"$mod, Return, exec, alacritty"
# kill current window
"$mod, Q, killactive,"
# lock screen
"$mod, L, exec, hyprlock"
# emacs
"$mod, e, exec, emacs"
# Rofi launcher
"$mod, SPACE, exec, rofi -show drun -theme ~/.config/rofi/theme.rasi"
# Toggle fullscreen
"$mod, M, fullscreen, 2"
# cycle windows
"$mod, N, cyclenext"
# cycle workspaces
"$mod, TAB, workspace, r+1"
# Switch to workspace 13
"$mod, 1, workspace, 1"
"$mod, 2, workspace, 2"
"$mod, 3, workspace, 3"
];
general = {
gaps_in = 4;
gaps_out = 8;
border_size = 0;
layout = "dwindle";
};
input = {
kb_layout = "de";
touchpad.disable_while_typing = true;
};
cursor = {
inactive_timeout = 5;
};
decoration = {
rounding = 6;
blur.enabled = false;
shadow.enabled = false;
};
};
};
}

View File

@@ -0,0 +1,22 @@
{
imports = [
../common/brave.nix
../common/direnv.nix
../common/emacs.nix
../common/git.nix
../common/shell.nix
../common/alacritty.nix
../common/tmux.nix
../common/xgd.nix
../common/libreoffice.nix
./packages.nix
./hyprland.nix
./waybar.nix
./rofi.nix
];
home.username = "lukas";
home.homeDirectory = "/home/lukas";
home.stateVersion = "25.05";
}

View File

@@ -0,0 +1,157 @@
{ pkgs, ... }:
{
home.pointerCursor = {
name = "Vanilla-DMZ";
package = pkgs.vanilla-dmz;
size = 24;
gtk.enable = true;
x11.enable = true;
};
wayland.windowManager.hyprland = {
enable = true;
settings = {
"$mod" = "ALT";
exec-once = [
"waybar"
"dunst"
"kwalletd6"
"nm-applet"
"blueman-applet"
"swww-daemon"
"swayidle -w timeout 300 'hyprlock' timeout 360 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on' before-sleep 'hyprlock'"
"swww img $HOME/Bilder/Wallpapers/mountain.jpg"
"nextcloud"
];
env = [
"HYPRCURSOR_THEME,Vanilla-DMZ"
"HYPRCURSOR_SIZE,24"
"XCURSOR_THEME,Vanilla-DMZ"
"GDK_SCALE,2"
"XCURSOR_SIZE,32"
];
#windowrulev2 = [
# do not let scenbuilder take focus
# "nofocus, title:^(.*java.*)$"
#];
monitor = [
", highres, auto, 1"
];
binds = {
allow_workspace_cycles = true;
};
xwayland = {
force_zero_scaling = true;
};
# windowrule = "stayfocused,^(com.oracle.javafx.scenebuilder.app.SceneBuilderApp)$";
bind = [
# terminal
"$mod, Return, exec, alacritty"
# kill current window
"$mod, Q, killactive,"
# lock screen
"$mod, L, exec, hyprlock"
"$mod, S, togglefloating"
# emacs
"$mod, e, exec, emacs"
# Rofi launcher
"$mod, SPACE, exec, rofi -show drun"
# Toggle fullscreen
"$mod, M, fullscreen, 2"
# cycle windows
"$mod, N, cyclenext"
# cycle workspaces
"$mod, Tab, workspace, r+1"
"$mod Shift, Tab, workspace, r-1"
"$mod, V, togglefloating"
# Switch to workspace 19
"$mod, 1, workspace, 1"
"$mod, 2, workspace, 2"
"$mod, 3, workspace, 3"
"$mod, 4, workspace, 4"
"$mod, 5, workspace, 5"
"$mod, 6, workspace, 6"
"$mod, 7, workspace, 7"
"$mod, 8, workspace, 8"
"$mod, 9, workspace, 9"
"$mod SHIFT, 1, movetoworkspace, 1"
"$mod SHIFT, 2, movetoworkspace, 2"
"$mod SHIFT, 3, movetoworkspace, 3"
"$mod SHIFT, 4, movetoworkspace, 4"
"$mod SHIFT, 5, movetoworkspace, 5"
"$mod SHIFT, 6, movetoworkspace, 6"
"$mod SHIFT, 7, movetoworkspace, 7"
"$mod SHIFT, 8, movetoworkspace, 8"
"$mod SHIFT, 9, movetoworkspace, 9"
# screenshot
", PRINT, exec, hyprshot -m region --clipboard-only"
# toggle muting speacers and mic
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
", XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
];
binde = [
# audio
", XF86AudioLowerVolume, exec, wpctl set-volume -l 1.25 @DEFAULT_AUDIO_SINK@ 5%-"
", XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.25 @DEFAULT_AUDIO_SINK@ 5%+"
# brightness
", XF86MonBrightnessDown, exec, brightnessctl set 10%-"
", XF86MonBrightnessUp, exec, brightnessctl set 10%+"
];
general = {
gaps_in = 4;
gaps_out = 8;
border_size = 0;
layout = "dwindle";
};
input = {
kb_layout = "de";
touchpad.disable_while_typing = true;
};
cursor = {
inactive_timeout = 5;
};
decoration = {
rounding = 6;
blur.enabled = false;
shadow.enabled = false;
};
};
};
services.udiskie.enable = true;
}

View File

@@ -0,0 +1,62 @@
{ pkgs, ... }:
{
fonts.fontconfig.enable = true;
home.packages = [
pkgs.thunderbird
pkgs.nextcloud-client
pkgs.keepassxc
pkgs.telegram-desktop
pkgs.element-desktop
pkgs.tree
pkgs.htop
pkgs.neovim
pkgs.wget
pkgs.unzip
pkgs.feather
pkgs.electrum
pkgs.firefox
pkgs.zathura
pkgs.xfce.thunar
pkgs.ranger
pkgs.nerd-fonts.fira-code
pkgs.fira-code
pkgs.meslo-lgs-nf
pkgs.eza
pkgs.bat
pkgs.ripgrep
pkgs.seahorse
pkgs.binutils
pkgs.gcc
pkgs.scenebuilder
pkgs.nil
pkgs.quickemu
pkgs.zotero
pkgs.jabref
(pkgs.aspellWithDicts
(dicts: with dicts; [ de en en-computers ]))
# stuff for the waybar
pkgs.nerd-fonts.jetbrains-mono
pkgs.brightnessctl
pkgs.bluez
pkgs.bluetui
pkgs.jq
pkgs.lm_sensors
];
}

View File

@@ -1,3 +1,5 @@
{config, ...}:
let let
fullTheme = '' fullTheme = ''
* { * {
@@ -109,7 +111,11 @@ let
} }
''; '';
in { in {
programs.rofi.enable = true;
home.file.".config/rofi/theme.rasi".text = fullTheme; home.file.".config/rofi/theme.rasi".text = fullTheme;
programs.rofi = {
enable = true;
theme = "${config.xdg.configHome}/rofi/theme.rasi";
};
} }

View File

@@ -0,0 +1,241 @@
let
fullStyle = ''
* {
min-height: 0;
min-width: 0;
font-family: FiraCode;
font-size: 16px;
font-weight: 600;
}
window#waybar {
transition-property: background-color;
transition-duration: 0.5s;
/* background-color: #1e1e2e; */
/* background-color: #181825; */
background-color: #11111b;
/* background-color: rgba(24, 24, 37, 0.6); */
}
#workspaces button {
padding: 0.3rem 0.6rem;
margin: 0.4rem 0.25rem;
border-radius: 6px;
/* background-color: #181825; */
background-color: #1e1e2e;
color: #cdd6f4;
}
#workspaces button:hover {
color: #1e1e2e;
background-color: #cdd6f4;
}
#workspaces button.active {
background-color: #1e1e2e;
color: #89b4fa;
}
#workspaces button.urgent {
background-color: #1e1e2e;
color: #f38ba8;
}
#clock,
#pulseaudio,
#custom-logo,
#custom-power,
#custom-spotify,
#custom-notification,
#cpu,
#tray,
#memory,
#window,
#mpris {
padding: 0.3rem 0.6rem;
margin: 0.4rem 0.25rem;
border-radius: 6px;
/* background-color: #181825; */
background-color: #1e1e2e;
}
#mpris.playing {
color: #a6e3a1;
}
#mpris.paused {
color: #9399b2;
}
#custom-sep {
padding: 0px;
color: #585b70;
}
window#waybar.empty #window {
background-color: transparent;
}
#cpu {
color: #94e2d5;
}
#memory {
color: #cba6f7;
}
#clock {
color: #74c7ec;
}
#clock.simpleclock {
color: #89b4fa;
}
#window {
color: #cdd6f4;
}
#pulseaudio {
color: #b4befe;
}
#pulseaudio.muted {
color: #a6adc8;
}
#custom-logo {
color: #89b4fa;
}
#custom-power {
color: #f38ba8;
}
tooltip {
background-color: #181825;
border: 2px solid #89b4fa;
}
'';
fullConfig = ''
{
"layer": "top",
"position": "top",
"height": 32,
"spacing": 0,
"modules-left": [
"hyprland/workspaces",
],
"modules-right": [
"pulseaudio",
"backlight",
"bluetooth",
"network",
"battery",
"clock",
"tray",
"custom/reboot",
"custom/power"
],
"hyprland/workspaces": {
"disable-scroll": false,
"all-outputs": true,
"format": "{icon}",
"on-click": "activate",
"persistent-workspaces": {
"*":[1,2,3,4]
},
"format-icons": {
"1": "󰞷",
"2": "󰖟",
"3": "",
"4": "",
"default": ""
}
},
"custom/reboot": {
"format": "<span color='#FFD700'> </span>",
"on-click": "systemctl reboot",
"tooltip": true,
},
"custom/power": {
"format": "<span color='#FF4040'> </span>",
"on-click": "systemctl poweroff",
"tooltip": true,
},
"network": {
"format-wifi": "<span color='#00FFFF'> 󰤨 </span>{essid} ",
"format-ethernet": "<span color='#7FFF00'> </span>Wired ",
"tooltip-format": "<span color='#FF1493'> 󰅧 </span>{bandwidthUpBytes} <span color='#00BFFF'> 󰅢 </span>{bandwidthDownBytes}",
"format-linked": "<span color='#FFA500'> 󱘖 </span>{ifname} (No IP) ",
"format-disconnected": "<span color='#FF4040'> </span>Disconnected ",
"format-alt": "<span color='#00FFFF'> 󰤨 </span>{signalStrength}% ",
"interval": 1
},
"battery": {
"states": {
"warning": 30,
"critical": 15
},
"format": "<span color='#28CD41'> {icon} </span>{capacity}% ",
"format-charging": " 󱐋{capacity}%",
"interval": 1,
"format-icons": ["󰂎", "󰁼", "󰁿", "󰂁", "󰁹"],
"tooltip": true
},
"pulseaudio": {
"format": "<span color='#00FF7F'>{icon}</span>{volume}% ",
"format-muted": "<span color='#FF4040'> 󰖁 </span>0% ",
"format-icons": {
"headphone": "<span color='#BF00FF'> </span>",
"hands-free": "<span color='#BF00FF'> </span>",
"headset": "<span color='#BF00FF'> </span>",
"phone": "<span color='#00FFFF'> </span>",
"portable": "<span color='#00FFFF'> </span>",
"car": "<span color='#FFA500'> </span>",
"default": [
"<span color='#808080'> </span>",
"<span color='#FFFF66'> </span>",
"<span color='#00FF7F'> </span>"
]
},
"on-click-right": "pavucontrol -t 3",
"on-click": "pactl -- set-sink-mute 0 toggle",
},
"clock": {
"interval": 1,
"timezone": "Europe/Berlin",
"format": "<span color='#BF00FF'> </span>{:%H:%M} ",
},
"tray": {
"icon-size": 17,
"spacing": 6
},
"backlight": {
"device": "intel_backlight",
"format": "<span color='#FFD700'>{icon}</span>{percent}% ",
"tooltip": true,
"format-icons": [
"<span color='#696969'> 󰃞 </span>",
"<span color='#A9A9A9'> 󰃝 </span>",
"<span color='#FFFF66'> 󰃟 </span>",
"<span color='#FFD700'> 󰃠 </span>"
]
},
"bluetooth": {
"format": "<span color='#00BFFF'> </span>{status} ",
"format-connected": "<span color='#00BFFF'> </span>{device_alias} ",
"format-connected-battery": "<span color='#00BFFF'> </span>{device_alias}{device_battery_percentage}% ",
"tooltip-format": "{controller_alias}\t{controller_address}\n\n{num_connections} connected",
"tooltip-format-connected": "{controller_alias}\t{controller_address}\n\n{num_connections} connected\n\n{device_enumerate}",
"tooltip-format-enumerate-connected": "{device_alias}\t{device_address}",
"tooltip-format-enumerate-connected-battery": "{device_alias}\t{device_address}\t{device_battery_percentage}%",
"on-click": "blueman-manager"
}
}
'';
in {
home.file.".config/waybar/style.css".text = fullStyle;
home.file.".config/waybar/config.jsonc".text = fullConfig;
}

View File

@@ -0,0 +1,19 @@
{
imports = [
./packages.nix
../common/brave.nix
../common/direnv.nix
../common/emacs.nix
../common/git.nix
../common/shell.nix
../common/alacritty.nix
../common/tmux.nix
../common/xgd.nix
../common/libreoffice.nix
];
home.username = "lukas";
home.homeDirectory = "/home/lukas";
home.stateVersion = "25.05";
}

View File

@@ -9,6 +9,7 @@
pkgs.keepassxc pkgs.keepassxc
pkgs.telegram-desktop pkgs.telegram-desktop
pkgs.element-desktop pkgs.element-desktop
pkgs.tidal-hifi
pkgs.tree pkgs.tree
pkgs.htop pkgs.htop
@@ -16,6 +17,16 @@
pkgs.wget pkgs.wget
pkgs.unzip pkgs.unzip
pkgs.open-webui
pkgs.librechat
pkgs.feather
pkgs.firefox
pkgs.ranger
pkgs.zathura
pkgs.nerd-fonts.fira-code pkgs.nerd-fonts.fira-code
pkgs.fira-code pkgs.fira-code
pkgs.meslo-lgs-nf pkgs.meslo-lgs-nf
@@ -24,14 +35,20 @@
pkgs.bat pkgs.bat
pkgs.ripgrep pkgs.ripgrep
pkgs.seahorse
pkgs.binutils pkgs.binutils
pkgs.gcc pkgs.gcc
# pkgs.scenebuilder
pkgs.nil pkgs.nil
pkgs.zotero
pkgs.jabref
(pkgs.aspellWithDicts (pkgs.aspellWithDicts
(dicts: with dicts; [ de en en-computers ])) (dicts: with dicts; [ de en en-computers ]))
]; ];
} }

View File

@@ -1,44 +0,0 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
waybar networkmanagerapplet
];
programs.waybar = {
catppuccin.enable = true;
enable = true;
systemd.enable = true; # auto-restart on crashes
settings = {
mainBar = {
layer = "top";
position = "top";
height = 32;
modules-left = [ "hyprland/workspaces" ];
modules-center = [ "clock" ];
modules-right = [
"network"
"pulseaudio"
"battery"
"tray"
];
# `network` module shows SSID + signal; no need for nm-applet text
"network" = {
format-wifi = "{ssid} {signalStrength}%";
format-disconnected = "";
};
};
};
};
# Start nm-applet once; Waybar's SNI tray picks it up.
systemd.user.services."nm-applet" = {
Unit.Description = "NetworkManager Applet";
Service = {
ExecStart = "${pkgs.networkmanagerapplet}/bin/nm-applet --indicator";
Restart = "on-failure";
};
Install.WantedBy = [ "graphical-session.target" ];
};
}

View File

@@ -1,13 +1,19 @@
{ pkgs, ... }: { { pkgs, ... }:
{
imports = [ imports = [
./hardware.nix ./hardware.nix
../../users/lukas.nix ../../users/lukas.nix
../../modules/desktop/hyprland.nix ../../modules/desktop/hyprland.nix
../../modules/input/katana.nix ../../modules/input/katana.nix
../../modules/networking/networkmanager.nix ../../modules/networking/networkmanager.nix
../../modules/networking/bluetooth.nix
../../modules/system/locale.nix ../../modules/system/locale.nix
../../modules/system/audio.nix ../../modules/system/audio.nix
../../modules/system/printing.nix ../../modules/system/printing.nix
../../modules/system/docker.nix
../../modules/system/gpg.nix
../../modules/system/virtualbox.nix
../../modules/system/mullvad.nix
]; ];
networking.hostName = "segfault-machine"; networking.hostName = "segfault-machine";

View File

@@ -13,6 +13,9 @@
boot.kernelModules = [ "kvm-amd" ]; boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
boot.kernelParams = [ "amd_iommu=on" ];
fileSystems."/" = fileSystems."/" =
{ device = "/dev/disk/by-uuid/5af0ed50-72c4-4bee-8c6e-7b0556cffbc7"; { device = "/dev/disk/by-uuid/5af0ed50-72c4-4bee-8c6e-7b0556cffbc7";
fsType = "ext4"; fsType = "ext4";
@@ -41,9 +44,7 @@
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.bluetooth = { services.hardware.bolt.enable = true;
enable = true;
powerOnBoot = true;
};
services.fwupd.enable = true;
} }

View File

@@ -0,0 +1,46 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ pkgs, ... }:
{
imports = [
./hardware.nix
../../users/lukas.nix
../../modules/desktop/gnome.nix
../../modules/input/katana.nix
../../modules/input/qmk.nix
../../modules/networking/networkmanager.nix
../../modules/networking/bluetooth.nix
../../modules/system/locale.nix
../../modules/system/nvidia.nix
../../modules/system/audio.nix
../../modules/system/printing.nix
../../modules/system/docker.nix
../../modules/system/gpg.nix
../../modules/system/virtualbox.nix
../../modules/system/mullvad.nix
../../modules/services/ollama.nix
];
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.initrd.luks.devices."luks-b10eb0c6-67b8-40b6-bba4-83d38267abad".device = "/dev/disk/by-uuid/b10eb0c6-67b8-40b6-bba4-83d38267abad";
boot.resumeDevice = "/dev/mapper/luks-b10eb0c6-67b8-40b6-bba4-83d38267abad";
hardware.enableAllFirmware = true;
networking.hostName = "segfault-tower";
nixpkgs.config.allowUnfree = true;
# Version festlegen
system.stateVersion = "25.05";
nix.settings.experimental-features = [ "nix-command" "flakes" ];
}

View File

@@ -0,0 +1,38 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/70a079c3-a222-473d-ba56-2f9bc60de4b5";
fsType = "ext4";
};
boot.initrd.luks.devices."luks-947b9aa6-e5dc-4e1e-83a7-7a77a7fe84f5".device = "/dev/disk/by-uuid/947b9aa6-e5dc-4e1e-83a7-7a77a7fe84f5";
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/E034-ADEC";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices =
[
{ device = "/dev/disk/by-uuid/9afed355-7650-43ae-9fae-1d6c1135f6ee"; }
];
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View File

@@ -1,21 +1,19 @@
{ config, pkgs, lib, ... }: { pkgs, ... }:
{ {
# --- GNOME on Wayland -------------------------------------------------- services.xserver = {
services.xserver.enable = true; displayManager.gdm.enable = true;
services.xserver.displayManager.gdm.enable = true; desktopManager.gnome.enable = true;
services.xserver.desktopManager.gnome.enable = true; };
# Electron/Chromium apps → Wayland
environment.sessionVariables.NIXOS_OZONE_WL = "1";
# # --- dconf service & keyboard repeat ---------------------------------- # To disable installing GNOME's suite of applications
# programs.dconf.enable = true; # ← brings the `dconf` option into scope! # and only be left with GNOME shell.
services.gnome.core-apps.enable = true;
services.gnome.core-developer-tools.enable = false;
services.gnome.games.enable = false;
environment.gnome.excludePackages = with pkgs; [ gnome-tour gnome-user-docs ];
# dconf.settings = { environment.systemPackages = [ pkgs.gnomeExtensions.appindicator ];
# "org/gnome/desktop/peripherals/keyboard" = { services.udev.packages = [ pkgs.gnome-settings-daemon ];
# delay = lib.gvariant.mkUint32 200; # ms before first repeat
# repeat-interval = lib.gvariant.mkUint32 25; # ms between repeats ≈40 cps
# };
# };
} }

View File

@@ -11,9 +11,7 @@
NIXOS_OZONE_WL = "1"; NIXOS_OZONE_WL = "1";
}; };
hardware = { hardware.graphics.enable = true;
opengl.enable = true;
};
environment.systemPackages = [ environment.systemPackages = [
(pkgs.waybar.overrideAttrs (oldAttrs: { (pkgs.waybar.overrideAttrs (oldAttrs: {
@@ -24,6 +22,9 @@
pkgs.swww pkgs.swww
pkgs.rofi-wayland pkgs.rofi-wayland
pkgs.hyprlock pkgs.hyprlock
pkgs.hyprshot
pkgs.swayidle
pkgs.udiskie
pkgs.brightnessctl # adjust backlight via keybindings pkgs.brightnessctl # adjust backlight via keybindings
pkgs.scrot # simple screenshot pkgs.scrot # simple screenshot
@@ -36,6 +37,9 @@
xdg.portal.enable = true; xdg.portal.enable = true;
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
services.udisks2.enable = true;
services.greetd = { services.greetd = {
enable = true; enable = true;
settings = { settings = {

View File

@@ -1,4 +1,3 @@
{ inputs, pkgs, ... }:
{ {
# Enable the uinput module # Enable the uinput module
boot.kernelModules = [ "uinput" ]; boot.kernelModules = [ "uinput" ];
@@ -28,17 +27,6 @@
enable = true; enable = true;
keyboards = { keyboards = {
internalKeyboard = { internalKeyboard = {
devices = [
# Replace the paths below with the appropriate device paths for your setup.
# Use `ls /dev/input/by-path/` to find your keyboard devices.
"/dev/input/by-path/pci-0000:66:00.0-usb-0:2.3:1.0-event-kbd"
"/dev/input/by-path/pci-0000:66:00.0-usb-0:2.4:1.0-event-kbd"
"/dev/input/by-path/pci-0000:66:00.0-usb-0:2.4:1.2-event-kbd"
"/dev/input/by-path/pci-0000:66:00.0-usbv2-0:2.3:1.0-event-kbd"
"/dev/input/by-path/pci-0000:66:00.0-usbv2-0:2.4:1.0-event-kbd"
"/dev/input/by-path/pci-0000:66:00.0-usbv2-0:2.4:1.2-event-kbd"
"/dev/input/by-path/platform-i8042-serio-0-event-kbd"
];
extraDefCfg = "process-unmapped-keys yes"; extraDefCfg = "process-unmapped-keys yes";
config = '' config = ''
(defsrc (defsrc

6
modules/input/qmk.nix Normal file
View File

@@ -0,0 +1,6 @@
{ pkgs, ... }:
{
hardware.keyboard.qmk.enable = true;
environment.systemPackages = with pkgs; [ via qmk ];
services.udev.packages = [ pkgs.via ];
}

View File

@@ -0,0 +1,8 @@
{
hardware.bluetooth = {
enable = true;
powerOnBoot = false;
};
services.blueman.enable = true;
}

View File

@@ -1,4 +1,3 @@
{ config, pkgs, ... }:
{ {
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
} }

View File

@@ -0,0 +1,45 @@
{config, pkgs-unstable, ... }:
{
services.ollama = {
enable = true;
package = pkgs-unstable.ollama;
acceleration = "cuda";
environmentVariables = {
OLLAMA_CONTEXT_LENGTH="32000";
};
};
systemd.services.ollama.serviceConfig = {
Environment = [ "OLLAMA_HOST=0.0.0.0:11434" ];
};
services.open-webui = {
package = pkgs-unstable.open-webui;
enable = true;
port = 8081;
environment = {
ANONYMIZED_TELEMETRY = "False";
DO_NOT_TRACK = "True";
SCARF_NO_ANALYTICS = "True";
OLLAMA_API_BASE_URL = "http://127.0.0.1:11434/api";
OLLAMA_BASE_URL = "http://127.0.0.1:11434";
WEBUI_AUTH = "False";
FRONTEND_BUILD_DIR = "${config.services.open-webui.stateDir}/build";
DATA_DIR = "${config.services.open-webui.stateDir}/data";
STATIC_DIR = "${config.services.open-webui.stateDir}/static";
};
};
services.searx = {
enable = true;
redisCreateLocally = true;
settings.server = {
bind_address = "::1";
port = 1111;
secret_key = "my ultra secret key";
};
settings.search.formats = ["html" "json"];
};
}

View File

@@ -0,0 +1,4 @@
{
virtualisation.docker.enable = true;
virtualisation.oci-containers.backend = "docker";
}

10
modules/system/gpg.nix Normal file
View File

@@ -0,0 +1,10 @@
{pkgs, ...}:
{
services.pcscd.enable = true;
programs.gnupg.agent = {
enable = true;
pinentryPackage = pkgs.pinentry-curses;
enableSSHSupport = true;
};
}

View File

@@ -1,6 +1,13 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
console = {
earlySetup = true;
useXkbConfig = true;
};
services.xserver.xkb.layout = "de";
time.timeZone = "Europe/Berlin"; time.timeZone = "Europe/Berlin";
i18n.defaultLocale = "de_DE.UTF-8"; i18n.defaultLocale = "de_DE.UTF-8";
i18n.extraLocaleSettings = { i18n.extraLocaleSettings = {

View File

@@ -0,0 +1,5 @@
{ pkgs, ... }:
{
services.mullvad-vpn.package = pkgs.mullvad-vpn;
services.mullvad-vpn.enable = true;
}

31
modules/system/nvidia.nix Normal file
View File

@@ -0,0 +1,31 @@
{config, pkgs, ...}:
{
nixpkgs.config.allowUnfree = true;
services.xserver.videoDrivers = ["nvidia"];
hardware.graphics = {
enable = true;
enable32Bit = true;
};
hardware.nvidia = {
modesetting.enable = true;
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
# Enable this if you have graphical corruption issues or application crashes after waking
# up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead
# of just the bare essentials.
powerManagement.enable = true;
# Fine-grained power management. Turns off GPU when not in use.
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
# (requires offloading)
powerManagement.finegrained = false;
open = false;
nvidiaSettings = true;
package = config.boot.kernelPackages.nvidiaPackages.stable;
};
}

View File

@@ -0,0 +1,37 @@
{ config, pkgs, ... }: let
hibernateEnvironment = {
HIBERNATE_SECONDS = "3600";
HIBERNATE_LOCK = "/var/run/autohibernate.lock";
};
in {
systemd.services."awake-after-suspend-for-a-time" = {
description = "Sets up the suspend so that it'll wake for hibernation";
wantedBy = [ "suspend.target" ];
before = [ "systemd-suspend.service" ];
environment = hibernateEnvironment;
script = ''
curtime=$(date +%s)
echo "$curtime $1" >> /tmp/autohibernate.log
echo "$curtime" > $HIBERNATE_LOCK
${pkgs.util-linux}/bin/rtcwake -m no -s $HIBERNATE_SECONDS
'';
serviceConfig.Type = "simple";
};
systemd.services."hibernate-after-recovery" = {
description = "Hibernates after a suspend recovery due to timeout";
wantedBy = [ "suspend.target" ];
after = [ "systemd-suspend.service" ];
environment = hibernateEnvironment;
script = ''
curtime=$(date +%s)
sustime=$(cat $HIBERNATE_LOCK)
rm $HIBERNATE_LOCK
if [ $(($curtime - $sustime)) -ge $HIBERNATE_SECONDS ] ; then
systemctl hibernate
else
${pkgs.util-linux}/bin/rtcwake -m no -s 1
fi
'';
serviceConfig.Type = "simple";
};
}

View File

@@ -0,0 +1,14 @@
{
nixpkgs.config.allowUnfree = true;
virtualisation.virtualbox.host = {
enable = true;
enableKvm = true;
enableHardening = false;
addNetworkInterface = false;
};
users.extraGroups.vboxusers.members = [ "lukas" ];
virtualisation.virtualbox.host.enableExtensionPack = true;
}

View File

@@ -1,14 +1,11 @@
{ config, pkgs, ... }:
{ {
users.users.lukas = { users.users.lukas = {
isNormalUser = true; isNormalUser = true;
description = "lukas"; description = "lukas";
extraGroups = [ "networkmanager" "wheel" ]; extraGroups = [ "networkmanager" "wheel" "docker"];
}; };
# Autologin # Autologin
services.displayManager.autoLogin.enable = true; services.displayManager.autoLogin.enable = true;
services.displayManager.autoLogin.user = "lukas"; services.displayManager.autoLogin.user = "lukas";
} }