nix-setup/home.nix

134 lines
3.8 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-09-30 17:57:23 +02:00
mpv
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-09-30 17:57:23 +02:00
] ++ (with pkgs; [
freecad
2024-09-30 17:57:23 +02:00
nheko
olm
mkchromecast
]);
2024-09-07 01:18:31 +02:00
nixpkgs.config.permittedInsecurePackages = [
"olm-3.2.16"
"python3.12-youtube-dl-2021.12.17"
];
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-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;
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 = "1";
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;
services.dunst.enable = true;
gtk.enable = true;
gtk.theme = {
name = "Arc-Dark";
package = pkgs.arc-theme;
};
};
}