Compare commits
No commits in common. "ccd462431af0669752af5e2d647b7a5448e53996" and "097e071ab1bb6084fe96e339668f0a7815437b6f" have entirely different histories.
ccd462431a
...
097e071ab1
@ -6,7 +6,6 @@
|
||||
config,
|
||||
pkgs,
|
||||
home-manager,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
@ -17,8 +16,6 @@
|
||||
#boot.loader.limine.secureBoot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
#programs.nix-ld = { enable = true; libraries = pkgs.steam-run.fhsenv.args.multiPkgs pkgs; }; # for dynamically links execs
|
||||
|
||||
# Enable networking
|
||||
#networking.networkmanager.enable = true;
|
||||
|
||||
@ -53,8 +50,6 @@
|
||||
"wheel"
|
||||
"adbusers" # adb
|
||||
"kvm" # virt
|
||||
"networkmanager"
|
||||
"lp" #printing
|
||||
];
|
||||
packages = with pkgs; [
|
||||
];
|
||||
@ -86,52 +81,11 @@
|
||||
keep-derivations = true
|
||||
'';
|
||||
gc.automatic = true;
|
||||
gc.randomizedDelaySec = "14m";
|
||||
gc.options = "--delete-older-than 10d";
|
||||
optimise.automatic = true;
|
||||
};
|
||||
|
||||
# unfree
|
||||
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
|
||||
# nvidia
|
||||
"nvidia-x11"
|
||||
"nvidia-settings"
|
||||
# cuda
|
||||
"cuda_cudart"
|
||||
"cuda_nvcc"
|
||||
"cuda_cccl"
|
||||
"libcublas"
|
||||
"cuda-merged"
|
||||
"cuda_cuobjdump"
|
||||
"cuda_gdb"
|
||||
"cuda_nvdisasm"
|
||||
"cuda_nvprune"
|
||||
"cuda_cupti"
|
||||
"cuda_cuxxfilt"
|
||||
"cuda_nvml_dev"
|
||||
"cuda_nvrtc"
|
||||
"cuda_nvtx"
|
||||
"cuda_profiler_api"
|
||||
"cuda_sanitizer_api"
|
||||
"libcufft"
|
||||
"libcurand"
|
||||
"libcusolver"
|
||||
"libnvjitlink"
|
||||
"libcusparse"
|
||||
"libnpp"
|
||||
# other
|
||||
"proton-authenticator"
|
||||
"obsidian"
|
||||
"via"
|
||||
"steam"
|
||||
"steam-unwrapped"
|
||||
"osu-lazer-bin"
|
||||
"corefonts"
|
||||
|
||||
"claude-code"
|
||||
|
||||
"brgenml1lpr"
|
||||
];
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
zsh
|
||||
@ -146,27 +100,6 @@
|
||||
usbutils # lsusb
|
||||
nmap
|
||||
tree
|
||||
p7zip
|
||||
inetutils # telnet
|
||||
wl-clipboard # clipboard for vim
|
||||
|
||||
# media
|
||||
yt-dlp
|
||||
exiftool
|
||||
mediainfo
|
||||
ffmpeg-full
|
||||
|
||||
# barcodes
|
||||
qrencode
|
||||
zbar
|
||||
barcode
|
||||
ghostscript
|
||||
|
||||
# documenation
|
||||
man-pages
|
||||
man-pages-posix
|
||||
];
|
||||
|
||||
# enable developer documenation
|
||||
documentation.dev.enable = true;
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
{ pkgs, inputs, ... }:
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
|
||||
@ -12,9 +12,10 @@
|
||||
services.xserver.enable = true;
|
||||
|
||||
# Enable the GNOME Desktop Environment.
|
||||
services.displayManager.gdm.enable = false; # use sddm until gnome 50 due to https://github.com/systemd/systemd/issues/39259
|
||||
services.displayManager.sddm.enable = true;
|
||||
services.displayManager.gdm.enable = true;
|
||||
services.desktopManager.gnome.enable = true;
|
||||
services.gnome.gnome-keyring.enable = true;
|
||||
security.pam.services.gdm.enableGnomeKeyring = true; #unlock PAM
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver.xkb = {
|
||||
@ -32,8 +33,21 @@
|
||||
nssmdns4 = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
services.tailscale.enable = true;
|
||||
services.printing.drivers = [ pkgs.brlaser pkgs.brgenml1lpr pkgs.brgenml1cupswrapper ];
|
||||
# services.printing.drivers = [ pkgs.brgenml1lpr pkgs.brgenml1cupswrapper ];
|
||||
# hardware.printers = {
|
||||
# ensurePrinters = [
|
||||
# {
|
||||
# name = "DCP-L8410CDWW";
|
||||
# location = "Home";
|
||||
# deviceUri = "http://192.168.0.177:631/ipp/print";
|
||||
# model = "drv:///cupsfilters.drv/pwgrast.ppd";
|
||||
# ppdOptions = {
|
||||
# PageSize = "A4";
|
||||
# };
|
||||
# }
|
||||
# ];
|
||||
# ensureDefaultPrinter = "DCP-L8410CDWW";
|
||||
# };
|
||||
|
||||
# Enable sound with pipewire.
|
||||
services.pulseaudio.enable = false;
|
||||
@ -46,10 +60,8 @@
|
||||
};
|
||||
|
||||
# Enable automatic login for the user.
|
||||
# services.displayManager.autoLogin.enable = true;
|
||||
# services.displayManager.autoLogin.user = "admin";
|
||||
# services.gnome.gnome-keyring.enable = true;
|
||||
# security.pam.services.gdm.enableGnomeKeyring = true; #unlock PAM
|
||||
services.displayManager.autoLogin.enable = true;
|
||||
services.displayManager.autoLogin.user = "admin";
|
||||
|
||||
# Workaround for GNOME autologin: https://github.com/NixOS/nixpkgs/issues/103746#issuecomment-945091229
|
||||
systemd.services."getty@tty1".enable = false;
|
||||
@ -65,9 +77,7 @@
|
||||
openFirewall = true;
|
||||
host = "0.0.0.0";
|
||||
# Optional: preload models, see https://ollama.com/library
|
||||
loadModels = [ "gemma3:4b-it-qat" ];
|
||||
package = pkgs.unstable.ollama;
|
||||
|
||||
loadModels = [ "deepseek-r1" ];
|
||||
};
|
||||
|
||||
hardware.keyboard.qmk.enable = true;
|
||||
@ -94,21 +104,10 @@
|
||||
yelp # help
|
||||
];
|
||||
|
||||
nixpkgs.overlays = [
|
||||
(final: _: {
|
||||
# this allows you to access `pkgs.unstable` anywhere in your config
|
||||
unstable = import inputs.nixpkgs-unstable {
|
||||
inherit (final.stdenv.hostPlatform) system;
|
||||
inherit (final) config;
|
||||
};
|
||||
})
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
audacity
|
||||
brave
|
||||
blender
|
||||
orca-slicer
|
||||
cura-appimage
|
||||
firefox
|
||||
gimp
|
||||
gnomeExtensions.appindicator
|
||||
@ -119,13 +118,10 @@
|
||||
kiwix
|
||||
libreoffice
|
||||
obs-studio
|
||||
obsidian
|
||||
unstable.proton-authenticator
|
||||
unstable.protonmail-desktop
|
||||
unstable.protonvpn-gui
|
||||
proton-authenticator
|
||||
protonmail-desktop
|
||||
prismlauncher
|
||||
unstable.signal-desktop
|
||||
freecad
|
||||
signal-desktop
|
||||
tor-browser
|
||||
wireshark
|
||||
monero-gui
|
||||
@ -137,11 +133,8 @@
|
||||
kdePackages.kdenlive
|
||||
easyeffects
|
||||
element-desktop
|
||||
p7zip
|
||||
chirp
|
||||
scrcpy
|
||||
|
||||
# AI?
|
||||
claude-code
|
||||
|
||||
# games
|
||||
heroic
|
||||
@ -157,8 +150,6 @@
|
||||
openttd
|
||||
xonotic
|
||||
osu-lazer-bin
|
||||
#ufoai
|
||||
#inputs.nix-citizen.packages.${system}.rsi-launcher
|
||||
|
||||
# game utils
|
||||
mangohud
|
||||
@ -167,15 +158,25 @@
|
||||
# emu
|
||||
ryubing
|
||||
xemu
|
||||
xenia-canary
|
||||
#retroarch-full
|
||||
rpcs3
|
||||
dolphin-emu
|
||||
cemu
|
||||
|
||||
# media
|
||||
yt-dlp
|
||||
exiftool
|
||||
mediainfo
|
||||
ffmpeg-full
|
||||
|
||||
# barcodes
|
||||
qrencode
|
||||
zbar
|
||||
barcode
|
||||
ghostscript
|
||||
|
||||
# backup
|
||||
keepassxc
|
||||
jdk
|
||||
];
|
||||
|
||||
fonts.packages = with pkgs; [
|
||||
@ -239,7 +240,7 @@
|
||||
"org.gnome.Nautilus.desktop"
|
||||
"brave-browser.desktop"
|
||||
"proton-mail.desktop"
|
||||
"obsidian.desktop"
|
||||
"joplin.desktop"
|
||||
"signal.desktop"
|
||||
"element-desktop.desktop"
|
||||
"steam.desktop"
|
||||
@ -288,7 +289,6 @@
|
||||
"org/gnome/shell/keybindings" = {
|
||||
show-screenshot-ui = ["<Shift><Super>s"];
|
||||
};
|
||||
#org.gnome.desktop.input-sources sources [('xkb', 'us'), ('xkb', 'dz+ar')]
|
||||
};
|
||||
}];
|
||||
};
|
||||
@ -332,10 +332,4 @@
|
||||
|
||||
services.flatpak.enable = true;
|
||||
|
||||
# programs.nix-ld = {
|
||||
# enable = true;
|
||||
# libraries = with pkgs; [
|
||||
# (pkgs.runCommand "steamrun-lib" {} "mkdir $out; ln -s ${pkgs.steam-run.fhsenv}/usr/lib64 $out/lib")
|
||||
# ];
|
||||
# };
|
||||
}
|
||||
|
||||
228
flake.lock
generated
228
flake.lock
generated
@ -24,11 +24,11 @@
|
||||
"cachyos-kernel": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1770052877,
|
||||
"narHash": "sha256-Ejj9F2obMjVoy0Jsugw6txHFaR9ziuErYIt58cIJqzE=",
|
||||
"lastModified": 1767984036,
|
||||
"narHash": "sha256-lcHdWENZAMakHEpjLRpi6DHPmqbUHji0TZTAsdyVIKA=",
|
||||
"owner": "CachyOS",
|
||||
"repo": "linux-cachyos",
|
||||
"rev": "1f8a79ffeac6f319a8c0fc3abad27a3ec7762abf",
|
||||
"rev": "46822116e738fbe7f1696d592761606fec514247",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -40,11 +40,11 @@
|
||||
"cachyos-kernel-patches": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1770051966,
|
||||
"narHash": "sha256-udCJTbUAEZm5zBrr4zVVjpBLQtCC/vQlkIOLnEGr5Ik=",
|
||||
"lastModified": 1768135201,
|
||||
"narHash": "sha256-cXF8TfRVMgdD0pxlWs5sknJRokqgwb4cunto3ycjWHk=",
|
||||
"owner": "CachyOS",
|
||||
"repo": "kernel-patches",
|
||||
"rev": "bfa4ff5231408610ffcc92898cd1e4c9bd55e452",
|
||||
"rev": "1378678080cdff989e935f374e4f9e92af720043",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -95,45 +95,6 @@
|
||||
"inputs": {
|
||||
"nixpkgs-lib": "nixpkgs-lib"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1769996383,
|
||||
"narHash": "sha256-AnYjnFWgS49RlqX7LrC4uA+sCCDBj0Ry/WOJ5XWAsa0=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "57928607ea566b5db3ad13af0e57e921e6b12381",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts_2": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"nix-citizen",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1768135262,
|
||||
"narHash": "sha256-PVvu7OqHBGWN16zSi6tEmPwwHQ4rLPU9Plvs8/1TUBY=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "80daad04eddbbf5a4d883996a73f3f542fa437ac",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts_3": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": "nixpkgs-lib_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1768135262,
|
||||
"narHash": "sha256-PVvu7OqHBGWN16zSi6tEmPwwHQ4rLPU9Plvs8/1TUBY=",
|
||||
@ -176,11 +137,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1769580047,
|
||||
"narHash": "sha256-tNqCP/+2+peAXXQ2V8RwsBkenlfWMERb+Uy6xmevyhM=",
|
||||
"lastModified": 1767910483,
|
||||
"narHash": "sha256-MOU5YdVu4DVwuT5ztXgQpPuRRBjSjUGIdUzOQr9iQOY=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "366d78c2856de6ab3411c15c1cb4fb4c2bf5c826",
|
||||
"rev": "82fb7dedaad83e5e279127a38ef410bcfac6d77c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -201,11 +162,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1770055712,
|
||||
"narHash": "sha256-VpbF4JDFPSW2crh0tP5EiegnuTkj3fACs0SLWDhlfPM=",
|
||||
"lastModified": 1768153598,
|
||||
"narHash": "sha256-ub5LZmQ6LEaV7k2pTlFXNc7BZj/rUooSR4hpUp3snYw=",
|
||||
"owner": "xddxdd",
|
||||
"repo": "nix-cachyos-kernel",
|
||||
"rev": "220dce3edcb81188ecb896382699884243d1c2e3",
|
||||
"rev": "8f448feca5af93c79fdd2187af392f692192b2f3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -215,79 +176,13 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-citizen": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts_2",
|
||||
"nix-gaming": "nix-gaming",
|
||||
"nix-github-actions": "nix-github-actions",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"systems": "systems_2",
|
||||
"treefmt-nix": "treefmt-nix"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1769832985,
|
||||
"narHash": "sha256-PKONM6JUGWviRsv3tZWj72HE0aeHKcHTrzTskj58MRM=",
|
||||
"owner": "LovingMelody",
|
||||
"repo": "nix-citizen",
|
||||
"rev": "47823c1ea4c53153dabd43f08b26f3c67c557542",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "LovingMelody",
|
||||
"repo": "nix-citizen",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-gaming": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts_3",
|
||||
"nixpkgs": [
|
||||
"nix-citizen",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1769653948,
|
||||
"narHash": "sha256-vOKkxlAREINxBVFzsj+8D3WZkoOPHLcjhweE0hDMwbg=",
|
||||
"owner": "fufexan",
|
||||
"repo": "nix-gaming",
|
||||
"rev": "60855f0c988b2b4b787f54ddda18a3af44134623",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "fufexan",
|
||||
"repo": "nix-gaming",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-github-actions": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nix-citizen",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1737420293,
|
||||
"narHash": "sha256-F1G5ifvqTpJq7fdkT34e/Jy9VCyzd5XfJ9TO8fHhJWE=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nix-github-actions",
|
||||
"rev": "f4158fa080ef4503c8f4c820967d946c2af31ec9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "nix-github-actions",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixos-hardware": {
|
||||
"locked": {
|
||||
"lastModified": 1769302137,
|
||||
"narHash": "sha256-QEDtctEkOsbx8nlFh4yqPEOtr4tif6KTqWwJ37IM2ds=",
|
||||
"lastModified": 1767185284,
|
||||
"narHash": "sha256-ljDBUDpD1Cg5n3mJI81Hz5qeZAwCGxon4kQW3Ho3+6Q=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixos-hardware",
|
||||
"rev": "a351494b0e35fd7c0b7a1aae82f0afddf4907aa8",
|
||||
"rev": "40b1a28dce561bea34858287fbb23052c3ee63fe",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -314,21 +209,6 @@
|
||||
}
|
||||
},
|
||||
"nixpkgs-lib": {
|
||||
"locked": {
|
||||
"lastModified": 1769909678,
|
||||
"narHash": "sha256-cBEymOf4/o3FD5AZnzC3J9hLbiZ+QDT/KDuyHXVJOpM=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs.lib",
|
||||
"rev": "72716169fe93074c333e8d0173151350670b824c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs.lib",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-lib_2": {
|
||||
"locked": {
|
||||
"lastModified": 1765674936,
|
||||
"narHash": "sha256-k00uTP4JNfmejrCLJOwdObYC9jHRrr/5M/a/8L2EIdo=",
|
||||
@ -343,45 +223,13 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1770107345,
|
||||
"narHash": "sha256-tbS0Ebx2PiA1FRW8mt8oejR0qMXmziJmPaU1d4kYY9g=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "4533d9293756b63904b7238acb84ac8fe4c8c2c4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1769461804,
|
||||
"narHash": "sha256-msG8SU5WsBUfVVa/9RPLaymvi5bI8edTavbIq3vRlhI=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "bfc1b8a4574108ceef22f02bafcf6611380c100d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1770056022,
|
||||
"narHash": "sha256-yvCz+Qmci1bVucXEyac3TdoSPMtjqVJmVy5wro6j/70=",
|
||||
"lastModified": 1768028080,
|
||||
"narHash": "sha256-50aDK+8eLvsLK39TzQhKNq50/HcXyP4hyxOYoPoVxjo=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "d04d8548aed39902419f14a8537006426dc1e4fa",
|
||||
"rev": "d03088749a110d52a4739348f39a63f84bb0be14",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -396,10 +244,8 @@
|
||||
"agenix": "agenix",
|
||||
"home-manager": "home-manager_2",
|
||||
"nix-cachyos-kernel": "nix-cachyos-kernel",
|
||||
"nix-citizen": "nix-citizen",
|
||||
"nixos-hardware": "nixos-hardware",
|
||||
"nixpkgs": "nixpkgs_3",
|
||||
"nixpkgs-unstable": "nixpkgs-unstable"
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
@ -416,42 +262,6 @@
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_2": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"treefmt-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nix-citizen",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1769515380,
|
||||
"narHash": "sha256-CWWK3PaQ7zhr+Jcf5zyaTR2cfRBXPo09H7+5nWApL8s=",
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"rev": "9911802c2822def2eec3d22e2cafd1619ede94a5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
|
||||
31
flake.nix
31
flake.nix
@ -4,23 +4,34 @@
|
||||
inputs = {
|
||||
agenix.url = "github:ryantm/agenix";
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
|
||||
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||
nixos-hardware.url = "github:nixos/nixos-hardware/master";
|
||||
home-manager.url = "github:nix-community/home-manager/release-25.11";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
nix-cachyos-kernel.url = "github:xddxdd/nix-cachyos-kernel/release";
|
||||
nix-cachyos-kernel.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
nix-citizen.url = "github:LovingMelody/nix-citizen";
|
||||
};
|
||||
|
||||
outputs =
|
||||
{ self, nixpkgs, home-manager, ... }@inputs:
|
||||
{
|
||||
self,
|
||||
nixpkgs,
|
||||
nixos-hardware,
|
||||
home-manager,
|
||||
agenix,
|
||||
nix-cachyos-kernel,
|
||||
}:
|
||||
{
|
||||
nixosConfigurations.desktop = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs;};
|
||||
#inherit system;
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
(
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
nixpkgs.overlays = [
|
||||
nix-cachyos-kernel.overlays.pinned
|
||||
];
|
||||
}
|
||||
)
|
||||
./config/common.nix
|
||||
./config/desktop.nix
|
||||
./hosts/desktop/hardware.nix
|
||||
@ -40,11 +51,15 @@
|
||||
};
|
||||
|
||||
nixosConfigurations.nixos-server = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs;};
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./config/common.nix
|
||||
./hosts/server/hardware.nix
|
||||
./hosts/server/settings.nix
|
||||
agenix.nixosModules.default
|
||||
{
|
||||
environment.systemPackages = [ agenix.packages.x86_64-linux.default ];
|
||||
}
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
@ -53,11 +68,11 @@
|
||||
imports = [
|
||||
./home/common.nix
|
||||
./home/podman.nix
|
||||
agenix.homeManagerModules.default
|
||||
];
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@ -1,6 +1,4 @@
|
||||
{ config, ...}:
|
||||
|
||||
{
|
||||
{
|
||||
home.sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
VISUAL = "nvim";
|
||||
@ -45,7 +43,7 @@
|
||||
historyLimit = 10000;
|
||||
mouse = true;
|
||||
extraConfig = ''
|
||||
set -s set-clipboard on
|
||||
|
||||
'';
|
||||
};
|
||||
|
||||
@ -56,14 +54,14 @@
|
||||
|
||||
zsh = {
|
||||
enable = true;
|
||||
dotDir = "${config.xdg.configHome}/zsh";
|
||||
dotDir = ".config/zsh";
|
||||
#enableCompletions = true;
|
||||
#autosuggestions.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
plugins = [ "git" ];
|
||||
theme = "daveverwer";
|
||||
theme = "robbyrussell";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@ -2,19 +2,12 @@
|
||||
|
||||
{
|
||||
programs = {
|
||||
# chromium = {
|
||||
# enable = true;
|
||||
# package = pkgs.brave;
|
||||
# commandLineArgs = [
|
||||
# #"--sync-url='http://192.168.0.30:8295/v2'"
|
||||
# ];
|
||||
# };
|
||||
|
||||
anki = {
|
||||
chromium = {
|
||||
enable = true;
|
||||
sync = {
|
||||
url = "http://192.168.0.30:27701";
|
||||
};
|
||||
package = pkgs.brave;
|
||||
commandLineArgs = [
|
||||
#"--sync-url='http://192.168.0.30:8295/v2'"
|
||||
];
|
||||
};
|
||||
|
||||
mpv = {
|
||||
@ -43,6 +36,11 @@
|
||||
r cycle_values video-rotate 90 180 270 0
|
||||
'';
|
||||
};
|
||||
|
||||
joplin-desktop = {
|
||||
enable = true;
|
||||
sync.target = "joplin-server";
|
||||
};
|
||||
};
|
||||
# add bookmarks for shared drives
|
||||
xdg.configFile."gtk-3.0/bookmarks" = {
|
||||
|
||||
733
home/podman.nix
733
home/podman.nix
File diff suppressed because it is too large
Load Diff
@ -8,7 +8,7 @@
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" "nvidia-uvm" ];
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
@ -30,11 +30,6 @@
|
||||
[ { device = "/dev/disk/by-uuid/be22d9db-283a-4dd9-93d5-1006e392724b"; }
|
||||
];
|
||||
|
||||
fileSystems."/run/media/admin/08cabc7a-9a6e-4c21-8a07-6663af77b705" =
|
||||
{ device = "/dev/disk/by-uuid/08cabc7a-9a6e-4c21-8a07-6663af77b705";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
|
||||
@ -1,19 +1,7 @@
|
||||
{ config, pkgs, inputs, ... }:
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
pulse.enable = true;
|
||||
wireplumber.enable = true;
|
||||
};
|
||||
services.displayManager.gdm.enable = false;
|
||||
services.displayManager.sddm.enable = true;
|
||||
|
||||
boot = {
|
||||
initrd.luks.devices."luks-cbf20b12-90f7-4fbb-95d3-1320eece4d89".device = "/dev/disk/by-uuid/cbf20b12-90f7-4fbb-95d3-1320eece4d89";
|
||||
kernelParams = [
|
||||
@ -53,54 +41,22 @@ services.displayManager.sddm.enable = true;
|
||||
modesetting.enable = true;
|
||||
powerManagement.enable = true;
|
||||
powerManagement.finegrained = false;
|
||||
open = true;
|
||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
open = false;
|
||||
nvidiaSettings = true;
|
||||
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
||||
};
|
||||
|
||||
# this fixes the sleep/wake issue FUCK NVIDIA
|
||||
# systemd.services."systemd-suspend" = {
|
||||
# serviceConfig = {
|
||||
# Environment = ''"SYSTEMD_SLEEP_FREEZE_USER_SESSIONS=false"'';
|
||||
# };
|
||||
# };
|
||||
|
||||
# fixes hardware accel on nvidia open FUCK NVIDIA
|
||||
hardware.graphics.extraPackages = [
|
||||
pkgs.nvidia-vaapi-driver
|
||||
];
|
||||
|
||||
systemd.user.services.reset-gnome-idle-on-resume = {
|
||||
description = "Reset GNOME idle timer after resume";
|
||||
after = [ "suspend.target" ];
|
||||
wantedBy = [ "suspend.target" ];
|
||||
environment = {
|
||||
DBUS_SESSION_BUS_ADDRESS = "unix:path=/run/user/1000/bus";
|
||||
};
|
||||
script = ''
|
||||
sleep 3
|
||||
# Tell gnome-session we have user activity
|
||||
${pkgs.dbus}/bin/dbus-send \
|
||||
--session \
|
||||
--dest=org.gnome.Mutter.IdleMonitor \
|
||||
/org/gnome/Mutter/IdleMonitor/Core \
|
||||
org.gnome.Mutter.IdleMonitor.ResetIdleTime
|
||||
'';
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
User = "admin";
|
||||
};
|
||||
};
|
||||
|
||||
environment.variables = {
|
||||
NVD_BACKEND = "direct";
|
||||
LIBVA_DRIVER_NAME = "nvidia";
|
||||
systemd.services."systemd-suspend" = {
|
||||
serviceConfig = {
|
||||
Environment = ''"SYSTEMD_SLEEP_FREEZE_USER_SESSIONS=false"'';
|
||||
};
|
||||
};
|
||||
|
||||
# cachyos kernel
|
||||
# nixpkgs.overlays = [ inputs.nix-cachyos-kernel.overlays.pinned ];
|
||||
# boot.kernelPackages = pkgs.cachyosKernels.linuxPackages-cachyos-latest;
|
||||
# nix.settings.substituters = [ "https://attic.xuyh0120.win/lantian" ];
|
||||
# nix.settings.trusted-public-keys = [ "lantian:EeAUQ+W+6r7EtwnmYjeVwx5kOGEBpjlBfPlzGlTNvHc=" ];
|
||||
boot.kernelPackages = pkgs.cachyosKernels.linuxPackages-cachyos-latest;
|
||||
nix.settings.substituters = [ "https://attic.xuyh0120.win/lantian" ];
|
||||
nix.settings.trusted-public-keys = [ "lantian:EeAUQ+W+6r7EtwnmYjeVwx5kOGEBpjlBfPlzGlTNvHc=" ];
|
||||
|
||||
system.stateVersion = "24.11";
|
||||
}
|
||||
|
||||
@ -1,22 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
networking = {
|
||||
hostName = "nixos-server-nut";
|
||||
hostId = "d5a2ce61";
|
||||
firewall.enable = false;
|
||||
interfaces.ens18 = {
|
||||
ipv4.addresses = [
|
||||
{
|
||||
address = "192.168.0.20";
|
||||
prefixLength = 24;
|
||||
}
|
||||
];
|
||||
};
|
||||
defaultGateway = "192.168.0.1";
|
||||
nameservers = [ "192.168.0.1" "1.1.1.1" ];
|
||||
};
|
||||
|
||||
users.users.admin.linger = true;
|
||||
system.stateVersion = "24.11";
|
||||
}
|
||||
@ -5,27 +5,21 @@
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
[ (modulesPath + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "mpt3sas" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
|
||||
boot.initrd.availableKernelModules = [ "uhci_hcd" "ehci_pci" "ahci" "virtio_pci" "mpt3sas" "xhci_pci" "sd_mod" "sr_mod" "virtio_blk" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/b9cc7972-36ae-4cb4-a6f4-e342eaca679e";
|
||||
{ device = "/dev/disk/by-uuid/54d867b3-a9cf-42cd-bc1a-56fbd758ecc4";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/542D-865C";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0077" "dmask=0077" ];
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/1032bbd9-0124-419f-a696-a977755aaf17"; }
|
||||
[ { device = "/dev/disk/by-uuid/b5e77330-ad8c-4c5b-99fc-aedfb6e0b145"; }
|
||||
];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
@ -33,8 +27,7 @@
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp6s0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp6s18.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
|
||||
@ -2,8 +2,19 @@
|
||||
|
||||
{
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
age.secrets = {
|
||||
"restic/environmentFile".file = ../../secrets/restic/environmentFile.age;
|
||||
"restic/repositoryFile".file = ../../secrets/restic/repositoryFile.age;
|
||||
"restic/passwordFile".file = ../../secrets/restic/passwordFile.age;
|
||||
"zfs/pool.key".file = ../../secrets/zfs/pool.key.age;
|
||||
};
|
||||
|
||||
age.identityPaths = [ "${config.users.users.admin.home}/.ssh/id_ed25519" ];
|
||||
|
||||
boot.loader.grub.enable = true;
|
||||
boot.loader.grub.device = "/dev/vda";
|
||||
boot.loader.grub.useOSProber = true;
|
||||
|
||||
#boot.loader.limine.biosDevice = "/dev/vda";
|
||||
#boot.loader.efi.efiSysMountPoint = "/boot";
|
||||
|
||||
@ -32,7 +43,7 @@ systemd.services.podman-network-vlan50 = {
|
||||
vlans = {
|
||||
vlan50 = {
|
||||
id = 50;
|
||||
interface = "enp7s0";
|
||||
interface = "ens18";
|
||||
};
|
||||
};
|
||||
hostName = "nixos-server";
|
||||
@ -46,7 +57,7 @@ systemd.services.podman-network-vlan50 = {
|
||||
}
|
||||
];
|
||||
};
|
||||
interfaces.enp7s0 = {
|
||||
interfaces.ens18 = {
|
||||
ipv4.addresses = [
|
||||
{
|
||||
address = "192.168.0.30";
|
||||
@ -59,29 +70,19 @@ systemd.services.podman-network-vlan50 = {
|
||||
};
|
||||
users.users.admin.linger = true;
|
||||
|
||||
#services.xserver.videoDrivers = [ "nvidia" ];
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
|
||||
# hardware = {
|
||||
# graphics.enable = true;
|
||||
# nvidia = {
|
||||
# modesetting.enable = true;
|
||||
# powerManagement.enable = true;
|
||||
# powerManagement.finegrained = false;
|
||||
# open = false;
|
||||
# nvidiaSettings = false;
|
||||
# package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
# };
|
||||
# nvidia-container-toolkit.enable = true;
|
||||
# };
|
||||
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true; # only needed if you run 32-bit apps
|
||||
extraPackages = with pkgs; [
|
||||
mesa.drivers
|
||||
libva
|
||||
libva-utils # provides vainfo
|
||||
];
|
||||
hardware = {
|
||||
graphics.enable = true;
|
||||
nvidia = {
|
||||
modesetting.enable = true;
|
||||
powerManagement.enable = true;
|
||||
powerManagement.finegrained = false;
|
||||
open = false;
|
||||
nvidiaSettings = false;
|
||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
};
|
||||
nvidia-container-toolkit.enable = true;
|
||||
};
|
||||
|
||||
boot.kernel.sysctl = {
|
||||
@ -106,9 +107,9 @@ systemd.services.podman-network-vlan50 = {
|
||||
|
||||
services.restic.backups.backup = {
|
||||
initialize = true;
|
||||
environmentFile = "/pool/services/secrets/restic/environmentFile";
|
||||
repositoryFile = "/pool/services/secrets/restic/repositoryFile";
|
||||
passwordFile = "/pool/services/secrets/restic/passwordFile";
|
||||
environmentFile = config.age.secrets."restic/environmentFile".path;
|
||||
repositoryFile = config.age.secrets."restic/repositoryFile".path;
|
||||
passwordFile = config.age.secrets."restic/passwordFile".path;
|
||||
|
||||
paths = [
|
||||
"/pool/services"
|
||||
@ -157,22 +158,18 @@ systemd.services.podman-network-vlan50 = {
|
||||
|
||||
services.zfs.autoScrub = {
|
||||
enable = true;
|
||||
interval = "weekly";
|
||||
};
|
||||
services.zfs.autoSnapshot.enable = true;
|
||||
services.zfs.trim.enable = true;
|
||||
|
||||
services.smartd = {
|
||||
enable = true;
|
||||
#devices = [ "DEVICESCAN -a" ]; # autodetect all drives
|
||||
};
|
||||
|
||||
services.zfs.zed = {
|
||||
settings = {
|
||||
ZED_NTFY_URL="https://ntfy.mektem.com";
|
||||
ZED_NTFY_TOPIC="zfs";
|
||||
ZED_NTFY_ACCESS_TOKEN="tk_gtjia7itxhg1qik7j58wkgey2parr";
|
||||
ZED_NOTIFY_INTERVAL_SECS = 1;
|
||||
ZED_NOTIFY_VERBOSE = true; # Set to false to only get alerts on degradation
|
||||
notifications = {
|
||||
mail.enable = true;
|
||||
mail.recipient = "accelarion@protonmail.com";
|
||||
};
|
||||
#devices = [ "DEVICESCAN -a" ]; # autodetect all drives
|
||||
};
|
||||
|
||||
services.samba = {
|
||||
@ -180,12 +177,11 @@ systemd.services.podman-network-vlan50 = {
|
||||
openFirewall = true;
|
||||
settings = {
|
||||
global = {
|
||||
"server min protocol" = "SMB2_10";
|
||||
"workgroup" = "WORKGROUP";
|
||||
"server string" = "smbnix";
|
||||
"netbios name" = "smbnix";
|
||||
"security" = "user";
|
||||
"hosts allow" = "192.168.0. 192.168.30. 192.168.40.10 127.0.0.1 localhost";
|
||||
"hosts allow" = "192.168.0. 127.0.0.1 localhost";
|
||||
"hosts deny" = "0.0.0.0/0";
|
||||
"guest account" = "nobody";
|
||||
"map to guest" = "never";
|
||||
@ -260,6 +256,7 @@ systemd.services.podman-network-vlan50 = {
|
||||
# };
|
||||
};
|
||||
|
||||
|
||||
matrix = {
|
||||
image = "ghcr.io/element-hq/synapse";
|
||||
autoStart = true;
|
||||
@ -305,6 +302,29 @@ systemd.services.podman-network-vlan50 = {
|
||||
# };
|
||||
};
|
||||
|
||||
ntfy = {
|
||||
image = "docker.io/binwiederhier/ntfy";
|
||||
autoStart = true;
|
||||
#autoUpdate = "registry";
|
||||
networks = [ "vlan50" ];
|
||||
cmd = [ "serve" ];
|
||||
environmentFiles = [
|
||||
"/pool/services/secrets/default"
|
||||
"/pool/services/secrets/ntfy"
|
||||
];
|
||||
volumes = [
|
||||
"/pool/services/podman/ntfy:/var/lib/ntfy"
|
||||
];
|
||||
extraOptions = [
|
||||
"--ip=192.168.50.35"
|
||||
];
|
||||
# extraConfig = {
|
||||
# Service = {
|
||||
# TimeoutStartSec = 900;
|
||||
# };
|
||||
# };
|
||||
};
|
||||
|
||||
privatebin = {
|
||||
image = "docker.io/privatebin/nginx-fpm-alpine:latest";
|
||||
autoStart = true;
|
||||
@ -326,6 +346,28 @@ systemd.services.podman-network-vlan50 = {
|
||||
# };
|
||||
};
|
||||
|
||||
vaultwarden = {
|
||||
image = "docker.io/vaultwarden/server:latest";
|
||||
autoStart = true;
|
||||
#autoUpdate = "registry";
|
||||
networks = [ "vlan50" ];
|
||||
environmentFiles = [
|
||||
"/pool/services/secrets/default"
|
||||
"/pool/services/secrets/vaultwarden"
|
||||
];
|
||||
volumes = [
|
||||
"/pool/services/podman/vaultwarden:/data/"
|
||||
];
|
||||
extraOptions = [
|
||||
"--ip=192.168.50.37"
|
||||
];
|
||||
# extraConfig = {
|
||||
# Service = {
|
||||
# TimeoutStartSec = 900;
|
||||
# };
|
||||
# };
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
system.stateVersion = "24.11";
|
||||
|
||||
@ -1,324 +0,0 @@
|
||||
|
||||
SSUUMMMMAARRYY OOFF LLEESSSS CCOOMMMMAANNDDSS
|
||||
|
||||
Commands marked with * may be preceded by a number, _N.
|
||||
Notes in parentheses indicate the behavior if _N is given.
|
||||
A key preceded by a caret indicates the Ctrl key; thus ^K is ctrl-K.
|
||||
|
||||
h H Display this help.
|
||||
q :q Q :Q ZZ Exit.
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
MMOOVVIINNGG
|
||||
|
||||
e ^E j ^N CR * Forward one line (or _N lines).
|
||||
y ^Y k ^K ^P * Backward one line (or _N lines).
|
||||
ESC-j * Forward one file line (or _N file lines).
|
||||
ESC-k * Backward one file line (or _N file lines).
|
||||
f ^F ^V SPACE * Forward one window (or _N lines).
|
||||
b ^B ESC-v * Backward one window (or _N lines).
|
||||
z * Forward one window (and set window to _N).
|
||||
w * Backward one window (and set window to _N).
|
||||
ESC-SPACE * Forward one window, but don't stop at end-of-file.
|
||||
ESC-b * Backward one window, but don't stop at beginning-of-file.
|
||||
d ^D * Forward one half-window (and set half-window to _N).
|
||||
u ^U * Backward one half-window (and set half-window to _N).
|
||||
ESC-) RightArrow * Right one half screen width (or _N positions).
|
||||
ESC-( LeftArrow * Left one half screen width (or _N positions).
|
||||
ESC-} ^RightArrow Right to last column displayed.
|
||||
ESC-{ ^LeftArrow Left to first column.
|
||||
F Forward forever; like "tail -f".
|
||||
ESC-F Like F but stop when search pattern is found.
|
||||
r ^R ^L Repaint screen.
|
||||
R Repaint screen, discarding buffered input.
|
||||
---------------------------------------------------
|
||||
Default "window" is the screen height.
|
||||
Default "half-window" is half of the screen height.
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
SSEEAARRCCHHIINNGG
|
||||
|
||||
/_p_a_t_t_e_r_n * Search forward for (_N-th) matching line.
|
||||
?_p_a_t_t_e_r_n * Search backward for (_N-th) matching line.
|
||||
n * Repeat previous search (for _N-th occurrence).
|
||||
N * Repeat previous search in reverse direction.
|
||||
ESC-n * Repeat previous search, spanning files.
|
||||
ESC-N * Repeat previous search, reverse dir. & spanning files.
|
||||
^O^N ^On * Search forward for (_N-th) OSC8 hyperlink.
|
||||
^O^P ^Op * Search backward for (_N-th) OSC8 hyperlink.
|
||||
^O^L ^Ol Jump to the currently selected OSC8 hyperlink.
|
||||
ESC-u Undo (toggle) search highlighting.
|
||||
ESC-U Clear search highlighting.
|
||||
&_p_a_t_t_e_r_n * Display only matching lines.
|
||||
---------------------------------------------------
|
||||
Search is case-sensitive unless changed with -i or -I.
|
||||
A search pattern may begin with one or more of:
|
||||
^N or ! Search for NON-matching lines.
|
||||
^E or * Search multiple files (pass thru END OF FILE).
|
||||
^F or @ Start search at FIRST file (for /) or last file (for ?).
|
||||
^K Highlight matches, but don't move (KEEP position).
|
||||
^R Don't use REGULAR EXPRESSIONS.
|
||||
^S _n Search for match in _n-th parenthesized subpattern.
|
||||
^W WRAP search if no match found.
|
||||
^L Enter next character literally into pattern.
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
JJUUMMPPIINNGG
|
||||
|
||||
g < ESC-< * Go to first line in file (or line _N).
|
||||
G > ESC-> * Go to last line in file (or line _N).
|
||||
p % * Go to beginning of file (or _N percent into file).
|
||||
t * Go to the (_N-th) next tag.
|
||||
T * Go to the (_N-th) previous tag.
|
||||
{ ( [ * Find close bracket } ) ].
|
||||
} ) ] * Find open bracket { ( [.
|
||||
ESC-^F _<_c_1_> _<_c_2_> * Find close bracket _<_c_2_>.
|
||||
ESC-^B _<_c_1_> _<_c_2_> * Find open bracket _<_c_1_>.
|
||||
---------------------------------------------------
|
||||
Each "find close bracket" command goes forward to the close bracket
|
||||
matching the (_N-th) open bracket in the top line.
|
||||
Each "find open bracket" command goes backward to the open bracket
|
||||
matching the (_N-th) close bracket in the bottom line.
|
||||
|
||||
m_<_l_e_t_t_e_r_> Mark the current top line with <letter>.
|
||||
M_<_l_e_t_t_e_r_> Mark the current bottom line with <letter>.
|
||||
'_<_l_e_t_t_e_r_> Go to a previously marked position.
|
||||
'' Go to the previous position.
|
||||
^X^X Same as '.
|
||||
ESC-m_<_l_e_t_t_e_r_> Clear a mark.
|
||||
---------------------------------------------------
|
||||
A mark is any upper-case or lower-case letter.
|
||||
Certain marks are predefined:
|
||||
^ means beginning of the file
|
||||
$ means end of the file
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
CCHHAANNGGIINNGG FFIILLEESS
|
||||
|
||||
:e [_f_i_l_e] Examine a new file.
|
||||
^X^V Same as :e.
|
||||
:n * Examine the (_N-th) next file from the command line.
|
||||
:p * Examine the (_N-th) previous file from the command line.
|
||||
:x * Examine the first (or _N-th) file from the command line.
|
||||
^O^O Open the currently selected OSC8 hyperlink.
|
||||
:d Delete the current file from the command line list.
|
||||
= ^G :f Print current file name.
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
MMIISSCCEELLLLAANNEEOOUUSS CCOOMMMMAANNDDSS
|
||||
|
||||
-_<_f_l_a_g_> Toggle a command line option [see OPTIONS below].
|
||||
--_<_n_a_m_e_> Toggle a command line option, by name.
|
||||
__<_f_l_a_g_> Display the setting of a command line option.
|
||||
___<_n_a_m_e_> Display the setting of an option, by name.
|
||||
+_c_m_d Execute the less cmd each time a new file is examined.
|
||||
|
||||
!_c_o_m_m_a_n_d Execute the shell command with $SHELL.
|
||||
#_c_o_m_m_a_n_d Execute the shell command, expanded like a prompt.
|
||||
|XX_c_o_m_m_a_n_d Pipe file between current pos & mark XX to shell command.
|
||||
s _f_i_l_e Save input to a file.
|
||||
v Edit the current file with $VISUAL or $EDITOR.
|
||||
V Print version number of "less".
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
OOPPTTIIOONNSS
|
||||
|
||||
Most options may be changed either on the command line,
|
||||
or from within less by using the - or -- command.
|
||||
Options may be given in one of two forms: either a single
|
||||
character preceded by a -, or a name preceded by --.
|
||||
|
||||
-? ........ --help
|
||||
Display help (from command line).
|
||||
-a ........ --search-skip-screen
|
||||
Search skips current screen.
|
||||
-A ........ --SEARCH-SKIP-SCREEN
|
||||
Search starts just after target line.
|
||||
-b [_N] .... --buffers=[_N]
|
||||
Number of buffers.
|
||||
-B ........ --auto-buffers
|
||||
Don't automatically allocate buffers for pipes.
|
||||
-c ........ --clear-screen
|
||||
Repaint by clearing rather than scrolling.
|
||||
-d ........ --dumb
|
||||
Dumb terminal.
|
||||
-D xx_c_o_l_o_r . --color=xx_c_o_l_o_r
|
||||
Set screen colors.
|
||||
-e -E .... --quit-at-eof --QUIT-AT-EOF
|
||||
Quit at end of file.
|
||||
-f ........ --force
|
||||
Force open non-regular files.
|
||||
-F ........ --quit-if-one-screen
|
||||
Quit if entire file fits on first screen.
|
||||
-g ........ --hilite-search
|
||||
Highlight only last match for searches.
|
||||
-G ........ --HILITE-SEARCH
|
||||
Don't highlight any matches for searches.
|
||||
-h [_N] .... --max-back-scroll=[_N]
|
||||
Backward scroll limit.
|
||||
-i ........ --ignore-case
|
||||
Ignore case in searches that do not contain uppercase.
|
||||
-I ........ --IGNORE-CASE
|
||||
Ignore case in all searches.
|
||||
-j [_N] .... --jump-target=[_N]
|
||||
Screen position of target lines.
|
||||
-J ........ --status-column
|
||||
Display a status column at left edge of screen.
|
||||
-k _f_i_l_e ... --lesskey-file=_f_i_l_e
|
||||
Use a compiled lesskey file.
|
||||
-K ........ --quit-on-intr
|
||||
Exit less in response to ctrl-C.
|
||||
-L ........ --no-lessopen
|
||||
Ignore the LESSOPEN environment variable.
|
||||
-m -M .... --long-prompt --LONG-PROMPT
|
||||
Set prompt style.
|
||||
-n ......... --line-numbers
|
||||
Suppress line numbers in prompts and messages.
|
||||
-N ......... --LINE-NUMBERS
|
||||
Display line number at start of each line.
|
||||
-o [_f_i_l_e] .. --log-file=[_f_i_l_e]
|
||||
Copy to log file (standard input only).
|
||||
-O [_f_i_l_e] .. --LOG-FILE=[_f_i_l_e]
|
||||
Copy to log file (unconditionally overwrite).
|
||||
-p _p_a_t_t_e_r_n . --pattern=[_p_a_t_t_e_r_n]
|
||||
Start at pattern (from command line).
|
||||
-P [_p_r_o_m_p_t] --prompt=[_p_r_o_m_p_t]
|
||||
Define new prompt.
|
||||
-q -Q .... --quiet --QUIET --silent --SILENT
|
||||
Quiet the terminal bell.
|
||||
-r -R .... --raw-control-chars --RAW-CONTROL-CHARS
|
||||
Output "raw" control characters.
|
||||
-s ........ --squeeze-blank-lines
|
||||
Squeeze multiple blank lines.
|
||||
-S ........ --chop-long-lines
|
||||
Chop (truncate) long lines rather than wrapping.
|
||||
-t _t_a_g .... --tag=[_t_a_g]
|
||||
Find a tag.
|
||||
-T [_t_a_g_s_f_i_l_e] --tag-file=[_t_a_g_s_f_i_l_e]
|
||||
Use an alternate tags file.
|
||||
-u -U .... --underline-special --UNDERLINE-SPECIAL
|
||||
Change handling of backspaces, tabs and carriage returns.
|
||||
-V ........ --version
|
||||
Display the version number of "less".
|
||||
-w ........ --hilite-unread
|
||||
Highlight first new line after forward-screen.
|
||||
-W ........ --HILITE-UNREAD
|
||||
Highlight first new line after any forward movement.
|
||||
-x [_N[,...]] --tabs=[_N[,...]]
|
||||
Set tab stops.
|
||||
-X ........ --no-init
|
||||
Don't use termcap init/deinit strings.
|
||||
-y [_N] .... --max-forw-scroll=[_N]
|
||||
Forward scroll limit.
|
||||
-z [_N] .... --window=[_N]
|
||||
Set size of window.
|
||||
-" [_c[_c]] . --quotes=[_c[_c]]
|
||||
Set shell quote characters.
|
||||
-~ ........ --tilde
|
||||
Don't display tildes after end of file.
|
||||
-# [_N] .... --shift=[_N]
|
||||
Set horizontal scroll amount (0 = one half screen width).
|
||||
|
||||
--exit-follow-on-close
|
||||
Exit F command on a pipe when writer closes pipe.
|
||||
--file-size
|
||||
Automatically determine the size of the input file.
|
||||
--follow-name
|
||||
The F command changes files if the input file is renamed.
|
||||
--form-feed
|
||||
Stop scrolling when a form feed character is reached.
|
||||
--header=[_L[,_C[,_N]]]
|
||||
Use _L lines (starting at line _N) and _C columns as headers.
|
||||
--incsearch
|
||||
Search file as each pattern character is typed in.
|
||||
--intr=[_C]
|
||||
Use _C instead of ^X to interrupt a read.
|
||||
--lesskey-context=_t_e_x_t
|
||||
Use lesskey source file contents.
|
||||
--lesskey-src=_f_i_l_e
|
||||
Use a lesskey source file.
|
||||
--line-num-width=[_N]
|
||||
Set the width of the -N line number field to _N characters.
|
||||
--match-shift=[_N]
|
||||
Show at least _N characters to the left of a search match.
|
||||
--modelines=[_N]
|
||||
Read _N lines from the input file and look for vim modelines.
|
||||
--mouse
|
||||
Enable mouse input.
|
||||
--no-edit-warn
|
||||
Don't warn when using v command on a file opened via LESSOPEN.
|
||||
--no-keypad
|
||||
Don't send termcap keypad init/deinit strings.
|
||||
--no-histdups
|
||||
Remove duplicates from command history.
|
||||
--no-number-headers
|
||||
Don't give line numbers to header lines.
|
||||
--no-paste
|
||||
Ignore pasted input.
|
||||
--no-search-header-lines
|
||||
Searches do not include header lines.
|
||||
--no-search-header-columns
|
||||
Searches do not include header columns.
|
||||
--no-search-headers
|
||||
Searches do not include header lines or columns.
|
||||
--no-vbell
|
||||
Disable the terminal's visual bell.
|
||||
--redraw-on-quit
|
||||
Redraw final screen when quitting.
|
||||
--rscroll=[_C]
|
||||
Set the character used to mark truncated lines.
|
||||
--save-marks
|
||||
Retain marks across invocations of less.
|
||||
--search-options=[EFKNRW-]
|
||||
Set default options for every search.
|
||||
--show-preproc-errors
|
||||
Display a message if preprocessor exits with an error status.
|
||||
--proc-backspace
|
||||
Process backspaces for bold/underline.
|
||||
--PROC-BACKSPACE
|
||||
Treat backspaces as control characters.
|
||||
--proc-return
|
||||
Delete carriage returns before newline.
|
||||
--PROC-RETURN
|
||||
Treat carriage returns as control characters.
|
||||
--proc-tab
|
||||
Expand tabs to spaces.
|
||||
--PROC-TAB
|
||||
Treat tabs as control characters.
|
||||
--status-col-width=[_N]
|
||||
Set the width of the -J status column to _N characters.
|
||||
--status-line
|
||||
Highlight or color the entire line containing a mark.
|
||||
--use-backslash
|
||||
Subsequent options use backslash as escape char.
|
||||
--use-color
|
||||
Enables colored text.
|
||||
--wheel-lines=[_N]
|
||||
Each click of the mouse wheel moves _N lines.
|
||||
--wordwrap
|
||||
Wrap lines at spaces.
|
||||
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
LLIINNEE EEDDIITTIINNGG
|
||||
|
||||
These keys can be used to edit text being entered
|
||||
on the "command line" at the bottom of the screen.
|
||||
|
||||
RightArrow ..................... ESC-l ... Move cursor right one character.
|
||||
LeftArrow ...................... ESC-h ... Move cursor left one character.
|
||||
ctrl-RightArrow ESC-RightArrow ESC-w ... Move cursor right one word.
|
||||
ctrl-LeftArrow ESC-LeftArrow ESC-b ... Move cursor left one word.
|
||||
HOME ........................... ESC-0 ... Move cursor to start of line.
|
||||
END ............................ ESC-$ ... Move cursor to end of line.
|
||||
BACKSPACE ................................ Delete char to left of cursor.
|
||||
DELETE ......................... ESC-x ... Delete char under cursor.
|
||||
ctrl-BACKSPACE ESC-BACKSPACE ........... Delete word to left of cursor.
|
||||
ctrl-DELETE .... ESC-DELETE .... ESC-X ... Delete word under cursor.
|
||||
ctrl-U ......... ESC (MS-DOS only) ....... Delete entire line.
|
||||
UpArrow ........................ ESC-k ... Retrieve previous command line.
|
||||
DownArrow ...................... ESC-j ... Retrieve next command line.
|
||||
TAB ...................................... Complete filename & cycle.
|
||||
SHIFT-TAB ...................... ESC-TAB Complete filename & reverse cycle.
|
||||
ctrl-L ................................... Complete filename, list all.
|
||||
Loading…
x
Reference in New Issue
Block a user