snowfall migration wip homepc done

This commit is contained in:
Aleksandr Lebedev 2025-08-09 17:07:55 +02:00
parent ed08a98651
commit 25774148e4
37 changed files with 1943 additions and 1447 deletions

84
flake.lock generated
View file

@ -716,7 +716,7 @@
"flake-parts_6": { "flake-parts_6": {
"inputs": { "inputs": {
"nixpkgs-lib": [ "nixpkgs-lib": [
"nix-schemes", "nix-schemas",
"nixpkgs" "nixpkgs"
] ]
}, },
@ -939,17 +939,17 @@
"git-hooks-nix": { "git-hooks-nix": {
"inputs": { "inputs": {
"flake-compat": [ "flake-compat": [
"nix-schemes" "nix-schemas"
], ],
"gitignore": [ "gitignore": [
"nix-schemes" "nix-schemas"
], ],
"nixpkgs": [ "nixpkgs": [
"nix-schemes", "nix-schemas",
"nixpkgs" "nixpkgs"
], ],
"nixpkgs-stable": [ "nixpkgs-stable": [
"nix-schemes", "nix-schemas",
"nixpkgs" "nixpkgs"
] ]
}, },
@ -1164,6 +1164,22 @@
"type": "github" "type": "github"
} }
}, },
"master": {
"locked": {
"lastModified": 1754742265,
"narHash": "sha256-fK5QWs+Z0MaORZKHITj0xHjQrxDp4+z1w5W5gw5TmkY=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "9114a7402bc71dd710b3b62ae7e6e915e658a08a",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "master",
"repo": "nixpkgs",
"type": "github"
}
},
"mnw": { "mnw": {
"locked": { "locked": {
"lastModified": 1735150973, "lastModified": 1735150973,
@ -1509,7 +1525,7 @@
"type": "github" "type": "github"
} }
}, },
"nix-schemes": { "nix-schemas": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_6", "flake-compat": "flake-compat_6",
"flake-parts": "flake-parts_6", "flake-parts": "flake-parts_6",
@ -1677,22 +1693,6 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-master": {
"locked": {
"lastModified": 1754301979,
"narHash": "sha256-EW3KN4OwiMtushATrcMsaEn0oYWuSrg4XmqpsB09ZW0=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "796e3f0d8b5570e3e3cddcf245a80e1bb70bc916",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "master",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-regression": { "nixpkgs-regression": {
"locked": { "locked": {
"lastModified": 1643052045, "lastModified": 1643052045,
@ -1741,22 +1741,6 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-unstable": {
"locked": {
"lastModified": 1754214453,
"narHash": "sha256-Q/I2xJn/j1wpkGhWkQnm20nShYnG7TI99foDBpXm1SY=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "5b09dc45f24cf32316283e62aec81ffee3c3e376",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_10": { "nixpkgs_10": {
"locked": { "locked": {
"lastModified": 1735523292, "lastModified": 1735523292,
@ -4232,23 +4216,23 @@
"home-manager": "home-manager_2", "home-manager": "home-manager_2",
"impermanence": "impermanence", "impermanence": "impermanence",
"lanzaboote": "lanzaboote", "lanzaboote": "lanzaboote",
"master": "master",
"neovim": "neovim", "neovim": "neovim",
"niri-flake": "niri-flake", "niri-flake": "niri-flake",
"nix-darwin": "nix-darwin", "nix-darwin": "nix-darwin",
"nix-flatpak": "nix-flatpak", "nix-flatpak": "nix-flatpak",
"nix-gaming": "nix-gaming", "nix-gaming": "nix-gaming",
"nix-on-droid": "nix-on-droid", "nix-on-droid": "nix-on-droid",
"nix-schemes": "nix-schemes", "nix-schemas": "nix-schemas",
"nixos-facter-modules": "nixos-facter-modules", "nixos-facter-modules": "nixos-facter-modules",
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
"nixos-wsl": "nixos-wsl", "nixos-wsl": "nixos-wsl",
"nixpkgs": "nixpkgs_14", "nixpkgs": "nixpkgs_14",
"nixpkgs-master": "nixpkgs-master",
"nixpkgs-unstable": "nixpkgs-unstable",
"snowfall-flake": "snowfall-flake", "snowfall-flake": "snowfall-flake",
"snowfall-lib": "snowfall-lib_2", "snowfall-lib": "snowfall-lib_2",
"sops-nix": "sops-nix", "sops-nix": "sops-nix",
"stylix": "stylix" "stylix": "stylix",
"unstable": "unstable"
} }
}, },
"rust-analyzer-src": { "rust-analyzer-src": {
@ -4667,6 +4651,22 @@
"type": "github" "type": "github"
} }
}, },
"unstable": {
"locked": {
"lastModified": 1754498491,
"narHash": "sha256-erbiH2agUTD0Z30xcVSFcDHzkRvkRXOQ3lb887bcVrs=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "c2ae88e026f9525daf89587f3cbee584b92b6134",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"xwayland-satellite-stable": { "xwayland-satellite-stable": {
"flake": false, "flake": false,
"locked": { "locked": {

View file

@ -14,10 +14,10 @@
nixpkgs = { nixpkgs = {
url = "github:nixos/nixpkgs?ref=nixos-25.05"; url = "github:nixos/nixpkgs?ref=nixos-25.05";
}; };
nixpkgs-unstable = { unstable = {
url = "github:nixos/nixpkgs?ref=nixos-unstable"; url = "github:nixos/nixpkgs?ref=nixos-unstable";
}; };
nixpkgs-master = { master = {
url = "github:nixos/nixpkgs?ref=master"; url = "github:nixos/nixpkgs?ref=master";
}; };
neovim = { neovim = {
@ -80,11 +80,12 @@
url = "github:snowfallorg/flake"; url = "github:snowfallorg/flake";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
nix-schemes = { flake-schemas.url = "github:DeterminateSystems/flake-schemas";
## nix client with schema support: see https://github.com/NixOS/nix/pull/8892
nix-schemas = {
url = "github:DeterminateSystems/nix-src/flake-schemas"; url = "github:DeterminateSystems/nix-src/flake-schemas";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
flake-schemas.url = "github:DeterminateSystems/flake-schemas";
}; };
outputs = inputs: outputs = inputs:
@ -99,10 +100,10 @@
overlays = with inputs; [ overlays = with inputs; [
niri-flake.overlays.niri niri-flake.overlays.niri
snowfall-flake.overlays.default snowfall-flake.overlays.default
nix-schemes.overlays.default
]; ];
systems.modules.nixos = with inputs; [ systems.modules.nixos = with inputs; [
home-manager.nixosModules.home-manager
nix-flatpak.nixosModules.nix-flatpak nix-flatpak.nixosModules.nix-flatpak
niri-flake.nixosModules.niri niri-flake.nixosModules.niri
sops-nix.nixosModules.sops sops-nix.nixosModules.sops
@ -116,6 +117,14 @@
impermanence.nixosModules.impermanence impermanence.nixosModules.impermanence
]; ];
systems.modules.home = with inputs; [
inputs.impermanence.nixosModules.home-manager.impermanence
];
home.modules = with inputs; [
impermanence.homeManagerModules.impermanence
];
templates = import ./templates {}; templates = import ./templates {};
outputs-builder = channels: { outputs-builder = channels: {

View file

@ -0,0 +1,44 @@
{
lib,
pkgs,
config,
osConfig ? {},
...
}: let
name = config.snowfallorg.user.name;
home = config.snowfallorg.user.home.directory;
in
with lib;
with lib.custom; {
imports = lib.snowfall.fs.get-non-default-nix-files-recursive ./.;
custom = {
programs = {
fastfetch = {
enable = true;
firstNixOSInstall = 1729112485;
};
librewolf = enabled;
prismlauncher.enable = osConfig.custom.presets.gaming.enable;
bottles = enabled;
};
};
home = {
packages = with pkgs; [
gdb
element-desktop
obs-studio
neovim
localsend
kdePackages.kdenlive
] ++ lib.optionals osConfig.custom.presets.gaming.enable [mcpelauncher-ui-qt];
sessionVariables = {
EDITOR = "emacsclient -c";
NH_OS_FLAKE = "${home}/nixos-config";
NH_HOME_FLAKE = "${home}/nixos-config";
NH_DARWIN_FLAKE = "${home}/nixos-config";
};
stateVersion = "25.05";
};
}

View file

@ -0,0 +1,28 @@
{
pkgs,
system,
inputs,
...
}: let
emacs = inputs.emacs-kylekrein.packages.${system}.with-lsps-native;
in {
programs.emacs = {
enable = true;
package = emacs;
};
systemd.user.services.emacs = {
Unit = {
Description = "Launches (and relaunches) emacs";
};
Install = {
WantedBy = ["default.target"];
};
Service = {
ExecStart = "${pkgs.writeShellScript "run-emacs" ''
${emacs}/bin/emacs --fg-daemon
''}";
Restart = "on-failure";
RestartSec = 5;
};
};
}

View file

@ -0,0 +1,12 @@
{...}: {
programs.git = {
enable = true;
userName = "Aleksandr Lebedev";
userEmail = "alex.lebedev2003@icloud.com";
extraConfig = {
credential.helper = "manager";
credential."https://github.com".username = "KyleKrein";
credential.credentialStore = "plaintext";
};
};
}

View file

@ -0,0 +1,27 @@
{osConfig, pkgs, ...}:
{
home.packages = with pkgs; [kitty-themes];
programs.fzf = {
enable = true;
enableBashIntegration = true;
};
programs.eza = {
enable = true;
icons = "always";
};
programs.kitty = {
enable = osConfig.custom.presets.workstation.enable;
font = {
name = "JetBrainsMono Nerd Font";
size = 20;
};
settings = {
confirm_os_window_close = 0;
};
#shellIntegration.enableFishIntegration = true;
themeFile = "Catppuccin-Macchiato";
#Also available: Catppuccin-Frappe Catppuccin-Latte Catppuccin-Macchiato Catppuccin-Mocha
# See all available kitty themes at: https://github.com/kovidgoyal/kitty-themes/blob/46d9dfe230f315a6a0c62f4687f6b3da20fd05e4/themes.json
};
}

View file

@ -0,0 +1,47 @@
* {
border: none;
font-family: Font Awesome, Roboto, Arial, sans-serif;
font-size: 16px;
color: #eeeeee;
border-radius: 10px;
}
window {
background-color: rgba(50, 63, 99, 0.718);
color: #eeeeee;
}
/* search entry */
entry {
background-color: rgba(0, 0, 0, 0.2)
}
button, image {
background: none;
border: none
}
button:hover {
background-color: rgba(255, 255, 255, 0.1)
}
/* in case you wanted to give category buttons a different look */
#category-button {
margin: 0 10px 0 10px
}
#pinned-box {
padding-bottom: 5px;
border-bottom: 1px dotted gray
}
#files-box {
padding: 5px;
border: 1px dotted gray;
border-radius: 15px
}
/* math operation result label */
#math-label {
font-weight: bold;
font-size: 16px
}

View file

@ -0,0 +1,97 @@
{
pkgs,
lib,
osConfig,
...
}: let
enable = osConfig.custom.windowManagers.niri.enable;
profile-image = ./nixos-warbler.png;
battery = osConfig.custom.hardware.battery;
battery-level = battery.scripts.labelPercent;
in {
programs.hyprlock = {
inherit enable;
settings = {
general = {
#enable_fingerprint = true;
disable_loading_bar = true;
hide_cursor = true;
no_fade_in = false;
grace = 10;
};
background = {
path = "${./wallpaper.jpg}";
blur_passes = 1;
blur_size = 7;
noise = 0.0117;
contrast = 0.8916;
brightness = 0.8172;
vibrancy = 0.1696;
vibrancy_darkness = 0.0;
};
image = {
path = "${profile-image}";
size = 150;
border_size = 4;
#border_color = "rgb(0C96F9)";
rounding = -1; # Negative means circle
position = "0, 220";
halign = "center";
valign = "center";
};
input-field = {
size = "600, 100";
outline_thickness = 3;
dots_size = 0.33;
dots_spacing = 0.15;
dots_center = true;
dots_rounding = -1;
dots_fade_time = 200;
placeholder_text = "<i>Input Password...</i>";
hide_input = false;
fade_on_empty = false;
fail_text = "<i>$FAIL <b>($ATTEMPTS)</b></i>";
fail_timeout = 2000;
fail_transition = 300;
position = "0, -20";
halign = "center";
valign = "center";
};
label =
[
{
text = "$USER";
font_family = "Fira Code";
font_size = 56;
position = "0, 100";
halign = "center";
valign = "center";
}
{
text = "$TIME";
font_family = "Roboto";
font_size = 72;
position = "-40, -40";
halign = "right";
valign = "top";
}
{
text = "$LAYOUT";
font_family = "JetBrains Mono";
font_size = 28;
position = "-20, 20";
halign = "right";
valign = "bottom";
}
]
++ lib.optional (battery.enable) {
text = ''cmd[update:10000] ${battery-level}'';
font_family = "JetBrains Mono";
font_size = 28;
position = "20, 20";
halign = "left";
valign = "bottom";
};
};
};
}

View file

@ -0,0 +1,358 @@
#https://github.com/sodiboo/niri-flake/blob/main/default-config.kdl.nix
#https://github.com/sodiboo/niri-flake/blob/main/docs.md
#https://github.com/sodiboo/system/blob/main/niri.mod.nix
{
osConfig,
config,
pkgs,
lib,
...
}: let
username = config.snowfallorg.user.name;
home = config.snowfallorg.user.home.directory;
in
lib.mkIf osConfig.custom.windowManagers.niri.enable {
programs.fuzzel = {
enable = true;
settings.main.terminal = "kitty";
};
services.swaync = {
enable = true;
};
home.packages = with pkgs; [
nwg-drawer
wlogout
brightnessctl
fuzzel
waybar
swaybg
libnotify
hyprlock
networkmanagerapplet
custom.wvkbd-kylekrein
custom.lisgd-kylekrein
];
programs.niri = {
settings = {
spawn-at-startup = [
{
command = [
"${lib.getExe pkgs.custom.wvkbd-kylekrein}"
"--hidden"
];
}
{
command = [
"${lib.getExe pkgs.networkmanagerapplet}"
];
}
{
command = [
"${lib.getExe pkgs.networkmanagerapplet}"
];
}
{
command = [
"dbus-update-activation-environment"
"--systemd"
"--all"
];
}
{
command = [
"${pkgs.solaar}/bin/solaar"
"-w"
"hide"
];
}
{
command = [
"${lib.getExe pkgs.swaybg}"
"-m"
"fill"
"-i"
"${./wallpaper.jpg}"
];
}
];
layout = {
preset-column-widths = [
{proportion = 1.0 / 2.0;}
{proportion = 1.0;}
{proportion = 2.0 / 3.0;}
{proportion = 1.0 / 3.0;}
];
default-column-width = {proportion = 1.0 / 2.0;};
};
binds = with config.lib.niri.actions; let
sh = spawn "sh" "-c";
emacs = action: sh "emacsclient -c --eval \"${action}\"";
homedir = "/home/${username}/";
screenshot-annotate = sh ''${lib.getExe pkgs.grim} -g "$(${lib.getExe pkgs.slurp} -w 0)" -t ppm - | ${lib.getExe pkgs.satty} --early-exit --copy-command 'wl-copy' --filename '-' --initial-tool brush'';
in {
"Mod+E".action = sh "emacsclient -c";
"Mod+Shift+C".action = sh "dolphin";
"Mod+C".action = emacs ''(dirvish \"${homedir}\")'';
"Mod+T".action = spawn "kitty";
"Mod+D".action = spawn "fuzzel";
"Mod+B".action = spawn "librewolf";
"Mod+H".action = show-hotkey-overlay;
"Mod+F".action = fullscreen-window;
"Mod+R".action = switch-preset-column-width;
"Mod+Q".action = close-window;
"Mod+Shift+S".action = screenshot-annotate;
"Mod+1".action = focus-workspace 1;
"Mod+2".action = focus-workspace 2;
"Mod+3".action = focus-workspace 3;
"Mod+4".action = focus-workspace 4;
"Mod+5".action = focus-workspace 5;
"Mod+6".action = focus-workspace 6;
"Mod+7".action = focus-workspace 7;
"Mod+8".action = focus-workspace 8;
"Mod+9".action = focus-workspace 9;
"Mod+0".action = focus-workspace 10;
"Mod+Shift+1".action.move-column-to-workspace = 1;
"Mod+Shift+2".action.move-column-to-workspace = 2;
"Mod+Shift+3".action.move-column-to-workspace = 3;
"Mod+Shift+4".action.move-column-to-workspace = 4;
"Mod+Shift+5".action.move-column-to-workspace = 5;
"Mod+Shift+6".action.move-column-to-workspace = 6;
"Mod+Shift+7".action.move-column-to-workspace = 7;
"Mod+Shift+8".action.move-column-to-workspace = 8;
"Mod+Shift+9".action.move-column-to-workspace = 9;
"Mod+Shift+0".action.move-column-to-workspace = 10;
"Mod+Left".action = focus-column-left;
"Mod+Right".action = focus-column-right;
"Mod+Up".action = focus-workspace-up;
"Mod+Down".action = focus-workspace-down;
"Mod+Shift+Left".action = move-column-left;
"Mod+Shift+Right".action = move-column-right;
"Mod+Shift+Up".action = move-column-to-workspace-up;
"Mod+Shift+Down".action = move-column-to-workspace-down;
"Mod+Ctrl+Left".action = focus-monitor-left;
"Mod+Ctrl+Right".action = focus-monitor-right;
"Mod+Shift+Ctrl+Left".action = move-column-to-monitor-left;
"Mod+Shift+Ctrl+Right".action = move-column-to-monitor-right;
"XF86AudioRaiseVolume".action = sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1+";
"XF86AudioLowerVolume".action = sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1-";
"XF86AudioMute".action = sh "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
"XF86MonBrightnessUp".action = sh "brightnessctl set 10%+";
"XF86MonBrightnessDown".action = sh "brightnessctl set 10%-";
#"Mod+Tab".action = focus-window-down-or-column-right;
#"Mod+Shift+Tab".action = focus-window-up-or-column-left;
"Mod+Tab".action = toggle-overview;
};
input = {
power-key-handling.enable = true;
focus-follows-mouse = {
#enable = true;
};
warp-mouse-to-focus.enable = true;
keyboard = {
xkb.layout = "us, ru, de";
xkb.options = "grp:lctrl_toggle, ctrl:nocaps";
track-layout = "window";
numlock = true;
};
touchpad = {
tap = true;
#accel-profile = "adaptive";
click-method = "clickfinger";
};
};
cursor = {
hide-after-inactive-ms = 10000;
};
gestures.hot-corners.enable = true;
prefer-no-csd = true;
environment = {
XDG_SESSION_TYPE = "wayland";
__GL_GSYNC_ALLOWED = "1";
QT_QPA_PLATFORM = "wayland";
DISPLAY = ":0";
};
layer-rules = [
{
#this is for later to place keyboard on top of hyprlock
matches = [{namespace = "wvkbd";}];
}
];
window-rules = [
{
#active
matches = [
{
is-active = true;
}
];
opacity = 1.0;
}
{
#inactive
matches = [
{
is-active = false;
}
];
opacity = 1.0;
}
{
#opaque
matches = [
{
app-id = "emacs";
}
{
app-id = "blender";
}
];
opacity = 1.0;
}
{
#Popups
matches = [
{
title = "emacs-run-launcher";
}
{
title = "Paradox Crash Reporter";
}
];
open-floating = true;
open-focused = true;
}
{
#PiP
matches = [
{
title = "Picture-in-Picture";
}
];
open-floating = true;
open-focused = false;
opacity = 1.0;
default-floating-position = {
x = 0;
y = 0;
relative-to = "top-right";
};
}
];
xwayland-satellite = {
enable = true;
path = "${lib.getExe pkgs.xwayland-satellite-unstable}";
};
};
};
services.hypridle = let
niri = lib.getExe config.programs.niri.package;
loginctl = "${pkgs.systemd}/bin/loginctl";
pidof = "${pkgs.procps}/bin/pidof";
locking-script = "${pidof} hyprlock || ${lib.getExe pkgs.hyprlock}";
systemctl = "${pkgs.systemd}/bin/systemctl";
#locking-script = "${pkgs.swaylock}/bin/swaylock --daemonize";
#unlocking-script = "pkill -SIGUSR1 swaylock";
suspendScript = cmd:
pkgs.writeShellScript "suspend-script" ''
# check if any player has status "Playing"
${lib.getExe pkgs.playerctl} -a status | ${lib.getExe pkgs.ripgrep} Playing -q
# only suspend if nothing is playing
if [ $? == 1 ]; then
${cmd}
fi
'';
in {
enable = true;
settings.general = {
before_sleep_cmd = "${pidof} hyprlock || ${loginctl} lock-session;#${niri} msg action power-off-monitors";
after_sleep_cmd = "#${niri} msg action power-on-monitors";
lock_cmd = "${locking-script}";
};
settings.listener = let
secondary = "${systemctl} suspend";
in
lib.mkIf (osConfig.custom.hardware.battery.enable) [
#{
# timeout = 30;
# command = "pidof hyprlock && ${secondary}";
#}
{
timeout = 870;
on-timeout = "${suspendScript ''${pkgs.libnotify}/bin/notify-send "You are idle. Going to sleep in 30 seconds"''}";
}
{
timeout = 900;
on-timeout = "${suspendScript "${systemctl} suspend"}";
}
];
};
services = {
mako = {
enable = false;
settings = {
};
};
};
systemd.user.services.lisgd-niri = lib.mkIf (osConfig.custom.hardware.framework12.enable) {
Unit = {
Description = "Makes sure that you have touchscreen gestures.";
};
Install = {
WantedBy = ["default.target"];
};
Service = {
ExecStart = "${pkgs.writeShellScript "run-lisgd" ''
${pkgs.custom.lisgd-kylekrein}/bin/lisgd
''}";
Restart = "on-failure";
RestartSec = 5;
};
};
systemd.user.services.autorotate-niri = lib.mkIf (osConfig.custom.hardware.framework12.enable) {
Unit = {
Description = "Adds auto rotation to Niri.";
};
Install = {
WantedBy = ["default.target"];
};
Service = {
ExecStart = "${pkgs.writeShellScript "autorotate" ''
transform="normal"
monitor-sensor | while read -r line; do
case "$line" in
*normal*)
new_transform="normal"
;;
*right-up*)
new_transform="270"
;;
*bottom-up*)
new_transform="180"
;;
*left-up*)
new_transform="90"
;;
*)
continue
;;
esac
if [[ "$new_transform" != "$transform" ]]; then
transform="$new_transform"
echo "Transform: $transform"
niri msg output eDP-1 transform "$transform"
systemctl --user restart lisgd-niri.service
fi
done
''}";
Restart = "always";
RestartSec = 5;
};
};
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

View file

@ -0,0 +1,163 @@
{
pkgs,
lib,
osConfig,
...
}: let
battery = osConfig.custom.hardware.battery;
enable = osConfig.custom.windowManagers.niri.enable;
in {
programs.waybar = {
inherit enable;
systemd.enable = true;
style = ''
${builtins.readFile ./waybarstyle.css}'';
settings = [
{
height = 36;
layer = "top";
position = "top";
tray = {spacing = 3;};
modules-center = [
"clock"
];
modules-left = [
"custom/drawer"
"wlr/taskbar"
"niri/workspaces"
"niri/window"
];
modules-right =
[
"backlight"
"pulseaudio"
#"network"
#"cpu"
"memory"
#"temperature"
"niri/language"
]
++ lib.optional battery.enable "custom/battery"
++ [
"tray"
"custom/notification"
"custom/power"
];
battery = lib.mkIf battery.enable {
format = " {time} {icon} ";
format-alt = " {capacity}% {icon} ";
format-charging = " {capacity}% ";
format-icons = ["" "" "" "" ""];
format-plugged = " {capacity}% ";
states = {
critical = 10;
warning = 20;
};
};
backlight = {
format = "{percent}% 󰛩";
on-scroll-up = "${pkgs.brightnessctl}/bin/brightnessctl s 5%+";
on-scroll-down = "${pkgs.brightnessctl}/bin/brightnessctl s 5%-";
};
"custom/battery" = {
exec = "${pkgs.writeShellScriptBin "battery-widget" ''
${battery.scripts.labelAdaptive}
${battery.scripts.labelPercent}
''}/bin/battery-widget";
interval = 20;
tooltip = true;
};
clock = {
format = "{:%a %d | %H:%M}";
format-alt = "{:%d.%m.%Y}";
tooltip-format = "{:%d.%m.%Y | %H:%M}";
};
cpu = {
format = "{usage}% ";
tooltip = false;
};
"custom/drawer" = {
format = "<span foreground='white'>󱄅</span>";
tooltip = false;
on-click = ''nwg-drawer -fm "dolphin" -closebtn "right" -nocats -term "kitty" -ovl -wm "niri" -s "${./drawerstyle.css}" '';
};
"niri/language" = {
format = "{}";
format-en = "EN";
format-ru = "RU";
format-de = "DE";
on-click = "niri msg action switch-layout next";
on-click-right = "niri msg action switch-layout prev";
};
"wlr/taskbar" = {
format = "{icon}";
icon-size = 18;
tooltip-format = "{title}";
on-click = "activate";
on-click-middle = "close";
};
memory = {
interval = 1;
format = " {used}/{total}Gb";
};
network = {
interval = 1;
format-alt = "{ifname}: {ipaddr}/{cidr}";
format-disconnected = "Disconnected ";
format-ethernet = "{ifname}: {ipaddr}/{cidr} up: {bandwidthUpBits} down: {bandwidthDownBits}";
format-linked = "{ifname} (No IP) ";
#format-wifi = "{signalStrength}% ";
format-wifi = "{signalStrength}% ";
tooltip-format = "{essid} ({signalStrength}%) ";
};
pulseaudio = {
format = "{icon} {volume}% {format_source}";
format-bluetooth = "{icon} {volume}% {format_source}";
format-bluetooth-muted = " {format_source}";
format-icons = {
car = "";
default = [" " " " " "];
handsfree = "";
headphones = "";
headset = "";
phone = "";
portable = "";
};
format-muted = " {format_source}";
format-source = " {volume}%";
format-source-muted = " ";
on-click = "${pkgs.pwvucontrol}/bin/pwvucontrol";
};
"hyprland/submap" = {format = ''<span style="italic">{}</span>'';};
temperature = {
critical-threshold = 80;
format = "{temperatureC}°C {icon}";
format-icons = ["" "" ""];
};
"custom/power" = {
format = "";
tooltip = false;
on-click = "wlogout";
};
"custom/notification" = {
tooltip = false;
format = "{icon}";
format-icons = {
notification = "<span foreground='red'></span>";
none = "";
dnd-notification = "<span foreground='red'></span>";
dnd-none = "";
};
return-type = "json";
exec-if = "which swaync-client";
exec = "swaync-client -swb";
on-click = "sleep 0.1 && swaync-client -t -sw";
on-click-right = "sleep 0.1 && swaync-client -d -sw";
escape = true;
};
}
];
};
}

View file

@ -0,0 +1,104 @@
* {
border: none;
font-family: Font Awesome, Roboto, Arial, sans-serif;
font-size: 16px;
color: #B9826A;
border-radius: 10px;
}
window {
font-weight: bold;
}
window#waybar {
background: transparent;
}
/*-----module groups----*/
.modules-right {
background-color: rgba(0,43,51,0.85);
margin: 2px 10px 0 0;
}
.modules-center {
background-color: rgba(0,43,51,0.85);
margin: 2px 0 0 0;
}
.modules-left {
margin: 2px 0 0 5px;
background-color: rgba(0,43,51,0.85);
}
/*-----modules indv----*/
#workspaces button {
padding: 1px 5px;
background-color: transparent;
}
#workspaces button:hover {
box-shadow: inherit;
background-color: rgba(0,153,153,1);
}
#workspaces button.focused {
background-color: rgba(0,119,179,0.6);
}
#clock,
#battery,
#cpu,
#memory,
#temperature,
#network,
#pulseaudio,
#custom-media,
#tray,
#mode,
#niri-language,
#language,
#custom-power,
#custom-menu,
#custom-battery,
#custom-notification,
#custom-drawer,
#backlight,
#workspaces,
#window,
#taskbar,
#idle_inhibitor {
margin: 0px 0px;
padding: 0px 5px;
border-right: 1px solid rgba(255,255,255,0.2);
border-radius: 0px;
}
#clock,
#custom-power,
#window {
border-right: none;
}
#custom-drawer {
font-size: 20px;
}
#custom-power,
#custom-drawer,
#custom-notification {
padding: 0px 0.5em 0px 0.3em;
}
#mode {
color: #cc3436;
font-weight: bold;
}
/*-----Indicators----*/
#idle_inhibitor.activated {
color: #2dcc36;
}
#pulseaudio.muted {
color: #cc3436;
}
#battery.charging {
color: #2dcc36;
}
#battery.warning:not(.charging) {
color: #e6e600;
}
#battery.critical:not(.charging) {
color: #cc3436;
}
#temperature.critical {
color: #cc3436;
}

