Rename directories for better organization

This commit is contained in:
Vili Sinervä 2025-06-01 12:31:28 +03:00
parent 9d1bd2941f
commit de8301ba4a
Signed by: Vili Sinervä
SSH key fingerprint: SHA256:FladqYjaE4scJY3Hi+gnShZ6ygnTJgixy0I6BAoHyos
47 changed files with 52 additions and 52 deletions

49
personal/desktop.nix Normal file
View file

@ -0,0 +1,49 @@
{ pkgs, ... }:
{
imports = [
./symlinked/symlinks.nix
../shared/users/vili
];
environment.systemPackages = with pkgs; [
alacritty
vlc
flameshot
speedcrunch
];
services = {
displayManager = {
autoLogin.enable = true;
autoLogin.user = "vili";
};
xserver = {
enable = true;
displayManager = {
lightdm.enable = true;
sessionCommands = ''${pkgs.xorg.xrdb}/bin/xrdb -merge < ${
(import ./embedded/xresources.nix { inherit pkgs; })
}'';
};
};
pipewire.enable = false;
pulseaudio.enable = true;
};
nixpkgs.config.pulseaudio = true;
security.polkit.enable = true;
xdg.mime.defaultApplications = {
"application/pdf" = "org.gnome.Evince.desktop";
"text/plain" = "org.xfce.mousepad.desktop";
"text/x-tex" = "org.kde.kile.desktop";
"inode/directory" = "pcmanfm.description";
};
qt = {
enable = true;
style = "adwaita-dark";
platformTheme = "gnome";
};
}

44
personal/development.nix Normal file
View file

@ -0,0 +1,44 @@
{ pkgs, lib, ... }:
{
imports = [ ./programs/embedded/nvim.nix ];
#################### Git configuration ####################
programs.git = {
enable = true;
lfs.enable = true;
config = {
user = {
email = "vili.m.sinerva@gmail.com";
name = "Vili Sinervä";
signingkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJowj9IJIgYjDwZm5mEttiwvPfu1dd4eVTHfaDnbwcOV";
};
merge = {
ff = "true";
};
pull = {
ff = "only";
};
commit = {
verbose = "true";
};
gpg.format = "ssh";
commit.gpgsign = "true";
};
};
#################### Packages ####################
environment.systemPackages = with pkgs; [
nixfmt-rfc-style
nixd
vagrant
nmap
metasploit
armitage
];
virtualisation.virtualbox.host.enable = true;
virtualisation.virtualbox.host.addNetworkInterface = false;
users.extraGroups.vboxusers.members = [ "vili" ];
fonts.packages = builtins.filter lib.attrsets.isDerivation (builtins.attrValues pkgs.nerd-fonts);
}

View file

@ -0,0 +1,49 @@
{
config,
pkgs,
lib,
...
}:
{
environment.systemPackages = with pkgs; [ zenmonitor ];
hardware.graphics.extraPackages = with pkgs; [ rocmPackages.clr.icd ];
boot.initrd.kernelModules = [ "amdgpu" ];
services = {
xserver = lib.mkIf config.services.xserver.enable {
videoDrivers = [
"amdgpu"
"modesetting"
];
deviceSection = ''
Option "DRI" "2"
Option "TearFree" "true"
'';
};
tlp = {
enable = true;
settings = {
CPU_SCALING_GOVERNOR_ON_AC = "performance";
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
CPU_MIN_PERF_ON_AC = 0;
CPU_MAX_PERF_ON_AC = 100;
CPU_MIN_PERF_ON_BAT = 0;
CPU_MAX_PERF_ON_BAT = 40;
#Optional helps save long term battery health
START_CHARGE_THRESH_BAT0 = 60; # 60 and bellow it starts to charge
STOP_CHARGE_THRESH_BAT0 = 80; # 80 and above it stops charging
};
};
logind.lidSwitch = if config.boot.resumeDevice != "" then "hibernate" else "suspend";
};
}

View file

@ -0,0 +1,13 @@
{ lib, ... }:
{
swapDevices = lib.mkForce [
{
device = "/var/lib/swapfile";
size = 16 * 1024;
}
];
boot = {
resumeDevice = lib.mkDefault "/dev/mapper/nixos";
};
}

View file

