commit 780ddcda1c0588b0f59bbe9d83c4685fd877953e Author: benstrb Date: Sat Jan 3 12:48:28 2026 +0100 first commit diff --git a/assets/bocchi/bocchi.txt b/assets/bocchi/bocchi.txt new file mode 100644 index 0000000..924ae4d --- /dev/null +++ b/assets/bocchi/bocchi.txt @@ -0,0 +1,16 @@ +     β–„β–„β–€β–€β–€β–€β–€β–€β–€β–€β–€β–„β–„           +   β–„β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–„     + β–„β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–„  +β–„β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€ +β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€ β–€β–€ +  β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€     +  β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€     +  β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–„    +   β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€    +    β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€    +    β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€    +    β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€     +     β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€      +       β–€β–€β–€β–€β–€β–€β–€β–€β–€             +      β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€            + diff --git a/assets/pictures/bocchi_lockscreen.png b/assets/pictures/bocchi_lockscreen.png new file mode 100644 index 0000000..f6130ee Binary files /dev/null and b/assets/pictures/bocchi_lockscreen.png differ diff --git a/assets/pictures/bocchi_wallpaper.png b/assets/pictures/bocchi_wallpaper.png new file mode 100644 index 0000000..7070062 Binary files /dev/null and b/assets/pictures/bocchi_wallpaper.png differ diff --git a/assets/pictures/roy_bocchi.png b/assets/pictures/roy_bocchi.png new file mode 100644 index 0000000..11a2118 Binary files /dev/null and b/assets/pictures/roy_bocchi.png differ diff --git a/configuration/main/500G-disk.nix b/configuration/main/500G-disk.nix new file mode 100644 index 0000000..2d13ee0 --- /dev/null +++ b/configuration/main/500G-disk.nix @@ -0,0 +1,7 @@ +{ + fileSystems."/mnt/500G-disk" = { + device = "/dev/disk/by-uuid/1a899f03-4c6a-460a-9635-c4b208b29fba"; + fsType = "ext4"; + options = ["nofail" "user" "rw" "exec"]; + }; +} diff --git a/configuration/main/configuration.nix b/configuration/main/configuration.nix new file mode 100644 index 0000000..f8410e5 --- /dev/null +++ b/configuration/main/configuration.nix @@ -0,0 +1,41 @@ +{ + pkgs, + inputs, + ... +}: { + imports = [ + ./hardware-configuration.nix + ./verbatim.nix + ./500G-disk.nix + + ../modules/graphics.nix + ../modules/boot.nix + ../modules/networking.nix + ../modules/xdg-settings.nix + ../modules/window-manager.nix + ../modules/sddm.nix + ../modules/main-user.nix + ../modules/programs.nix + ../modules/ssh.nix + ../modules/sound.nix + ../modules/printing.nix + ../modules/input-handle.nix + ../modules/keyboard.nix + ../modules/locale.nix + ]; + + nix.settings.experimental-features = ["nix-command" "flakes"]; + + nixpkgs.config = { + allowUnfree = true; + nvidia.acceptLicense = true; + }; + + services.xserver.enable = true; + + environment.shells = [pkgs.nushell]; + + home-manager.extraSpecialArgs = {inherit inputs;}; + + system.stateVersion = "25.11"; +} diff --git a/configuration/main/hardware-configuration.nix b/configuration/main/hardware-configuration.nix new file mode 100644 index 0000000..66dfb14 --- /dev/null +++ b/configuration/main/hardware-configuration.nix @@ -0,0 +1,30 @@ +# Do not modify this file! It was generated by β€˜nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "ata_generic" "ehci_pci" "ahci" "nvme" "usbhid" "usb_storage" "uas" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/339dddc4-c4f8-47ea-a7a9-471c77f7c89e"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/1ff36da1-f1eb-4ae0-911f-d638ad5cf5ec"; + fsType = "ext4"; + }; + + swapDevices = [ ]; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/configuration/main/verbatim.nix b/configuration/main/verbatim.nix new file mode 100644 index 0000000..076eeb8 --- /dev/null +++ b/configuration/main/verbatim.nix @@ -0,0 +1,7 @@ +{ + fileSystems."/mnt/verbatim" = { + device = "/dev/disk/by-uuid/2aa5f849-1df0-4f3a-b7db-ef64d06b16e4"; + fsType = "ext4"; + options = ["nofail" "user" "rw" "exec"]; + }; +} diff --git a/configuration/modules/boot.nix b/configuration/modules/boot.nix new file mode 100644 index 0000000..7aed324 --- /dev/null +++ b/configuration/modules/boot.nix @@ -0,0 +1,10 @@ +{pkgs, ...}: { + boot = { + kernelPackages = pkgs.linuxPackages_6_6; + + loader.grub = { + enable = true; + device = "/dev/disk/by-id/ata-KINGSTON_SKC300S37A60G_50026B7239039148"; + }; + }; +} diff --git a/configuration/modules/graphics.nix b/configuration/modules/graphics.nix new file mode 100644 index 0000000..164d7ae --- /dev/null +++ b/configuration/modules/graphics.nix @@ -0,0 +1,13 @@ +{config, ...}: { + services.xserver.videoDrivers = ["nvidia"]; + + hardware = { + graphics.enable = true; + + nvidia = { + modesetting.enable = true; + open = false; + package = config.boot.kernelPackages.nvidiaPackages.legacy_470; + }; + }; +} diff --git a/configuration/modules/input-handle.nix b/configuration/modules/input-handle.nix new file mode 100644 index 0000000..2578a46 --- /dev/null +++ b/configuration/modules/input-handle.nix @@ -0,0 +1,3 @@ +{ + services.libinput.enable = true; +} diff --git a/configuration/modules/keyboard.nix b/configuration/modules/keyboard.nix new file mode 100644 index 0000000..96a81b1 --- /dev/null +++ b/configuration/modules/keyboard.nix @@ -0,0 +1,6 @@ +{ + services.xserver.xkb = { + layout = "cz"; + options = "caps:escape"; + }; +} diff --git a/configuration/modules/locale.nix b/configuration/modules/locale.nix new file mode 100644 index 0000000..c1e9d41 --- /dev/null +++ b/configuration/modules/locale.nix @@ -0,0 +1,19 @@ +{ + console.keyMap = "cz-lat2"; + time.timeZone = "Europe/Prague"; + + i18n = { + defaultLocale = "en_US.UTF-8"; + extraLocaleSettings = { + LC_ADDRESS = "cs_CZ.UTF-8"; + LC_IDENTIFICATION = "cs_CZ.UTF-8"; + LC_MEASUREMENT = "cs_CZ.UTF-8"; + LC_MONETARY = "cs_CZ.UTF-8"; + LC_NAME = "cs_CZ.UTF-8"; + LC_NUMERIC = "cs_CZ.UTF-8"; + LC_PAPER = "cs_CZ.UTF-8"; + LC_TELEPHONE = "cs_CZ.UTF-8"; + LC_TIME = "cs_CZ.UTF-8"; + }; + }; +} diff --git a/configuration/modules/main-user.nix b/configuration/modules/main-user.nix new file mode 100644 index 0000000..b5c6253 --- /dev/null +++ b/configuration/modules/main-user.nix @@ -0,0 +1,8 @@ +{pkgs, ...}: { + users.users.benag = { + isNormalUser = true; + extraGroups = ["wheel"]; + + shell = pkgs.nushell; + }; +} diff --git a/configuration/modules/networking.nix b/configuration/modules/networking.nix new file mode 100644 index 0000000..6611ed0 --- /dev/null +++ b/configuration/modules/networking.nix @@ -0,0 +1,6 @@ +{ + networking = { + hostName = "nixos"; + networkmanager.enable = true; + }; +} diff --git a/configuration/modules/printing.nix b/configuration/modules/printing.nix new file mode 100644 index 0000000..dc591ea --- /dev/null +++ b/configuration/modules/printing.nix @@ -0,0 +1,3 @@ +{ + services.printing.enable = true; +} diff --git a/configuration/modules/programs.nix b/configuration/modules/programs.nix new file mode 100644 index 0000000..6457a97 --- /dev/null +++ b/configuration/modules/programs.nix @@ -0,0 +1,8 @@ +{ + programs = { + firefox.enable = true; + steam.enable = true; + bash.blesh.enable = true; + nix-ld.enable = true; + }; +} diff --git a/configuration/modules/sddm.nix b/configuration/modules/sddm.nix new file mode 100644 index 0000000..714abbb --- /dev/null +++ b/configuration/modules/sddm.nix @@ -0,0 +1,3 @@ +{ + services.displayManager.sddm.enable = true; +} diff --git a/configuration/modules/sound.nix b/configuration/modules/sound.nix new file mode 100644 index 0000000..945248d --- /dev/null +++ b/configuration/modules/sound.nix @@ -0,0 +1,13 @@ +{ + services = { + pipewire = { + enable = true; + pulse.enable = true; + + alsa = { + enable = true; + support32Bit = true; + }; + }; + }; +} diff --git a/configuration/modules/ssh.nix b/configuration/modules/ssh.nix new file mode 100644 index 0000000..8f0456f --- /dev/null +++ b/configuration/modules/ssh.nix @@ -0,0 +1,3 @@ +{ + services.openssh.enable = true; +} diff --git a/configuration/modules/window-manager.nix b/configuration/modules/window-manager.nix new file mode 100644 index 0000000..49570d8 --- /dev/null +++ b/configuration/modules/window-manager.nix @@ -0,0 +1,5 @@ +{ + services.xserver.windowManager = { + bspwm.enable = true; + }; +} diff --git a/configuration/modules/xdg-settings.nix b/configuration/modules/xdg-settings.nix new file mode 100644 index 0000000..47e31f8 --- /dev/null +++ b/configuration/modules/xdg-settings.nix @@ -0,0 +1,9 @@ +{pkgs, ...}: { + xdg.portal = { + enable = true; + extraPortals = [pkgs.xdg-desktop-portal-gtk]; + configPackages = with pkgs; [ + xdg-desktop-portal-gtk + ]; + }; +} diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..e67c90b --- /dev/null +++ b/flake.lock @@ -0,0 +1,176 @@ +{ + "nodes": { + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1751685974, + "narHash": "sha256-NKw96t+BgHIYzHUjkTK95FqYRVKB8DHpVhefWSz/kTw=", + "ref": "refs/heads/main", + "rev": "549f2762aebeff29a2e5ece7a7dc0f955281a1d1", + "revCount": 92, + "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": [ + "nvf", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1760948891, + "narHash": "sha256-TmWcdiUUaWk8J4lpjzu4gCGxWY6/Ok7mOK4fIFfBuU4=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "864599284fc7c0ba6357ed89ed5e2cd5040f0c04", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1766850854, + "narHash": "sha256-asWZx7X5FRrna8ntfE0+vTBUIPLth8R8bckbOpfT3Us=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "2d36a6de2fee5cd232b0a28137d95541c21eb7f0", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "mnw": { + "locked": { + "lastModified": 1758834834, + "narHash": "sha256-Y7IvY4F8vajZyp3WGf+KaiIVwondEkMFkt92Cr9NZmg=", + "owner": "Gerg-L", + "repo": "mnw", + "rev": "cfbc7d1cc832e318d0863a5fc91d940a96034001", + "type": "github" + }, + "original": { + "owner": "Gerg-L", + "repo": "mnw", + "type": "github" + } + }, + "ndg": { + "inputs": { + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1765435293, + "narHash": "sha256-HRp4g6qBCb8vpJ17s2FacMRXRszM73uBiR56aILMELA=", + "owner": "feel-co", + "repo": "ndg", + "rev": "65bf834b332d5f8b28d95ea14c7974be7c272971", + "type": "github" + }, + "original": { + "owner": "feel-co", + "repo": "ndg", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1766651565, + "narHash": "sha256-QEhk0eXgyIqTpJ/ehZKg9IKS7EtlWxF3N7DXy42zPfU=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "3e2499d5539c16d0d173ba53552a4ff8547f4539", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1764242076, + "narHash": "sha256-sKoIWfnijJ0+9e4wRvIgm/HgE27bzwQxcEmo2J/gNpI=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "2fad6eac6077f03fe109c4d4eb171cf96791faa4", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nvf": { + "inputs": { + "flake-compat": "flake-compat", + "flake-parts": "flake-parts", + "mnw": "mnw", + "ndg": "ndg", + "nixpkgs": [ + "nixpkgs" + ], + "systems": "systems" + }, + "locked": { + "lastModified": 1765537745, + "narHash": "sha256-EaFYxx2aSuM2xx+l+E55YNMCJOoQBl2tJybxyF0pPqw=", + "owner": "notashelf", + "repo": "nvf", + "rev": "8e031476d0d7f326b63c9c5522f840e2f8b724c0", + "type": "github" + }, + "original": { + "owner": "notashelf", + "ref": "v0.8", + "repo": "nvf", + "type": "github" + } + }, + "root": { + "inputs": { + "home-manager": "home-manager", + "nixpkgs": "nixpkgs", + "nvf": "nvf" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..81f7376 --- /dev/null +++ b/flake.nix @@ -0,0 +1,44 @@ +{ + description = "A very basic flake"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; + + nvf = { + url = "github:notashelf/nvf/v0.8"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + home-manager = { + url = "github:nix-community/home-manager"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; + + outputs = inputs @ { + self, + nixpkgs, + home-manager, + ... + }: { + nixosConfigurations.benag = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + + specialArgs = {inherit inputs;}; + + modules = [ + ./configuration/main/configuration.nix + + home-manager.nixosModules.default + + { + home-manager = { + useUserPackages = true; + useGlobalPkgs = true; + users.benag = ./home/home.nix; + }; + } + ]; + }; + }; +} diff --git a/home/home.nix b/home/home.nix new file mode 100644 index 0000000..1859513 --- /dev/null +++ b/home/home.nix @@ -0,0 +1,40 @@ +{pkgs, ...}: { + home = { + username = "benag"; + homeDirectory = "/home/benag"; + stateVersion = "25.11"; + }; + + programs.home-manager.enable = true; + + imports = [ + ./modules/bspwm.nix + ./modules/sxhkd.nix + + ./modules/picom.nix + + ./modules/shells.nix + ./modules/nvf.nix + ./modules/kitty.nix + ./modules/fastfetch.nix + ./modules/git.nix + ./modules/create-project/create-project.nix + ]; + + home.packages = [ + pkgs.bspwm + pkgs.sxhkd + + pkgs.feh + pkgs.picom + + pkgs.rofi + pkgs.neovim + pkgs.kitty + pkgs.fastfetch + pkgs.pavucontrol + pkgs.btop + + pkgs.discord + ]; +} diff --git a/home/modules/bspwm.nix b/home/modules/bspwm.nix new file mode 100644 index 0000000..e57eaeb --- /dev/null +++ b/home/modules/bspwm.nix @@ -0,0 +1,15 @@ +{ + xsession.windowManager.bspwm = { + enable = true; + + settings = { + focus_follows_pointer = true; + pointer_follows_focus = true; + pointer_follows_monitor = true; + }; + + extraConfig = '' + feh --bg-fill "/home/benag/.nix-config/assets/pictures/bocchi_wallpaper.png" + ''; + }; +} diff --git a/home/modules/create-project/create-project.nix b/home/modules/create-project/create-project.nix new file mode 100644 index 0000000..6acb525 --- /dev/null +++ b/home/modules/create-project/create-project.nix @@ -0,0 +1,62 @@ +{pkgs, ...}: { + home.packages = [ + (pkgs.writeScriptBin "create-project" + '' + #!${pkgs.nushell}/bin/nu + + def main [ + type?: string + name?: string + --local (-l) + ] { + + if $name == null or $type == null { + print "Usage: create-project [Options: -l]" + exit 1 + } + + if ($name | str contains "/") or ($name | str contains ".") { + print "This is not a valid name for a project" + exit 1 + } + + if ($type | str contains "/") or ($type | str contains ".") { + print "This is not a valid project type" + exit 1 + } + + mkdir $name + cd $name + + if ($"~/.nix-config/home/modules/create-project/project-blueprints/($type)" | path expand | ls $in | length) > 0 { + glob $"~/.nix-config/home/modules/create-project/project-blueprints/($type)/*" | each { |file| cp $file . } + } + + if ($"./init.sh" | path type) == "file" { + bash $"./init.sh" $name + rm "init.sh" + } + + echo "use flake" | save .envrc + direnv allow + + git init + git add . + git commit -m "Project setup" + + if $local { + print "You are all done" + exit 0 + } + + ${pkgs.tea}/bin/tea repos create --name $name + git remote add origin $"https://git.stribrny.org/ben_ag/($name).git" + git push -u origin main + + print "You are all done" + exit 0 + + } + '') + ]; +} diff --git a/home/modules/create-project/project-blueprints/rust/.gitignore b/home/modules/create-project/project-blueprints/rust/.gitignore new file mode 100644 index 0000000..eb5a316 --- /dev/null +++ b/home/modules/create-project/project-blueprints/rust/.gitignore @@ -0,0 +1 @@ +target diff --git a/home/modules/create-project/project-blueprints/rust/flake.nix b/home/modules/create-project/project-blueprints/rust/flake.nix new file mode 100644 index 0000000..3b6f7ce --- /dev/null +++ b/home/modules/create-project/project-blueprints/rust/flake.nix @@ -0,0 +1,29 @@ +{ + description = "My rust development shell"; + inputs = { + nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; + rust-overlay = { + url = "github:oxalica/rust-overlay"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; + + outputs = {nixpkgs, ...} @ inputs: let + system = "x86_64-linux"; + overlays = [(import inputs.rust-overlay)]; + pkgs = import nixpkgs { + inherit system overlays; + }; + in { + devShells."${system}" = { + default = pkgs.mkShell { + buildInputs = with pkgs; [ + gcc + gnumake + rust-bin.stable.latest.default + evcxr + ]; + }; + }; + }; +} diff --git a/home/modules/create-project/project-blueprints/rust/init.sh b/home/modules/create-project/project-blueprints/rust/init.sh new file mode 100644 index 0000000..c925bdc --- /dev/null +++ b/home/modules/create-project/project-blueprints/rust/init.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +nix develop . --command bash -c "cargo new $1" + +cp -r "$1"/* . +rm -fr "$1" diff --git a/home/modules/fastfetch.nix b/home/modules/fastfetch.nix new file mode 100644 index 0000000..d545bfe --- /dev/null +++ b/home/modules/fastfetch.nix @@ -0,0 +1,88 @@ +{ + programs.fastfetch = { + enable = true; + + settings = { + logo = { + source = "/home/benag/.nix-config/assets/bocchi/bocchi.txt"; + padding = { + top = 1; + left = 1; + }; + }; + + display = { + separator = " -> "; + }; + + modules = [ + "break" + { + type = "custom"; + format = "β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€Hardware──────────────────────┐"; + } + { + type = "title"; + key = " PC"; + keyColor = "green"; + } + { + type = "disk"; + key = "β”‚ β”œο’‰"; + device = "/dev/sdb"; + keyColor = "green"; + } + + { + type = "cpu"; + key = "β”‚ β”œο’Ό"; + keyColor = "green"; + } + { + type = "gpu"; + key = "β”‚ β”œσ°›"; + keyColor = "green"; + } + { + type = "memory"; + key = "β”” └󰍛"; + keyColor = "green"; + } + { + type = "custom"; + format = "β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜"; + } + "break" + { + type = "custom"; + format = "β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€Software──────────────────────┐"; + } + { + type = "os"; + key = "󰻀 OS"; + keyColor = "yellow"; + } + { + type = "kernel"; + key = "β”‚ β”œο€“"; + keyColor = "yellow"; + } + { + type = "packages"; + key = "β”‚ β”œσ°–"; + keyColor = "yellow"; + } + { + type = "shell"; + key = "β”” β””ο’‰"; + keyColor = "yellow"; + } + + { + type = "custom"; + format = "β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜"; + } + ]; + }; + }; +} diff --git a/home/modules/git.nix b/home/modules/git.nix new file mode 100644 index 0000000..cd9b46f --- /dev/null +++ b/home/modules/git.nix @@ -0,0 +1,13 @@ +{pkgs, ...}: { + programs.git = { + enable = true; + package = pkgs.gitFull; + settings = { + user.name = "benstrb"; + user.email = "ben.stribrny@gmail.com"; + init.defaultBranch = "main"; + github.user = "benstrb"; + credential.helper = "store"; + }; + }; +} diff --git a/home/modules/kitty.nix b/home/modules/kitty.nix new file mode 100644 index 0000000..8b31be3 --- /dev/null +++ b/home/modules/kitty.nix @@ -0,0 +1,9 @@ +{ + programs.kitty = { + enable = true; + + settings = { + background_opacity = 0.75; + }; + }; +} diff --git a/home/modules/nvf.nix b/home/modules/nvf.nix new file mode 100644 index 0000000..c034b2f --- /dev/null +++ b/home/modules/nvf.nix @@ -0,0 +1,154 @@ +{ + pkgs, + inputs, + ... +}: { + imports = [ + inputs.nvf.homeManagerModules.default + ]; + + programs.nvf = { + enable = true; + enableManpages = true; + + settings.vim = { + theme = { + enable = true; + transparent = true; + + name = "catppuccin"; + style = "mocha"; + }; + + lsp = { + enable = true; + null-ls.enable = false; + + inlayHints.enable = true; + formatOnSave = true; + lspkind.enable = true; + lspsaga.enable = true; + trouble.enable = true; + }; + + debugger = { + nvim-dap = { + enable = true; + ui.enable = true; + }; + }; + + options = { + tabstop = 2; + expandtab = false; + autoindent = true; + shiftwidth = 2; + }; + + clipboard = { + enable = true; + registers = "unnamedplus"; + providers = { + xclip = { + enable = true; + package = pkgs.xclip; + }; + }; + }; + + languages = { + enableFormat = true; + enableTreesitter = false; + enableExtraDiagnostics = true; + + nix.enable = true; + markdown.enable = true; + + nu.enable = true; + bash.enable = true; + + css.enable = true; + html = { + enable = true; + lsp.servers = [ + "emmet-ls" + "superhtml" + ]; + }; + + python.enable = true; + + sql.enable = true; + ts.enable = true; + zig.enable = true; + csharp.enable = true; + rust = { + enable = true; + extensions.crates-nvim.enable = true; + }; + }; + + visuals = { + nvim-web-devicons.enable = true; + nvim-cursorline.enable = true; + cinnamon-nvim.enable = true; + fidget-nvim.enable = true; + + highlight-undo.enable = true; + indent-blankline.enable = true; + }; + + statusline = { + lualine = { + enable = true; + }; + }; + + autopairs.nvim-autopairs.enable = true; + + autocomplete = { + nvim-cmp.enable = true; + blink-cmp.enable = false; + }; + + snippets.luasnip.enable = true; + + telescope.enable = true; + + git = { + enable = true; + gitsigns.enable = true; + gitsigns.codeActions.enable = false; + }; + + dashboard.alpha.enable = true; + + notify.nvim-notify.enable = true; + + projects.project-nvim.enable = true; + + utility = { + ccc.enable = true; + diffview-nvim.enable = true; + icon-picker.enable = true; + surround.enable = true; + + motion = { + hop.enable = true; + leap.enable = true; + }; + }; + + comments.comment-nvim.enable = true; + + ui = { + noice.enable = true; + colorizer.enable = true; + illuminate.enable = true; + + fastaction.enable = true; + }; + }; + }; +} + diff --git a/home/modules/picom.nix b/home/modules/picom.nix new file mode 100644 index 0000000..0957531 --- /dev/null +++ b/home/modules/picom.nix @@ -0,0 +1,7 @@ +{ + services.picom = { + enable = true; + + backend = "glx"; + }; +} diff --git a/home/modules/shells.nix b/home/modules/shells.nix new file mode 100644 index 0000000..a8752ac --- /dev/null +++ b/home/modules/shells.nix @@ -0,0 +1,111 @@ +{pkgs, ...}: { + home.packages = with pkgs; [ + bat + fzf + fd + eza + most + ]; + + home.sessionVariables = { + EDITOR = "neovim"; + PAGER = "most"; + MANPAGER = "most"; + MANROFFOPT = "-c"; + }; + + programs = { + bash.enable = true; + fzf.enable = true; + eza.enable = true; + + direnv = { + enable = true; + silent = true; + nix-direnv.enable = true; + }; + + nushell = { + enable = true; + + settings = { + show_banner = false; + }; + + shellAliases = { + cat = "bat -p -P"; + + system = "nvim /home/benag/.nix-config/flake.nix"; + home = "nvim /home/benag/.nix-config/home/home.nix"; + config = "nvim /home/benag/.nix-config/configuration/main/configuration.nix"; + }; + + extraConfig = '' + if "IN_NIX_SHELL" in $env == false { + fastfetch + } + + def c [] { + clear + fastfetch + } + + def rebuild [message?: string] { + cd /home/benag/.nix-config + let commit_message = if $message != null {$message} else {"non important commit"} + + try { + git pull + git add . + git commit -m $commit_message + git push + } + + sudo nixos-rebuild switch --flake . + } + + def --env fzf-cd [] { + let dir = (fd -H -t d -L . | fzf --reverse --height 40% --border rounded --preview=("eza --color=always --group-directories-first --icons --long {}") --preview-window=border-left) + + if $dir != null and $dir != "" { + cd $dir + } + } + + def --env fzf-nvim [] { + let file = (fd -H -t f -L . | fzf --reverse --height 40% --border rounded --preview=("bat -p -P --color always {}") --preview-window=border-left) + + if $file != null and $file != "" { + nvim $file + } + } + + $env.config.keybindings = ($env.config.keybindings | append { + name: "fzf-cd" + modifier: "control" + keycode: "char_f" + mode: "emacs" + event: [ + { + send: "executehostcommand" + cmd: 'fzf-cd' + } + ] + }) + + $env.config.keybindings = ($env.config.keybindings | append { + name: "fzf-nvim" + modifier: "control" + keycode: "char_e" + mode: "emacs" + event: [ + { + send: "executehostcommand" + cmd: 'fzf-nvim' + } + ] + }) + ''; + }; + }; +} diff --git a/home/modules/sxhkd.nix b/home/modules/sxhkd.nix new file mode 100644 index 0000000..255f71b --- /dev/null +++ b/home/modules/sxhkd.nix @@ -0,0 +1,16 @@ +{ + services.sxhkd = { + enable = true; + + keybindings = { + "super + q" = "bspc node -c"; + "super + f" = "bspc node -t fullscreen"; + "super + t" = "bspc node -t tiled"; + + "super + Return" = "kitty"; + "super + b" = "firefox"; + "super + d" = "discord"; + "super + a" = "rofi -show drun"; + }; + }; +}