nix-setup/home.nix

189 lines
5.2 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
#marker.pkgs.end#
2024-10-23 10:08:40 +02:00
(import ./traewelling.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-09-07 01:18:31 +02:00
'';
programs.alacritty.enable = true;
/* 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;
2024-10-19 15:32:41 +02:00
extraConfig = "exec feh --bg-fill .background-image";
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";
};
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-09-07 01:18:31 +02:00
services.dunst.enable = true;
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
};
2024-09-07 01:18:31 +02:00
};
}