@ -0,0 +1,34 @@
{ config, pkgs, ... }:
{
hardware.graphics = {
extraPackages = with pkgs; [
intel-media-driver
intel-compute-runtime
];
};
services = {
tlp = {
enable = true;
settings = {
CPU_SCALING_GOVERNOR_ON_AC = "performance";
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
CPU_MIN_PERF_ON_AC = 0;
CPU_MAX_PERF_ON_AC = 100;
CPU_MIN_PERF_ON_BAT = 0;
CPU_MAX_PERF_ON_BAT = 40;
#Optional helps save long term battery health
START_CHARGE_THRESH_BAT0 = 60; # 60 and bellow it starts to charge
STOP_CHARGE_THRESH_BAT0 = 80; # 80 and above it stops charging
};
};
logind.lidSwitch = if config.boot.resumeDevice != "" then "hibernate" else "suspend";
};
}

View file

@ -0,0 +1,9 @@
{ config, pkgs, ... }:
{
environment.systemPackages = with pkgs; if config.services.xserver.enable then [ via ] else [ ];
# Keychron Q11
services.udev.extraRules = ''
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="3434", ATTRS{idProduct}=="01e0", MODE="0660", GROUP="users", TAG+="uaccess", TAG+="udev-acl"
'';
}

View file

@ -0,0 +1,15 @@
diff --git a/app/streaming/input/input.cpp b/app/streaming/input/input.cpp
index 95db06e0..d1d34fd5 100644
--- a/app/streaming/input/input.cpp
+++ b/app/streaming/input/input.cpp
@@ -39,6 +39,10 @@ SdlInputHandler::SdlInputHandler(StreamingPreferences& prefs, int streamWidth, i
m_CaptureSystemKeysMode = StreamingPreferences::CSK_ALWAYS;
}
+ // This is used to always grab the OS-modified input for the mouse
+ // This is because I am using OS-level functionality for mouse acceleration
+ SDL_SetHint(SDL_HINT_MOUSE_RELATIVE_MODE_WARP, "1");
+
// Allow gamepad input when the app doesn't have focus if requested
SDL_SetHint(SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS, prefs.backgroundGamepad ? "1" : "0");

View file

@ -0,0 +1,18 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
(onlykey.override (prev: {
node_webkit = prev.node_webkit.overrideAttrs {
version = "0.71.1";
src = fetchurl {
url = "https://dl.nwjs.io/v0.71.1/nwjs-v0.71.1-linux-x64.tar.gz";
hash = "sha256-bnObpwfJ6SNJdOvzWTnh515JMcadH1+fxx5W9e4gl/4=";
};
};
}))
onlykey-cli
];
hardware.onlykey.enable = true;
}

View file

@ -0,0 +1,74 @@
{ ... }:
{
nixpkgs.overlays = [
(final: prev: {
moonlight-qt = prev.moonlight-qt.overrideAttrs (old: {
patches = (old.patches or [ ]) ++ [ ./moonlight-trackball-accel.patch ];
});
})
];
hardware.logitech.wireless = {
enable = true;
enableGraphical = true;
};
services.libinput.mouse = {
accelProfile = "custom";
accelStepMotion = 5.0e-2;
accelPointsMotion = [
0.0
2.0e-2
4.0e-2
6.0e-2
8.0e-2
0.1
0.12
0.14
0.16
0.18
0.2
0.2525
0.31
0.3725
0.44
0.5125
0.59
0.6725
0.76
0.8525
0.95
1.155
1.37
1.595
1.83
2.075
2.33
2.595
2.87
3.155
3.45
3.755
4.07
4.395
4.73
5.075
5.43
5.795
6.17
6.555
6.95
7.355
7.77
8.195
8.63
9.075
9.53
9.995
10.47
10.955
11.45
11.95
];
};
}

View file

@ -0,0 +1,50 @@
{ config, lib, ... }:
{
options.custom.home_wg_suffix = lib.mkOption {
type = with lib.types; nullOr (strMatching "^[0-9a-zA-Z:]+$");
default = null;
description = "IPv6 GUA Suffix for Home WireGuard config";
};
config = {
networking = {
wg-quick.interfaces = {
wg0 = {
autostart = true;
address = [ "${config.custom.gua_pref}ff::${config.custom.home_wg_suffix}/64" ];
dns = [
"${config.custom.gua_pref}ff::1"
"vsinerva.fi"
];
privateKeyFile = "/persist/secrets/wireguard/priv-home";
listenPort = 51820;
peers = [
{
publicKey = "f9QoYPxyaxylUcOI9cE9fE9DJoEX4c6GUtr4p+rsd34=";
presharedKeyFile = "/persist/secrets/wireguard/psk-home";
allowedIPs = [ "::/0" ];
endpoint = "wg.vsinerva.fi:51820";
}
];
};
};
};
services.clatd = {
enable = true;
settings.clat-v6-addr = "${config.custom.gua_pref}ff::c${config.custom.home_wg_suffix}";
};
systemd.services = {
"wg-quick-wg0" = {
wants = [ "network-online.target" ];
after = [ "network-online.target" ];
};
clatd = {
wants = [ "wg-quick-wg0.service" ];
after = [ "wg-quick-wg0.service" ];
};
};
};
}

