commit ad35518613f5770cdb620ffb6ce20efe0655ae1e Author: asnev Date: Sun Oct 25 11:41:10 2026 +0700 genesis diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..48e8156 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +.directory +*.swp +result +result-* + diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..72ef093 --- /dev/null +++ b/flake.lock @@ -0,0 +1,163 @@ +{ + "nodes": { + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1777699697, + "narHash": "sha256-Eg9b/rq/ECYwNwEXs5i9wHyhxNI0JrYx2srdI2uZMaQ=", + "ref": "refs/heads/main", + "rev": "382052b74656a369c5408822af3f2501e9b1af81", + "revCount": 94, + "type": "git", + "url": "https://git.lix.systems/lix-project/flake-compat.git" + }, + "original": { + "type": "git", + "url": "https://git.lix.systems/lix-project/flake-compat.git" + } + }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1790898470, + "narHash": "sha256-zTwuwezD0w3hpga6a6P8emidzAZFyWqlNeRBlpWOOl8=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "024633cd702b10285db5cb19b40ad48d2399ba60", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1792818383, + "narHash": "sha256-199i7ubVSXTMl+0AAlL7cVCXSjcI+jWByMcimYjeMX0=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "24f2190587513b9c2f73db112a17844ae912d965", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "release-26.05", + "repo": "home-manager", + "type": "github" + } + }, + "import-tree": { + "locked": { + "lastModified": 1788467110, + "narHash": "sha256-ljEMTXP/rH0tOvDzc9gzwww6KcHRPRnEHzd9lK48V7s=", + "owner": "vic", + "repo": "import-tree", + "rev": "eb1b52eaecc57f7c136d07ae8a93e724dfecac46", + "type": "github" + }, + "original": { + "owner": "vic", + "repo": "import-tree", + "type": "github" + } + }, + "mnw": { + "locked": { + "lastModified": 1784154424, + "narHash": "sha256-HRn4O1X2ShYtbq5Egji72/aemyc2cIQicjRZD9hBqM8=", + "owner": "Gerg-L", + "repo": "mnw", + "rev": "0151d9fa87992cbeb67c86616fb9170dcec830b6", + "type": "github" + }, + "original": { + "owner": "Gerg-L", + "repo": "mnw", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1792898606, + "narHash": "sha256-v+CWvNPgAsxoqWDWmkjhh3qwZiE/oGkhXT+QH79yg2o=", + "rev": "1f607aa79b6356ed45d3cd3c8079c196e79efa2c", + "type": "tarball", + "url": "https://releases.nixos.org/nixos/26.05/nixos-26.05.12658.1f607aa79b63/nixexprs.tar.zst" + }, + "original": { + "type": "tarball", + "url": "https://channels.nixos.org/nixos-26.05/nixexprs.tar.zst" + } + }, + "nixpkgs-lib": { + "locked": { + "lastModified": 1790477367, + "narHash": "sha256-oujbxmVKDhci2E4EM3KyAbRUgp5/IsCoiA/LfEF7OOk=", + "owner": "nix-community", + "repo": "nixpkgs.lib", + "rev": "f7cd230690d9fc982d06129f9189b101fddcfa3b", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixpkgs.lib", + "type": "github" + } + }, + "nixpkgs-unstable": { + "locked": { + "lastModified": 315532800, + "narHash": "sha256-17eNBI5Khe4JZaRkL5hRGPWf8MZ6qv+bWAr4V8YeKBw=", + "type": "tarball", + "url": "https://releases.nixos.org/nixos/unstable/nixos-26.11pre1100280.3ec636362e18/nixexprs.tar.zst" + }, + "original": { + "type": "tarball", + "url": "https://releases.nixos.org/nixos/unstable/nixos-26.11pre1100280.3ec636362e18/nixexprs.tar.zst" + } + }, + "nvf": { + "inputs": { + "flake-compat": "flake-compat", + "mnw": "mnw", + "nixpkgs": [ + "nixpkgs-unstable" + ] + }, + "locked": { + "lastModified": 1792889789, + "narHash": "sha256-xpH3z+T5NELixXRjxGJ3mx30kz63Xt2B0ZfPWl7hcUg=", + "owner": "NotAShelf", + "repo": "nvf", + "rev": "557d2eb05a76e5939e6a75351343cae5731a71f8", + "type": "github" + }, + "original": { + "owner": "NotAShelf", + "repo": "nvf", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-parts": "flake-parts", + "home-manager": "home-manager", + "import-tree": "import-tree", + "nixpkgs": "nixpkgs", + "nixpkgs-unstable": "nixpkgs-unstable", + "nvf": "nvf" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..872b57c --- /dev/null +++ b/flake.nix @@ -0,0 +1,15 @@ +{ + inputs = { + flake-parts.url = "github:hercules-ci/flake-parts"; + import-tree.url = "github:vic/import-tree"; + nixpkgs.url = "https://channels.nixos.org/nixos-26.05/nixexprs.tar.zst"; + nixpkgs-unstable.url = "https://releases.nixos.org/nixos/unstable/nixos-26.11pre1100280.3ec636362e18/nixexprs.tar.zst"; + home-manager.url = "github:nix-community/home-manager/release-26.05"; + nvf.url = "github:NotAShelf/nvf"; + + home-manager.inputs.nixpkgs.follows = "nixpkgs"; + nvf.inputs.nixpkgs.follows = "nixpkgs-unstable"; + }; + + outputs = inputs: inputs.flake-parts.lib.mkFlake {inherit inputs;} (inputs.import-tree ./modules); +} diff --git a/modules/base/boot.nix b/modules/base/boot.nix new file mode 100644 index 0000000..9244d92 --- /dev/null +++ b/modules/base/boot.nix @@ -0,0 +1,17 @@ +{ + flake.modules.nixos.base = {pkgs, ...}: { + boot = { + loader = { + systemd-boot = { + enable = true; + configurationLimit = 10; + }; + + efi.canTouchEfiVariables = true; + timeout = 2; + }; + + kernelPackages = pkgs.linuxPackages_latest; + }; + }; +} diff --git a/modules/base/configuration.nix b/modules/base/configuration.nix new file mode 100644 index 0000000..eaf01d5 --- /dev/null +++ b/modules/base/configuration.nix @@ -0,0 +1,7 @@ +{ + flake.modules.nixos.base = {modulesPath, ...}: { + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; + }; +} diff --git a/modules/base/doas.nix b/modules/base/doas.nix new file mode 100644 index 0000000..a2e08ec --- /dev/null +++ b/modules/base/doas.nix @@ -0,0 +1,18 @@ +{ + flake.modules.nixos.base = { + security = { + doas = { + enable = true; + extraRules = [ + { + groups = ["wheel"]; + keepEnv = true; + persist = true; + } + ]; + }; + + sudo.enable = false; + }; + }; +} diff --git a/modules/base/fonts.nix b/modules/base/fonts.nix new file mode 100644 index 0000000..61d46e6 --- /dev/null +++ b/modules/base/fonts.nix @@ -0,0 +1,45 @@ +{ + flake.modules.nixos.base = {pkgs, ...}: { + fonts = { + packages = with pkgs; [ + # GUI + inter + corefonts + roboto + cantarell-fonts + # internationalisation + noto-fonts + noto-fonts-cjk-sans + noto-fonts-cjk-serif + noto-fonts-color-emoji + noto-fonts-monochrome-emoji + unifont + unifont_upper + unifont-csur + # terminal + nerd-fonts.iosevka + ]; + + fontconfig = { + antialias = true; + subpixel.rgba = "rgb"; + hinting.enable = true; + defaultFonts = { + serif = ["Noto Serif"]; + sansSerif = ["Cantarell"]; + monospace = ["Iosevka Nerd Font"]; + emoji = ["Noto Color Emoji"]; + }; + }; + }; + }; + + flake.modules.nixos.kdePlasma = { + config, + lib, + ... + }: { + services.displayManager.sddm.settings.Theme.Font = + lib.concatStrings config.fonts.fontconfig.defaultFonts.sansSerif; + }; +} diff --git a/modules/base/locale.nix b/modules/base/locale.nix new file mode 100644 index 0000000..4d2b12f --- /dev/null +++ b/modules/base/locale.nix @@ -0,0 +1,7 @@ +{ + flake.modules.nixos.base = { + time.timeZone = "Asia/Jakarta"; + i18n.defaultLocale = "en_GB.UTF-8"; + services.xserver.xkb.layout = "us"; + }; +} diff --git a/modules/base/nix-ld.nix b/modules/base/nix-ld.nix new file mode 100644 index 0000000..5a3cb13 --- /dev/null +++ b/modules/base/nix-ld.nix @@ -0,0 +1,15 @@ +{ + flake.modules.nixos.base = {pkgs, ...}: { + programs.nix-ld = { + enable = true; + libraries = with pkgs; [ + fuse + e2fsprogs + stdenv.cc.cc + zlib + alsa-lib + expat + ]; + }; + }; +} diff --git a/modules/base/nix.nix b/modules/base/nix.nix new file mode 100644 index 0000000..adb6cd6 --- /dev/null +++ b/modules/base/nix.nix @@ -0,0 +1,18 @@ +{ + flake.modules.nixos.base = { + nix = { + settings = { + experimental-features = ["nix-command" "flakes"]; + auto-optimise-store = true; + }; + + gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 14d"; + }; + + optimise.automatic = true; + }; + }; +} diff --git a/modules/base/nixpkgs.nix b/modules/base/nixpkgs.nix new file mode 100644 index 0000000..278a861 --- /dev/null +++ b/modules/base/nixpkgs.nix @@ -0,0 +1,8 @@ +{self, ...}: { + flake.modules.nixos.base = { + nixpkgs = { + config.allowUnfree = true; + overlays = [self.overlays.default]; + }; + }; +} diff --git a/modules/base/overlays.nix b/modules/base/overlays.nix new file mode 100644 index 0000000..5b6d8b7 --- /dev/null +++ b/modules/base/overlays.nix @@ -0,0 +1,15 @@ +{inputs, ...}: { + perSystem = { + pkgs, + final, + system, + ... + }: { + overlayAttrs = { + unstable = import inputs.nixpkgs-unstable { + inherit system; + config.allowUnfree = true; + }; + }; + }; +} diff --git a/modules/base/programs.nix b/modules/base/programs.nix new file mode 100644 index 0000000..107933d --- /dev/null +++ b/modules/base/programs.nix @@ -0,0 +1,25 @@ +{ + flake.modules.nixos.base = { + programs = { + fish.enable = true; + + atuin = { + enable = true; + settings = { + sync_address = "https://api.atuin.sh"; + enter_accept = true; + }; + }; + + git = { + enable = true; + config = { + init.defaultBranch = "main"; + advice.defaultBranchName = false; + gpg.format = "ssh"; + commit.gpgSign = true; + }; + }; + }; + }; +} diff --git a/modules/base/services.nix b/modules/base/services.nix new file mode 100644 index 0000000..6cb4d10 --- /dev/null +++ b/modules/base/services.nix @@ -0,0 +1,21 @@ +{ + flake.modules.nixos.base = { + services = { + fwupd.enable = true; + locate.enable = true; + openssh.enable = false; + + pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + }; + }; + + security.rtkit.enable = true; + + # ssh-agent user service (SSH_AUTH_SOCK=%t/ssh-agent) + programs.ssh.startAgent = true; + }; +} diff --git a/modules/base/system-packages.nix b/modules/base/system-packages.nix new file mode 100644 index 0000000..3b18369 --- /dev/null +++ b/modules/base/system-packages.nix @@ -0,0 +1,39 @@ +{ + flake.modules.nixos.base = {pkgs, ...}: { + environment.systemPackages = with pkgs; [ + nh + alejandra + git + python315 + # system utils + file + firmware-updater + mtr + gnupg + ddate + testdisk + tree + wget + btop + plocate + traceroute + rlwrap + entr + unzip + ffmpeg + imagemagick + gnome-disk-utility + # oxidised utils + fd + bat + xh + tlrc + dysk + dust + hyperfine + ripgrep + fzf + eza + ]; + }; +} diff --git a/modules/gui/kde-plasma.nix b/modules/gui/kde-plasma.nix new file mode 100644 index 0000000..c7a4ce2 --- /dev/null +++ b/modules/gui/kde-plasma.nix @@ -0,0 +1,27 @@ +{ + flake.modules.nixos.kdePlasma = {pkgs, ...}: { + services = { + displayManager.sddm.enable = true; + desktopManager.plasma6.enable = true; + }; + + environment = { + plasma6.excludePackages = with pkgs.kdePackages; [ + discover + ]; + + systemPackages = with pkgs.kdePackages; [ + kate + elisa + bluez-qt + kalk + filelight + kamoso + konversation + kmail + ktorrent + kclock + ]; + }; + }; +} diff --git a/modules/hosts/phostron/amd-microcode.nix b/modules/hosts/phostron/amd-microcode.nix new file mode 100644 index 0000000..389a106 --- /dev/null +++ b/modules/hosts/phostron/amd-microcode.nix @@ -0,0 +1,9 @@ +{ + flake.modules.nixos.phostron = { + config, + lib, + ... + }: { + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + }; +} diff --git a/modules/hosts/phostron/bluetooth.nix b/modules/hosts/phostron/bluetooth.nix new file mode 100644 index 0000000..e8d4d96 --- /dev/null +++ b/modules/hosts/phostron/bluetooth.nix @@ -0,0 +1,5 @@ +{ + flake.modules.nixos.base = { + hardware.bluetooth.enable = true; + }; +} diff --git a/modules/hosts/phostron/boot.nix b/modules/hosts/phostron/boot.nix new file mode 100644 index 0000000..5ba475c --- /dev/null +++ b/modules/hosts/phostron/boot.nix @@ -0,0 +1,21 @@ +{ + flake.modules.nixos.phostron = { + boot = { + initrd = { + availableKernelModules = [ + "nvme" + "ehci_pci" + "xhci_pci" + "usbhid" + "usb_storage" + "sd_mod" + "sdhci_pci" + ]; + kernelModules = []; + }; + + kernelModules = ["kvm-amd"]; + extraModulePackages = []; + }; + }; +} diff --git a/modules/hosts/phostron/display-manager.nix b/modules/hosts/phostron/display-manager.nix new file mode 100644 index 0000000..444867b --- /dev/null +++ b/modules/hosts/phostron/display-manager.nix @@ -0,0 +1,5 @@ +{ + flake.modules.nixos.kdePlasma = { + services.displayManager.sddm.settings.Theme.CursorSize = 18; + }; +} diff --git a/modules/hosts/phostron/entry.nix b/modules/hosts/phostron/entry.nix new file mode 100644 index 0000000..2308a09 --- /dev/null +++ b/modules/hosts/phostron/entry.nix @@ -0,0 +1,28 @@ +{ + self, + inputs, + ... +}: let + stateVersion = "26.05"; # i don't read comments! +in { + flake.modules.nixos.phostron = {lib, ...}: { + system = {inherit stateVersion;}; + + networking.hostName = "phostron"; + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + }; + + flake.modules.homeManager.coyote = { + home = {inherit stateVersion;}; + }; + + flake.nixosConfigurations.phostron = inputs.nixpkgs.lib.nixosSystem { + modules = [ + self.modules.nixos.base + self.modules.nixos.phostron + self.modules.nixos.kdePlasma + self.modules.nixos.homeManagerModule + self.modules.nixos.coyote + ]; + }; +} diff --git a/modules/hosts/phostron/file-systems.nix b/modules/hosts/phostron/file-systems.nix new file mode 100644 index 0000000..41838db --- /dev/null +++ b/modules/hosts/phostron/file-systems.nix @@ -0,0 +1,19 @@ +{ + flake.modules.nixos.phostron = { + fileSystems = { + "/" = { + device = "/dev/disk/by-uuid/24fb172c-c29f-40c3-ae4d-ff652358563a"; + fsType = "ext4"; + }; + + "/boot" = { + device = "/dev/disk/by-uuid/DFC9-994A"; + fsType = "vfat"; + options = ["fmask=0077" "dmask=0077"]; + }; + }; + + swapDevices = [{device = "/dev/disk/by-uuid/91d96247-85c3-4e0a-93a2-5632b96179b6";}]; + zramSwap.enable = true; + }; +} diff --git a/modules/hosts/phostron/graphics.nix b/modules/hosts/phostron/graphics.nix new file mode 100644 index 0000000..2d2c8ce --- /dev/null +++ b/modules/hosts/phostron/graphics.nix @@ -0,0 +1,9 @@ +{ + flake.modules.nixos.phostron = { + hardware = { + graphics.enable = true; + graphics.enable32Bit = true; + enableRedistributableFirmware = true; + }; + }; +} diff --git a/modules/hosts/phostron/networking.nix b/modules/hosts/phostron/networking.nix new file mode 100644 index 0000000..02e0bb9 --- /dev/null +++ b/modules/hosts/phostron/networking.nix @@ -0,0 +1,8 @@ +{ + flake.modules.nixos.phostron = { + networking = { + networkmanager.enable = true; + firewall.enable = true; + }; + }; +} diff --git a/modules/hosts/phostron/printing.nix b/modules/hosts/phostron/printing.nix new file mode 100644 index 0000000..ff2e715 --- /dev/null +++ b/modules/hosts/phostron/printing.nix @@ -0,0 +1,13 @@ +{ + flake.modules.nixos.phostron = {pkgs, ...}: { + services.printing.enable = true; + services.printing.drivers = with pkgs; [ + epson-escpr + ]; + + hardware.sane.enable = true; + hardware.sane.extraBackends = with pkgs; [ + epsonscan2 + ]; + }; +} diff --git a/modules/hosts/phostron/ssd.nix b/modules/hosts/phostron/ssd.nix new file mode 100644 index 0000000..f4b4f45 --- /dev/null +++ b/modules/hosts/phostron/ssd.nix @@ -0,0 +1,5 @@ +{ + flake.modules.nixos.phostron = { + services.fstrim.enable = true; + }; +} diff --git a/modules/modules/flake-parts.nix b/modules/modules/flake-parts.nix new file mode 100644 index 0000000..11cc653 --- /dev/null +++ b/modules/modules/flake-parts.nix @@ -0,0 +1,20 @@ +{ + inputs, + self, + ... +}: { + imports = [ + inputs.flake-parts.flakeModules.modules + inputs.flake-parts.flakeModules.easyOverlay + ]; + + perSystem = {system, ...}: { + _module.args.pkgs = import inputs.nixpkgs { + inherit system; + overlays = [self.overlays.default]; + config.allowUnfree = true; + }; + }; + + systems = []; +} diff --git a/modules/modules/home-manager-nixos-module.nix b/modules/modules/home-manager-nixos-module.nix new file mode 100644 index 0000000..fb2e014 --- /dev/null +++ b/modules/modules/home-manager-nixos-module.nix @@ -0,0 +1,26 @@ +{ + inputs, + self, + ... +}: { + flake.modules.nixos.homeManagerModule = { + imports = [inputs.home-manager.nixosModules.home-manager]; + + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + backupFileExtension = "backup"; + users = { + coyote = self.modules.homeManager.coyote; + }; + }; + }; + + flake.modules.homeManager.coyote = { + home = { + username = "coyote"; + homeDirectory = "/home/coyote"; + shell.enableShellIntegration = true; + }; + }; +} diff --git a/modules/users/coyote/configuration.nix b/modules/users/coyote/configuration.nix new file mode 100644 index 0000000..c667f33 --- /dev/null +++ b/modules/users/coyote/configuration.nix @@ -0,0 +1,29 @@ +{ + flake.modules.nixos.coyote = {pkgs, ...}: { + users = { + users.coyote = { + isNormalUser = true; + description = "coyote"; + uid = 1000; + extraGroups = [ + "wheel" + "networkmanager" + "lp" + "scanner" + "video" + "render" + "input" + "audio" + "kvm" + ]; + }; + + mutableUsers = true; + defaultUserShell = pkgs.fish; + }; + + environment.sessionVariables = { + NH_FLAKE = "/home/coyote/NixOS"; + }; + }; +} diff --git a/modules/users/coyote/home-packages.nix b/modules/users/coyote/home-packages.nix new file mode 100644 index 0000000..ca900ea --- /dev/null +++ b/modules/users/coyote/home-packages.nix @@ -0,0 +1,34 @@ +{ + flake.modules.homeManager.coyote = {pkgs, ...}: { + home.packages = with pkgs; [ + # internet + vivaldi + proton-vpn + # productivity + libreoffice-fresh + karp + keepassxc + pdfarranger + # multimedia + vlc + haruna + subtitlecomposer + kid3 + # music + furnace + corrscope + unstable.audacity + # editing + kdePackages.kdenlive + # games + osu-lazer-bin + pcsx2 + ppsspp + # wine + (bottles.override {removeWarningPopup = true;}) + # development + emacs + unstable.racket + ]; + }; +} diff --git a/modules/users/coyote/programs/fastfetch.nix b/modules/users/coyote/programs/fastfetch.nix new file mode 100644 index 0000000..4c9bcff --- /dev/null +++ b/modules/users/coyote/programs/fastfetch.nix @@ -0,0 +1,92 @@ +{ + flake.modules.homeManager.coyote = {pkgs, ...}: { + programs.fastfetch = { + enable = true; + settings = { + "$schema" = "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json"; + + logo = { + type = "small"; + padding.top = 4; + padding.left = 3; + padding.right = 4; + }; + + display.separator = " "; + + modules = [ + { + key = "╭─────────╮"; + type = "custom"; + } + { + key = "│ {#31}user {#keys}│"; + type = "title"; + format = "{user-name}"; + } + { + key = "│ {#32}host {#keys}│"; + type = "title"; + format = "{host-name}"; + } + { + key = "│ {#33}uptime {#keys}│"; + type = "uptime"; + } + { + key = "│ {#34}distro {#keys}│"; + type = "os"; + } + { + key = "│ {#35}kernel {#keys}│"; + type = "kernel"; + } + { + key = "│ {#36}desktop {#keys}│"; + type = "de"; + } + { + key = "│ {#31}term {#keys}│"; + type = "terminal"; + } + { + key = "│ {#32}shell {#keys}│"; + type = "shell"; + } + { + key = "│ {#33}cpu {#keys}│"; + type = "cpu"; + showPeCoreCount = true; + } + { + key = "│ {#34}disk {#keys}│"; + type = "disk"; + folders = "/"; + } + { + key = "│ {#35}memory {#keys}│"; + type = "memory"; + } + { + key = "│ {#36}network {#keys}│"; + type = "localip"; + format = "{ipv4} ({ifname})"; + } + { + key = "├─────────┤"; + type = "custom"; + } + { + key = "│ {#39}colors {#keys}│"; + type = "colors"; + symbol = "circle"; + } + { + key = "╰─────────╯"; + type = "custom"; + } + ]; + }; + }; + }; +} diff --git a/modules/users/coyote/programs/git.nix b/modules/users/coyote/programs/git.nix new file mode 100644 index 0000000..382efcc --- /dev/null +++ b/modules/users/coyote/programs/git.nix @@ -0,0 +1,23 @@ +{ + flake.modules.homeManager.coyote = { + programs.git = { + enable = true; + settings = { + user.name = "asnev"; + user.email = "notasnev@proton.me"; + }; + + signing = { + key = "/home/coyote/.ssh/id_ed25519.pub"; + format = "ssh"; + }; + + includes = [ + { + condition = "gitdir:/home/coyote/chitin/"; + contents.core.sshCommand = "ssh -i /home/coyote/.ssh/id_ed25519"; + } + ]; + }; + }; +} diff --git a/modules/users/coyote/programs/nvf.nix b/modules/users/coyote/programs/nvf.nix new file mode 100644 index 0000000..ca09bc0 --- /dev/null +++ b/modules/users/coyote/programs/nvf.nix @@ -0,0 +1,190 @@ +{inputs, ...}: { + flake.modules.homeManager.coyote = {pkgs, ...}: { + imports = [inputs.nvf.homeManagerModules.default]; + + home.packages = with pkgs.unstable; [ + lazygit + tree-sitter + ]; + + programs.nvf = { + enable = true; + defaultEditor = true; + enableManpages = true; + + settings.vim = { + viAlias = true; + vimAlias = true; + + syntaxHighlighting = true; + lineNumberMode = "relNumber"; + searchCase = "smart"; + hideSearchHighlight = false; + + clipboard = { + enable = true; + registers = "unnamedplus"; + providers.wl-copy.enable = true; + }; + + options = { + encoding = "utf-8"; + backspace = "indent,eol,start"; + history = 1000; + mouse = "a"; + updatetime = 300; + + ruler = true; + cursorline = true; + showcmd = true; + showmode = true; + laststatus = 1; + wildmenu = true; + wildmode = ["longest" "list" "full"]; + ttyfast = true; + lazyredraw = true; + signcolumn = "no"; + + autoindent = true; + expandtab = true; + smarttab = true; + tabstop = 4; + shiftwidth = 4; + softtabstop = 4; + + hlsearch = true; + incsearch = true; + + termguicolors = true; + background = "dark"; + showmatch = true; + }; + + theme = { + enable = true; + name = "gruvbox"; + style = "dark"; + }; + + globals.terminal_ansi_colors = [ + "#282828" + "#cc241d" + "#98971a" + "#d79921" + "#458588" + "#b16286" + "#689d6a" + "#a89984" + "#928374" + "#fb4934" + "#b8bb26" + "#fabd2f" + "#83a598" + "#d3869b" + "#8ec07c" + "#ebdbb2" + ]; + + keymaps = [ + { + mode = "i"; + key = ""; + action = "λ"; + desc = "inserts lambda"; + } + ]; + + languages.nix = { + enable = true; + treesitter.enable = true; + lsp.enable = true; + format.enable = false; + extraDiagnostics.enable = false; + }; + + utility.undotree.enable = true; + + augroups = [ + { + name = "my_filetype_settings"; + clear = true; + } + ]; + + autocmds = [ + { + event = ["FileType"]; + pattern = [ + "javascript" + "javascriptreact" + "typescript" + "typescriptreact" + "html" + "css" + "scss" + "json" + "jsonc" + "vue" + "svelte" + "yaml" + "toml" + "markdown" + "nix" + "vim" + "ruby" + "eruby" + "dart" + "haskell" + "elm" + ]; + group = "my_filetype_settings"; + desc = "2-space indent"; + command = "setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=2"; + } + { + event = ["FileType"]; + pattern = [ + "python" + "rust" + "java" + "lua" + "c" + "cpp" + "cs" + "php" + "kotlin" + "swift" + "scala" + "perl" + ]; + group = "my_filetype_settings"; + desc = "4-space indent"; + command = "setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4"; + } + { + event = ["FileType"]; + pattern = ["go" "gomod" "make"]; + group = "my_filetype_settings"; + desc = "hard tabs"; + command = "setlocal noexpandtab tabstop=4 shiftwidth=4 softtabstop=0"; + } + { + event = ["FileType"]; + pattern = ["lisp" "scheme" "clojure" "racket" "fennel"]; + group = "my_filetype_settings"; + desc = "Lisp-style indent"; + command = "setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=2 lisp autoindent"; + } + ]; + + luaConfigRC.my_lispwords = '' + vim.opt.lispwords:append({ + "defun", "defmacro", "defvar", "defparameter", "defmethod", + "define-syntax", "lambda", "let", "let*", "letrec", "flet", + "labels", "progn", "when", "unless", "if", "cond", + }) + ''; + }; + }; + }; +} diff --git a/modules/users/coyote/programs/obs.nix b/modules/users/coyote/programs/obs.nix new file mode 100644 index 0000000..35b7e57 --- /dev/null +++ b/modules/users/coyote/programs/obs.nix @@ -0,0 +1,15 @@ +{ + flake.modules.homeManager.coyote = {pkgs, ...}: { + programs.obs-studio = { + enable = true; + plugins = with pkgs.obs-studio-plugins; [ + input-overlay + droidcam-obs + ]; + }; + }; + + flake.modules.nixos.coyote = { + programs.obs-studio.enableVirtualCamera = true; + }; +} diff --git a/modules/users/coyote/programs/shell.nix b/modules/users/coyote/programs/shell.nix new file mode 100644 index 0000000..a9bb9e9 --- /dev/null +++ b/modules/users/coyote/programs/shell.nix @@ -0,0 +1,15 @@ +{ + flake.modules.homeManager.coyote = { + programs.fish = { + enable = true; + shellAbbrs = { + l = "eza --grid --all"; + ll = "eza --long --all"; + ls = "eza"; + ".." = "cd .."; + "..." = "cd ../.."; + cat = "bat"; + }; + }; + }; +} diff --git a/modules/users/coyote/programs/ssh.nix b/modules/users/coyote/programs/ssh.nix new file mode 100644 index 0000000..78ebc2b --- /dev/null +++ b/modules/users/coyote/programs/ssh.nix @@ -0,0 +1,20 @@ +{ + flake.modules.homeManager.coyote = { + programs.ssh = { + enable = true; + enableDefaultConfig = false; + settings."*" = { + ForwardAgent = false; + AddKeysToAgent = "yes"; # no passphrase, silent auto-add + Compression = false; + ServerAliveInterval = 0; + ServerAliveCountMax = 3; + HashKnownHosts = false; + UserKnownHostsFile = "~/.ssh/known_hosts"; + ControlMaster = "no"; + ControlPath = "~/.ssh/master-%r@%n:%p"; + ControlPersist = "no"; + }; + }; + }; +} diff --git a/modules/users/coyote/programs/starship.nix b/modules/users/coyote/programs/starship.nix new file mode 100644 index 0000000..3f92f84 --- /dev/null +++ b/modules/users/coyote/programs/starship.nix @@ -0,0 +1,19 @@ +{ + flake.modules.homeManager.coyote = {pkgs, ...}: { + programs.starship = { + enable = true; + package = pkgs.unstable.starship; + enableTransience = true; + settings = { + "$schema" = "https://starship.rs/config-schema.json"; + git_status = { + ahead = ">"; + behind = "<"; + diverged = "<>"; + renamed = "r"; + deleted = "d"; + }; + }; + }; + }; +} diff --git a/modules/users/coyote/programs/tmux.nix b/modules/users/coyote/programs/tmux.nix new file mode 100644 index 0000000..02ec9fe --- /dev/null +++ b/modules/users/coyote/programs/tmux.nix @@ -0,0 +1,21 @@ +{ + flake.modules.homeManager.coyote = { + programs.tmux = { + enable = true; + clock24 = true; + baseIndex = 1; + keyMode = "vi"; + terminal = "tmux-256color"; + escapeTime = 10; + extraConfig = '' + set -g pane-base-index 1 + set-window-option -g pane-base-index 1 + set-option -g renumber-windows on + set-option -g status-right "\"#W\"" + set -ga terminal-overrides ",*:RGB" + set -g mouse on + set -g set-clipboard on + ''; + }; + }; +} diff --git a/modules/users/coyote/programs/yt-dlp.nix b/modules/users/coyote/programs/yt-dlp.nix new file mode 100644 index 0000000..39a7445 --- /dev/null +++ b/modules/users/coyote/programs/yt-dlp.nix @@ -0,0 +1,8 @@ +{ + flake.modules.homeManager.coyote = {pkgs, ...}: { + programs.yt-dlp = { + enable = true; + package = pkgs.unstable.yt-dlp; + }; + }; +}