cnfgs
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
{
|
||||
imports = [
|
||||
./modules/zsh/zsh.nix
|
||||
/.modules/openai.nix
|
||||
./modules/openai.nix
|
||||
./modules/kitty.nix
|
||||
./modules/git.nix
|
||||
./modules/programs.nix
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
|
||||
exec-once = [
|
||||
"caelestia shell &"
|
||||
"caelestia shell lock lock; until [ $? -eq 0 ]; do sleep 0.1; caelestia shell lock lock; done"
|
||||
#"caelestia shell lock lock; until [ $? -eq 0 ]; do sleep 0.1; caelestia shell lock lock; done"
|
||||
"AmneziaVPN & disown"
|
||||
# "hyprlock --immediate-render --no-fade-in &"
|
||||
"wal -R &"
|
||||
|
||||
@@ -42,8 +42,8 @@ def check_setup() -> None:
|
||||
for prog in ["swww", "hyprpanel", "wal"]:
|
||||
try:
|
||||
subprocess.run([prog, "--version"], capture_output=True)
|
||||
except FileNotFoundError:
|
||||
print(f"Note: Optional program '{prog}' not found in PATH.")
|
||||
except Exception as e:
|
||||
print(f"{e}")
|
||||
|
||||
wallpaper_dir = pathlib.Path(WALLPAPERS_DIR)
|
||||
if not wallpaper_dir.is_dir():
|
||||
@@ -324,11 +324,12 @@ def next_wallpaper(
|
||||
except FileNotFoundError:
|
||||
pass
|
||||
try:
|
||||
subprocess.run(["hyprpanel", "-q"], check=False)
|
||||
# subprocess.run(["hyprpanel", "-q"], check=False)
|
||||
# restart in background
|
||||
subprocess.Popen(
|
||||
["hyprpanel"], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL
|
||||
)
|
||||
# subprocess.Popen(
|
||||
# ["hyprpanel"], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL
|
||||
# )
|
||||
pass
|
||||
except FileNotFoundError:
|
||||
pass
|
||||
try:
|
||||
|
||||
@@ -15,9 +15,17 @@
|
||||
scrollback_lines = 5000;
|
||||
mouse_hide_wait = 3.0;
|
||||
|
||||
background_opacity = "0.6";
|
||||
background_opacity = "0.3";
|
||||
#background_opacity = 0;
|
||||
dynamic_background_opacity = "yes";
|
||||
#backgroud_image = "/home/krosh/Pictures/kitty.jpg";
|
||||
#backgroud_image = "kitty.jpg";
|
||||
#backgroud_image = "/home/krosh/Pictures/wallpaper.png";
|
||||
background_blur = 5;
|
||||
#background_image_layout = "cscaled";
|
||||
#background_image_linear = "yes";
|
||||
background_tint = 0.8;
|
||||
#background_tint_gaps = 0.5;
|
||||
|
||||
confirm_os_window_close = 0;
|
||||
|
||||
@@ -26,7 +34,7 @@
|
||||
|
||||
keybindings = {
|
||||
"ctrl+shift+enter" = "new_window_with_cwd";
|
||||
"ctrl+c" = "copy_or_interrupt";
|
||||
"ctrl+c" = "copy_and_clear_or_interrupt";
|
||||
"ctrl+v" = "paste_from_clipboard";
|
||||
};
|
||||
|
||||
|
||||
@@ -6,5 +6,12 @@
|
||||
f() { llm "$@" | tee >(cat) | glow --style=dark --width=100; unset -f f; }; f'';
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [ python312Packages.llm glow ];
|
||||
home.packages = with pkgs; [
|
||||
# python312Packages.llm
|
||||
glow
|
||||
|
||||
(llm.withPlugins { llm-openai-plugin = true; })
|
||||
|
||||
];
|
||||
|
||||
}
|
||||
|
||||
@@ -27,6 +27,9 @@
|
||||
vlc
|
||||
# yubikey-manager-qt
|
||||
# paprefs
|
||||
|
||||
zed-editor
|
||||
ollama
|
||||
];
|
||||
|
||||
services.syncthing = { enable = true; };
|
||||
@@ -40,13 +43,13 @@
|
||||
imports = [ inputs.zen-browser.homeModules.default ];
|
||||
programs.zen-browser = { enable = true; };
|
||||
|
||||
xdg.mimeApps = let
|
||||
value = let
|
||||
system = pkgs.stdenv.hostPlatform.system;
|
||||
zen-browser = inputs.zen-browser.packages.${system}.default;
|
||||
in zen-browser.meta.desktopFileName;
|
||||
xdg.mimeApps =
|
||||
let
|
||||
value = "zen-beta.desktop";
|
||||
|
||||
associations = builtins.listToAttrs (map (name: { inherit name value; }) [
|
||||
associations = builtins.listToAttrs (map (name: {
|
||||
inherit name value;
|
||||
}) [
|
||||
"application/x-extension-shtml"
|
||||
"application/x-extension-xhtml"
|
||||
"application/x-extension-html"
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
matchBlocks = {
|
||||
"kr0sh.ru" = {
|
||||
host = "kr0sh.ru";
|
||||
port = 2006;
|
||||
user = "krosh";
|
||||
identityFile = [ "~/.ssh/id" ];
|
||||
};
|
||||
|
||||
@@ -80,6 +80,8 @@
|
||||
];
|
||||
};
|
||||
|
||||
sessionVariables = { EDITOR = "nvim"; };
|
||||
|
||||
shellAliases = {
|
||||
ll = "ls -lh";
|
||||
la = "ls -la";
|
||||
@@ -177,6 +179,7 @@
|
||||
|
||||
printf "--- Hi, %s! ---\n" "$USER"
|
||||
printf "Battery: %s%%\n" "$(cat /sys/class/power_supply/BAT0/capacity 2>/dev/null || echo "N/A")"
|
||||
printf "Time: %s\n" "$(date +"%H:%M:%S")"
|
||||
printf "Time you live: %s years :)\n" "$(python3 -c "from datetime import datetime; age_years = (datetime.now() - datetime(2006, 6, 16)).total_seconds() / (365.25 * 24 * 3600); print(f'{age_years:.10f}')")"
|
||||
|
||||
|
||||
|
||||
@@ -8,16 +8,32 @@
|
||||
swapDevices = [{
|
||||
device = "/swapfile";
|
||||
size = 16 * 1024;
|
||||
randomEncryption.enable = true;
|
||||
randomEncryption.enable = false;
|
||||
}];
|
||||
boot.resumeDevice = "/dev/nvme0n1p2";
|
||||
boot.kernel.sysctl."vm.swappiness" = 120;
|
||||
# systemd.oomd.enable = true;
|
||||
systemd.oomd = {
|
||||
enable = true;
|
||||
enableSystemSlice = true;
|
||||
enableUserSlices = true;
|
||||
};
|
||||
zramSwap.enable = true; # more ram in
|
||||
zramSwap.memoryPercent = 150;
|
||||
# boot.resumeDevice = "/dev/nvme0n1p2";
|
||||
|
||||
# -- tmp --
|
||||
|
||||
services.xserver.enable = false;
|
||||
services.displayManager.gdm.enable = false;
|
||||
services.getty.autologinUser = "krosh";
|
||||
services.getty.autologinOnce = true;
|
||||
#services.getty.autologinUser = "krosh";
|
||||
#services.getty.autologinOnce = true;
|
||||
services.getty = {
|
||||
autologinUser = "krosh";
|
||||
autologinOnce = true;
|
||||
greetingLine = "";
|
||||
helpLine = "";
|
||||
extraArgs = [ "--noissue" "--nohostname" "--nonewline" "--nohints" ];
|
||||
};
|
||||
|
||||
programs.zsh.enable = true;
|
||||
programs.zsh.loginShellInit = ''
|
||||
|
||||
@@ -10,11 +10,24 @@
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "sdhci_pci" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.initrd.systemd.enable = true;
|
||||
boot.initrd.luks.fido2Support = false;
|
||||
boot.initrd.luks.devices.cryptnixos.device = "/dev/disk/by-uuid/5a9c3975-0dad-4cb6-9998-3d443d81eae5";
|
||||
boot.initrd.luks.devices.cryptnixos.crypttabExtraOpts = [ "fido2-device=auto" ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
boot.kernelParams = [
|
||||
"quiet"
|
||||
"udev.log_level=3"
|
||||
"systemd.show_status=0"
|
||||
];
|
||||
boot.consoleLogLevel = 0;
|
||||
boot.initrd.verbose = false;
|
||||
#boot.initrd.stage1Greeting = "";
|
||||
#boot.stage2Greeting = "";
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/57528dff-a344-4f53-83e9-2959547fc44b";
|
||||
{ device = "/dev/mapper/cryptnixos";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@" ];
|
||||
};
|
||||
|
||||
+14
-4
@@ -13,7 +13,7 @@
|
||||
];
|
||||
};
|
||||
|
||||
consoleLogLevel = 3;
|
||||
consoleLogLevel = lib.mkDefault 3;
|
||||
initrd.verbose = false;
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
kernelParams = [
|
||||
@@ -25,9 +25,19 @@
|
||||
"kvm.enable_virt_at_load=0"
|
||||
];
|
||||
loader = {
|
||||
systemd-boot.enable = true;
|
||||
efi.canTouchEfiVariables = true;
|
||||
timeout = 0;
|
||||
grub = {
|
||||
enable = true;
|
||||
useOSProber = true;
|
||||
device = "nodev";
|
||||
timeoutStyle = "menu";
|
||||
efiSupport = true;
|
||||
};
|
||||
# systemd-boot.enable = true;
|
||||
efi = {
|
||||
canTouchEfiVariables = true;
|
||||
efiSysMountPoint = "/boot";
|
||||
};
|
||||
timeout = 5;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
# zramSwap.enable = true;
|
||||
services.btrfs.autoScrub.enable = true; # i can use not only btrfs
|
||||
services.btrfs.autoScrub.interval = "weekly";
|
||||
}
|
||||
|
||||
@@ -6,5 +6,12 @@
|
||||
networking.networkmanager.enable = true;
|
||||
networking.nameservers = [ "8.8.8.8" "1.1.1.1" ];
|
||||
networking.networkmanager.insertNameservers = [ "1.1.1.1" "8.8.8.8" ];
|
||||
networking.firewall.enable = lib.mkDefault false; # ! 🤡
|
||||
networking.firewall.enable = lib.mkDefault true;
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
22000 # syncthing
|
||||
];
|
||||
networking.firewall.allowedUDPPorts = [
|
||||
22000 # syncthing
|
||||
];
|
||||
networking.enableIPv6 = true;
|
||||
}
|
||||
|
||||
@@ -3,6 +3,19 @@
|
||||
# ! KROSH mention
|
||||
|
||||
{
|
||||
services.tailscale = {
|
||||
enable = true;
|
||||
# Enable tailscale at startup
|
||||
|
||||
# If you would like to use a preauthorized key
|
||||
#authKeyFile = "/run/secrets/tailscale_key";
|
||||
|
||||
};
|
||||
networking.firewall = {
|
||||
trustedInterfaces = [ "tailscale0" ];
|
||||
allowedUDPPorts = [ config.services.tailscale.port ];
|
||||
};
|
||||
|
||||
system.stateVersion = "25.11";
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
nix.gc = {
|
||||
@@ -36,6 +49,16 @@
|
||||
# adwaita-icon-theme
|
||||
hicolor-icon-theme
|
||||
# lomiri.suru-icon-theme
|
||||
|
||||
stdenv.cc.cc.lib
|
||||
|
||||
python312Packages.ipykernel
|
||||
python312Packages.jupyterlab
|
||||
python312Packages.numpy
|
||||
python312Packages.pycodestyle
|
||||
|
||||
fuse
|
||||
fuse3
|
||||
];
|
||||
|
||||
programs.nix-ld.enable = true;
|
||||
|
||||
Reference in New Issue
Block a user