View file

@ -0,0 +1,12 @@
{ ... }:
{
programs.i3lock.enable = true;
services = {
printing.enable = true;
avahi = {
enable = true;
nssmdns4 = true;
openFirewall = true;
};
};
}

View file

@ -0,0 +1,21 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
bitwarden
bitwarden-cli
];
programs.zsh.interactiveShellInit = "export SSH_AUTH_SOCK=/home/vili/.bitwarden-ssh-agent.sock";
security = {
pam = {
rssh.enable = true;
services = {
sudo.rssh = true;
};
};
sudo.execWheelOnly = true;
};
# We need SSH for the sudo, but generally don't want it open on machines with Bitwarden client
services.openssh.openFirewall = false;
}

View file

@ -0,0 +1,8 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
telegram-desktop
signal-desktop
discord
];
}

View file

@ -0,0 +1,13 @@
{ pkgs, ... }:
pkgs.writeText "Xresources" ''
Xft.dpi: 96
Xft.antialias: true
Xft.hinting: true
Xft.rgba: rgb
Xft.autohint: false
Xft.hintstyle: hintslight
Xft.lcdfilter: lcddefault
Xcursor.theme: xcursor-breeze
Xcursor.size: 0
''

View file

@ -0,0 +1,262 @@
{ pkgs, ... }:
let
alacritty-conf = "${
(import ./alacritty.nix {
inherit pkgs;
})
}";
i3status-conf = "${pkgs.writeText "i3status-conf" ''
# It is important that this file is edited as UTF-8.
# The following line should contain a sharp s:
# ß
# If the above line is not correctly displayed, fix your editor first!
general {
output_format = "i3bar"
colors = true
interval = 1
color_good = "#2AA198"
color_bad = "#586E75"
color_degraded = "#DC322F"
}
order += "battery all"
order += "cpu_usage"
order += "memory"
order += "ipv6"
order += "ethernet _first_"
order += "wireless _first_"
order += "disk /"
order += "tztime local"
order += "tztime helsinki"
battery all {
format = " %status %percentage (%remaining @ %consumption) "
format_down = ""
last_full_capacity = true
integer_battery_capacity = true
low_threshold = 30
threshold_type = time
}
cpu_usage {
format = " CPU %usage "
}
memory {
format = " RAM %used / %total "
threshold_degraded = "10%"
}
ipv6 {
format_up = " %iface: %ip "
format_down = " No IPv6 "
}
ethernet _first_ {
format_up = " LAN: %ip "
format_down = " No LAN "
}
wireless _first_ {
format_up = " %quality%essid: %ip "
format_down = " No WLAN "
}
disk "/" {
format = " %avail "
}
tztime local {
format = " %d.%m. %H:%M "
}
tztime helsinki {
format = " (HEL %H:%M) "
timezone = "Europe/Helsinki"
hide_if_equals_localtime = true
}
''}";
in
pkgs.writeText "i3-conf" ''
# Set mod key (Mod1=<Alt>, Mod4=<Super>)
set $mod Mod1
set $secondary Mod4
exec --no-startup-id nm-applet --sm-disable
exec --no-startup-id bitwarden
for_window [window_type="notification"] floating enable
# Screen brightness controls
bindcode 232 exec --no-startup-id brightnessctl set 5%-
bindcode 233 exec --no-startup-id brightnessctl set 5%+
bindsym $mod+Return exec "alacritty --config-file ${alacritty-conf}"
bindsym $mod+d exec --no-startup-id "rofi -theme 'Arc-Dark' -show combi -combi-modes 'run' -modes combi"
bindsym $mod+Shift+p mode "$mode_system"
set $mode_system (l)ock, (s)uspend, (h)ibernate, (r)eboot, (S)hutdown
mode "$mode_system" {
bindsym l exec --no-startup-id i3lock, mode "default"
bindsym s exec --no-startup-id "i3lock; systemctl suspend", mode "default"
bindsym h exec --no-startup-id systemctl hibernate, mode "default"
bindsym r exec --no-startup-id systemctl reboot, mode "default"
bindsym Shift+s exec --no-startup-id systemctl poweroff, mode "default"
bindsym Return mode "default"
bindsym Escape mode "default"
}
font xft:DejaVuSansMono-Book 14
default_border pixel 3
gaps inner 2
bar {
i3bar_command i3bar
status_command i3status -c ${i3status-conf}
## please set your primary output first. Example: 'xrandr --output eDP1 --primary'
tray_output primary
bindsym button4 nop
bindsym button5 nop
colors {
background #0f212f
statusline #d0d0d0
separator #d0d0d0
# border back. text
active_workspace #303030 #505050 #d0d0d0
}
}
bindsym $mod+Shift+q kill
floating_modifier $mod
bindsym $mod+s split h
bindsym $mod+v split v
bindsym $mod+f fullscreen toggle
bindsym $mod+Shift+space floating toggle
bindsym $mod+space focus mode_toggle
bindsym $mod+Shift+c reload
bindsym $mod+Shift+r restart
bindsym $mod+h focus left
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+l focus right
bindsym $mod+Shift+h move left
bindsym $mod+Shift+j move down
bindsym $mod+Shift+k move up
bindsym $mod+Shift+l move right
bindsym $mod+r mode "resize"
mode "resize" {
bindsym h resize shrink width 5 px or 5 ppt
bindsym j resize grow height 5 px or 5 ppt
bindsym k resize shrink height 5 px or 5 ppt
bindsym l resize grow width 5 px or 5 ppt
bindsym Return mode "default"
bindsym Escape mode "default"
}
workspace 1 output primary
workspace 2 output primary
workspace 3 output primary
workspace 4 output primary
workspace 5 output primary
workspace 6 output primary
workspace 7 output primary
workspace 8 output primary
workspace 9 output primary
workspace 10 output primary
workspace 11 output eDP primary
workspace 12 output eDP primary
workspace 13 output eDP primary
workspace 14 output eDP primary
workspace 15 output eDP primary
workspace 16 output eDP primary
workspace 17 output eDP primary
workspace 18 output eDP primary
# switch to workspace
bindsym $mod+1 workspace 1
bindsym $mod+2 workspace 2
bindsym $mod+3 workspace 3
bindsym $mod+4 workspace 4
bindsym $mod+5 workspace 5
bindsym $mod+6 workspace 6
bindsym $mod+7 workspace 7
bindsym $mod+8 workspace 8
bindsym $mod+9 workspace 9
bindsym $mod+0 workspace 10
bindsym $mod+$secondary+1 workspace 11
bindsym $mod+$secondary+2 workspace 12
bindsym $mod+$secondary+3 workspace 13
bindsym $mod+$secondary+4 workspace 14
bindsym $mod+$secondary+5 workspace 15
bindsym $mod+$secondary+6 workspace 16
bindsym $mod+$secondary+7 workspace 17
bindsym $mod+$secondary+8 workspace 18
bindsym $mod+$secondary+9 workspace 19
bindsym $mod+$secondary+0 workspace 20
# Move focused container to workspace
bindsym $mod+Ctrl+1 move container to workspace 1
bindsym $mod+Ctrl+2 move container to workspace 2
bindsym $mod+Ctrl+3 move container to workspace 3
bindsym $mod+Ctrl+4 move container to workspace 4
bindsym $mod+Ctrl+5 move container to workspace 5
bindsym $mod+Ctrl+6 move container to workspace 6
bindsym $mod+Ctrl+7 move container to workspace 7
bindsym $mod+Ctrl+8 move container to workspace 8
bindsym $mod+Ctrl+9 move container to workspace 9
bindsym $mod+Ctrl+0 move container to workspace 10
bindsym $mod+$secondary+Ctrl+1 move container to workspace 11
bindsym $mod+$secondary+Ctrl+2 move container to workspace 12
bindsym $mod+$secondary+Ctrl+3 move container to workspace 13
bindsym $mod+$secondary+Ctrl+4 move container to workspace 14
bindsym $mod+$secondary+Ctrl+5 move container to workspace 15
bindsym $mod+$secondary+Ctrl+6 move container to workspace 16
bindsym $mod+$secondary+Ctrl+7 move container to workspace 17
bindsym $mod+$secondary+Ctrl+8 move container to workspace 18
bindsym $mod+$secondary+Ctrl+9 move container to workspace 19
bindsym $mod+$secondary+Ctrl+0 move container to workspace 20
# Move to workspace with focused container
bindsym $mod+Shift+1 move container to workspace 1; workspace 1
bindsym $mod+Shift+2 move container to workspace 2; workspace 2
bindsym $mod+Shift+3 move container to workspace 3; workspace 3
bindsym $mod+Shift+4 move container to workspace 4; workspace 4
bindsym $mod+Shift+5 move container to workspace 5; workspace 5
bindsym $mod+Shift+6 move container to workspace 6; workspace 6
bindsym $mod+Shift+7 move container to workspace 7; workspace 7
bindsym $mod+Shift+8 move container to workspace 8; workspace 8
bindsym $mod+Shift+9 move container to workspace 9; workspace 9
bindsym $mod+Shift+0 move container to workspace 10; workspace 10
bindsym $mod+$secondary+Shift+1 move container to workspace 11; workspace 11
bindsym $mod+$secondary+Shift+2 move container to workspace 12; workspace 12
bindsym $mod+$secondary+Shift+3 move container to workspace 13; workspace 13
bindsym $mod+$secondary+Shift+4 move container to workspace 14; workspace 14
bindsym $mod+$secondary+Shift+5 move container to workspace 15; workspace 15
bindsym $mod+$secondary+Shift+6 move container to workspace 16; workspace 16
bindsym $mod+$secondary+Shift+7 move container to workspace 17; workspace 17
bindsym $mod+$secondary+Shift+8 move container to workspace 18; workspace 18
bindsym $mod+$secondary+Shift+9 move container to workspace 19; workspace 19
bindsym $mod+$secondary+Shift+0 move container to workspace 20; workspace 20
''