View file

@ -0,0 +1,22 @@
{
lib,
pkgs,
config,
...
}:
# User information gathered by Snowfall Lib is available.
let
name = config.snowfallorg.user.name;
home = config.snowfallorg.user.home.directory;
in {
imports = lib.snowfall.fs.get-non-default-nix-files ./.;
home = {
packages = with pkgs; [
];
sessionVariables = {
};
stateVersion = "25.05";
};
}

View file

@ -1,51 +1,11 @@
{ {
lib, lib,
namespace, namespace,
inputs,
... ...
}: }:
with lib; rec { with lib; rec {
mkHomeManagerConfigOpt = config: mkHomeManagerConfigOpt = config: lib.${namespace}.mkOpt' types.anything {};
mkOption {
# HM-compatible options taken from:
# https://github.com/nix-community/home-manager/blob/0ee5ab611dc1fbb5180bd7d88d2aeb7841a4d179/nixos/common.nix#L14
# NOTE: This has been adapted to support documentation generation without
# having home-manager options fully declared.
type = types.submoduleWith {
specialArgs =
{
osConfig = config;
modulesPath = "${inputs.home-manager or "/"}/modules";
}
// (config.home-manager.extraSpecialArgs or {});
modules =
[
({
lib,
modulesPath,
...
}:
if inputs ? home-manager
then {
imports = import "${modulesPath}/modules.nix" {
inherit pkgs lib;
useNixpkgsModule = !(config.home-manager.useGlobalPkgs or false);
};
config = {
submoduleSupport.enable = true;
submoduleSupport.externalPackageInstall = config.home-manager.useUserPackages;
home.username = config.users.users.${name}.name;
home.homeDirectory = config.users.users.${name}.home;
nix.package = config.nix.package;
};
}
else {})
]
++ (config.home-manager.sharedModules or []);
};
};
mkUser = { mkUser = {
config, config,
@ -65,7 +25,7 @@ with lib; rec {
home = { home = {
enable = enable; enable = enable;
config = homeConfig; #config = homeConfig;
}; };
}; };
users.users.${username} = mkIf enable { users.users.${username} = mkIf enable {

View file

@ -0,0 +1,87 @@
{
lib,
osConfig,
pkgs,
inputs,
namespace,
system,
target,
format,
virtual,
systems,
config,
...
}:
with lib;
with lib.${namespace}; let
cfg = config.${namespace}.impermanence;
osCfg = osConfig.${namespace}.impermanence;
name = config.snowfallorg.user.name;
home = config.snowfallorg.user.home.directory;
in {
options.${namespace}.impermanence = with types; {
enable = mkBoolOpt osCfg.enable "Enable impermanence";
persistentStorage = mkOpt path "${osCfg.persistentStorage}${home}" "Actual persistent storage path";
};
imports = with inputs; [
impermanence.homeManagerModules.impermanence
];
config = mkIf cfg.enable {
home.persistence."${cfg.persistentStorage}" = {
directories = [
"Downloads"
"Music"
"Pictures"
"Documents"
"Videos"
"Apps"
"VMs"
"Git"
"nixos-config"
"blender"
".gnupg"
".password-store"
".ssh"
".emacs.d"
".local/share/keyrings"
".local/share/direnv"
".local/share/chat.fluffy.fluffychat"
".klei"
"Android"
{
directory = ".var/app";
method = "symlink";
}
{
directory = ".local/share/Steam";
method = "symlink";
}
".mozilla"
".librewolf"
".local/share/mcpelauncher"
".local/share/PrismLauncher"
".local/share/TelegramDesktop"
".local/share/Paradox Interactive"
".config/unity3d/Ludeon Studios/RimWorld by Ludeon Studios"
".config/solaar"
".config/eww"
".config/kdeconnect"
".config/blender"
".config/unity3d"
".config/Element"
".config/GIMP"
".cache/nix-index"
".local/share/aspyr-media"
".themes"
];
files = [
".screenrc"
".config/kdeglobals"
".config/Minecraft Linux Launcher/Minecraft Linux Launcher UI.conf"
];
allowOther = true;
};
};
}

View file

@ -0,0 +1,34 @@
{
lib,
pkgs,
inputs,
namespace,
system,
target,
format,
virtual,
systems,
config,
...
}:
with lib;
with lib.${namespace}; let
cfg = config.${namespace}.programs.bottles;
impermanence = config.${namespace}.impermanence;
in {
options.${namespace}.programs.bottles = with types; {
enable = mkBoolOpt false "Enable Bottles";
};
config = mkIf cfg.enable (mkIf impermanence.enable {
home.persistence."${impermanence.persistentStorage}".directories = [
{
directory = ".local/share/bottles";
method = "symlink";
}
];
}
// {
home.packages = with pkgs; [bottles];
});
}

View file

Before

Width:  |  Height:  |  Size: 78 KiB

After

Width:  |  Height:  |  Size: 78 KiB

Before After
Before After

View file

@ -0,0 +1,143 @@
{
lib,
pkgs,
inputs,
namespace,
system,
target,
format,
virtual,
systems,
config,
...
}:
with lib;
with lib.${namespace}; let
cfg = config.${namespace}.programs.librewolf;
lock-false = {
Value = false;
Status = "locked";
};
lock-true = {
Value = true;
Status = "locked";
};
in {
options.${namespace}.programs.librewolf = with types; {
enable = mkBoolOpt false "Enable librewolf with best settings";
};
config = mkIf cfg.enable {
programs = {
librewolf = {
enable = true;
languagePacks = ["de" "en-US" "ru"];
/*
---- POLICIES ----
*/
# Check about:policies#documentation for options.
policies = {
DisableTelemetry = true;
DisableFirefoxStudies = true;
EnableTrackingProtection = {
Value = true;
Locked = true;
Cryptomining = true;
Fingerprinting = true;
};
DisablePocket = true;
DisableFirefoxAccounts = true;
DisableAccounts = true;
DisableFirefoxScreenshots = true;
OverrideFirstRunPage = "";
OverridePostUpdatePage = "";
DontCheckDefaultBrowser = true;
DisplayBookmarksToolbar = "never"; # alternatives: "always" or "newtab"
DisplayMenuBar = "default-off"; # alternatives: "always", "never" or "default-on"
SearchBar = "unified"; # alternative: "separate"
OfferToSaveLogins = false;
OffertosaveloginsDefault = false;
PasswordManagerEnabled = false;
NoDefaultBookmarks = true;
/*
---- EXTENSIONS ----
*/
# Check about:support for extension/add-on ID strings.
# Valid strings for installation_mode are "allowed", "blocked",
# "force_installed" and "normal_installed".
#https://mozilla.github.io/policy-templates/#extensionsettings
ExtensionSettings = {
"*".installation_mode = "allowed"; # blocks all addons except the ones specified below
# uBlock Origin
"uBlock0@raymondhill.net" = {
install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi";
installation_mode = "force_installed";
};
# Privacy Badger:
"jid1-MnnxcxisBPnSXQ@jetpack" = {
install_url = "https://addons.mozilla.org/firefox/downloads/latest/privacy-badger17/latest.xpi";
installation_mode = "force_installed";
};
# Dark Reader
"addon@darkreader.org" = {
install_url = "https://addons.mozilla.org/firefox/downloads/latest/darkreader/latest.xpi";
installation_mode = "force_installed";
};
#auto tab discard
"{c2c003ee-bd69-42a2-b0e9-6f34222cb046}" = {
install_url = "https://addons.mozilla.org/firefox/downloads/latest/auto-tab-discard/latest.xpi";
installation_mode = "force_installed";
};
# global speed
"{f4961478-ac79-4a18-87e9-d2fb8c0442c4}" = {
install_url = "https://addons.mozilla.org/firefox/downloads/latest/global-speed/latest.xpi";
installation_mode = "force_installed";
};
# sponsorblock
"sponsorBlocker@ajay.app" = {
install_url = "https://addons.mozilla.org/firefox/downloads/latest/sponsorblock/latest.xpi";
installation_mode = "force_installed";
};
# Adguard adblocker
"adguardadblocker@adguard.com" = {
install_url = "https://addons.mozilla.org/firefox/downloads/latest/adguard-adblocker/latest.xpi";
installation_mode = "force_installed";
};
};
/*
---- PREFERENCES ----
*/
# Check about:config for options.
Preferences = {
"browser.contentblocking.category" = {
Value = "strict";
Status = "locked";
};
"extensions.pocket.enabled" = lock-false;
"extensions.screenshots.disabled" = lock-true;
"browser.startup.page" = 3; # restore session on startup
"browser.topsites.contile.enabled" = lock-false;
"browser.formfill.enable" = lock-false;
"browser.search.suggest.enabled" = lock-false;
"browser.search.suggest.enabled.private" = lock-false;
"browser.urlbar.suggest.searches" = lock-false;
"browser.urlbar.showSearchSuggestionsFirst" = lock-false;
"browser.newtabpage.activity-stream.feeds.section.topstories" = lock-false;
"browser.newtabpage.activity-stream.feeds.snippets" = lock-false;
"browser.newtabpage.activity-stream.section.highlights.includePocket" = lock-false;
"browser.newtabpage.activity-stream.section.highlights.includeBookmarks" = lock-false;
"browser.newtabpage.activity-stream.section.highlights.includeDownloads" = lock-false;
"browser.newtabpage.activity-stream.section.highlights.includeVisited" = lock-false;
"browser.newtabpage.activity-stream.showSponsored" = lock-false;
"browser.newtabpage.activity-stream.system.showSponsored" = lock-false;
"browser.newtabpage.activity-stream.showSponsoredTopSites" = lock-false;
};
};
};
};
};
}

View file

@ -0,0 +1,34 @@
{
lib,
pkgs,
inputs,
namespace,
system,
target,
format,
virtual,
systems,
config,
...
}:
with lib;
with lib.${namespace}; let
cfg = config.${namespace}.programs.prismlauncher;
impermanence = config.${namespace}.impermanence;
in {
options.${namespace}.programs.prismlauncher = with types; {
enable = mkBoolOpt false "Enable prismlauncher";
};
config = mkIf cfg.enable (mkIf impermanence.enable {
home.persistence."${impermanence.persistentStorage}".directories = [
{
directory = ".local/share/Prismlauncher";
method = "symlink";
}
];
}
// {
home.packages = with pkgs; [prismlauncher];
});
}

View file

@ -0,0 +1,88 @@
{
config,
namespace,
pkgs,
...
}: let
cfg = config.${namespace}.hardware.battery;
battery-path = "/sys/class/power_supply/${cfg.batteryName}";
get-battery-level = "${pkgs.writeShellScriptBin "get-battery-level" ''
cat ${battery-path}/capacity 2>/dev/null || echo "N/A"
''}/bin/get-battery-level";
get-status = "${pkgs.writeShellScriptBin "get-status" ''
cat ${battery-path}/status 2>/dev/null || echo "Unknown"
''}/bin/get-status";
get-icon = "${pkgs.writeShellScriptBin "get-icon" ''
BATTERY_LEVEL=$(${get-battery-level})
STATUS=$(${get-status})
if [[ "$BATTERY_LEVEL" == "N/A" ]]; then
ICON="󰂑 "
elif [[ "$STATUS" == "Charging" ]]; then
if [[ $BATTERY_LEVEL -ge 90 ]]; then
ICON="󰂋 "
elif [[ $BATTERY_LEVEL -ge 80 ]]; then
ICON="󰂊 "
elif [[ $BATTERY_LEVEL -ge 70 ]]; then
ICON="󰢞 "
elif [[ $BATTERY_LEVEL -ge 60 ]]; then
ICON="󰂉 "
elif [[ $BATTERY_LEVEL -ge 50 ]]; then
ICON="󰢝 "
elif [[ $BATTERY_LEVEL -ge 40 ]]; then
ICON="󰂈 "
elif [[ $BATTERY_LEVEL -ge 30 ]]; then
ICON="󰂇 "
elif [[ $BATTERY_LEVEL -ge 20 ]]; then
ICON="󰂆 "
elif [[ $BATTERY_LEVEL -ge 10 ]]; then
ICON="󰢜 "
else
ICON="󰢜 "
fi
else
if [[ $BATTERY_LEVEL -ge 90 ]]; then
ICON="󰂂 "
elif [[ $BATTERY_LEVEL -ge 70 ]]; then
ICON="󰂀 "
elif [[ $BATTERY_LEVEL -ge 50 ]]; then
ICON="󰁾 "
elif [[ $BATTERY_LEVEL -ge 30 ]]; then
ICON="󰁼 "
elif [[ $BATTERY_LEVEL -ge 10 ]]; then
ICON="󰁺 "
else
ICON="󰁺 "
fi
fi
echo "$ICON"
''}/bin/get-icon";
get-remaining-time = "${pkgs.writeShellScriptBin "get-remaining-time" ''
REMAINING_ENERGY=$(cat ${battery-path}/${cfg.remainingEnergy})
POWER_USAGE=$(cat ${battery-path}/${cfg.powerUsage})
if [[ -n "$REMAINING_ENERGY" && -n "$POWER_USAGE" && "$POWER_USAGE" -ne 0 ]]; then
TIME_LEFT=$(((REMAINING_ENERGY / POWER_USAGE)))
MINUTES_LEFT=$(((( (REMAINING_ENERGY * 60) / POWER_USAGE )) - (TIME_LEFT * 60)))
echo "$TIME_LEFT h $MINUTES_LEFT min"
else
echo ""
fi
''}/bin/get-remaining-time";
in {
${namespace}.hardware.battery.scripts = {
icon = get-icon;
status = get-status;
time = get-remaining-time;
level = get-battery-level;
labelAdaptive = "${pkgs.writeShellScriptBin "labelAdaptive" ''
if [[ "$(${get-status})" == "Charging" ]]; then
echo "$(${get-battery-level})% $(${get-icon})"
else
echo "$(${get-remaining-time}) $(${get-icon})"
fi
''}/bin/labelAdaptive";
labelPercent = "${pkgs.writeShellScriptBin "labelPercent" ''
echo "$(${get-battery-level})% $(${get-icon})"
''}/bin/labelPercent";
};
}

