Finally the start of basic desktop apps on hyprland
This commit is contained in:
parent
458fb492c4
commit
14cd58677a
@ -83,15 +83,13 @@
|
|||||||
users.users.javi = {
|
users.users.javi = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
description = "javi";
|
description = "javi";
|
||||||
|
shell = pkgs.zsh;
|
||||||
|
useDefaultShell = true;
|
||||||
extraGroups = [
|
extraGroups = [
|
||||||
"networkmanager"
|
"networkmanager"
|
||||||
"wheel"
|
"wheel"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
# Install firefox.
|
|
||||||
programs.firefox.enable = true;
|
|
||||||
|
|
||||||
# Allow unfree packages
|
# Allow unfree packages
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
@ -161,6 +159,9 @@
|
|||||||
polarity = "dark";
|
polarity = "dark";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Enable zshell
|
||||||
|
programs.zsh.enable = true;
|
||||||
|
|
||||||
# Enable home manager
|
# Enable home manager
|
||||||
home-manager = {
|
home-manager = {
|
||||||
extraSpecialArgs = { inherit inputs; };
|
extraSpecialArgs = { inherit inputs; };
|
||||||
|
40
home.nix
40
home.nix
@ -33,8 +33,6 @@
|
|||||||
# environment.
|
# environment.
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
# Basics
|
# Basics
|
||||||
starship
|
|
||||||
nautilus
|
|
||||||
quickshell
|
quickshell
|
||||||
|
|
||||||
# Terminal tools
|
# Terminal tools
|
||||||
@ -64,9 +62,6 @@
|
|||||||
go
|
go
|
||||||
nodejs_22
|
nodejs_22
|
||||||
bun
|
bun
|
||||||
|
|
||||||
# Media
|
|
||||||
mpc
|
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.btop = {
|
programs.btop = {
|
||||||
@ -112,6 +107,7 @@
|
|||||||
|
|
||||||
# Configure all the xdg stuff so apps work correctly
|
# Configure all the xdg stuff so apps work correctly
|
||||||
xdg = {
|
xdg = {
|
||||||
|
enable = true;
|
||||||
# Normal expected directories
|
# Normal expected directories
|
||||||
userDirs = {
|
userDirs = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@ -126,23 +122,23 @@
|
|||||||
videos = "${config.home.homeDirectory}/Videos";
|
videos = "${config.home.homeDirectory}/Videos";
|
||||||
};
|
};
|
||||||
|
|
||||||
# File/app associations
|
# TODO: Move the http handler to a browser.nix
|
||||||
|
# # File/app associations
|
||||||
mimeApps = {
|
# mimeApps = {
|
||||||
enable = true;
|
# enable = true;
|
||||||
defaultApplications = {
|
# defaultApplications = {
|
||||||
"text/html" = "brave-browser.desktop";
|
# "text/html" = "brave.desktop";
|
||||||
"x-scheme-handler/http" = "brave-browser.desktop";
|
# "x-scheme-handler/http" = "brave.desktop";
|
||||||
"x-scheme-handler/https" = "brave-browser.desktop";
|
# "x-scheme-handler/https" = "brave.desktop";
|
||||||
"x-scheme-handler/about" = "brave-browser.desktop";
|
# "x-scheme-handler/about" = "brave.desktop";
|
||||||
"x-scheme-handler/unknown" = "brave-browser.desktop";
|
# "x-scheme-handler/unknown" = "brave.desktop";
|
||||||
"application/pdf" = "org.gnome.Evince.desktop";
|
# "application/pdf" = "org.gnome.Evince.desktop";
|
||||||
"text/plain" = "code.desktop";
|
# "text/plain" = "code.desktop";
|
||||||
"application/json" = "code.desktop";
|
# "application/json" = "code.desktop";
|
||||||
"application/javascript" = "code.desktop";
|
# "application/javascript" = "code.desktop";
|
||||||
"text/x-php" = "code.desktop";
|
# "text/x-php" = "code.desktop";
|
||||||
};
|
# };
|
||||||
};
|
# };
|
||||||
};
|
};
|
||||||
|
|
||||||
# Let Home Manager install and manage itself.
|
# Let Home Manager install and manage itself.
|
||||||
|
@ -1,110 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
# Development-specific configurations and tools
|
|
||||||
|
|
||||||
# Node.js development
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
# Node.js tools (system-wide installation handled in NixOS config)
|
|
||||||
nodePackages.npm
|
|
||||||
nodePackages.bun
|
|
||||||
|
|
||||||
# PHP development tools
|
|
||||||
phpPackages.composer
|
|
||||||
|
|
||||||
# JSON/YAML tools
|
|
||||||
jq
|
|
||||||
yq
|
|
||||||
];
|
|
||||||
|
|
||||||
# Development environment variables
|
|
||||||
home.sessionVariables = {
|
|
||||||
# Node.js
|
|
||||||
NODE_ENV = "development";
|
|
||||||
NPM_CONFIG_PREFIX = "${config.home.homeDirectory}/.npm-global";
|
|
||||||
|
|
||||||
# PHP
|
|
||||||
COMPOSER_HOME = "${config.home.homeDirectory}/.composer";
|
|
||||||
|
|
||||||
# Go
|
|
||||||
GOPATH = "${config.home.homeDirectory}/go";
|
|
||||||
GOBIN = "${config.home.homeDirectory}/go/bin";
|
|
||||||
|
|
||||||
# Laravel Valet (when using it with Nix)
|
|
||||||
PATH = "$PATH:${config.home.homeDirectory}/.composer/vendor/bin";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Create development directories
|
|
||||||
home.file.".keep-dirs" = {
|
|
||||||
text = "";
|
|
||||||
onChange = ''
|
|
||||||
mkdir -p ${config.home.homeDirectory}/projects
|
|
||||||
mkdir -p ${config.home.homeDirectory}/go/{bin,pkg,src}
|
|
||||||
mkdir -p ${config.home.homeDirectory}/.composer
|
|
||||||
mkdir -p ${config.home.homeDirectory}/.npm-global
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
# Yazi file manager configuration (replaces your yazi.sh script)
|
|
||||||
programs.yazi = {
|
|
||||||
enable = true;
|
|
||||||
enableBashIntegration = true;
|
|
||||||
|
|
||||||
settings = {
|
|
||||||
manager = {
|
|
||||||
show_hidden = true;
|
|
||||||
sort_by = "modified";
|
|
||||||
sort_reverse = true;
|
|
||||||
linemode = "permissions";
|
|
||||||
};
|
|
||||||
|
|
||||||
preview = {
|
|
||||||
max_width = 600;
|
|
||||||
max_height = 900;
|
|
||||||
};
|
|
||||||
|
|
||||||
opener = {
|
|
||||||
edit = [
|
|
||||||
{
|
|
||||||
run = "code \"$@\"";
|
|
||||||
block = true;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
open = [
|
|
||||||
{
|
|
||||||
run = "xdg-open \"$@\"";
|
|
||||||
desc = "Open";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
keymap = {
|
|
||||||
manager.prepend_keymap = [
|
|
||||||
{
|
|
||||||
on = [ "<Esc>" ];
|
|
||||||
run = "escape";
|
|
||||||
desc = "Exit visual mode, clear selected, or cancel search";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
on = [ "q" ];
|
|
||||||
run = "quit";
|
|
||||||
desc = "Exit the process";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
on = [ "Q" ];
|
|
||||||
run = "quit --no-cwd-file";
|
|
||||||
desc = "Exit the process without writing cwd-file";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
on = [ "<C-q>" ];
|
|
||||||
run = "close";
|
|
||||||
desc = "Close the current tab, or quit if it is last tab";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
@ -14,6 +14,7 @@
|
|||||||
# Desktop environment
|
# Desktop environment
|
||||||
./hyprland/hyprpanel.nix
|
./hyprland/hyprpanel.nix
|
||||||
./wofi.nix
|
./wofi.nix
|
||||||
|
./hyprland/desktop-env.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
"$mod" = "SUPER";
|
"$mod" = "SUPER";
|
||||||
"$browser" = "brave";
|
"$browser" = "brave";
|
||||||
"$terminal" = "kitty";
|
"$terminal" = "kitty";
|
||||||
"$file_browser" = "nautilus";
|
"$file_browser" = "thunar";
|
||||||
"$webapp" = "$browser --new-window --app=";
|
"$webapp" = "$browser --new-window --app=";
|
||||||
|
|
||||||
binds = {
|
binds = {
|
||||||
|
142
home/hyprland/desktop-env.nix
Normal file
142
home/hyprland/desktop-env.nix
Normal file
@ -0,0 +1,142 @@
|
|||||||
|
/*
|
||||||
|
This file is for configuring all the normal things
|
||||||
|
you would need in a desktop environment that
|
||||||
|
hyprland doesn't come with by default
|
||||||
|
such as:
|
||||||
|
- A file manager
|
||||||
|
- An image viewer
|
||||||
|
- Video player
|
||||||
|
*/
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
# Complete Desktop Applications Suite for Home Manager
|
||||||
|
{
|
||||||
|
# Media Viewers
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
# *** File Manager ***
|
||||||
|
xfce.thunar
|
||||||
|
xfce.thunar-volman # Removable drive support
|
||||||
|
xfce.thunar-media-tags-plugin
|
||||||
|
# Essential thumbnail generators
|
||||||
|
xfce.tumbler # Thunar's thumbnail service
|
||||||
|
ffmpegthumbnailer # Video thumbnails
|
||||||
|
libgsf # Office document thumbnails
|
||||||
|
poppler # PDF thumbnails
|
||||||
|
# ********************
|
||||||
|
|
||||||
|
# Image Viewers
|
||||||
|
kdePackages.gwenview # KDE image viewer - integrates well with Dolphin
|
||||||
|
# feh # Lightweight alternative
|
||||||
|
|
||||||
|
# Video Players
|
||||||
|
mpv
|
||||||
|
|
||||||
|
# Audio Players
|
||||||
|
kdePackages.elisa # KDE music player
|
||||||
|
|
||||||
|
# Document Viewers
|
||||||
|
kdePackages.okular # KDE PDF/document viewer
|
||||||
|
|
||||||
|
# Archive Managers
|
||||||
|
kdePackages.ark # KDE archive manager
|
||||||
|
|
||||||
|
# Text Editors
|
||||||
|
kdePackages.kate # KDE advanced text editor
|
||||||
|
# kwrite # KDE simple text editor
|
||||||
|
# gedit # GNOME text editor alternative
|
||||||
|
|
||||||
|
# Office & Productivity
|
||||||
|
# libreoffice # Full office suite
|
||||||
|
# onlyoffice-bin # Alternative office suite
|
||||||
|
];
|
||||||
|
|
||||||
|
# XDG MIME associations for seamless integration
|
||||||
|
xdg.mimeApps = {
|
||||||
|
enable = true;
|
||||||
|
defaultApplications = {
|
||||||
|
# Image files
|
||||||
|
"image/jpeg" = "org.kde.gwenview.desktop";
|
||||||
|
"image/png" = "org.kde.gwenview.desktop";
|
||||||
|
"image/gif" = "org.kde.gwenview.desktop";
|
||||||
|
"image/bmp" = "org.kde.gwenview.desktop";
|
||||||
|
"image/tiff" = "org.kde.gwenview.desktop";
|
||||||
|
"image/webp" = "org.kde.gwenview.desktop";
|
||||||
|
"image/svg+xml" = "org.kde.gwenview.desktop";
|
||||||
|
|
||||||
|
# Video files
|
||||||
|
"video/mp4" = "mpv.desktop";
|
||||||
|
"video/mpeg" = "mpv.desktop";
|
||||||
|
"video/quicktime" = "mpv.desktop";
|
||||||
|
"video/x-msvideo" = "mpv.desktop";
|
||||||
|
"video/x-matroska" = "mpv.desktop";
|
||||||
|
"video/webm" = "mpv.desktop";
|
||||||
|
|
||||||
|
# Audio files
|
||||||
|
"audio/mpeg" = "org.kde.elisa.desktop";
|
||||||
|
"audio/flac" = "org.kde.elisa.desktop";
|
||||||
|
"audio/x-wav" = "org.kde.elisa.desktop";
|
||||||
|
"audio/ogg" = "org.kde.elisa.desktop";
|
||||||
|
"audio/mp4" = "org.kde.elisa.desktop";
|
||||||
|
|
||||||
|
# Document files
|
||||||
|
"application/pdf" = "org.kde.okular.desktop";
|
||||||
|
"application/postscript" = "org.kde.okular.desktop";
|
||||||
|
"application/epub+zip" = "org.kde.okular.desktop";
|
||||||
|
|
||||||
|
# Text files
|
||||||
|
"text/plain" = "org.kde.kate.desktop";
|
||||||
|
"text/markdown" = "org.kde.kate.desktop";
|
||||||
|
"application/x-shellscript" = "org.kde.kate.desktop";
|
||||||
|
|
||||||
|
# Archive files
|
||||||
|
"application/zip" = "org.kde.ark.desktop";
|
||||||
|
"application/x-tar" = "org.kde.ark.desktop";
|
||||||
|
"application/x-compressed-tar" = "org.kde.ark.desktop";
|
||||||
|
"application/x-7z-compressed" = "org.kde.ark.desktop";
|
||||||
|
"application/x-rar" = "org.kde.ark.desktop";
|
||||||
|
|
||||||
|
# Directory
|
||||||
|
"inode/directory" = "org.kde.dolphin.desktop";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Configure specific programs
|
||||||
|
programs = {
|
||||||
|
# Configure mpv for advanced video playback
|
||||||
|
mpv = {
|
||||||
|
enable = true;
|
||||||
|
config = {
|
||||||
|
# Hardware acceleration
|
||||||
|
hwdec = "auto";
|
||||||
|
vo = "gpu";
|
||||||
|
|
||||||
|
# UI improvements
|
||||||
|
osc = true;
|
||||||
|
border = false;
|
||||||
|
|
||||||
|
# Subtitle settings
|
||||||
|
sub-auto = "fuzzy";
|
||||||
|
sub-file-paths = "ass:srt:sub:subs:subtitles";
|
||||||
|
|
||||||
|
# Audio settings
|
||||||
|
volume = 100;
|
||||||
|
volume-max = 200;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Optional: Create custom desktop entries for specific workflows
|
||||||
|
xdg.desktopEntries = {
|
||||||
|
# Open terminal in current directory (for Dolphin integration)
|
||||||
|
"terminal-here" = {
|
||||||
|
name = "Terminal Here";
|
||||||
|
comment = "Open terminal in current location";
|
||||||
|
exec = "kitty --workdir %u";
|
||||||
|
icon = "utilities-terminal";
|
||||||
|
mimeType = [ "inode/directory" ];
|
||||||
|
noDisplay = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -4,10 +4,11 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
# Bash configuration
|
programs.zsh = {
|
||||||
programs.bash = {
|
|
||||||
enable = true;
|
enable = true;
|
||||||
enableCompletion = true;
|
enableCompletion = true;
|
||||||
|
autosuggestion.enable = true;
|
||||||
|
syntaxHighlighting.enable = true;
|
||||||
|
|
||||||
# Shell aliases (equivalent to your script functions)
|
# Shell aliases (equivalent to your script functions)
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
@ -62,7 +63,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
# Additional bash configuration
|
# Additional bash configuration
|
||||||
bashrcExtra = ''
|
initContent = ''
|
||||||
function pape() {
|
function pape() {
|
||||||
hyprctl hyprpaper preload $1
|
hyprctl hyprpaper preload $1
|
||||||
hyprctl hyprpaper wallpaper ", $1"
|
hyprctl hyprpaper wallpaper ", $1"
|
||||||
|
@ -4,10 +4,15 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
starship
|
||||||
|
];
|
||||||
|
|
||||||
# Starship prompt configuration (equivalent to your starship-prompt.sh)
|
# Starship prompt configuration (equivalent to your starship-prompt.sh)
|
||||||
programs.starship = {
|
programs.starship = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableBashIntegration = true;
|
enableBashIntegration = true;
|
||||||
|
enableZshIntegration = true;
|
||||||
|
|
||||||
# settings = {
|
# settings = {
|
||||||
# # Main prompt format
|
# # Main prompt format
|
||||||
|
@ -5,9 +5,8 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
services.xserver = {
|
services.displayManager = {
|
||||||
enable = true;
|
gdm = {
|
||||||
displayManager.gdm = {
|
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -1,49 +1,39 @@
|
|||||||
{ lib, ... }:
|
{ lib, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
nasIp = "10.89.0.15";
|
||||||
|
baseMnt = "/mnt/main";
|
||||||
|
shares = [
|
||||||
|
"backups"
|
||||||
|
"container-data"
|
||||||
|
"javi"
|
||||||
|
];
|
||||||
|
|
||||||
|
configureShare = share: {
|
||||||
|
name = "/mnt/${share}";
|
||||||
|
value = {
|
||||||
|
device = "${nasIp}:${baseMnt}/${share}";
|
||||||
|
fsType = "nfs";
|
||||||
|
options = [
|
||||||
|
"x-systemd.automount"
|
||||||
|
"noauto"
|
||||||
|
"rw"
|
||||||
|
"vers=4"
|
||||||
|
|
||||||
|
# make Nautilus/Dolphin/Any File Manager show it with a friendly name/icon
|
||||||
|
"x-gvfs-show"
|
||||||
|
"x-gvfs-name=NAS — ${share}"
|
||||||
|
"x-gvfs-icon=network-server"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
shareConfig = map configureShare shares;
|
||||||
|
fsConfig = builtins.listToAttrs shareConfig;
|
||||||
|
|
||||||
|
in
|
||||||
{
|
{
|
||||||
services.gvfs.enable = true;
|
services.gvfs.enable = true;
|
||||||
services.udisks2.enable = true;
|
services.udisks2.enable = true;
|
||||||
fileSystems."/mnt/backups" = {
|
fileSystems = fsConfig;
|
||||||
device = "10.89.0.15:/mnt/main/backups";
|
|
||||||
fsType = "nfs";
|
|
||||||
options = [
|
|
||||||
"x-systemd.automount"
|
|
||||||
"noauto"
|
|
||||||
"rw"
|
|
||||||
"vers=4"
|
|
||||||
|
|
||||||
# make Nautilus show it with a friendly name/icon
|
|
||||||
"x-gvfs-show"
|
|
||||||
"x-gvfs-name=NAS — backups"
|
|
||||||
"x-gvfs-icon=network-server"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
# let
|
|
||||||
# nasIp = "10.89.0.15";
|
|
||||||
# baseMnt = "/mnt/main";
|
|
||||||
# shares = [
|
|
||||||
# "backups"
|
|
||||||
# "container-data"
|
|
||||||
# "javi"
|
|
||||||
# ];
|
|
||||||
# nfsOptions = [
|
|
||||||
# "x-systemd.automount"
|
|
||||||
# "noauto"
|
|
||||||
# "rw"
|
|
||||||
# "vers=4"
|
|
||||||
# ];
|
|
||||||
# in
|
|
||||||
# {
|
|
||||||
# fileSystems = lib.genAttrs (map (name: "${baseMnt}/${name}}") shares) (
|
|
||||||
# mountPoint:
|
|
||||||
# let
|
|
||||||
# name = builtins.baseNameOf mountPoint;
|
|
||||||
# in
|
|
||||||
# {
|
|
||||||
# device = "${nasIp}:${baseMnt}/${name}";
|
|
||||||
# fsType = "nfs";
|
|
||||||
# options = nfsOptions;
|
|
||||||
# }
|
|
||||||
# );
|
|
||||||
# }
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user