View file

@ -0,0 +1,238 @@
{ ... }:
let
nixvim = import (
builtins.fetchGit {
url = "https://github.com/nix-community/nixvim";
ref = "nixos-25.05";
}
);
in
{
imports = [ nixvim.nixosModules.nixvim ];
programs.nixvim = {
enable = true;
defaultEditor = true;
vimAlias = false;
colorschemes.vscode.enable = true;
globals.mapleader = " ";
opts = {
colorcolumn = "100";
cursorline = true;
number = true;
showcmd = true;
signcolumn = "yes";
scrolloff = 16;
shiftwidth = 3;
tabstop = 3;
};
keymaps = [
{
key = "T";
action = "<cmd>Neotree<cr>";
options.desc = "Open Neotree";
}
{
mode = [
"i"
"v"
];
key = "<C-c>";
action = "<Esc>";
options.desc = "Exit To Normal Mode";
}
{
key = "<leader>b";
action = "<cmd>Gitsigns toggle_current_line_blame<cr>";
options.desc = "Toggle Current Line Git Blame";
}
];
plugins = {
fugitive.enable = true;
gitsigns = {
enable = true;
settings = {
current_line_blame_opts.delay = 100;
numhl = true;
};
};
lualine.enable = true;
markdown-preview.enable = true;
neo-tree = {
enable = true;
buffers.followCurrentFile = {
enabled = true;
leaveDirsOpen = true;
};
};
nix.enable = true;
rainbow-delimiters.enable = true;
sleuth.enable = true;
tmux-navigator = {
enable = true;
settings.no_mappings = 1;
keymaps = [
{
key = "<C-h>";
action = "left";
options.desc = "Tmux Left";
}
{
key = "<C-j>";
action = "down";
options.desc = "Tmux Down";
}
{
key = "<C-k>";
action = "up";
options.desc = "Tmux Up";
}
{
key = "<C-l>";
action = "right";
options.desc = "Tmux Right";
}
];
};
treesitter = {
enable = true;
folding = true;
settings.indent.enable = true;
nixGrammars = true;
};
web-devicons.enable = true;
which-key = {
enable = true;
settings.delay.__raw = ''
function(ctx)
return ctx.plugin and 0 or 500
end
'';
};
cmp = {
enable = true;
settings = {
sources = [
{ name = "vim-vsnip"; }
{ name = "vim-lsp-signature-help"; }
{ name = "nvim-lsp"; }
{ name = "treesitter"; }
{ name = "buffer"; }
];
mapping = {
"<C-Space>" = "cmp.mapping.complete()";
"<C-e>" = "cmp.mapping.close()";
"<CR>" = "cmp.mapping.confirm({ select = true })";
"<C-Tab>" = "cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})";
"<Tab>" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})";
};
};
};
friendly-snippets.enable = true;
nvim-autopairs.enable = true;
lsp = {
enable = true;
inlayHints = true;
keymaps = {
diagnostic = {
"<leader>dj" = {
action = "goto_next";
desc = "Next Diagnostic";
};
"<leader>dk" = {
action = "goto_prev";
desc = "Previous Diagnostic";
};
"<leader>dh" = {
action = "open_float";
desc = "Line Diagnostics";
};
};
lspBuf = {
"<leader>gd" = {
action = "definition";
desc = "Goto Definition";
};
"<leader>gr" = {
action = "references";
desc = "Goto References";
};
"<leader>gD" = {
action = "declaration";
desc = "Goto Declaration";
};
"<leader>gi" = {
action = "implementation";
desc = "Goto Implementation";
};
"<leader>gt" = {
action = "type_definition";
desc = "Type Definition";
};
"<leader>s" = {
action = "workspace_symbol";
desc = "Search Symbol";
};
"<leader>r" = {
action = "rename";
desc = "Rename Symbol";
};
"<leader>a" = {
action = "code_action";
desc = "Code Action";
};
H = {
action = "hover";
desc = "Hover";
};
};
extra = [
{
action = "<cmd>lua vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled())<cr>";
key = "<leader>h";
options.desc = "Toggle LSP Inlay Hints";
}
];
};
servers = {
clangd.enable = true;
cmake.enable = true;
dockerls.enable = true;
docker_compose_language_service.enable = true;
eslint.enable = true;
html.enable = true;
jsonls.enable = true;
nixd.enable = true;
pylsp.enable = true;
rust_analyzer = {
enable = true;
installCargo = false;
installRustc = false;
settings = {
completion = {
autoimport.enable = true;
autoself.enable = true;
fullFunctionSignatures.enable = true;
privateEditable.enable = true;
};
diagnostics = {
styleLints.enable = true;
};
hover.actions.references.enable = true;
};
};
yamlls.enable = true;
};
};
lsp-format.enable = true;
lsp-signature.enable = true;
};
};
}