View file

@ -0,0 +1,38 @@
{
lib,
pkgs,
namespace,
config,
...
}:
with lib;
with lib.${namespace}; let
cfg = config.${namespace}.hardware.battery;
in {
options.${namespace}.hardware.battery = with types; {
enable = mkBoolOpt false "If you have a battery in your hardware, enable this";
batteryName = mkOpt str "BAT1" ''
Put your battery name here. You can find it at "/sys/class/power_supply/"
'';
remainingEnergy = mkOpt str "charge_now" ''
File in your battery, that tells the current amount of energy
'';
powerUsage = mkOpt str "current_now" ''
File in your battery, that tells, how much energy your hardware is using
'';
scripts = {
icon = mkOpt' str "";
status = mkOpt' str "";
time = mkOpt' str "";
level = mkOpt' str "";
labelAdaptive = mkOpt' str "";
labelPercent = mkOpt' str "";
};
};
config = mkIf cfg.enable (import ./batteryStatus.nix {
inherit config;
inherit namespace;
inherit pkgs;
});
}

View file

@ -47,7 +47,6 @@ in {
with pkgs.${namespace}; [ with pkgs.${namespace}; [
libreoffice libreoffice
root-files root-files
pass
gparted gparted
qdirstat qdirstat
exfatprogs exfatprogs
@ -65,14 +64,6 @@ in {
#kde #kde
kdePackages.gwenview kdePackages.gwenview
kdePackages.ark kdePackages.ark
# user packages
obs-studio
neovim
localsend
gdb
element-desktop
]; ];
programs.kdeconnect.enable = true; programs.kdeconnect.enable = true;
programs.kdeconnect.package = lib.mkDefault pkgs.kdePackages.kdeconnect-kde; programs.kdeconnect.package = lib.mkDefault pkgs.kdePackages.kdeconnect-kde;

View file

@ -0,0 +1,37 @@
{
lib,
pkgs,
inputs,
namespace,
system,
target,
format,
virtual,
systems,
config,
...
}:
with lib;
with lib.${namespace}; let
username = "tania";
admin = false;
extraGroups = ["networkmanager" "touchscreen"];
trustedSshKeys = [];
cfg = config.${namespace}.users.${username};
in {
options.${namespace}.users.${username} = with types; {
enable = mkBoolOpt false "Enable ${username} user";
config = mkHomeManagerConfigOpt config;
};
config = mkUser {
inherit config;
inherit (cfg) enable;
homeConfig = cfg.config;
inherit username;
inherit admin;
inherit extraGroups;
inherit trustedSshKeys;
};
}

View file

@ -20,7 +20,10 @@ in {
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
${namespace}.loginManagers.sddm.enable = mkDefault true; ${namespace} = {
loginManagers.sddm.enable = mkDefault true;
programs.dolphin.enable = mkDefault true;
};
security.pam.services.hyprlock = {}; security.pam.services.hyprlock = {};
programs.niri = { programs.niri = {
enable = true; enable = true;

View file

@ -4,7 +4,7 @@
userName = "Aleksandr Lebedev"; userName = "Aleksandr Lebedev";
userEmail = "alex.lebedev2003@icloud.com"; userEmail = "alex.lebedev2003@icloud.com";
extraConfig = { extraConfig = {
credential.helper = "manager"; #"${pkgs.git.override { withLibsecret = true; }}/bin/git-credential-libsecret"; credential.helper = "manager";
credential."https://github.com".username = "KyleKrein"; credential."https://github.com".username = "KyleKrein";
credential.credentialStore = "plaintext"; credential.credentialStore = "plaintext";
}; };

View file

@ -0,0 +1,19 @@
{
# Channels are named after NixPkgs instances in your flake inputs. For example,
# with the input `nixpkgs` there will be a channel available at `channels.nixpkgs`.
# These channels are system-specific instances of NixPkgs that can be used to quickly
# pull packages into your overlay.
channels,
inputs,
...
}: final: prev: {
nix-schemas = inputs.nix-schemas.packages.${prev.system}.nix.overrideAttrs (old: {
doCheck = false;
doInstallCheck = false;
postInstall =
old.postInstall or ""
+ ''
mv $out/bin/nix $out/bin/nix-schemas
'';
});
}

View file

@ -0,0 +1,6 @@
{lisgd}:
(lisgd.overrideAttrs
(final: prev: {
pname = "lisgd-kylekrein";
name = "lisgd-kylekrein";
})).override {conf = ./lisgd-config.h;}

View file

@ -0,0 +1,56 @@
/*
distancethreshold: Minimum cutoff for a gestures to take effect
degreesleniency: Offset degrees within which gesture is recognized (max=45)
timeoutms: Maximum duration for a gesture to take place in miliseconds
orientation: Number of 90 degree turns to shift gestures by
verbose: 1=enabled, 0=disabled; helpful for debugging
device: Path to the /dev/ filesystem device events should be read from
gestures: Array of gestures; binds num of fingers / gesturetypes to commands
Supported gestures: SwipeLR, SwipeRL, SwipeDU, SwipeUD,
SwipeDLUR, SwipeURDL, SwipeDRUL, SwipeULDR
*/
unsigned int distancethreshold = 125;
unsigned int distancethreshold_pressed = 60;
unsigned int degreesleniency = 15;
unsigned int timeoutms = 800;
unsigned int orientation = 0;
unsigned int verbose = 1;
double edgesizeleft = 50.0;
double edgesizetop = 50.0;
double edgesizeright = 50.0;
double edgesizebottom = 50.0;
double edgessizecaling = 1.0;
char *device = "/dev/touchscreen";
// Gestures can also be specified interactively from the command line using -g
Gesture gestures[] = {
{1, SwipeRL, EdgeRight, DistanceAny, ActModeReleased,
"niri msg action focus-column-right"},
{1, SwipeLR, EdgeLeft, DistanceAny, ActModeReleased,
"niri msg action focus-column-left"},
{1, SwipeDU, CornerBottomRight, DistanceMedium, ActModeReleased,
"niri msg action focus-workspace-down"},
{1, SwipeUD, CornerTopRight, DistanceMedium, ActModeReleased,
"niri msg action focus-workspace-up"},
{1, SwipeDU, CornerBottomLeft, DistanceShort, ActModeReleased,
"niri msg action switch-preset-column-width"},
//{1, SwipeUD, EdgeTop, DistanceAny, ActModeReleased, "nwggrid -o 0.98"},
//"pkill -SIGRTMIN -f wvkbd"},
//{2, SwipeUD, EdgeAny, DistanceAny, ActModeReleased,
//"sway-interactive-screenshot -s focused-output"},
//{3, SwipeLR, EdgeAny, DistanceAny, ActModeReleased,
//"swaymsg layout tabbed"},
//{3, SwipeRL, EdgeAny, DistanceAny, ActModeReleased,
//"swaymsg layout toggle split"},
{2, SwipeUD, EdgeLeft, DistanceShort, ActModePressed,
"niri msg action fullscreen-window"},
{2, SwipeUD, EdgeRight, DistanceMedium, ActModeReleased,
"niri msg action close-window"},
{2, SwipeDU, EdgeBottom, DistanceAny, ActModeReleased,
"pkill -34 -f wvkbd"},
//{2, SwipeUD, EdgeBottom, DistanceAny, ActModeReleased,
//"pkill -9 -f wvkbd-mobintl"},
{3, SwipeDU, EdgeAny, DistanceAny, ActModeReleased,
"niri msg action toggle-overview"},
};

View file

@ -0,0 +1,21 @@
{
wvkbd,
fetchFromGitHub,
lib,
}: let
smithay-patch = ./wvkbd-smithay.patch; #https://github.com/jjsullivan5196/wvkbd/issues/70
in
wvkbd.overrideAttrs (final: prev: {
pname = "wvkbd-kylekrein";
name = "wvkbd-kylekrein";
version = "0.17";
src = fetchFromGitHub {
owner = "Paulicat";
repo = "wvkbd";
rev = "ac02545ab6f6ccfa5b6f132414021ba57ea73096";
hash = "sha256-py/IqNEEaTOx/9W935Vc47WoNFz99+bNaYD0sL//JmY=";
};
installFlags = prev.installFlags ++ ["LAYOUT=vistath"];
patches = prev.patches or [] ++ [smithay-patch];
meta.mainProgram = "wvkbd";
})

View file

@ -0,0 +1,27 @@
From 764c39633aa4bb8b94463dd19961bb4e9c78be26 Mon Sep 17 00:00:00 2001
From: Maarten van Gompel <proycon@anaproy.nl>
Date: Sun, 31 Mar 2024 13:57:24 +0200
Subject: [PATCH] debug: include trailing \0 byte in call to
zwp_virtual_keyboard_v1.keymap()
Ref: https://github.com/jjsullivan5196/wvkbd/issues/70
---
keyboard.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/keyboard.c b/keyboard.c
index afe0639..cd9a11e 100644
--- a/keyboard.c
+++ b/keyboard.c
@@ -678,7 +678,7 @@ create_and_upload_keymap(struct kbd *kb, const char *name, uint32_t comp_unichr,
size_t keymap_size = strlen(keymap_template) + 64;
char *keymap_str = malloc(keymap_size);
sprintf(keymap_str, keymap_template, comp_unichr, comp_shift_unichr);
- keymap_size = strlen(keymap_str);
+ keymap_size = strlen(keymap_str) + 1;
int keymap_fd = os_create_anonymous_file(keymap_size);
if (keymap_fd < 0) {
die("could not create keymap fd\n");
--
2.49.0

View file

@ -13,6 +13,10 @@
}: }:
with lib; with lib;
with lib.${namespace}; { with lib.${namespace}; {
facter.reportPath = ./facter.json;
systemd.network.wait-online.enable = lib.mkForce false; #facter
custom.hardware.nvidia = enabled;
boot.kernelPackages = lib.mkForce pkgs.linuxPackages_cachyos; boot.kernelPackages = lib.mkForce pkgs.linuxPackages_cachyos;
services.scx.enable = true; # by default uses scx_rustland scheduler services.scx.enable = true; # by default uses scx_rustland scheduler
custom.impermanence = enabled; custom.impermanence = enabled;
@ -31,11 +35,29 @@ with lib.${namespace}; {
}; };
custom.users = { custom.users = {
kylekrein = enabled; tania = enabled;
kylekrein = {
enable = true;
};
};
snowfallorg.users.kylekrein.home.config = {
programs.niri.settings.outputs = {
"DP-1" = {
scale = 1.6;
position.x = 1600;
position.y = 0;
};
"DP-3" = {
scale = 1.6;
position.x = 0;
position.y = 0;
};
};
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
blender blender
nix-schemas
]; ];
services.zerotierone = { services.zerotierone = {

File diff suppressed because it is too large Load diff

View file

@ -9,6 +9,7 @@ let
name = config.snowfallorg.user.name; name = config.snowfallorg.user.name;
home = config.snowfallorg.user.home.directory; home = config.snowfallorg.user.home.directory;
in { in {
imports = lib.snowfall.fs.get-non-default-nix-files ./.;
home = { home = {
packages = with pkgs; [ packages = with pkgs; [
librewolf librewolf

View file

@ -1,3 +1,15 @@
channels: (final: prev: { {
package = prev.package.override {}; # Channels are named after NixPkgs instances in your flake inputs. For example,
}) # with the input `nixpkgs` there will be a channel available at `channels.nixpkgs`.
# These channels are system-specific instances of NixPkgs that can be used to quickly
# pull packages into your overlay.
channels,
namespace,
inputs,
...
}: final: prev: {
# For example, to pull a package from unstable NixPkgs
inherit (channels.unstable) chromium;
my-package = inputs.my-input.packages.${prev.system}.my-package;
}

View file

@ -11,27 +11,7 @@
config, config,
... ...
}: { }: {
imports = [./hardware-configuration.nix]; facter.reportPath = ./facter.json;
# Enable Bootloader (EFI or BIOS)
#system.boot.efi.enable = true;
#system.boot.bios.enable = true;
# Better battery life on laptops
# system.battery.enable = true;
# suites.desktop.enable = true;
# suites.development.enable = true;
# suites.server.enable = true;
# Nvidia Drivers
# hardware.nvidia.enable = true;
# Add packages (custom for ones in these dotfiles)
# environment.systemPackages = with pkgs; [
# ${namespace}.package
# ];
# ======================== DO NOT CHANGE THIS ======================== # ======================== DO NOT CHANGE THIS ========================
system.stateVersion = "25.05"; system.stateVersion = "25.05";