nix-setup/home.nix

250 lines
6.7 KiB
Nix
Raw Normal View History

2024-09-07 01:18:31 +02:00
{ lib, config, pkgs, ... }:
2024-09-30 17:57:23 +02:00
2024-09-07 01:18:31 +02:00
let
home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/master.tar.gz";
2024-09-30 17:57:23 +02:00
upkgs = import <nixpkgs> {};
2024-09-07 01:18:31 +02:00
in
{
imports = [
(import "${home-manager}/nixos")
];
2024-09-30 17:57:23 +02:00
users.users.tudbut.packages = with upkgs; [
2024-09-07 01:18:31 +02:00
firefox
thunderbird
tree
keepassxc
sshfs
arc-theme
signal-desktop
gimp
yt-dlp
2024-10-31 20:09:37 +01:00
( mpv-unwrapped.wrapper { mpv = mpv-unwrapped.override { ffmpeg = ffmpeg-full; }; } )
2024-09-30 17:57:23 +02:00
graphviz
2024-09-07 01:18:31 +02:00
giac-with-xcas
sqlite-interactive
acpi
nix-init
2024-09-30 17:57:23 +02:00
hydra-check
mate.eom
jdt-language-server
bluej
pcmanfm
filezilla
tree-sitter
gnome-network-displays
prismlauncher
prusa-slicer
evcxr
tcpdump
2024-10-20 10:52:46 +02:00
hyfetch
libreoffice
2024-10-23 10:10:01 +02:00
nushell
2024-10-23 14:15:30 +02:00
testdisk
2024-10-24 11:48:18 +02:00
bb
2024-10-27 02:33:14 +02:00
elixir-ls
2024-10-27 02:37:01 +02:00
elixir
2024-10-29 20:59:32 +01:00
dogdns
2024-11-03 02:43:48 +01:00
scc
2024-11-05 12:18:55 +01:00
typst
2024-11-08 20:23:04 +01:00
ventoy
2024-11-09 01:28:40 +01:00
nmap
2024-11-09 01:33:18 +01:00
qemu_full
2024-11-10 22:14:02 +01:00
qpaeq
deadd-notification-center
2024-11-15 17:47:21 +01:00
dig
2024-11-15 17:56:07 +01:00
arp-scan
2024-11-15 18:31:38 +01:00
masscan
2024-11-17 18:15:02 +01:00
arduino
2024-11-17 18:43:33 +01:00
patchelf
2024-11-17 18:51:37 +01:00
eudev
#marker.pkgs.end#
2024-10-23 10:08:40 +02:00
(import ./traewelling.script.nix)
2024-11-12 16:09:38 +01:00
(import ./metronom-login.script.nix)
2024-10-30 01:16:16 +01:00
(import ./plans.script.nix)
2024-11-03 00:08:06 +01:00
(import ./todos.script.nix)
(import ./plans-backend.script.nix)
2024-09-30 17:57:23 +02:00
] ++ (with pkgs; [
freecad
2024-09-30 17:57:23 +02:00
nheko
olm
mkchromecast
2024-10-19 15:31:20 +02:00
feh
2024-11-06 11:06:04 +01:00
geogebra
2024-09-30 17:57:23 +02:00
]);
2024-09-07 01:18:31 +02:00
nixpkgs.config.permittedInsecurePackages = [
"olm-3.2.16"
"python3.12-youtube-dl-2021.12.17"
];
2024-11-06 11:06:04 +01:00
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
"geogebra"
];
2024-09-07 01:18:31 +02:00
home-manager.backupFileExtension = ".hm-old";
home-manager.users.tudbut = {
programs.home-manager.enable = true;
/* The home.stateVersion option does not have a default and must be set */
home.stateVersion = "24.05";
programs.fish.enable = true;
programs.fish.shellInit = ''
export PATH="$PATH:$HOME/.cargo/bin"
2024-09-30 17:57:23 +02:00
export SPL_PATH="$HOME/gitshit/spl/spl"
2024-09-07 01:18:31 +02:00
export ISBPL_PATH="$HOME/gitshit/isbpl"
2024-09-30 17:57:23 +02:00
function mmgui
sudo modem-manager-gui & disown
exit
end
function jjci
jjc "$(head -n1)"
end
function jjc
echo "public class _main { public static void p(Object o) { System.out.println(o); } public static void main(String[] args) { $argv ; } }" > src/_main.java
jjj _main
rm src/_main.java
end
function jjj
mkdir src build lib res 2> /dev/null
pushd src
javac -cp "../lib" -d ../build $(find -type f)
popd
java -cp "build/:lib/:res/" $argv
end
2024-10-22 00:06:18 +02:00
if status is-interactive
2024-10-30 01:56:01 +01:00
stty -echo
2024-10-22 00:06:18 +02:00
if [ -e ~/sync/todo.txt ]
2024-10-30 01:10:30 +01:00
set_color magenta
echo "> Plans from ~/sync/plans.txt:"
set_color brmagenta
cat ~/sync/plans.txt
echo
2024-10-22 00:09:50 +02:00
set_color blue
2024-10-22 00:06:18 +02:00
echo "> Your TODOs from ~/sync/todo.txt:"
2024-10-22 00:09:50 +02:00
set_color brblue
2024-10-22 00:06:18 +02:00
cat ~/sync/todo.txt
else
set_color red
echo "> Sync is not mounted."
2024-10-22 00:06:18 +02:00
end
2024-10-29 00:02:02 +01:00
echo
2024-10-22 18:24:54 +02:00
# check träwelling
traewelling
set_color normal
2024-10-30 01:56:01 +01:00
stty echo
2024-10-22 00:06:18 +02:00
end
2024-10-22 00:13:52 +02:00
function edit-todo
hx ~/sync/todo.txt
2024-10-22 00:22:31 +02:00
clear
2024-10-22 00:20:52 +02:00
exec $SHELL
2024-10-22 00:13:52 +02:00
end
2024-11-13 00:33:22 +01:00
alias nix-fish="nix-shell --command fish"
alias gitlog="git log --all --oneline --graph"
2024-09-07 01:18:31 +02:00
'';
programs.alacritty.enable = true;
2024-11-22 20:41:08 +01:00
programs.direnv = {
enable = true;
nix-direnv.enable = true;
};
2024-09-07 01:18:31 +02:00
/* Here goes the rest of your home-manager config, e.g. home.packages = [ pkgs.foo ]; */
xsession.enable = true;
xsession.initExtra = "clipit &";
xsession.windowManager.i3 = {
enable = true;
package = pkgs.i3-gaps;
extraConfig = ''
exec feh --bg-fill .background-image
exec deadd-notification-center
'';
2024-09-07 01:18:31 +02:00
config = {
keybindings = lib.mkOptionDefault {
"XF86AudioMute" = "exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle";
"XF86AudioMicMute" = "exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle";
"XF86AudioRaiseVolume" = "exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5%";
"XF86AudioLowerVolume" = "exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5%";
"XF86MonBrightnessUp" = "exec --no-startup-id bright up";
"XF86MonBrightnessDown" = "exec --no-startup-id bright down";
"Print" = "exec --no-startup-id maim -s screenshot.png && xclip -selection clipboard -target image/png screenshot.png";
"Mod4+q" = "exec sl";
"Mod4+p" = "exec killall -USR1 deadd-notification-center";
2024-09-07 01:18:31 +02:00
};
terminal = "alacritty";
modifier = "Mod4";
fonts.names = ["Fira Code" "DejaVu Sans Mono"];
fonts.size = 12.0;
bars = [{
statusCommand = "${pkgs.i3status}/bin/i3status";
fonts = {
names = [ "Fira Code" "DejaVu Sans Mono" ];
size = 12.0;
};
}];
defaultWorkspace = "workspace number 1";
2024-09-07 01:18:31 +02:00
gaps = {
inner = 12;
};
};
};
programs.i3status.enable = true;
2024-09-30 17:57:23 +02:00
programs.i3status.modules."cpu_temperature 0" = {
enable = true;
position = 6;
};
2024-09-07 01:18:31 +02:00
programs.i3status.modules."battery all".settings.format = "%status %percentage %remaining %emptytime %consumption";
programs.i3status.modules."battery all".settings.last_full_capacity = true;
2024-10-19 18:09:34 +02:00
services.picom.enable = true;
2024-10-19 18:03:43 +02:00
programs.alacritty.settings.window.opacity = 0.7;
programs.alacritty.settings.font.normal.family = "Monocraft";
2024-11-15 21:39:06 +01:00
programs.alacritty.settings.font.size = 10;
#services.dunst.enable = true;
2024-09-07 01:18:31 +02:00
gtk.enable = true;
gtk.theme = {
name = "Arc-Dark";
package = pkgs.arc-theme;
};
2024-10-30 19:53:57 +01:00
gtk.iconTheme = {
2024-10-30 19:57:19 +01:00
name = "Breeze-Dark";
package = pkgs.breeze-icons;
2024-10-30 19:54:19 +01:00
};
xdg.enable = true;
xdg.configFile."deadd/deadd.yml".text = ''
2024-11-13 09:02:28 +01:00
width: 600
notification:
popup:
default-timeout: 10000
'';
xdg.configFile."deadd/deadd.css".source = ./deadd.css;
2024-11-15 21:11:44 +01:00
programs.helix.enable = true;
programs.helix.defaultEditor = true;
programs.helix.settings = {
2024-11-15 21:39:06 +01:00
theme = "tudbut";
2024-11-15 21:11:44 +01:00
editor = {
line-number = "relative";
lsp.display-messages = true;
cursor-shape = {
insert = "bar";
};
cursorline = true;
bufferline = "always";
lsp.display-inlay-hints = true;
idle-timeout = 0;
completion-trigger-len = 1;
2024-11-15 21:11:44 +01:00
};
keys.normal = {
minus = "goto_previous_buffer";
"+" = "goto_next_buffer";
"#" = ":buffer-close";
G = "goto_file_end";
};
keys.normal.g.f = "code_action";
2024-11-15 21:11:44 +01:00
};
2024-11-15 21:39:06 +01:00
programs.helix.themes.tudbut = {
inherits = "monokai_pro_ristretto";
2024-11-15 22:06:54 +01:00
"string.special.symbol" = { fg = "#5cdaa7"; };
2024-11-15 21:39:06 +01:00
};
2024-09-07 01:18:31 +02:00
};
}