View file

@ -0,0 +1,17 @@
{ pkgs, ... }:
pkgs.writeText "alacritty-conf" ''
[font]
size = 13
[cursor]
style.shape = "Beam"
style.blinking = "On"
blink_timeout = 0
unfocused_hollow = false
[keyboard]
bindings = [
{key = "+", mods = "Control | Shift", action = "ResetFontSize"},
{key = "Enter", mods = "Alt | Shift", action = "SpawnNewInstance"},
]
''

View file

@ -0,0 +1,177 @@
{ ... }:
let
lock-false = {
Value = false;
Status = "locked";
};
lock-true = {
Value = true;
Status = "locked";
};
in
{
programs.firefox = {
enable = true;
# AutoConfig used for preferences not supported via policies
autoConfig = ''
lockPref("full-screen-api.warning.timeout", 500)
lockPref("privacy.fingerprintingProtection", true)
lockPref("privacy.donottrackheader.enabled", true)
'';
# ---- POLICIES ----
# Check about:policies#documentation for options.
policies = {
# ---- EXTENSIONS ----
# Check about:support for extension/add-on ID strings.
# Valid strings for installation_mode are "allowed", "blocked",
# "force_installed" and "normal_installed".
ExtensionSettings = {
"*".installation_mode = "blocked";
"{446900e4-71c2-419f-a6a7-df9c091e268b}" = {
install_url = "https://addons.mozilla.org/firefox/downloads/latest/bitwarden-password-manager/latest.xpi";
installation_mode = "force_installed";
};
"jsr@javascriptrestrictor" = {
install_url = "https://addons.mozilla.org/firefox/downloads/latest/javascript-restrictor/latest.xpi";
installation_mode = "force_installed";
};
};
AutofillAddressEnabled = false;
AutofillCreditCardEnabled = false;
DisableFirefoxStudies = true;
DisableFormHistory = true;
DisablePocket = true;
DisableSecurityBypass = false;
DisableTelemetry = true;
DisplayBookmarksToolbar = "always"; # alternatives: "always" or "newtab"
DisplayMenuBar = "default-off"; # alternatives: "always", "never" or "default-on"
DontCheckDefaultBrowser = true;
DownloadDirectory = "\${home}/Downloads";
EnableTrackingProtection = {
Value = true;
Locked = true;
Cryptomining = true;
Fingerprinting = true;
EmailTracking = true;
};
FirefoxHome = {
Locked = true;
Search = true;
TopSites = true;
SponsoredTopSites = false;
Highlights = false;
Pocket = false;
SponsoredPocket = false;
};
FirefoxSuggest = {
Locked = true;
WebSuggestions = false;
SponsoredSuggestions = false;
ImproveSuggest = false;
};
HardwareAccelerations = true;
Homepage = {
Locked = true;
URL = "https://www.duckduckgo.com/";
StartPage = "previous-session";
};
HttpsOnlyMode = "force_enabled";
NetworkPrediction = false;
NoDefaultBookmarks = true;
OverrideFirstRunPage = "";
OverridePostUpdatePage = "";
PasswordManagerEnabled = false;
Permissions = {
Camera = {
Allow = [ ];
Block = [ ];
BlockNewRequests = false;
Locked = true;
};
Microphone = {
Allow = [ ];
Block = [ ];
BlockNewRequests = false;
Locked = true;
};
Location = {
Allow = [ ];
Block = [ ];
BlockNewRequests = false;
Locked = true;
};
Notifications = {
Allow = [ ];
Block = [ ];
BlockNewRequests = false;
Locked = true;
};
Autoplay = {
Allow = [ ];
Block = [ ];
BlockNewRequests = false;
Default = "block-audio-video";
Locked = true;
};
};
PictureInPicture = {
Enabled = true;
Locked = true;
};
PopupBlocking = {
Allow = [ ];
Default = true;
Locked = true;
};
PostQuantumKeyAgreementEnabled = true;
PrimaryPassword = false;
PrintingEnabled = true;
PromptForDownloadLocation = false;
RequestedLocales = [ "en-US" ];
SearchBar = "unified"; # alternative: "separate"
SearchEngines.PreventInstalls = true;
SearchSuggestEnabled = false;
UserMessaging = {
Locked = true;
ExtensionRecommendations = true;
FeatureRecommendations = false;
UrlbarInterventions = false;
SkipOnboarding = true;
MoreFromMozilla = false;
};
UseSystemPrintDialog = true;
# ---- PREFERENCES ----
# Check about:config for options.
Preferences = {
"browser.contentblocking.category" = {
Value = "strict";
Status = "locked";
};
"browser.safebrowsing.downloads.enabled" = lock-true;
"browser.safebrowsing.downloads.remote.block_potentially_unwanted" = lock-true;
"browser.safebrowsing.downloads.remote.block_uncommon" = lock-true;
"browser.safebrowsing.malware.enabled" = lock-true;
"browser.safebrowsing.phishing.enabled" = lock-true;
"browser.crashReports.unsubmittedCheck.autoSubmit2" = lock-false;
"browser.topsites.contile.enabled" = lock-false;
"browser.translations.automaticallyPopup" = lock-false;
"dom.private-attribution.submission.enabled" = lock-false;
"media.ffmpeg.vaapi.enabled" = lock-true;
"privacy.globalprivacycontrol.enabled" = lock-true;
"xpinstall.whitelist.required" = lock-true;
"network.trr.mode" = {
Value = 0;
Status = "locked";
};
"security.OCSP.enabled" = {
Value = 1;
Status = "locked";
};
};
};
};
}

