Update flake
This commit is contained in:
181
flake.nix
181
flake.nix
@@ -14,6 +14,8 @@
|
||||
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
try-cli.url = "github:tobi/try-cli";
|
||||
elephant.url = "github:abenz1267/elephant";
|
||||
};
|
||||
|
||||
outputs = {
|
||||
@@ -23,6 +25,8 @@
|
||||
impermanence,
|
||||
disko,
|
||||
home-manager,
|
||||
try-cli,
|
||||
elephant,
|
||||
...
|
||||
} @ inputs: let
|
||||
lib = nixpkgs.lib;
|
||||
@@ -123,8 +127,6 @@
|
||||
btop
|
||||
eza
|
||||
fzf
|
||||
iwd
|
||||
git
|
||||
neovim
|
||||
ripgrep
|
||||
tldr
|
||||
@@ -134,16 +136,16 @@
|
||||
zip
|
||||
zoxide
|
||||
jq
|
||||
git
|
||||
lazygit
|
||||
less
|
||||
mlocate
|
||||
tree
|
||||
tmux
|
||||
tmuxinator
|
||||
wget
|
||||
zenity
|
||||
gum
|
||||
yazi
|
||||
pkgs-unstable.yazi
|
||||
rsync
|
||||
p7zip
|
||||
impala
|
||||
@@ -153,6 +155,23 @@
|
||||
networking = {
|
||||
hostName = "stationette";
|
||||
networkmanager.enable = true;
|
||||
wireless = {
|
||||
iwd.enable = true;
|
||||
networks = {
|
||||
ssid = "Outskirt Stable";
|
||||
psk = "SidonPhlegm";
|
||||
};
|
||||
};
|
||||
firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [ 53317 ];
|
||||
allowedUDPPorts = [ 53317 ];
|
||||
|
||||
# Optional: Extra commands for specific DNS rules
|
||||
extraCommands = ''
|
||||
ip46tables -A INPUT -p udp -s 172.16.0.0/12 -d 172.17.0.1 --dport 53 -m comment --comment "allow-docker-dns" -j ACCEPT
|
||||
'';
|
||||
};
|
||||
};
|
||||
users.users.chris = {
|
||||
uid = 1000;
|
||||
@@ -172,6 +191,8 @@
|
||||
};
|
||||
hyprland = {
|
||||
enable = true;
|
||||
package = pkgs-unstable.hyprland;
|
||||
xwayland.enable = true;
|
||||
};
|
||||
steam = {
|
||||
enable = true;
|
||||
@@ -184,6 +205,9 @@
|
||||
openssh.enable = true;
|
||||
dbus.enable = true;
|
||||
envfs.enable = true; # This ensures normal shebangs work (#!/bin/bash)
|
||||
expressvpn.enable = true;
|
||||
locate.enable = true;
|
||||
|
||||
displayManager = {
|
||||
sddm = {
|
||||
enable = true;
|
||||
@@ -209,6 +233,7 @@
|
||||
directories = [
|
||||
"Downloads"
|
||||
"Tower"
|
||||
"Code"
|
||||
".steam"
|
||||
".config/dotfiles"
|
||||
".mozilla/firefox"
|
||||
@@ -227,45 +252,61 @@
|
||||
".config/shell/.env"
|
||||
];
|
||||
};
|
||||
activation.setupDotfiles = lib.hm.dag.entryAfter ["writeBoundary"] ''
|
||||
if [[ -v DRY_RUN ]]; then
|
||||
echo "Dry run: Would bootstrap dotfiles from labs.scarif.space"
|
||||
exit
|
||||
fi
|
||||
activation = {
|
||||
setupDotfiles = lib.hm.dag.entryAfter ["writeBoundary"] ''
|
||||
if [[ -v DRY_RUN ]]; then
|
||||
echo "Dry run: Would bootstrap dotfiles from labs.scarif.space"
|
||||
exit
|
||||
fi
|
||||
|
||||
TEMP_DIR=$(mktemp -d)
|
||||
TEMP_DIR=$(mktemp -d)
|
||||
|
||||
DOTFILES_DIR="$HOME/.config/dotfiles"
|
||||
DOTFILES_GIT_DIR="$DOTFILES_DIR/.git"
|
||||
DOTFILES_DIR="$HOME/.config/dotfiles"
|
||||
DOTFILES_GIT_DIR="$DOTFILES_DIR/.git"
|
||||
|
||||
if [ ! -d "$DOTFILES_GIT_DIR" ]; then
|
||||
echo "No local repository so cloning from remote"
|
||||
SOURCE="https://labs.scarif.space/chris/dotfiles.git"
|
||||
${pkgs.git}/bin/git clone -b main "$SOURCE" "$TEMP_DIR"
|
||||
mv "$TEMP_DIR/.git" "$DOTFILES_GIT_DIR"
|
||||
else
|
||||
echo "Local repository found so cloning from there"
|
||||
${pkgs.git}/bin/git clone -b main "$DOTFILES_GIT_DIR" "$TEMP_DIR"
|
||||
${pkgs.git}/bin/git --git-dir="$DOTFILES_GIT_DIR" --work-tree="$TEMP_DIR" pull --rebase || true
|
||||
fi
|
||||
if [ ! -d "$DOTFILES_GIT_DIR" ]; then
|
||||
echo "No local repository so cloning from remote"
|
||||
SOURCE="https://labs.scarif.space/chris/dotfiles.git"
|
||||
${pkgs.git}/bin/git clone -b main "$SOURCE" "$TEMP_DIR"
|
||||
mv "$TEMP_DIR/.git" "$DOTFILES_GIT_DIR"
|
||||
else
|
||||
echo "Local repository found so cloning from there"
|
||||
${pkgs.git}/bin/git clone -b main "$DOTFILES_GIT_DIR" "$TEMP_DIR"
|
||||
${pkgs.git}/bin/git --git-dir="$DOTFILES_GIT_DIR" --work-tree="$TEMP_DIR" pull --rebase || true
|
||||
fi
|
||||
|
||||
echo "Copying dot files to home"
|
||||
${pkgs.coreutils}/bin/cp -rfT "$TEMP_DIR" "$HOME"
|
||||
echo "Copying dot files to home"
|
||||
${pkgs.coreutils}/bin/cp -rfT "$TEMP_DIR" "$HOME"
|
||||
|
||||
NVIM_DIR="$HOME/.config/nvim"
|
||||
echo "Neovim config not initialised so initialising from remote"
|
||||
${pkgs.git}/bin/git --git-dir="$DOTFILES_GIT_DIR" --work-tree="$HOME" submodule set-url ".config/nvim" https://labs.scarif.space/chris/nvim.git
|
||||
${pkgs.git}/bin/git --git-dir="$DOTFILES_GIT_DIR" --work-tree="$HOME" submodule update --init || true
|
||||
${pkgs.git}/bin/git --git-dir="$DOTFILES_GIT_DIR" --work-tree="$HOME" submodule set-url ".config/nvim" git@labs.scarif.space:chris/nvim.git
|
||||
NVIM_DIR="$HOME/.config/nvim"
|
||||
echo "Neovim config not initialised so initialising from remote"
|
||||
${pkgs.git}/bin/git --git-dir="$DOTFILES_GIT_DIR" --work-tree="$HOME" submodule set-url ".config/nvim" https://labs.scarif.space/chris/nvim.git
|
||||
${pkgs.git}/bin/git --git-dir="$DOTFILES_GIT_DIR" --work-tree="$HOME" submodule update --init || true
|
||||
${pkgs.git}/bin/git --git-dir="$DOTFILES_GIT_DIR" --work-tree="$HOME" submodule set-url ".config/nvim" git@labs.scarif.space:chris/nvim.git
|
||||
|
||||
cd "$HOME"
|
||||
cd "$HOME"
|
||||
|
||||
echo "Cleanup"
|
||||
${pkgs.coreutils}/bin/rm -rf "$TEMP_DIR"
|
||||
${pkgs.coreutils}/bin/rm -rf "$HOME/.git" || true
|
||||
echo "Cleanup"
|
||||
${pkgs.coreutils}/bin/rm -rf "$TEMP_DIR"
|
||||
${pkgs.coreutils}/bin/rm -rf "$HOME/.git" || true
|
||||
|
||||
echo "Dotfiles bootstrapped successfully."
|
||||
'';
|
||||
echo "Dotfiles bootstrapped successfully."
|
||||
'';
|
||||
setupDevDirectories = lib.hm.dag.entryAfter ["writeBoundary"] ''
|
||||
if [[ -v DRY_RUN ]]; then
|
||||
echo "Dry run: Would create dev directories"
|
||||
exit
|
||||
fi
|
||||
|
||||
echo "Creating development directories"
|
||||
|
||||
for dir in "DevOps" "FSharp" "JavaScript" "Scala" "Rust" "PHP" "Tutorials" "Sites" "MobileApps" "Tries"; do
|
||||
if [ ! -d "$HOME/Code/$dir" ]; then
|
||||
mkdir -p "$HOME/Code/$dir"
|
||||
fi
|
||||
done
|
||||
'';
|
||||
};
|
||||
packages = with pkgs; [
|
||||
# jetbrains.rider
|
||||
# android-studio
|
||||
@@ -273,8 +314,14 @@
|
||||
# brave
|
||||
# go
|
||||
# lua
|
||||
direnv
|
||||
wiremix
|
||||
bluetui
|
||||
spotify
|
||||
nodePackages.pnpm
|
||||
try-cli.packages.${system}.default
|
||||
elephant.packages.${system}.default
|
||||
walker
|
||||
# (python3.withPackages (python-pkgs: [ python-pkgs.pip python-pkgs.requests ]))
|
||||
# rustup
|
||||
# zig
|
||||
@@ -302,6 +349,7 @@
|
||||
antigravity
|
||||
gimp
|
||||
# kdePackages.dolphin
|
||||
nautilus
|
||||
enpass
|
||||
enpass-cli
|
||||
expressvpn
|
||||
@@ -323,9 +371,72 @@
|
||||
# kdePackages.print-manager
|
||||
mpv
|
||||
vlc
|
||||
imv
|
||||
# telegram-desktop
|
||||
];
|
||||
};
|
||||
xdg.mimeApps = {
|
||||
enable = true;
|
||||
defaultApplications = {
|
||||
# Directories
|
||||
"inode/directory" = [ "org.gnome.Nautilus.desktop" ];
|
||||
|
||||
# Images
|
||||
"image/png" = [ "imv.desktop" ];
|
||||
"image/jpeg" = [ "imv.desktop" ];
|
||||
"image/gif" = [ "imv.desktop" ];
|
||||
"image/webp" = [ "imv.desktop" ];
|
||||
"image/bmp" = [ "imv.desktop" ];
|
||||
"image/tiff" = [ "imv.desktop" ];
|
||||
|
||||
# Documents
|
||||
"application/pdf" = [ "zathura.desktop" ];
|
||||
|
||||
# Web and Browser
|
||||
"x-scheme-handler/http" = [ "firefox.desktop" ];
|
||||
"x-scheme-handler/https" = [ "firefox.desktop" ];
|
||||
"text/html" = [ "firefox.desktop" ];
|
||||
|
||||
# Video
|
||||
"video/mp4" = [ "mpv.desktop" ];
|
||||
"video/x-msvideo" = [ "mpv.desktop" ];
|
||||
"video/x-matroska" = [ "mpv.desktop" ];
|
||||
"video/x-flv" = [ "mpv.desktop" ];
|
||||
"video/x-ms-wmv" = [ "mpv.desktop" ];
|
||||
"video/mpeg" = [ "mpv.desktop" ];
|
||||
"video/ogg" = [ "mpv.desktop" ];
|
||||
"video/webm" = [ "mpv.desktop" ];
|
||||
"video/quicktime" = [ "mpv.desktop" ];
|
||||
"video/3gpp" = [ "mpv.desktop" ];
|
||||
"video/3gpp2" = [ "mpv.desktop" ];
|
||||
"video/x-ms-asf" = [ "mpv.desktop" ];
|
||||
"video/x-ogm+ogg" = [ "mpv.desktop" ];
|
||||
"video/x-theora+ogg" = [ "mpv.desktop" ];
|
||||
"application/ogg" = [ "mpv.desktop" ];
|
||||
|
||||
# Mail
|
||||
"x-scheme-handler/mailto" = [ "mailspring.desktop" ];
|
||||
|
||||
# Text and Code
|
||||
"text/plain" = [ "nvim.desktop" ];
|
||||
"text/english" = [ "nvim.desktop" ];
|
||||
"text/x-makefile" = [ "nvim.desktop" ];
|
||||
"text/x-c++hdr" = [ "nvim.desktop" ];
|
||||
"text/x-c++src" = [ "nvim.desktop" ];
|
||||
"text/x-chdr" = [ "nvim.desktop" ];
|
||||
"text/x-csrc" = [ "nvim.desktop" ];
|
||||
"text/x-java" = [ "nvim.desktop" ];
|
||||
"text/x-moc" = [ "nvim.desktop" ];
|
||||
"text/x-pascal" = [ "nvim.desktop" ];
|
||||
"text/x-tcl" = [ "nvim.desktop" ];
|
||||
"text/x-tex" = [ "nvim.desktop" ];
|
||||
"application/x-shellscript" = [ "nvim.desktop" ];
|
||||
"text/x-c" = [ "nvim.desktop" ];
|
||||
"text/x-c++" = [ "nvim.desktop" ];
|
||||
"application/xml" = [ "nvim.desktop" ];
|
||||
"text/xml" = [ "nvim.desktop" ];
|
||||
};
|
||||
};
|
||||
programs = let
|
||||
lock-false = {
|
||||
Value = false;
|
||||
|
||||
Reference in New Issue
Block a user