first commit

This commit is contained in:
benstrb 2026-01-03 12:48:28 +01:00
commit 780ddcda1c
37 changed files with 981 additions and 0 deletions

16
assets/bocchi/bocchi.txt Normal file
View file

@ -0,0 +1,16 @@
     ▄▄▀▀▀▀▀▀▀▀▀▄▄          
   ▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄    
 ▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄ 
▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ ▀▀
  ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀    
  ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀    
  ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄   
   ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀   
    ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀   
    ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀   
    ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀    
     ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀     
       ▀▀▀▀▀▀▀▀▀            
      ▀▀▀▀▀▀▀▀▀▀▀           

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 MiB

View file

@ -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"];
};
}

View file

@ -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";
}

View file

@ -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;
}

View file

@ -0,0 +1,7 @@
{
fileSystems."/mnt/verbatim" = {
device = "/dev/disk/by-uuid/2aa5f849-1df0-4f3a-b7db-ef64d06b16e4";
fsType = "ext4";
options = ["nofail" "user" "rw" "exec"];
};
}

View file

@ -0,0 +1,10 @@
{pkgs, ...}: {
boot = {
kernelPackages = pkgs.linuxPackages_6_6;
loader.grub = {
enable = true;
device = "/dev/disk/by-id/ata-KINGSTON_SKC300S37A60G_50026B7239039148";
};
};
}

View file

@ -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;
};
};
}

View file

@ -0,0 +1,3 @@
{
services.libinput.enable = true;
}

View file

@ -0,0 +1,6 @@
{
services.xserver.xkb = {
layout = "cz";
options = "caps:escape";
};
}

View file

@ -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";
};
};
}

View file

@ -0,0 +1,8 @@
{pkgs, ...}: {
users.users.benag = {
isNormalUser = true;
extraGroups = ["wheel"];
shell = pkgs.nushell;
};
}

View file

@ -0,0 +1,6 @@
{
networking = {
hostName = "nixos";
networkmanager.enable = true;
};
}

View file

@ -0,0 +1,3 @@
{
services.printing.enable = true;
}

View file

@ -0,0 +1,8 @@
{
programs = {
firefox.enable = true;
steam.enable = true;
bash.blesh.enable = true;
nix-ld.enable = true;
};
}

View file

@ -0,0 +1,3 @@
{
services.displayManager.sddm.enable = true;
}

View file

@ -0,0 +1,13 @@
{
services = {
pipewire = {
enable = true;
pulse.enable = true;
alsa = {
enable = true;
support32Bit = true;
};
};
};
}

View file

@ -0,0 +1,3 @@
{
services.openssh.enable = true;
}

View file

@ -0,0 +1,5 @@
{
services.xserver.windowManager = {
bspwm.enable = true;
};
}

View file

@ -0,0 +1,9 @@
{pkgs, ...}: {
xdg.portal = {
enable = true;
extraPortals = [pkgs.xdg-desktop-portal-gtk];
configPackages = with pkgs; [
xdg-desktop-portal-gtk
];
};
}

176
flake.lock generated Normal file
View file

@ -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
}

44
flake.nix Normal file
View file

@ -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;
};
}
];
};
};
}

40
home/home.nix Normal file
View file

@ -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
];
}

15
home/modules/bspwm.nix Normal file
View file

@ -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"
'';
};
}

View file

@ -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 <name> <type> [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
}
'')
];
}

View file

@ -0,0 +1 @@
target

View file

@ -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
];
};
};
};
}

View file

@ -0,0 +1,6 @@
#!/usr/bin/env bash
nix develop . --command bash -c "cargo new $1"
cp -r "$1"/* .
rm -fr "$1"

View file

@ -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 = "";
}
];
};
};
}

13
home/modules/git.nix Normal file
View file

@ -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";
};
};
}

9
home/modules/kitty.nix Normal file
View file

@ -0,0 +1,9 @@
{
programs.kitty = {
enable = true;
settings = {
background_opacity = 0.75;
};
};
}

154
home/modules/nvf.nix Normal file
View file

@ -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;
};
};
};
}

7
home/modules/picom.nix Normal file
View file

@ -0,0 +1,7 @@
{
services.picom = {
enable = true;
backend = "glx";
};
}

111
home/modules/shells.nix Normal file
View file

@ -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'
}
]
})
'';
};
};
}

16
home/modules/sxhkd.nix Normal file
View file

@ -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";
};
};
}