28
personal/programs/i3.nix Normal file
View file

@ -0,0 +1,28 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
i3status
rofi
arandr
pavucontrol
viewnior
xfce.mousepad
pcmanfm
evince
brightnessctl
networkmanagerapplet
];
programs.i3lock.enable = true;
services = {
displayManager = {
defaultSession = "none+i3";
};
xserver.windowManager.i3 = {
enable = true;
extraPackages = [ ];
configFile = "${(import ./embedded/i3.nix { inherit pkgs; })}";
};
};
}

View file

@ -0,0 +1,7 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
moonlight-qt
parsec-bin
];
}

View file

@ -0,0 +1,20 @@
{ ... }:
{
services.redshift = {
executable = "/bin/redshift-gtk";
enable = true;
temperature = {
night = 2800;
day = 6500;
};
brightness = {
night = "0.5";
day = "1";
};
};
location = {
latitude = 60.17;
longitude = 24.94;
};
}

View file

@ -0,0 +1,12 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
libreoffice
zotero
kile
texliveFull
imagemagick
ghostscript
kdePackages.okular
];
}

View file

@ -0,0 +1,6 @@
[Settings]
gtk-theme-name=Adwaita-dark
gtk-application-prefer-dark-theme=true
gtk-icon-theme-name=Adwaita
gtk-cursor-theme-name=Adwaita
gtk-cursor-theme-size=0

