wip: dnsc-machine setup
This commit is contained in:
parent
ffead91f28
commit
dfc586c85e
8 changed files with 158 additions and 57 deletions
|
|
@ -28,6 +28,7 @@
|
||||||
libnotify
|
libnotify
|
||||||
bluez
|
bluez
|
||||||
bluetui
|
bluetui
|
||||||
|
swww
|
||||||
];
|
];
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
|
|
@ -38,7 +39,9 @@
|
||||||
../modules/nvim
|
../modules/nvim
|
||||||
../modules/wezterm
|
../modules/wezterm
|
||||||
../modules/fish
|
../modules/fish
|
||||||
|
../modules/firefox
|
||||||
../modules/wm/swaync
|
../modules/wm/swaync
|
||||||
|
../modules/wm/awww
|
||||||
../modules/wm/niri
|
../modules/wm/niri
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,7 @@
|
||||||
programs.niri.enable = true;
|
programs.niri.enable = true;
|
||||||
security.polkit.enable = true;
|
security.polkit.enable = true;
|
||||||
services.gnome.gnome-keyring.enable = true;
|
services.gnome.gnome-keyring.enable = true;
|
||||||
security.pam.services.swaylock = {};
|
security.pam.services.hyprlock = {};
|
||||||
|
|
||||||
# Nix settings
|
# Nix settings
|
||||||
nix.gc = {
|
nix.gc = {
|
||||||
|
|
@ -126,10 +126,10 @@
|
||||||
neovim
|
neovim
|
||||||
btop
|
btop
|
||||||
wezterm
|
wezterm
|
||||||
|
ghostty
|
||||||
fish
|
fish
|
||||||
firefox # TODO use zen browser instead
|
pcmanfm
|
||||||
pavucontrol
|
pwvucontrol
|
||||||
swaybg
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# Some programs need SUID wrappers, can be configured further or are
|
# Some programs need SUID wrappers, can be configured further or are
|
||||||
|
|
@ -184,22 +184,6 @@
|
||||||
# Tailscale
|
# Tailscale
|
||||||
services.tailscale.enable = true;
|
services.tailscale.enable = true;
|
||||||
|
|
||||||
# Custom systemd services
|
|
||||||
systemd.user.services.wallpaper = {
|
|
||||||
enable = true;
|
|
||||||
description = "Sets the wallpaper with swaybg";
|
|
||||||
wantedBy = [ "niri.service" ];
|
|
||||||
unitConfig = {
|
|
||||||
PartOf = "graphical-session.target";
|
|
||||||
After = "graphical-session.target";
|
|
||||||
Requisite = "graphical-session.target";
|
|
||||||
};
|
|
||||||
serviceConfig = {
|
|
||||||
ExecStart = "${pkgs.swaybg}/bin/swaybg -o * -i %h/Pictures/Wallpapers/coom.jpg -m fill";
|
|
||||||
Restart = "on-failure";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Environment & session variables
|
# Environment & session variables
|
||||||
environment.variables.EDITOR = "nvim";
|
environment.variables.EDITOR = "nvim";
|
||||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||||
|
|
@ -211,5 +195,4 @@
|
||||||
# Before changing this value read the documentation for this option
|
# Before changing this value read the documentation for this option
|
||||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||||
system.stateVersion = "25.05"; # Did you read the comment?
|
system.stateVersion = "25.05"; # Did you read the comment?
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
86
modules/firefox/default.nix
Normal file
86
modules/firefox/default.nix
Normal file
|
|
@ -0,0 +1,86 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.firefox = {
|
||||||
|
enable = true;
|
||||||
|
languagePacks = [ "en-US" "de" ];
|
||||||
|
policies = {
|
||||||
|
DisableTelemetry = true;
|
||||||
|
DisableFirefoxStudies = true;
|
||||||
|
DisablePocket = true;
|
||||||
|
DisableFirefoxScreenshots = true;
|
||||||
|
DisplayBookmarksToolbar = "never";
|
||||||
|
DisplayMenuBar = "default-off";
|
||||||
|
SearchBar = "unified";
|
||||||
|
OverrideFirstRunPage = "";
|
||||||
|
OverridePostUpdatePage = "";
|
||||||
|
EnableTrackingProtection = {
|
||||||
|
Value= true;
|
||||||
|
Locked = true;
|
||||||
|
Cryptomining = true;
|
||||||
|
Fingerprinting = true;
|
||||||
|
};
|
||||||
|
DefaultDownloadDirectory = "\${home}/Downloads";
|
||||||
|
ExtensionSettings = {
|
||||||
|
"{446900e4-71c2-419f-a6a7-df9c091e268b}" = {
|
||||||
|
default_area = "menupanel";
|
||||||
|
install_url = "https://addons.mozilla.org/firefox/downloads/latest/%7B446900e4-71c2-419f-a6a7-df9c091e268b%7D/latest.xpi";
|
||||||
|
installation_mode = "force_installed";
|
||||||
|
private_browsing = true;
|
||||||
|
};
|
||||||
|
"uBlock0@raymondhill.net" = {
|
||||||
|
default_area = "menupanel";
|
||||||
|
install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi";
|
||||||
|
installation_mode = "force_installed";
|
||||||
|
private_browsing = true;
|
||||||
|
};
|
||||||
|
"sponsorBlocker@ajay.app" = {
|
||||||
|
install_url = "https://addons.mozilla.org/firefox/downloads/latest/sponsorBlocker@ajay.app/latest.xpi";
|
||||||
|
installation_mode = "force_installed";
|
||||||
|
private_browsing = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
profiles = {
|
||||||
|
"dennis" = {
|
||||||
|
id = 0;
|
||||||
|
isDefault = true;
|
||||||
|
search.force = true;
|
||||||
|
search.engines = {
|
||||||
|
"Nix Packages" = {
|
||||||
|
urls = [{
|
||||||
|
template = "https://search.nixos.org/packages";
|
||||||
|
params = [
|
||||||
|
{ name = "query"; value = "{searchTerms}"; }
|
||||||
|
];
|
||||||
|
}];
|
||||||
|
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||||
|
definedAliases = [ "@np" ];
|
||||||
|
};
|
||||||
|
"Nix Options" = {
|
||||||
|
definedAliases = [ "@no" ];
|
||||||
|
urls = [{
|
||||||
|
template = "https://search.nixos.org/options";
|
||||||
|
params = [
|
||||||
|
{ name = "query"; value = "{searchTerms}"; }
|
||||||
|
];
|
||||||
|
}];
|
||||||
|
};
|
||||||
|
bing.metaData.hidden = true;
|
||||||
|
perplexity.metaData.hidden = true;
|
||||||
|
wikipedia.metaData.hidden = true;
|
||||||
|
ddg.metaData.hidden = true;
|
||||||
|
};
|
||||||
|
settings = {
|
||||||
|
"browser.startup.homepage" = "https://home.dnsc.io";
|
||||||
|
"browser.newtabpage.pinned" = [{
|
||||||
|
title = "[dnsc] Home";
|
||||||
|
url = "https://home.dnsc.io";
|
||||||
|
}];
|
||||||
|
"browser.search.region" = "DE";
|
||||||
|
"general.useragent.locale" = "en-US";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -16,6 +16,7 @@ function M.apply_to_config(config)
|
||||||
config.window_decorations = "NONE"
|
config.window_decorations = "NONE"
|
||||||
config.window_padding = helpers.get_padding(18, 6)
|
config.window_padding = helpers.get_padding(18, 6)
|
||||||
config.window_background_opacity = 0.95
|
config.window_background_opacity = 0.95
|
||||||
|
-- config.enable_wayland = false;
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
7
modules/wm/awww/default.nix
Normal file
7
modules/wm/awww/default.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
{ config, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
xdg.configFile."awww/bin" = {
|
||||||
|
source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/dev/nix-config/modules/wm/awww/scripts";
|
||||||
|
};
|
||||||
|
}
|
||||||
28
modules/wm/awww/scripts/random-bg.sh
Executable file
28
modules/wm/awww/scripts/random-bg.sh
Executable file
|
|
@ -0,0 +1,28 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# Changes the wallpaper to a randomly chosen image in a given directory
|
||||||
|
# at a set interval.
|
||||||
|
|
||||||
|
DEFAULT_INTERVAL=300 # In seconds
|
||||||
|
|
||||||
|
if [ $# -lt 1 ] || [ ! -d "$1" ]; then
|
||||||
|
printf "Usage:\n\t\e[1m%s\e[0m \e[4mDIRECTORY\e[0m [\e[4mINTERVAL\e[0m]\n" "$0"
|
||||||
|
printf "\tChanges the wallpaper to a randomly chosen image in DIRECTORY every\n\tINTERVAL seconds (or every %d seconds if unspecified)." "$DEFAULT_INTERVAL"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# See awww-img(1)
|
||||||
|
RESIZE_TYPE="fit"
|
||||||
|
export AWWW_TRANSITION_FPS="${AWWW_TRANSITION_FPS:-60}"
|
||||||
|
export AWWW_TRANSITION_STEP="${AWWW_TRANSITION_STEP:-2}"
|
||||||
|
|
||||||
|
while true; do
|
||||||
|
find "$1" -type f \
|
||||||
|
| while read -r img; do
|
||||||
|
echo "$(</dev/urandom tr -dc a-zA-Z0-9 | head -c 8):$img"
|
||||||
|
done \
|
||||||
|
| sort -n | cut -d':' -f2- \
|
||||||
|
| while read -r img; do
|
||||||
|
awww img --resize="$RESIZE_TYPE" "$img"
|
||||||
|
sleep "${2:-$DEFAULT_INTERVAL}"
|
||||||
|
done
|
||||||
|
done
|
||||||
|
|
@ -69,7 +69,7 @@ cursor {
|
||||||
xcursor-theme "Bibata-Modern-Ice"
|
xcursor-theme "Bibata-Modern-Ice"
|
||||||
xcursor-size 24
|
xcursor-size 24
|
||||||
hide-when-typing
|
hide-when-typing
|
||||||
hide-after-inactive-ms 1000
|
hide-after-inactive-ms 5000
|
||||||
}
|
}
|
||||||
|
|
||||||
layout {
|
layout {
|
||||||
|
|
@ -183,7 +183,7 @@ layout {
|
||||||
}
|
}
|
||||||
|
|
||||||
// STARTUP
|
// STARTUP
|
||||||
// spawn-at-startup ""
|
spawn-at-startup "swww-daemon" // Wallpaper
|
||||||
// spawn-sh-at-startup ""
|
// spawn-sh-at-startup ""
|
||||||
|
|
||||||
hotkey-overlay {
|
hotkey-overlay {
|
||||||
|
|
@ -275,8 +275,9 @@ binds {
|
||||||
Mod+Return hotkey-overlay-title="Open a terminal" { spawn "wezterm"; }
|
Mod+Return hotkey-overlay-title="Open a terminal" { spawn "wezterm"; }
|
||||||
Mod+Space hotkey-overlay-title="Launcher" { spawn "fuzzel"; }
|
Mod+Space hotkey-overlay-title="Launcher" { spawn "fuzzel"; }
|
||||||
Mod+B hotkey-overlay-title="Browser" { spawn "firefox"; }
|
Mod+B hotkey-overlay-title="Browser" { spawn "firefox"; }
|
||||||
Mod+M hotkey-overlay-title="System Monitor" { spawn "wezterm start -- btop"; }
|
Mod+M hotkey-overlay-title="System Monitor" { spawn-sh "wezterm start -- btop"; }
|
||||||
Mod+Alt+L hotkey-overlay-title="Lock the Screen: swaylock" { spawn "swaylock"; }
|
Mod+N hotkey-overlay-title="File Manager" { spawn "pcmanfm"; }
|
||||||
|
Mod+Alt+L hotkey-overlay-title="Lock the Screen: hyprlock" { spawn "hyprlock"; }
|
||||||
|
|
||||||
// Use spawn-sh to run a shell command. Do this if you need pipes, multiple commands, etc.
|
// Use spawn-sh to run a shell command. Do this if you need pipes, multiple commands, etc.
|
||||||
// Note: the entire command goes as a single argument. It's passed verbatim to `sh -c`.
|
// Note: the entire command goes as a single argument. It's passed verbatim to `sh -c`.
|
||||||
|
|
@ -321,10 +322,10 @@ binds {
|
||||||
Mod+Ctrl+J { move-window-down-or-to-workspace-down; }
|
Mod+Ctrl+J { move-window-down-or-to-workspace-down; }
|
||||||
Mod+Ctrl+K { move-window-up-or-to-workspace-up; }
|
Mod+Ctrl+K { move-window-up-or-to-workspace-up; }
|
||||||
|
|
||||||
Mod+Home { focus-column-first; }
|
Mod+A { focus-column-first; }
|
||||||
Mod+End { focus-column-last; }
|
Mod+E { focus-column-last; }
|
||||||
Mod+Ctrl+Home { move-column-to-first; }
|
Mod+Ctrl+A { move-column-to-first; }
|
||||||
Mod+Ctrl+End { move-column-to-last; }
|
Mod+Ctrl+E { move-column-to-last; }
|
||||||
|
|
||||||
Mod+Shift+Left { focus-monitor-left; }
|
Mod+Shift+Left { focus-monitor-left; }
|
||||||
Mod+Shift+Down { focus-monitor-down; }
|
Mod+Shift+Down { focus-monitor-down; }
|
||||||
|
|
@ -335,31 +336,25 @@ binds {
|
||||||
Mod+Shift+K { focus-monitor-up; }
|
Mod+Shift+K { focus-monitor-up; }
|
||||||
Mod+Shift+L { focus-monitor-right; }
|
Mod+Shift+L { focus-monitor-right; }
|
||||||
|
|
||||||
Mod+Shift+Ctrl+Left { move-column-to-monitor-left; }
|
// Mod+Shift+Ctrl+Left { move-column-to-monitor-left; }
|
||||||
Mod+Shift+Ctrl+Down { move-column-to-monitor-down; }
|
// Mod+Shift+Ctrl+Down { move-column-to-monitor-down; }
|
||||||
Mod+Shift+Ctrl+Up { move-column-to-monitor-up; }
|
// Mod+Shift+Ctrl+Up { move-column-to-monitor-up; }
|
||||||
Mod+Shift+Ctrl+Right { move-column-to-monitor-right; }
|
// Mod+Shift+Ctrl+Right { move-column-to-monitor-right; }
|
||||||
Mod+Shift+Ctrl+H { move-column-to-monitor-left; }
|
// Mod+Shift+Ctrl+H { move-column-to-monitor-left; }
|
||||||
Mod+Shift+Ctrl+J { move-column-to-monitor-down; }
|
// Mod+Shift+Ctrl+J { move-column-to-monitor-down; }
|
||||||
Mod+Shift+Ctrl+K { move-column-to-monitor-up; }
|
// Mod+Shift+Ctrl+K { move-column-to-monitor-up; }
|
||||||
Mod+Shift+Ctrl+L { move-column-to-monitor-right; }
|
// Mod+Shift+Ctrl+L { move-column-to-monitor-right; }
|
||||||
|
|
||||||
// Alternatively, there are commands to move just a single window:
|
// Alternatively, there are commands to move just a single window:
|
||||||
// Mod+Shift+Ctrl+Left { move-window-to-monitor-left; }
|
// Mod+Shift+Ctrl+Left { move-window-to-monitor-left; }
|
||||||
// ...
|
// ...
|
||||||
|
|
||||||
// And you can also move a whole workspace to another monitor:
|
// And you can also move a whole workspace to another monitor:
|
||||||
// Mod+Shift+Ctrl+Left { move-workspace-to-monitor-left; }
|
// Mod+Shift+Ctrl+Left { move-workspace-to-monitor-left; }
|
||||||
// ...
|
// ...
|
||||||
|
|
||||||
Mod+Page_Down { focus-workspace-down; }
|
Mod+D { focus-workspace-down; }
|
||||||
Mod+Page_Up { focus-workspace-up; }
|
Mod+U { focus-workspace-up; }
|
||||||
Mod+U { focus-workspace-down; }
|
Mod+Ctrl+D { move-column-to-workspace-down; }
|
||||||
Mod+I { focus-workspace-up; }
|
Mod+Ctrl+U { move-column-to-workspace-up; }
|
||||||
Mod+Ctrl+Page_Down { move-column-to-workspace-down; }
|
|
||||||
Mod+Ctrl+Page_Up { move-column-to-workspace-up; }
|
|
||||||
Mod+Ctrl+U { move-column-to-workspace-down; }
|
|
||||||
Mod+Ctrl+I { move-column-to-workspace-up; }
|
|
||||||
|
|
||||||
// Alternatively, there are commands to move just a single window:
|
// Alternatively, there are commands to move just a single window:
|
||||||
// Mod+Ctrl+Page_Down { move-window-to-workspace-down; }
|
// Mod+Ctrl+Page_Down { move-window-to-workspace-down; }
|
||||||
|
|
@ -485,7 +480,7 @@ binds {
|
||||||
// Toggle tabbed column display mode.
|
// Toggle tabbed column display mode.
|
||||||
// Windows in this column will appear as vertical tabs,
|
// Windows in this column will appear as vertical tabs,
|
||||||
// rather than stacked on top of each other.
|
// rather than stacked on top of each other.
|
||||||
Mod+W { toggle-column-tabbed-display; }
|
// Mod+W { toggle-column-tabbed-display; }
|
||||||
|
|
||||||
// Actions to switch layouts.
|
// Actions to switch layouts.
|
||||||
// Note: if you uncomment these, make sure you do NOT have
|
// Note: if you uncomment these, make sure you do NOT have
|
||||||
|
|
@ -495,9 +490,9 @@ binds {
|
||||||
// Mod+Space { switch-layout "next"; }
|
// Mod+Space { switch-layout "next"; }
|
||||||
// Mod+Shift+Space { switch-layout "prev"; }
|
// Mod+Shift+Space { switch-layout "prev"; }
|
||||||
|
|
||||||
Print { screenshot; }
|
Mod+P { screenshot; }
|
||||||
Ctrl+Print { screenshot-screen; }
|
Mod+Ctrl+P { screenshot-screen; }
|
||||||
Alt+Print { screenshot-window; }
|
Mod+Alt+P { screenshot-window; }
|
||||||
|
|
||||||
// Applications such as remote-desktop clients and software KVM switches may
|
// Applications such as remote-desktop clients and software KVM switches may
|
||||||
// request that niri stops processing the keyboard shortcuts defined here
|
// request that niri stops processing the keyboard shortcuts defined here
|
||||||
|
|
@ -506,11 +501,8 @@ binds {
|
||||||
// so a buggy application can't hold your session hostage.
|
// so a buggy application can't hold your session hostage.
|
||||||
//
|
//
|
||||||
// The allow-inhibiting=false property can be applied to other binds as well,
|
// The allow-inhibiting=false property can be applied to other binds as well,
|
||||||
// which ensures niri always processes them, even when an inhibitor is active.
|
|
||||||
Mod+Escape allow-inhibiting=false { toggle-keyboard-shortcuts-inhibit; }
|
|
||||||
|
|
||||||
// The quit action will show a confirmation dialog to avoid accidental exits.
|
// The quit action will show a confirmation dialog to avoid accidental exits.
|
||||||
Mod+Shift+E { quit; }
|
|
||||||
Ctrl+Alt+Delete { quit; }
|
Ctrl+Alt+Delete { quit; }
|
||||||
|
|
||||||
// Powers off the monitors. To turn them back on, do any input like
|
// Powers off the monitors. To turn them back on, do any input like
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,9 @@
|
||||||
services.polkit-gnome.enable = true;
|
services.polkit-gnome.enable = true;
|
||||||
|
|
||||||
# WM Utilities (split out if they need additional config)
|
# WM Utilities (split out if they need additional config)
|
||||||
|
# TODO configure ironbar
|
||||||
|
programs.hyprlock.enable = true;
|
||||||
programs.fuzzel.enable = true; # TODO switch to anyrun
|
programs.fuzzel.enable = true; # TODO switch to anyrun
|
||||||
programs.waybar.enable = true; # TODO switch to ironbar
|
|
||||||
programs.swaylock.enable = true;
|
# TODO: Install idle manager
|
||||||
services.swayidle.enable = true;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue