411 lines
11 KiB
Nix
411 lines
11 KiB
Nix
{ config, pkgs, lib, system, allowed, secrets, ... }:
|
|
|
|
{
|
|
imports = [
|
|
# Make vscode settings writable
|
|
(import (builtins.fetchurl {
|
|
url = "https://gist.githubusercontent.com/piousdeer/b29c272eaeba398b864da6abf6cb5daa/raw/41e569ba110eb6ebbb463a6b1f5d9fe4f9e82375/mutability.nix";
|
|
sha256 = "4b5ca670c1ac865927e98ac5bf5c131eca46cc20abf0bd0612db955bfc979de8";
|
|
}) { inherit config lib; })
|
|
|
|
(import (builtins.fetchurl {
|
|
url = "https://gist.githubusercontent.com/piousdeer/b29c272eaeba398b864da6abf6cb5daa/raw/41e569ba110eb6ebbb463a6b1f5d9fe4f9e82375/vscode.nix";
|
|
sha256 = "fed877fa1eefd94bc4806641cea87138df78a47af89c7818ac5e76ebacbd025f";
|
|
}) { inherit config lib pkgs; })
|
|
];
|
|
|
|
home.username = "nx2";
|
|
home.homeDirectory = "/home/nx2";
|
|
|
|
home.stateVersion = "23.11";
|
|
|
|
nixpkgs.config = {
|
|
allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) allowed.unfree-packages;
|
|
permittedInsecurePackages = allowed.inecure-packages;
|
|
};
|
|
|
|
|
|
|
|
home.packages = with pkgs; [
|
|
firefox chromium
|
|
vscodium gimp inkscape
|
|
kitty
|
|
zathura remmina
|
|
#vesktop
|
|
thunderbird element-desktop # zoom-us
|
|
obsidian
|
|
spotify spicetify-cli
|
|
obs-studio bitwarden
|
|
hyprland-protocols waybar swww hyprland-autoname-workspaces rofi wlogout imv mpv
|
|
pavucontrol fontpreview gtk2fontsel
|
|
lynx tldr fzf
|
|
libinput-gestures dotool wev gnome.nautilus gnome.gnome-themes-extra gnome.adwaita-icon-theme gnome.gnome-tweaks gtk3 gtk4 lxappearance
|
|
element sssnake pipes
|
|
|
|
|
|
# # You can also create simple shell scripts directly inside your
|
|
# # configuration. For example, this adds a command 'my-hello' to your
|
|
# # environment:
|
|
(writeShellScriptBin "connect_to_pnx" ''
|
|
pushd ~/.ssl/
|
|
sudo openvpn --config /home/nx2/.ssl/ljk-pnx.ovpn --auth-user-pass ~/.ssl/ljk-pnx-pass.txt #gets put there by home-manager
|
|
popd
|
|
'')
|
|
|
|
(writeShellScriptBin "nxrbs-nix" ''
|
|
set -e
|
|
pushd ~/.nix-dots/
|
|
git diff
|
|
|
|
'')
|
|
|
|
# only works on spec arch, chage url for others
|
|
(stdenv.mkDerivation {
|
|
name = "easycommit";
|
|
src = pkgs.fetchurl {
|
|
url = "https://github.com/blackironj/easycommit/releases/download/v0.0.1/easycommit-v0.0.1-linux-amd64.tar.gz";
|
|
sha256 = "sha256-Ip5wfVe/RzCxGGh1YFBllAn84nD7mUXbnMko+ue/C2E=";
|
|
};
|
|
phases = ["installPhase"];
|
|
installPhase = ''
|
|
mkdir -p $out/bin
|
|
tar xf $src -C $out/
|
|
ls -la $out
|
|
mv $out/easycommit $out/bin/
|
|
chmod +x $out/bin/easycommit
|
|
'';
|
|
})
|
|
|
|
|
|
|
|
];
|
|
|
|
|
|
xdg.mimeApps = {
|
|
enable = true;
|
|
defaultApplications = {
|
|
"default-web-browser" = [ "firefox.desktop" ];
|
|
"text/html" = [ "firefox.desktop" ];
|
|
"x-scheme-handler/http" = [ "firefox.desktop" ];
|
|
"x-scheme-handler/https" = [ "firefox.desktop" ];
|
|
"x-scheme-handler/about" = [ "firefox.desktop" ];
|
|
"x-scheme-handler/unknown" = [ "firefox.desktop" ];
|
|
"image/png" = "imv.desktop";
|
|
"image/gif" = "imv.desktop";
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
# systemd.user.services = {
|
|
# ydotoold = {
|
|
# Unit = {
|
|
# Description = "An auto-input utility for wayland";
|
|
# Documentation = [ "man:ydotool(1)" "man:ydotoold(8)" ];
|
|
# };
|
|
|
|
# Service = {
|
|
# ExecStart = "/run/current-system/sw/bin/ydotoold --socket-path /tmp/ydotool_socket ";
|
|
# };
|
|
|
|
# Install = {
|
|
# WantedBy = ["default.target"];
|
|
# };
|
|
# };
|
|
# };
|
|
|
|
|
|
home.file = {
|
|
|
|
".ssl/ljk-pnx-cert.pem".text = secrets.pnxVpn.cert;
|
|
".ssl/ljk-pnx-cert.key".text = secrets.pnxVpn.certKey;
|
|
".ssl/ljk-pnx-ca.pem".text = secrets.pnxVpn.ca;
|
|
".ssl/ljk-pnx.ovpn".text = secrets.pnxVpn.ovpn;
|
|
".ssl/ljk-pnx-pass.txt".text = secrets.pnxVpn.pass;
|
|
|
|
|
|
# ".config/libinput/gestures".text = ''
|
|
# # Swipe threshold (0-100)
|
|
# swipe_threshold 0
|
|
|
|
# # Gestures
|
|
# gesture swipe left 3 ydotool key 276:1 276:0
|
|
# gesture swipe right 3 ydotool key 275:1 275:0
|
|
# ''
|
|
".config/libinput/gestures".text = ''
|
|
# Swipe threshold (0-100)
|
|
swipe_threshold 0
|
|
|
|
# Gestures
|
|
gesture swipe left 3 echo key k:276 | dotool
|
|
gesture swipe right 3 echo key k:275 | dotool
|
|
'';
|
|
|
|
".config/hyprland-autoname-workspaces/config.toml".text = ''
|
|
version = "1.1.13"
|
|
|
|
[class]
|
|
Signal = ""
|
|
DEFAULT = "{class}"
|
|
libreoffice-writer = ""
|
|
pavucontrol = ""
|
|
"epicgameslauncher.exe" = ""
|
|
"riotclientux.exe" = ""
|
|
"[Cc]ode" = ""
|
|
VirtualBox = ""
|
|
KiCad = ""
|
|
Gimp = ""
|
|
code-oss = ""
|
|
VSCodium = ""
|
|
Alacritty = ""
|
|
kitty = ""
|
|
vesktop = ""
|
|
"cyberpunk2077.exe" = ""
|
|
"Tor Browser" = ""
|
|
"[Tt]hunderbird" = ""
|
|
Element = ""
|
|
blueman-manager = ""
|
|
obsidian = ""
|
|
libreoffice-calc = ""
|
|
zoom = ""
|
|
mpv = ""
|
|
chatterino = ""
|
|
"com.obsproject.Studio" = ""
|
|
"leagueclientux.exe" = ""
|
|
"[sS]potify" = ""
|
|
"org.remmina.Remmina" = ""
|
|
steam = ""
|
|
"galaxyclient.exe" = ""
|
|
"[Ff]irefox" = ""
|
|
pcbnew = ""
|
|
".*.exe" = ""
|
|
Chromium = ""
|
|
virt-manager = ""
|
|
Bitwarden = ""
|
|
"[tT]hunar" = ""
|
|
zathura = ""
|
|
discord = ""
|
|
"VirtualBox Manager" = ""
|
|
"org.inkscape.Inkscape" = ""
|
|
"VirtualBox Machine" = ""
|
|
lutris = ""
|
|
"[gG]imp-.*" = ""
|
|
|
|
[class_active]
|
|
"(?i)ExampleOneTerm" = "icon"
|
|
|
|
[initial_class]
|
|
|
|
[initial_class_active]
|
|
|
|
[workspaces_name]
|
|
10 = "ten"
|
|
4 = "four"
|
|
8 = "eight"
|
|
9 = "nine"
|
|
6 = "six"
|
|
1 = "one"
|
|
3 = "three"
|
|
2 = "two"
|
|
0 = "zero"
|
|
7 = "seven"
|
|
5 = "five"
|
|
|
|
[title_in_class]
|
|
[title_in_class_active]
|
|
[title_in_initial_class]
|
|
[title_in_initial_class_active]
|
|
[initial_title_in_class]
|
|
[initial_title_in_class_active]
|
|
[initial_title_in_initial_class]
|
|
[initial_title_in_initial_class_active]
|
|
|
|
[exclude]
|
|
"(?i)fcitx" = ".*"
|
|
aProgram = "^$"
|
|
"ueberzug.*" = ""
|
|
"" = "^$"
|
|
"[Ss]team" = "^(Friends List.*)?$"
|
|
"explorer.exe" = ".*"
|
|
"(?i)TestApp" = ""
|
|
|
|
[format]
|
|
dedup = false
|
|
dedup_inactive_fullscreen = false
|
|
delim = " "
|
|
workspace = "{id}: {clients}"
|
|
workspace_empty = "{id}"
|
|
client = "{icon}"
|
|
client_fullscreen = "{icon}"
|
|
client_active = "{icon}"
|
|
client_dup = "{icon}{counter_sup}"
|
|
client_dup_active = "*{icon}*{delim}{icon}{counter_unfocused_sup}"
|
|
client_dup_fullscreen = "[{icon}]{delim}{icon}{counter_unfocused_sup}"
|
|
'';
|
|
# Remmina
|
|
".local/share/remmina/pnx_rdp_srv-phoe3-vmdms_192-168-1-104.remmina".source = ./secrets/pnx-vpn/pnx_rdp_srv-phoe3-vmdms_192-168-1-104.remmina;
|
|
".local/share/remmina/pnx_rdp_srv-phoenix-3_192-168-1-108.remmina".source = ./secrets/pnx-vpn/pnx_rdp_srv-phoenix-3_192-168-1-108.remmina;
|
|
".local/share/remmina/pnx_rdp_srv-phoenix2_192_168-1-101.remmina".source = ./secrets/pnx-vpn/pnx_rdp_srv-phoenix2_1_92168-1-101.remmina;
|
|
".local/share/remmina/pnx_rdp_srv-remote_192-168.1.21.remmina".source = ./secrets/pnx-vpn/pnx_rdp_srv-remote_192-168.1.21.remmina;
|
|
|
|
};
|
|
|
|
# Home Manager can also manage your environment variables through
|
|
# 'home.sessionVariables'. If you don't want to manage your shell through Home
|
|
# Manager then you have to manually source 'hm-session-vars.sh' located at
|
|
# either
|
|
#
|
|
# ~/.nix-profile/etc/profile.d/hm-session-vars.sh
|
|
#
|
|
# or
|
|
#
|
|
# /etc/profiles/per-user/nx2/etc/profile.d/hm-session-vars.sh
|
|
#
|
|
# home.sessionVariables = {
|
|
systemd.user.sessionVariables = {
|
|
EDITOR = "micro";
|
|
BROWSER = "firefox";
|
|
# YDOTOOL_SOCKET = "/tmp/ydotool_socket";
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#https://github.com/NixOS/nixpkgs/blob/592047fc9e4f7b74a4dc85d1b9f5243dfe4899e3/pkgs/applications/editors/vscode/extensions/default.nix#L1539
|
|
programs.vscode = {
|
|
enable = true;
|
|
package = pkgs.vscodium;
|
|
extensions = with pkgs.vscode-extensions; [
|
|
jnoortheen.nix-ide
|
|
viktorqvarfordt.vscode-pitch-black-theme
|
|
ms-python.python
|
|
ms-python.black-formatter
|
|
redhat.vscode-yaml
|
|
redhat.vscode-xml
|
|
ms-python.python
|
|
mhutchie.git-graph
|
|
github.vscode-pull-request-github
|
|
esbenp.prettier-vscode
|
|
gencer.html-slim-scss-css-class-completion
|
|
donjayamanne.githistory
|
|
mads-hartmann.bash-ide-vscode
|
|
|
|
#jeanp413.open-remote-ssh
|
|
# ms-vscode-remote.remote-ssh
|
|
# ] ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
|
|
# {
|
|
# name = "remote-ssh-edit";
|
|
# publisher = "ms-vscode-remote";
|
|
# version = "0.47.2";
|
|
# sha256 = "1hp6gjh4xp2m1xlm1jsdzxw9d8frkiidhph6nvl24d0h8z34w49g";
|
|
# }
|
|
];
|
|
userSettings = {
|
|
workbench.colorTheme = "Just Black";
|
|
editor.fontFamily = "'CaskaydiaCove Nerd Font', 'monospace', monospace";
|
|
};
|
|
enableUpdateCheck = false;
|
|
enableExtensionUpdateCheck = false;
|
|
keybindings = [
|
|
{
|
|
key = "ctrl+d";
|
|
command = "editor.action.deleteLines";
|
|
when = "textInputFocus";
|
|
}
|
|
{
|
|
key = "ctrl+shift+d";
|
|
command = "editor.action.duplicateSelection";
|
|
when = "textInputFocus";
|
|
}
|
|
{ # unset so that ctrl d is not set twice
|
|
key = "";
|
|
command = "editor.action.addSelectionToNextFindMatch";
|
|
when = "editorFocus";
|
|
}
|
|
{ # unset so that ctrl shift d is not set twice
|
|
key = "";
|
|
command = "workbench.view.debug";
|
|
}
|
|
];
|
|
};
|
|
|
|
|
|
gtk = {
|
|
enable = true;
|
|
theme = {
|
|
name = "Adwaita-Dark";
|
|
package = pkgs.gnome.gnome-themes-extra;
|
|
};
|
|
gtk3.extraConfig = {
|
|
Settings = ''
|
|
gtk-application-prefer-dark-theme=1
|
|
'';
|
|
};
|
|
|
|
gtk4.extraConfig = {
|
|
Settings = ''
|
|
gtk-application-prefer-dark-theme=1
|
|
'';
|
|
};
|
|
};
|
|
|
|
home.sessionVariables.GTK_THEME = "Adwaita-Dark";
|
|
|
|
xdg.configFile = {
|
|
"gtk-4.0/assets".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0/assets";
|
|
"gtk-4.0/gtk.css".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0/gtk.css";
|
|
"gtk-4.0/gtk-dark.css".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0/gtk-dark.css";
|
|
};
|
|
|
|
dconf = {
|
|
enable = true;
|
|
settings = {
|
|
"org/gnome/desktop/interface" = {
|
|
color-scheme = "prefer-dark";
|
|
gtk-theme = "Adwaita-Dark";
|
|
};
|
|
};
|
|
};
|
|
|
|
# Wayland, X, etc. support for session vars
|
|
# systemd.user.sessionVariables = home.sessionVariables;
|
|
|
|
qt = {
|
|
platformTheme = "gtk";
|
|
};
|
|
|
|
|
|
|
|
home.file.".ssh/config".text = ''
|
|
HOST nxace
|
|
HostName nx2.site
|
|
User nx2
|
|
Port 50022
|
|
|
|
HOST nxacel
|
|
HostName 192.168.178.32
|
|
User nx2
|
|
Port 50022
|
|
|
|
HOST nxrpi
|
|
HostName nx2.site
|
|
User pi
|
|
Port 50023
|
|
|
|
HOST nxrpil
|
|
HostName 192.168.178.31
|
|
User pi
|
|
Port 50023
|
|
'';
|
|
|
|
|
|
|
|
|
|
|
|
# Let Home Manager install and manage itself.
|
|
programs.home-manager.enable = true;
|
|
}
|