View file

@ -0,0 +1,8 @@
file:///home/vili/Documents Documents
file:///home/vili/Downloads Downloads
file:///home/vili/Music Music
file:///home/vili/Pictures Pictures
file:///home/vili/Projects Projects
file:///home/vili/School School
file:///home/vili/Videos Videos
file:///home/vili/nixos-conf nixos-conf

View file

@ -0,0 +1,4 @@
gtk-theme-name="Adwaita-dark"
gtk-icon-theme-name="Adwaita"
gtk-cursor-theme-name="Adwaita"
gtk-cursor-theme-size=0

View file

@ -0,0 +1,44 @@
# Configuration file for the libfm version 1.3.2.
# Autogenerated file, don't edit, your changes will be overwritten.
[config]
single_click=0
use_trash=0
confirm_del=1
confirm_trash=1
advanced_mode=0
si_unit=0
force_startup_notify=1
backup_as_hidden=1
no_usb_trash=1
no_child_non_expandable=0
show_full_names=0
only_user_templates=0
template_run_app=0
template_type_once=0
auto_selection_delay=600
drop_default_action=auto
defer_content_test=0
quick_exec=0
terminal=alacritty
thumbnail_local=1
thumbnail_max=2048
smart_desktop_autodrop=1
[ui]
big_icon_size=48
small_icon_size=16
pane_icon_size=16
thumbnail_size=128
show_thumbnail=1
shadow_hidden=0
[places]
places_home=1
places_desktop=1
places_root=1
places_computer=1
places_trash=1
places_applications=1
places_network=0
places_unmounted=1

View file

@ -0,0 +1,26 @@
[config]
bm_open_method=0
[volume]
mount_on_startup=1
mount_removable=1
autorun=1
[ui]
always_show_tabs=0
max_tab_chars=32
win_width=1271
win_height=2121
splitter_pos=150
media_in_new_tab=0
desktop_folder_new_win=0
change_tab_on_drop=1
close_on_unmount=1
focus_previous=0
side_pane_mode=places
view_mode=list
show_hidden=1
sort=name;ascending;
toolbar=newtab;navigation;home;
show_statusbar=1
pathbar_mode_buttons=0

View file

@ -0,0 +1,54 @@
{ ... }:
{
system.userActivationScripts.mkDesktopSettingsSymlinks.text =
let
home = "/home/vili/";
paths = [
rec {
dir = "${home}.config/pcmanfm/default/";
file = "pcmanfm.conf";
full = "${dir}${file}";
source = "${./pcmanfm.conf}";
}
rec {
dir = "${home}.config/libfm/";
file = "libfm.conf";
full = "${dir}${file}";
source = "${./libfm.conf}";
}
rec {
dir = "${home}.config/gtk-3.0/";
file = "bookmarks";
full = "${dir}${file}";
source = "${./gtk-bookmarks}";
}
rec {
dir = "${home}";
file = ".gtkrc-2.0";
full = "${dir}${file}";
source = "${./gtkrc-2.0}";
}
rec {
dir = "${home}.config/gtk-3.0/";
file = "settings.ini";
full = "${dir}${file}";
source = "${./gtk-3-4-settings.ini}";
}
rec {
dir = "${home}.config/gtk-4.0/";
file = "settings.ini";
full = "${dir}${file}";
source = "${./gtk-3-4-settings.ini}";
}
];
in
toString (
map (path: ''
mkdir -p ${path.dir}
if test -e ${path.full} -a ! -L ${path.full}; then
mv -f ${path.full} ${path.full}.old
fi
ln -sf ${path.source} ${path.full}
'') paths
);
}

View file

@ -0,0 +1,8 @@
{ ... }:
{
services = {
devmon.enable = true;
gvfs.enable = true;
udisks2.enable = true;
};
}