aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgrm@eyesin.space <grm@eyesin.space>2025-09-02 23:04:24 +0000
committergrm@eyesin.space <grm@eyesin.space>2025-09-02 23:04:24 +0000
commit47ef05ab310bb466300e93d1459370450414fbc4 (patch)
tree808f155d2871f831af743509de982c4c9789357c
downloadnixos-config-47ef05ab310bb466300e93d1459370450414fbc4.tar.gz
nixos-config-47ef05ab310bb466300e93d1459370450414fbc4.tar.bz2
nixos-config-47ef05ab310bb466300e93d1459370450414fbc4.zip
-rw-r--r--.gitignore1
-rw-r--r--Makefile47
-rw-r--r--README.md19
-rw-r--r--flake.lock48
-rw-r--r--flake.nix36
-rw-r--r--home/core/default.nix66
-rw-r--r--home/core/fzf.nix6
-rw-r--r--home/core/git.nix32
-rw-r--r--home/core/keychain.nix14
-rw-r--r--home/core/starship.nix23
-rw-r--r--home/core/tmux.nix22
-rw-r--r--home/core/zsh.nix89
-rw-r--r--home/default.nix16
-rw-r--r--home/desktop/alacritty.nix34
-rw-r--r--home/desktop/default.nix34
-rw-r--r--home/desktop/games.nix6
-rw-r--r--home/desktop/ghostty.nix10
-rw-r--r--home/desktop/internet.nix13
-rw-r--r--home/desktop/multimedia.nix33
-rw-r--r--home/desktop/productivity.nix15
-rw-r--r--home/dev/ai.nix9
-rw-r--r--home/dev/db.nix13
-rw-r--r--home/dev/default.nix39
-rw-r--r--home/dev/direnv.nix6
-rw-r--r--home/dev/docker.nix9
-rw-r--r--home/dev/go.nix15
-rw-r--r--home/dev/js.nix5
-rw-r--r--home/dev/k8s.nix19
-rw-r--r--home/dev/k9s.nix182
-rw-r--r--home/dev/neovim.nix82
-rw-r--r--home/dev/php.nix53
-rw-r--r--home/dev/virt-manager.nix8
-rw-r--r--home/dev/zed-editor.nix76
-rw-r--r--hosts/eye/configuration.nix43
-rw-r--r--hosts/eye/hardware-configuration.nix31
-rw-r--r--hosts/eye/home.nix8
-rw-r--r--nixos/amd_gpu.nix20
-rw-r--r--nixos/bluetooth.nix4
-rw-r--r--nixos/default.nix95
-rw-r--r--nixos/docker.nix15
-rw-r--r--nixos/extrahosts.nix29
-rw-r--r--nixos/flatpak.nix3
-rw-r--r--nixos/fonts.nix19
-rw-r--r--nixos/fprintd.nix11
-rw-r--r--nixos/intel_gpu.nix10
-rw-r--r--nixos/kde.nix38
-rw-r--r--nixos/localization.nix24
-rw-r--r--nixos/mergerfs.nix5
-rw-r--r--nixos/ollama.nix5
-rw-r--r--nixos/opensmtpd.nix35
-rw-r--r--nixos/pipewire.nix8
-rw-r--r--nixos/printing.nix16
-rw-r--r--nixos/restic.nix31
-rw-r--r--nixos/steam.nix3
-rw-r--r--nixos/systemd-boot.nix12
-rw-r--r--nixos/users-home.nix35
-rw-r--r--nixos/users.nix22
-rw-r--r--nixos/vim.nix92
-rw-r--r--nixos/virt-manager.nix6
-rw-r--r--nixos/zramswap.nix11
60 files changed, 1711 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..b2be92b
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+result
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..df714bb
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,47 @@
+result_dir = $(wildcard result)
+
+# delete the result directory if it exists
+.PHONY: $(result_dir)
+$(result_dir):
+ rm -rf -- $(result_dir)
+
+.PHONY: all
+all: upgrade
+
+.PHONY: build
+build:
+ nixos-rebuild build --flake .#
+
+.PHONY: build-debug
+build-debug:
+ nixos-rebuild build --show-trace --flake .#
+
+.PHONY: diff
+diff:
+ nvd diff /run/current-system result
+
+.PHONY: deploy
+deploy:
+ nixos-rebuild switch --flake .#
+
+.PHONY: deploy-boot
+deploy-boot:
+ nixos-rebuild boot --flake .#
+
+.PHONY: gc
+gc: | $(result_dir)
+ nix-collect-garbage
+
+.PHONY: gc-old
+gc-old: | $(result_dir)
+ nix-collect-garbage -d
+
+.PHONY: ls-updates
+ls-updates: update build diff
+
+.PHONY: update
+update:
+ nix flake update
+
+.PHONY: upgrade
+upgrade: update deploy
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..82e5703
--- /dev/null
+++ b/README.md
@@ -0,0 +1,19 @@
+# nixos-config
+
+NixOS Configurations for my systems, using [Flakes](https://nixos.wiki/wiki/Flakes) and [Home Manager](https://nix-community.github.io/home-manager/).
+
+## Install a new system
+
+Boot a NixOS installation media, format the drive and mount root partition on `/mnt` and all additional partitions under this path.
+
+Clone this repository and run `sudo nixos-install --flake .#HOSTNAME` to install `HOSTNAME` system.
+
+## Update the system
+
+On this repo run `make ls-updates` to get a list of packages that will be updated, and `sudo make deploy` to install them and switch the system to the new configuration. To install the upgrades but switch to the new configuration on the next reboot, instead run `sudo make deploy-boot`.
+
+To directly upgrade all packages and switch to the new configuration without showing changes, run `sudo make upgrade`.
+
+## Cleanup
+
+To remove old configurations and clean up the system, run `make gc-old`. To only remove unreachable objects, run `make gc`.
diff --git a/flake.lock b/flake.lock
new file mode 100644
index 0000000..b6168ec
--- /dev/null
+++ b/flake.lock
@@ -0,0 +1,48 @@
+{
+ "nodes": {
+ "home-manager": {
+ "inputs": {
+ "nixpkgs": [
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1756669196,
+ "narHash": "sha256-E/l+K8WIjbH5AUv/B17RX1hzx1CsuPaT86g1xDwiYY8=",
+ "owner": "nix-community",
+ "repo": "home-manager",
+ "rev": "b4b5f008d772c0e8e9c420cfa0d240a447747e0a",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-community",
+ "repo": "home-manager",
+ "type": "github"
+ }
+ },
+ "nixpkgs": {
+ "locked": {
+ "lastModified": 1756542300,
+ "narHash": "sha256-tlOn88coG5fzdyqz6R93SQL5Gpq+m/DsWpekNFhqPQk=",
+ "owner": "nixos",
+ "repo": "nixpkgs",
+ "rev": "d7600c775f877cd87b4f5a831c28aa94137377aa",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nixos",
+ "ref": "nixos-unstable",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
+ "root": {
+ "inputs": {
+ "home-manager": "home-manager",
+ "nixpkgs": "nixpkgs"
+ }
+ }
+ },
+ "root": "root",
+ "version": 7
+}
diff --git a/flake.nix b/flake.nix
new file mode 100644
index 0000000..c187e12
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,36 @@
+{
+ description = "NixOS configuration";
+
+ inputs = {
+ # default to nixpkgs-unstable
+ nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
+
+ home-manager = {
+ url = "github:nix-community/home-manager";
+ inputs.nixpkgs.follows = "nixpkgs";
+ };
+ };
+
+ outputs = inputs @ {
+ nixpkgs,
+ home-manager,
+ ...
+ }: {
+ nixosConfigurations = {
+ eye = nixpkgs.lib.nixosSystem {
+ system = "x86_64-linux";
+ modules = [
+ ./hosts/eye/configuration.nix
+ home-manager.nixosModules.home-manager
+ {
+ home-manager = {
+ useGlobalPkgs = true;
+ useUserPackages = true;
+ users.grm = import ./hosts/eye/home.nix;
+ };
+ }
+ ];
+ };
+ };
+ };
+}
diff --git a/home/core/default.nix b/home/core/default.nix
new file mode 100644
index 0000000..575bef0
--- /dev/null
+++ b/home/core/default.nix
@@ -0,0 +1,66 @@
+{pkgs, ...}: {
+ imports = [
+ ./fzf.nix
+ ./git.nix
+ ./keychain.nix
+ ./starship.nix
+ ./tmux.nix
+ ./zsh.nix
+ ];
+
+ programs = {
+ atuin = {
+ enable = true;
+ settings = {
+ enter_accept = false;
+ };
+ flags = [
+ "--disable-up-arrow"
+ ];
+ };
+ nix-index.enable = true;
+ zoxide = {
+ enable = true;
+ options = [
+ "--cmd cd"
+ ];
+ };
+ };
+
+ home.packages = with pkgs; [
+ bat
+ btop
+ comma
+ dnsutils
+ dogdns
+ dua
+ duf
+ exfatprogs
+ eza
+ fd
+ fortune
+ gocryptfs
+ htop
+ inetutils
+ jnv
+ jq
+ iperf
+ lm_sensors
+ ncdu
+ nmap
+ ntfy-sh
+ nvd
+ pwgen
+ rclone
+ restic
+ ripgrep
+ sshfs
+ tldr
+ unzip
+ unrar
+ wget
+ wol
+ zip
+ zstd
+ ];
+}
diff --git a/home/core/fzf.nix b/home/core/fzf.nix
new file mode 100644
index 0000000..2278cef
--- /dev/null
+++ b/home/core/fzf.nix
@@ -0,0 +1,6 @@
+{
+ programs.fzf = {
+ enable = true;
+ defaultCommand = "rg --files --no-ignore-vcs --hidden";
+ };
+}
diff --git a/home/core/git.nix b/home/core/git.nix
new file mode 100644
index 0000000..89ed25c
--- /dev/null
+++ b/home/core/git.nix
@@ -0,0 +1,32 @@
+{
+ programs.git = {
+ enable = true;
+ userName = "Anastasis Grammenos";
+ userEmail = "anastasis@learnworlds.com";
+ aliases = {
+ retag = "!f() { git tag -f -a \"$1\" -m \"$1\" && git push origin \"$1\" -f; }; f";
+ deltag = "!f() { git tag -d \"$1\" && git push --delete origin \"$1\"; }; f";
+ };
+ extraConfig = {
+ init = {
+ defaultBranch = "main";
+ };
+ diff = {
+ colorMoved = "zebra";
+ #tool = "nvim -d";
+ };
+ fetch = {
+ prune = true;
+ };
+ log = {
+ date = "iso8601";
+ };
+ #merge = {
+ # tool = "nvimdiff";
+ #};
+ pull = {
+ rebase = false;
+ };
+ };
+ };
+}
diff --git a/home/core/keychain.nix b/home/core/keychain.nix
new file mode 100644
index 0000000..2dcced1
--- /dev/null
+++ b/home/core/keychain.nix
@@ -0,0 +1,14 @@
+{
+ programs.keychain = {
+ enable = true;
+ keys = [
+ "github_ed25519"
+ "id_ed25519"
+ "id_rsa"
+ ];
+ extraFlags = [
+ "--quiet"
+ "--timeout 120"
+ ];
+ };
+}
diff --git a/home/core/starship.nix b/home/core/starship.nix
new file mode 100644
index 0000000..8465f54
--- /dev/null
+++ b/home/core/starship.nix
@@ -0,0 +1,23 @@
+{
+ programs.starship = {
+ enable = true;
+
+ settings = {
+ directory = {
+ truncate_to_repo = false;
+ truncation_symbol = "…";
+ };
+
+ command_timeout = 2000;
+
+ gcloud = {
+ disabled = true;
+ };
+
+ kubernetes = {
+ disabled = false;
+ format = "[$symbol$context(/$namespace)]($style) in ";
+ };
+ };
+ };
+}
diff --git a/home/core/tmux.nix b/home/core/tmux.nix
new file mode 100644
index 0000000..6f591b8
--- /dev/null
+++ b/home/core/tmux.nix
@@ -0,0 +1,22 @@
+{
+ programs.tmux = {
+ enable = true;
+ keyMode = "vi";
+ historyLimit = 5000;
+ mouse = true;
+ terminal = "screen-256color";
+ extraConfig = ''
+ set -as terminal-features ",*:RGB"
+ set-option -g status-style fg=yellow,bg=black
+ set-window-option -g window-status-style fg=brightblue,bg=default
+ set-window-option -g window-status-current-style fg=brightred,bg=default
+ set-option -g pane-border-style fg=black
+ set-option -g pane-active-border-style fg=brightgreen
+ set-option -g message-style fg=brightred,bg=black
+ set-option -g display-panes-active-colour blue
+ set-option -g display-panes-colour brightred
+ set-window-option -g clock-mode-colour green
+ set-window-option -g window-status-bell-style fg=black,bg=red
+ '';
+ };
+}
diff --git a/home/core/zsh.nix b/home/core/zsh.nix
new file mode 100644
index 0000000..e95ac5c
--- /dev/null
+++ b/home/core/zsh.nix
@@ -0,0 +1,89 @@
+{pkgs, ...}: {
+ home.sessionVariables = {
+ ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE = "fg=60";
+ NTFY_TOPIC = "generic";
+ };
+
+ programs.zsh = {
+ enable = true;
+ autosuggestion.enable = true;
+ autocd = true;
+ oh-my-zsh = {
+ enable = true;
+ plugins = [
+ "docker"
+ "docker-compose"
+ "git"
+ "golang"
+ "kubectl"
+ "nmap"
+ "vi-mode"
+ ];
+ };
+
+ initContent = ''
+ # run getnixindexdb first
+ source ${pkgs.nix-index}/etc/profile.d/command-not-found.sh
+
+ function getnixindexdb {
+ local _index="index-$(uname -m | sed 's/^arm64$/aarch64/')-$(uname | tr A-Z a-z)"
+ local _cache=~/.cache/nix-index
+ local _file=''${_cache}/files
+ test -d ''${_cache} || mkdir -p ''${_cache}
+ curl -s -L -R -o ''${_file} -z ''${_file} \
+ "https://github.com/Mic92/nix-index-database/releases/latest/download/''${_index}"
+ }
+
+ function kwide {
+ kubectl $@ -o wide
+ }
+
+ function ktail {
+ local _app=$1; shift
+ kubectl logs --prefix -f -l app=''${_app} $@ | \
+ grep -E -v 'health|metrics'
+ }
+
+ function weather {
+ local _city=Cholargos
+ [[ "$1" ]] && _city="$1"
+ curl -s "https://wttr.in/''${_city}?format=3"
+ }
+
+ function rsb {
+ local _rsb=$HOME/.rsbackup
+ if [[ -z "$1" ]]; then
+ echo "available options: $(cd ''${_rsb}; echo *)"
+ return 2
+ fi
+ cd "''${_rsb}/$1"
+ }
+
+ echo -e "\n$(fortune -s)"
+ '';
+
+ shellAliases = {
+ ls = "eza --header --git --icons --long";
+ l = "ls";
+ la = "ls -a";
+ cp = "nocorrect cp -i";
+ rm = "nocorrect rm -i";
+ mv = "nocorrect mv -i";
+ df = "df -h";
+ dmesg = "sudo dmesg -HTP";
+ dpss = "docker ps --format 'table {{.ID}}\t{{.Image}}\t{{.Names}}\t{{.Status}}'";
+ du = "du -hsc";
+ gti = "git";
+ gdet = "git deltag";
+ gret = "git retag";
+ mkdir = "nocorrect mkdir";
+ whatsmyip = "dig -4 +short myip.opendns.com @resolver1.opendns.com";
+ whatsmyip-curl = "curl -4 -s https://ifconfig.co";
+ kns = "kubens";
+ kctx = "kubectx";
+ kingtail = "kubectl logs -f -n default daemonsets.apps/nginx-ingress-nginx-controller";
+ lwdc = "docker-compose -f docker-compose.yml -f extra/account.yml -f extra/adminer.yml -f extra/website.yml -f extra/marketplace.yml -f extra/cameraman.yml -f extra/pubsub-emulator.yml -f extra/cloner.yml -f extra/lwdemomaker.yml -f extra/iplocate.yml -f extra/mailpit.yml -f docker-compose.override.yml";
+ lwdctail = "lwdc logs --no-log-prefix --no-color -f";
+ };
+ };
+}
diff --git a/home/default.nix b/home/default.nix
new file mode 100644
index 0000000..df80943
--- /dev/null
+++ b/home/default.nix
@@ -0,0 +1,16 @@
+{ config, pkgs, lib, ... }:
+{
+ home.username = "grm";
+ home.homeDirectory = lib.mkForce "/home/grm";
+
+ programs.home-manager.enable = true;
+
+ # This value determines the Home Manager release that your configuration is
+ # compatible with. This helps avoid breakage when a new Home Manager release
+ # introduces backwards incompatible changes.
+ #
+ # You should not change this value, even if you update Home Manager. If you do
+ # want to update the value, then make sure to first check the Home Manager
+ # release notes.
+ home.stateVersion = "23.05"; # Please read the comment before changing.
+}
diff --git a/home/desktop/alacritty.nix b/home/desktop/alacritty.nix
new file mode 100644
index 0000000..6c31e68
--- /dev/null
+++ b/home/desktop/alacritty.nix
@@ -0,0 +1,34 @@
+{
+ programs.alacritty = {
+ enable = true;
+ settings = {
+ colors = {
+ primary = {
+ background = "0x002b36";
+ foreground = "0x839496";
+ };
+ normal = {
+ black = "0x073642";
+ red = "0xdc322f";
+ green = "0x859900";
+ yellow = "0xb58900";
+ blue = "0x268bd2";
+ magenta = "0xd33682";
+ cyan = "0x2aa198";
+ white = "0xeee8d5";
+ };
+
+ bright = {
+ black = "0x002b36";
+ red = "0xcb4b16";
+ green = "0x586e75";
+ yellow = "0x657b83";
+ blue = "0x839496";
+ magenta = "0x6c71c4";
+ cyan = "0x93a1a1";
+ white = "0xfdf6e3";
+ };
+ };
+ };
+ };
+}
diff --git a/home/desktop/default.nix b/home/desktop/default.nix
new file mode 100644
index 0000000..1012454
--- /dev/null
+++ b/home/desktop/default.nix
@@ -0,0 +1,34 @@
+{
+ config,
+ pkgs,
+ ...
+}: {
+ imports = [
+ ./alacritty.nix
+ ./games.nix
+ ./ghostty.nix
+ ./internet.nix
+ ./multimedia.nix
+ ./productivity.nix
+ ];
+
+ home.sessionVariables.NIXOS_OZONE_WL = "1";
+
+ home.packages = with pkgs; [
+ wl-clipboard
+ xorg.xhost
+ ];
+
+ home.file.pw-pa-conf = {
+ text = ''
+ pulse.properties = {
+ server.address = [
+ "unix:native"
+ "unix:/tmp/pulseaudio.socket"
+ ]
+ }
+ '';
+
+ target = "${config.xdg.configHome}/pipewire/pipewire-pulse.conf.d/socket.conf";
+ };
+}
diff --git a/home/desktop/games.nix b/home/desktop/games.nix
new file mode 100644
index 0000000..eb0bc4a
--- /dev/null
+++ b/home/desktop/games.nix
@@ -0,0 +1,6 @@
+{pkgs, ...}: {
+ home.packages = with pkgs; [
+ protonup-qt
+ steam-run
+ ];
+}
diff --git a/home/desktop/ghostty.nix b/home/desktop/ghostty.nix
new file mode 100644
index 0000000..7de8af8
--- /dev/null
+++ b/home/desktop/ghostty.nix
@@ -0,0 +1,10 @@
+{
+ programs.ghostty = {
+ enable = true;
+ enableZshIntegration = true;
+ settings = {
+ theme = "Solarized Dark - Patched";
+ font-size = 12;
+ };
+ };
+}
diff --git a/home/desktop/internet.nix b/home/desktop/internet.nix
new file mode 100644
index 0000000..9c7f3e8
--- /dev/null
+++ b/home/desktop/internet.nix
@@ -0,0 +1,13 @@
+{pkgs, ...}: {
+ home.packages = with pkgs; [
+ discord
+ firefox
+ google-chrome
+ monolith
+ nextcloud-client
+ signal-desktop
+ slack
+ transmission_3-qt
+ yt-dlp
+ ];
+}
diff --git a/home/desktop/multimedia.nix b/home/desktop/multimedia.nix
new file mode 100644
index 0000000..bbb7fc2
--- /dev/null
+++ b/home/desktop/multimedia.nix
@@ -0,0 +1,33 @@
+{pkgs, ...}: {
+ home.packages = with pkgs; [
+ audacity
+ curtail
+ darktable
+ feishin
+ ffmpeg
+ gimp3
+ glaxnimate
+ handbrake
+ imagemagick
+ inkscape
+ jellyfin-media-player
+ mousai
+ obs-studio
+ picard
+ scribus
+ tidal-dl
+ vhs
+ vlc
+ ];
+
+ programs.mpv = {
+ enable = true;
+ config = {
+ gpu-context = "wayland";
+ hwdec = "auto-safe";
+ profile = "gpu-hq";
+ ytdl-format = "bestvideo+bestaudio";
+ vo = "gpu";
+ };
+ };
+}
diff --git a/home/desktop/productivity.nix b/home/desktop/productivity.nix
new file mode 100644
index 0000000..b972b43
--- /dev/null
+++ b/home/desktop/productivity.nix
@@ -0,0 +1,15 @@
+{pkgs, ...}: {
+ home.packages = with pkgs; [
+ bitwarden
+ bitwarden-cli
+ calibre
+ fastfetch
+ gnome-frog
+ hunspell
+ libreoffice-qt
+ obsidian
+ pdfcpu
+ tradingview
+ trezor-suite
+ ];
+}
diff --git a/home/dev/ai.nix b/home/dev/ai.nix
new file mode 100644
index 0000000..da7d9e0
--- /dev/null
+++ b/home/dev/ai.nix
@@ -0,0 +1,9 @@
+{pkgs, ...}: {
+ home.packages = with pkgs; [
+ claude-code
+ codex
+ fabric-ai
+ gemini-cli
+ warp-terminal
+ ];
+}
diff --git a/home/dev/db.nix b/home/dev/db.nix
new file mode 100644
index 0000000..bf7398a
--- /dev/null
+++ b/home/dev/db.nix
@@ -0,0 +1,13 @@
+{pkgs, ...}: {
+ home.packages = with pkgs; [
+ dbgate
+ go-migrate
+ mongodb-compass
+ mongodb-tools
+ mongosh
+ mycli
+ pg_activity
+ pgcli
+ sqlite
+ ];
+}
diff --git a/home/dev/default.nix b/home/dev/default.nix
new file mode 100644
index 0000000..e1c9a5c
--- /dev/null
+++ b/home/dev/default.nix
@@ -0,0 +1,39 @@
+{pkgs, ...}: {
+ imports = [
+ ./ai.nix
+ ./db.nix
+ ./direnv.nix
+ ./docker.nix
+ ./go.nix
+ ./js.nix
+ ./k8s.nix
+ ./neovim.nix
+ ./php.nix
+ ./virt-manager.nix
+ ./zed-editor.nix
+ ];
+
+ home.packages = with pkgs; [
+ backblaze-b2
+ ddosify
+ dos2unix
+ fx
+ gh
+ glab
+ glow
+ go-task
+ graphviz
+ httpie
+ hyperfine
+ jd-diff-patch
+ just
+ mkcert
+ nfpm
+ nssTools
+ scc
+ speedtest-go
+ testssl
+ upx
+ yq
+ ];
+}
diff --git a/home/dev/direnv.nix b/home/dev/direnv.nix
new file mode 100644
index 0000000..2b51c9d
--- /dev/null
+++ b/home/dev/direnv.nix
@@ -0,0 +1,6 @@
+{
+ programs.direnv = {
+ enable = true;
+ nix-direnv.enable = true;
+ };
+}
diff --git a/home/dev/docker.nix b/home/dev/docker.nix
new file mode 100644
index 0000000..dfb8054
--- /dev/null
+++ b/home/dev/docker.nix
@@ -0,0 +1,9 @@
+{pkgs, ...}: {
+ home.packages = with pkgs; [
+ diffoci
+ dive
+ docker-buildx
+ docker-compose
+ docker-ls
+ ];
+}
diff --git a/home/dev/go.nix b/home/dev/go.nix
new file mode 100644
index 0000000..0b27b06
--- /dev/null
+++ b/home/dev/go.nix
@@ -0,0 +1,15 @@
+{pkgs, ...}: {
+ programs.go = {
+ enable = true;
+ };
+
+ home.packages = with pkgs; [
+ delve
+ gdlv
+ gofumpt
+ golangci-lint
+ gopls
+ gotools
+ go-tools
+ ];
+}
diff --git a/home/dev/js.nix b/home/dev/js.nix
new file mode 100644
index 0000000..fed6dd9
--- /dev/null
+++ b/home/dev/js.nix
@@ -0,0 +1,5 @@
+{pkgs, ...}: {
+ home.packages = with pkgs; [
+ bun
+ ];
+}
diff --git a/home/dev/k8s.nix b/home/dev/k8s.nix
new file mode 100644
index 0000000..457e43b
--- /dev/null
+++ b/home/dev/k8s.nix
@@ -0,0 +1,19 @@
+{pkgs, ...}: {
+ imports = [
+ ./k9s.nix
+ ];
+
+ home.packages = with pkgs; [
+ (google-cloud-sdk.withExtraComponents [google-cloud-sdk.components.gke-gcloud-auth-plugin])
+ helmfile
+ kubectl
+ kubectx
+ kubent
+ stern
+ (wrapHelm kubernetes-helm {
+ plugins = with pkgs.kubernetes-helmPlugins; [
+ helm-diff
+ ];
+ })
+ ];
+}
diff --git a/home/dev/k9s.nix b/home/dev/k9s.nix
new file mode 100644
index 0000000..6c90e92
--- /dev/null
+++ b/home/dev/k9s.nix
@@ -0,0 +1,182 @@
+{
+ programs.k9s = {
+ enable = true;
+
+ views = {
+ "v1/pods" = {
+ sortColumn = "NAME:asc";
+ columns = [
+ "NAME"
+ "VERSION:.metadata.labels.version"
+ "READY"
+ "STATUS"
+ "RESTARTS"
+ "CPU"
+ "MEM"
+ "PF"
+ "IP"
+ "NODE|W"
+ "AGE"
+ "LAST RESTART|W"
+ "%CPU/R|H"
+ "%CPU/L|H"
+ "%MEM/R|H"
+ "%MEM/L|H"
+ "CPU/RL|H"
+ "MEM/RL|H"
+ "SERVICE-ACCOUNT|H"
+ "NOMINATED NODE|H"
+ "READINESS GATES|H"
+ "QOS|H"
+ "LABELS|H"
+ "VALID|H"
+ ];
+ };
+ };
+
+ plugins = {
+ stern = {
+ shortCut = "Ctrl-L";
+ confirm = false;
+ description = "Logs <Stern>";
+ scopes = [ "pods" ];
+ command = "stern";
+ background = false;
+ args = [
+ "--tail"
+ "50"
+ "$FILTER"
+ "-n"
+ "$NAMESPACE"
+ "--context"
+ "$CONTEXT"
+ ];
+ };
+ };
+
+ settings = {
+ k9s = {
+ skipLatestRevCheck = true;
+ ui = {
+ logoless = true;
+ enableMouse = true;
+ skin = "solarized";
+ };
+ };
+ };
+
+ skins = {
+ solarized = {
+ foreground = "#839495";
+ background = "#002833";
+ "current_line" = "#003440";
+ selection = "#003440";
+ comment = "#6272a4";
+ cyan = "#2aa197";
+ green = "#859901";
+ orange = "#cb4a16";
+ magenta = "#d33582";
+ blue = "#2aa198";
+ red = "#dc312e";
+ k9s = {
+ body = {
+ fgColor = "#839495";
+ bgColor = "#002833";
+ logoColor = "#2aa198";
+ };
+ prompt = {
+ fgColor = "#839495";
+ bgColor = "#002833";
+ suggestColor = "#cb4a16";
+ };
+ info = {
+ fgColor = "#d33582";
+ sectionColor = "#839495";
+ };
+ dialog = {
+ fgColor = "#839495";
+ bgColor = "#002833";
+ buttonFgColor = "#839495";
+ buttonBgColor = "#d33582";
+ buttonFocusFgColor = "white";
+ buttonFocusBgColor = "#2aa197";
+ labelFgColor = "#cb4a16";
+ fieldFgColor = "#839495";
+ };
+ frame = {
+ border = {
+ fgColor = "#003440";
+ focusColor = "#003440";
+ };
+ menu = {
+ fgColor = "#839495";
+ keyColor = "#d33582";
+ numKeyColor = "#d33582";
+ };
+ crumbs = {
+ fgColor = "#839495";
+ bgColor = "#003440";
+ activeColor = "#003440";
+ };
+ status = {
+ newColor = "#2aa197";
+ modifyColor = "#2aa198";
+ addColor = "#859901";
+ errorColor = "#dc312e";
+ highlightColor = "#cb4a16";
+ killColor = "#6272a4";
+ completedColor = "#6272a4";
+ };
+ title = {
+ fgColor = "#839495";
+ bgColor = "#003440";
+ highlightColor = "#cb4a16";
+ counterColor = "#2aa198";
+ filterColor = "#d33582";
+ };
+ };
+ views = {
+ charts = {
+ bgColor = "default";
+ defaultDialColors = ["#2aa198" "#dc312e"];
+ defaultChartColors = ["#2aa198" "#dc312e"];
+ };
+ table = {
+ fgColor = "#839495";
+ bgColor = "#002833";
+ cursorFgColor = "#003440";
+ cursorBgColor = "#003440";
+ header = {
+ fgColor = "#839495";
+ bgColor = "#002833";
+ sorterColor = "#2aa197";
+ };
+ };
+ xray = {
+ fgColor = "#839495";
+ bgColor = "#002833";
+ cursorColor = "#003440";
+ graphicColor = "#2aa198";
+ showIcons = false;
+ };
+ yaml = {
+ keyColor = "#d33582";
+ colonColor = "#2aa198";
+ valueColor = "#839495";
+ };
+ logs = {
+ fgColor = "#839495";
+ bgColor = "#002833";
+ indicator = {
+ fgColor = "#839495";
+ bgColor = "#003440";
+ toggleOnColor = "#d33582";
+ toggleOffColor = "#2aa198";
+ };
+ };
+ };
+ };
+ };
+ };
+ };
+}
diff --git a/home/dev/neovim.nix b/home/dev/neovim.nix
new file mode 100644
index 0000000..37bdaea
--- /dev/null
+++ b/home/dev/neovim.nix
@@ -0,0 +1,82 @@
+{pkgs, ...}: {
+ programs.neovim = {
+ enable = true;
+ defaultEditor = true;
+ viAlias = true;
+ vimAlias = true;
+ coc.enable = true;
+ plugins = with pkgs.vimPlugins; [
+ NeoSolarized
+ copilot-vim
+ fzf-vim
+ nerdcommenter
+ vim-airline
+ vim-airline-themes
+ vim-go
+ vim-sleuth
+ vim-surround
+ {
+ plugin = undotree;
+ config = ''
+ nnoremap <F5> :UndotreeToggle<CR>
+ if has("persistent_undo")
+ let target_path = expand('~/.local/nvim-undo')
+ if !isdirectory(target_path)
+ call mkdir(target_path, "p", 0700)
+ endif
+ let &undodir=target_path
+ set undofile
+ endif
+ '';
+ }
+ ];
+ extraConfig = ''
+ filetype off
+ set nocompatible
+ set modelines=0
+ set encoding=utf-8
+ set scrolloff=3
+ set wildmode=list:longest
+ set visualbell
+ set backspace=indent,eol,start
+ set laststatus=2
+ set number
+ set history=1000
+ set title
+ set ignorecase
+ set smartcase
+ set gdefault
+ set incsearch
+ set showmatch
+ set hlsearch
+
+ let mapleader = ","
+ nmap <silent> <leader><space> :silent :nohlsearch<CR>
+
+ set wrap
+ set textwidth=0
+ set list
+ set listchars=tab:▸\ ,eol:¬
+ set mousehide
+ set mouse=a
+ set cursorline
+ set cursorcolumn
+
+ au VimResized * exe "normal! \<c-w>="
+
+ augroup vimrc_autocmd
+ autocmd!
+
+ " jump to the last position when reopening a file
+ autocmd BufReadPost *
+ \ if line("'\"") > 1 && line("'\"") <= line("$") |
+ \ exe "normal! g`\"" |
+ \ endif
+ augroup END
+
+ syn on
+ set background=dark
+ colorscheme NeoSolarized
+ '';
+ };
+}
diff --git a/home/dev/php.nix b/home/dev/php.nix
new file mode 100644
index 0000000..a8a49a9
--- /dev/null
+++ b/home/dev/php.nix
@@ -0,0 +1,53 @@
+{pkgs, ...}: {
+ home.packages = [
+ (pkgs.php82.buildEnv {
+ extensions = {
+ enabled,
+ all,
+ }:
+ enabled
+ ++ (with all; [
+ bcmath
+ bz2
+ calendar
+ dom
+ ctype
+ curl
+ enchant
+ exif
+ ffi
+ fileinfo
+ gd
+ gettext
+ grpc
+ iconv
+ intl
+ imagick
+ mbstring
+ mongodb
+ opcache
+ openssl
+ pdo_pgsql
+ pcntl
+ posix
+ pspell
+ rdkafka
+ redis
+ session
+ shmop
+ simplexml
+ sockets
+ sodium
+ sysvmsg
+ sysvsem
+ sysvshm
+ tidy
+ tokenizer
+ xmlreader
+ xmlwriter
+ xsl
+ zip
+ ]);
+ })
+ ];
+}
diff --git a/home/dev/virt-manager.nix b/home/dev/virt-manager.nix
new file mode 100644
index 0000000..5aa991a
--- /dev/null
+++ b/home/dev/virt-manager.nix
@@ -0,0 +1,8 @@
+{
+ dconf.settings = {
+ "org/virt-manager/virt-manager/connections" = {
+ autoconnect = ["qemu:///system"];
+ uris = ["qemu:///system"];
+ };
+ };
+}
diff --git a/home/dev/zed-editor.nix b/home/dev/zed-editor.nix
new file mode 100644
index 0000000..79bde2c
--- /dev/null
+++ b/home/dev/zed-editor.nix
@@ -0,0 +1,76 @@
+{pkgs, ...}: {
+ programs.zed-editor = {
+ enable = true;
+
+ extensions = [
+ "dockerfile"
+ "docker-compose"
+ "git-firefly"
+ "golangci_lint"
+ "helm"
+ "html"
+ "make"
+ "nix"
+ "php"
+ ];
+
+ extraPackages = with pkgs; [
+ alejandra
+ nil
+ ];
+
+ userSettings = {
+ vim_mode = true;
+ load_direnv = "shell_hook";
+ show_whitespaces = "all";
+ ui_font_size = 18;
+ buffer_font_size = 16;
+ buffer_font_family = "JetBrainsMono Nerd Font";
+ hour_format = "hour24";
+ assistant = {
+ default_model = {
+ # provider = "ollama";
+ # model = "qwen2.5-coder:latest";
+ provider = "copilot_chat";
+ #model = "gpt-4o";
+ model = "claude-3-5-sonnet";
+ };
+ version = "2";
+ };
+ theme = {
+ mode = "system";
+ light = "Solarized Light";
+ dark = "Solarized Dark";
+ };
+ languages = {
+ Nix = {
+ language_servers = [
+ "nil"
+ "!nixd"
+ ];
+ formatter = {
+ external = {
+ command = "alejandra";
+ };
+ };
+ };
+ };
+ telemetry = {
+ metrics = false;
+ diagnostics = false;
+ };
+ terminal = {
+ blinking = "off";
+ env = {
+ TERM = "alacritty";
+ };
+ detect_venv = {
+ on = {
+ directories = [".env" "env" ".venv" "venv"];
+ activate_script = "default";
+ };
+ };
+ };
+ };
+ };
+}
diff --git a/hosts/eye/configuration.nix b/hosts/eye/configuration.nix
new file mode 100644
index 0000000..9f7b1aa
--- /dev/null
+++ b/hosts/eye/configuration.nix
@@ -0,0 +1,43 @@
+{pkgs, ...}: {
+ imports = [
+ ../../nixos
+ ../../nixos/amd_gpu.nix
+ ../../nixos/bluetooth.nix
+ ../../nixos/docker.nix
+ ../../nixos/extrahosts.nix
+ ../../nixos/flatpak.nix
+ ../../nixos/fonts.nix
+ ../../nixos/fprintd.nix
+ ../../nixos/kde.nix
+ ../../nixos/ollama.nix
+ ../../nixos/pipewire.nix
+ ../../nixos/printing.nix
+ ../../nixos/steam.nix
+ ../../nixos/systemd-boot.nix
+ ../../nixos/virt-manager.nix
+ ../../nixos/zramswap.nix
+
+ ./hardware-configuration.nix
+ ];
+
+ networking = {
+ hostName = "eye";
+ networkmanager.enable = true;
+ };
+
+ #virtualisation.docker = {
+ # storageDriver = "btrfs";
+ # daemon.settings = {
+ # ipv6 = true;
+ # fixed-cidr-v6 = "fd00::/80";
+ # };
+ #};
+
+ # This value determines the NixOS release from which the default
+ # settings for stateful data, like file locations and database versions
+ # on your system were taken. It's perfectly fine and recommended to leave
+ # this value at the release version of the first install of this system.
+ # Before changing this value read the documentation for this option
+ # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
+ system.stateVersion = "24.05"; # Did you read the comment?
+}
diff --git a/hosts/eye/hardware-configuration.nix b/hosts/eye/hardware-configuration.nix
new file mode 100644
index 0000000..ad99d5b
--- /dev/null
+++ b/hosts/eye/hardware-configuration.nix
@@ -0,0 +1,31 @@
+# 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 + "/profiles/qemu-guest.nix")
+ ];
+
+ boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk" ];
+ boot.initrd.kernelModules = [ ];
+ boot.kernelModules = [ "kvm-intel" ];
+ boot.extraModulePackages = [ ];
+
+ fileSystems."/" =
+ { device = "/dev/disk/by-uuid/156ad64b-7ded-492f-8b97-286ba3948f71";
+ fsType = "ext4";
+ };
+
+ swapDevices = [ ];
+
+ # 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
+ # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
+ networking.useDHCP = lib.mkDefault true;
+ # networking.interfaces.enp1s0.useDHCP = lib.mkDefault true;
+
+ nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
+}
diff --git a/hosts/eye/home.nix b/hosts/eye/home.nix
new file mode 100644
index 0000000..3479dc6
--- /dev/null
+++ b/hosts/eye/home.nix
@@ -0,0 +1,8 @@
+{
+ imports = [
+ ../../home
+ ../../home/core
+ ../../home/desktop
+ ../../home/dev
+ ];
+}
diff --git a/nixos/amd_gpu.nix b/nixos/amd_gpu.nix
new file mode 100644
index 0000000..6cf6d87
--- /dev/null
+++ b/nixos/amd_gpu.nix
@@ -0,0 +1,20 @@
+{pkgs, ...}: {
+ hardware.graphics = {
+ enable = true;
+ enable32Bit = true;
+ extraPackages = with pkgs; [
+ libvdpau-va-gl
+ #rocmPackages.clr.icd
+ #rocmPackages.rocm-runtime
+ vaapiVdpau
+ ];
+ };
+
+ environment.systemPackages = with pkgs; [
+ amdgpu_top
+ clinfo
+ lact
+ #rocmPackages.rocminfo
+ #rocmPackages.rocm-smi
+ ];
+}
diff --git a/nixos/bluetooth.nix b/nixos/bluetooth.nix
new file mode 100644
index 0000000..5278615
--- /dev/null
+++ b/nixos/bluetooth.nix
@@ -0,0 +1,4 @@
+{
+ hardware.bluetooth.enable = true;
+ hardware.bluetooth.powerOnBoot = true;
+}
diff --git a/nixos/default.nix b/nixos/default.nix
new file mode 100644
index 0000000..fd5467a
--- /dev/null
+++ b/nixos/default.nix
@@ -0,0 +1,95 @@
+{pkgs, ...}: {
+ imports = [
+ ./localization.nix
+ ./users.nix
+ ./vim.nix
+ ];
+
+ nix = {
+ # weekly gc
+ gc = {
+ automatic = true;
+ dates = "weekly";
+ options = "--delete-older-than 1w";
+ };
+
+ settings = {
+ # optimize store (run manually with `nix-store --optimise`)
+ auto-optimise-store = true;
+ download-buffer-size = 524288000; #500MiB
+
+ # enable flakes
+ experimental-features = ["nix-command" "flakes"];
+ };
+ };
+
+ # allow unfree packages globally
+ nixpkgs.config.allowUnfree = true;
+
+
+
+ nixpkgs.config.permittedInsecurePackages = [
+ "qtwebengine-5.15.19"
+ ];
+
+ # timezone
+ time.timeZone = "Europe/Athens";
+
+ # default packages
+ environment = {
+ systemPackages = with pkgs; [
+ bc
+ cifs-utils
+ linuxPackages_latest.cpupower
+ comma
+ curl
+ efibootmgr
+ ethtool
+ file
+ git
+ gnumake
+ lesspipe
+ lsof
+ moreutils
+ nettools
+ nvme-cli
+ openssl
+ pciutils
+ smartmontools
+ somo
+ usbutils
+ ];
+
+ # add zsh completion for system packages
+ pathsToLink = ["/share/zsh"];
+
+ # add ~/bin to PATH
+ homeBinInPath = true;
+ };
+
+ # enable zsh
+ programs.zsh.enable = true;
+
+ # add lesspipe support for less
+ programs.less = {
+ enable = true;
+ lessopen = "|${pkgs.lesspipe}/bin/lesspipe.sh %s";
+ };
+
+ services = {
+ envfs = {
+ enable = true;
+ };
+
+ fwupd = {
+ enable = true;
+ };
+
+ openssh = {
+ enable = true;
+ settings = {
+ PasswordAuthentication = false;
+ };
+ };
+ };
+}
diff --git a/nixos/docker.nix b/nixos/docker.nix
new file mode 100644
index 0000000..35258d3
--- /dev/null
+++ b/nixos/docker.nix
@@ -0,0 +1,15 @@
+{pkgs, ...}: {
+ virtualisation.docker = {
+ enable = true;
+ autoPrune.enable = true;
+ liveRestore = false;
+ };
+
+ users.users.grm.extraGroups = ["docker"];
+
+ environment = {
+ systemPackages = with pkgs; [
+ ctop
+ ];
+ };
+}
diff --git a/nixos/extrahosts.nix b/nixos/extrahosts.nix
new file mode 100644
index 0000000..de20195
--- /dev/null
+++ b/nixos/extrahosts.nix
@@ -0,0 +1,29 @@
+{
+ networking.extraHosts = ''
+
+ # lw devsetup hosts
+ 127.0.0.1 api.learnworlds.develop
+ 127.0.0.1 apitasks-scheduler.learnworlds.develop
+ 127.0.0.1 account.learnworlds.develop
+ 127.0.0.1 adminer.learnworlds.develop
+ 127.0.0.1 analytics.learnworlds.develop
+ 127.0.0.1 assets.learnworlds.develop
+ 127.0.0.1 aurora.learnworlds.develop
+ 127.0.0.1 client.learnworlds.develop
+ 127.0.0.1 client-canary.learnworlds.develop
+ 127.0.0.1 companion.learnworlds.develop
+ 127.0.0.1 kafka-ui.learnworlds.develop
+ 127.0.0.1 profiler.learnworlds.develop
+ 127.0.0.1 string-is.learnworlds.develop
+ 127.0.0.1 www.learnworlds.develop
+ 127.0.0.1 urlshortener.learnworlds.develop
+ 127.0.0.1 mailpit.learnworlds.develop
+
+ # local dev hosts
+ 127.0.0.1 adminer.local
+ 127.0.0.1 akyriaki.local
+ 127.0.0.1 alfa3.local
+ 127.0.0.1 aris.local
+ 127.0.0.1 proteins.local
+ '';
+}
diff --git a/nixos/flatpak.nix b/nixos/flatpak.nix
new file mode 100644
index 0000000..1ff0c53
--- /dev/null
+++ b/nixos/flatpak.nix
@@ -0,0 +1,3 @@
+{
+ services.flatpak.enable = true;
+}
diff --git a/nixos/fonts.nix b/nixos/fonts.nix
new file mode 100644
index 0000000..b7a922e
--- /dev/null
+++ b/nixos/fonts.nix
@@ -0,0 +1,19 @@
+{pkgs, ...}: {
+ fonts = {
+ packages = with pkgs; [
+ dejavu_fonts
+ departure-mono
+ roboto
+ nerd-fonts.jetbrains-mono
+ noto-fonts
+ noto-fonts-cjk-sans
+ noto-fonts-emoji
+ ubuntu_font_family
+ ];
+
+ fontconfig = {
+ subpixel.rgba = "rgb";
+ hinting.style = "slight";
+ };
+ };
+}
diff --git a/nixos/fprintd.nix b/nixos/fprintd.nix
new file mode 100644
index 0000000..b530edc
--- /dev/null
+++ b/nixos/fprintd.nix
@@ -0,0 +1,11 @@
+{pkgs, ...}: {
+ environment.systemPackages = with pkgs; [
+ fprintd
+ ];
+
+ services.fprintd = {
+ enable = true;
+ };
+
+ security.pam.services.login.fprintAuth = false;
+}
diff --git a/nixos/intel_gpu.nix b/nixos/intel_gpu.nix
new file mode 100644
index 0000000..006bbb3
--- /dev/null
+++ b/nixos/intel_gpu.nix
@@ -0,0 +1,10 @@
+{pkgs, ...}: {
+ hardware.graphics = {
+ enable = true;
+ extraPackages = with pkgs; [
+ intel-media-driver
+ intel-ocl
+ intel-vaapi-driver
+ ];
+ };
+}
diff --git a/nixos/kde.nix b/nixos/kde.nix
new file mode 100644
index 0000000..c5f6a68
--- /dev/null
+++ b/nixos/kde.nix
@@ -0,0 +1,38 @@
+{pkgs, ...}: {
+ programs.dconf.enable = true;
+
+ services = {
+ colord.enable = true;
+ desktopManager.plasma6.enable = true;
+ displayManager = {
+ sddm = {
+ enable = true;
+ wayland.enable = true;
+ };
+ defaultSession = "plasma";
+ };
+ };
+
+ environment = {
+ # extra kde packages
+ systemPackages = with pkgs.kdePackages; [
+ colord-kde
+ kcalc
+ kclock
+ kdeconnect-kde
+ kdenlive
+ krecorder
+ ksshaskpass
+ kweather
+ mlt
+ sddm-kcm
+ skanlite
+ xwaylandvideobridge
+ ];
+
+ # skip default packages
+ plasma6.excludePackages = with pkgs.kdePackages; [
+ elisa
+ ];
+ };
+}
diff --git a/nixos/localization.nix b/nixos/localization.nix
new file mode 100644
index 0000000..f05278b
--- /dev/null
+++ b/nixos/localization.nix
@@ -0,0 +1,24 @@
+{
+ # locale
+ i18n = {
+ defaultLocale = "en_US.UTF-8";
+ extraLocaleSettings = {
+ LC_TIME = "el_GR.UTF-8";
+ LC_MONETARY = "el_GR.UTF-8";
+ LC_ADDRESS = "el_GR.UTF-8";
+ LC_TELEPHONE = "el_GR.UTF-8";
+ LC_MEASUREMENT = "el_GR.UTF-8";
+ };
+ };
+
+ # console font and keyboard layout
+ console = {
+ useXkbConfig = true;
+ };
+
+ # X11 keyboard layout
+ services.xserver.xkb = {
+ layout = "us,gr";
+ options = "grp:alt_shift_toggle,ctrl:nocaps,grp_led:caps,terminate:ctrl_alt_bksp";
+ };
+}
diff --git a/nixos/mergerfs.nix b/nixos/mergerfs.nix
new file mode 100644
index 0000000..50d0063
--- /dev/null
+++ b/nixos/mergerfs.nix
@@ -0,0 +1,5 @@
+{pkgs, ...}: {
+ environment.systemPackages = with pkgs; [
+ mergerfs
+ ];
+}
diff --git a/nixos/ollama.nix b/nixos/ollama.nix
new file mode 100644
index 0000000..19087de
--- /dev/null
+++ b/nixos/ollama.nix
@@ -0,0 +1,5 @@
+{
+ services.ollama = {
+ enable = true;
+ };
+}
diff --git a/nixos/opensmtpd.nix b/nixos/opensmtpd.nix
new file mode 100644
index 0000000..57db251
--- /dev/null
+++ b/nixos/opensmtpd.nix
@@ -0,0 +1,35 @@
+{pkgs, ...}: {
+ environment = {
+ systemPackages = with pkgs; [
+ mailutils
+ ];
+
+ etc."smtpd/aliases" = {
+ text = ''
+ root: manolis@netriin.net
+ abuse: root
+ noc: root
+ security: root
+ postmaster: root
+ hostmaster: root
+ webmaster: root
+ www: webmaster
+ ftp: root
+ '';
+ mode = "0644";
+ };
+ };
+
+ services.opensmtpd = {
+ enable = true;
+ serverConfiguration = ''
+ listen on 0.0.0.0
+ table aliases file:/etc/smtpd/aliases
+ action "local" maildir alias <aliases>
+ action "relay" relay
+ match for local action "local"
+ match from local for any action "relay"
+ match from any for any action "relay"
+ '';
+ };
+}
diff --git a/nixos/pipewire.nix b/nixos/pipewire.nix
new file mode 100644
index 0000000..24e9fb5
--- /dev/null
+++ b/nixos/pipewire.nix
@@ -0,0 +1,8 @@
+{
+ services.pipewire = {
+ enable = true;
+ alsa.enable = true;
+ alsa.support32Bit = true;
+ pulse.enable = true;
+ };
+}
diff --git a/nixos/printing.nix b/nixos/printing.nix
new file mode 100644
index 0000000..9eefaa8
--- /dev/null
+++ b/nixos/printing.nix
@@ -0,0 +1,16 @@
+{pkgs, ...}: {
+ services = {
+ avahi = {
+ enable = true;
+ nssmdns4 = true;
+ openFirewall = true;
+ };
+
+ printing = {
+ enable = true;
+ drivers = with pkgs; [
+ cups-brother-hl1210w
+ ];
+ };
+ };
+}
diff --git a/nixos/restic.nix b/nixos/restic.nix
new file mode 100644
index 0000000..46f0631
--- /dev/null
+++ b/nixos/restic.nix
@@ -0,0 +1,31 @@
+{
+ services.restic.backups = {
+ periodic = {
+ initialize = true;
+ environmentFile = "/root/.config/restic/env";
+ repositoryFile = "/root/.config/restic/repository";
+ passwordFile = "/root/.config/restic/password";
+
+ timerConfig = {
+ OnCalendar = "0/4:00";
+ };
+
+ exclude = [
+ "lost+found"
+ ];
+
+ paths = [
+ "/home"
+ "/root"
+ ];
+
+ pruneOpts = [
+ "--keep-hourly 6"
+ "--keep-daily 7"
+ "--keep-weekly 2"
+ "--keep-monthly 12"
+ "--keep-yearly 1"
+ ];
+ };
+ };
+}
diff --git a/nixos/steam.nix b/nixos/steam.nix
new file mode 100644
index 0000000..05f296d
--- /dev/null
+++ b/nixos/steam.nix
@@ -0,0 +1,3 @@
+{
+ programs.steam.enable = true;
+}
diff --git a/nixos/systemd-boot.nix b/nixos/systemd-boot.nix
new file mode 100644
index 0000000..cb3cd23
--- /dev/null
+++ b/nixos/systemd-boot.nix
@@ -0,0 +1,12 @@
+{
+ boot = {
+ loader = {
+ grub.device = "/dev/vda";
+# efi.canTouchEfiVariables = true;
+# systemd-boot = {
+# enable = true;
+# configurationLimit = 5;
+# };
+ };
+ };
+}
diff --git a/nixos/users-home.nix b/nixos/users-home.nix
new file mode 100644
index 0000000..baa5d91
--- /dev/null
+++ b/nixos/users-home.nix
@@ -0,0 +1,35 @@
+{pkgs, ...}: {
+ users = {
+ groups = {
+ anthi = {
+ gid = 1001;
+ };
+
+ aris = {
+ gid = 1002;
+ };
+ };
+
+ users = {
+ anthi = {
+ isNormalUser = true;
+ uid = 1001;
+ group = "anthi";
+ createHome = true;
+ home = "/home/anthi";
+ initialPassword = "password";
+ shell = pkgs.zsh;
+ };
+
+ aris = {
+ isNormalUser = true;
+ uid = 1002;
+ group = "aris";
+ createHome = true;
+ home = "/home/aris";
+ initialPassword = "password";
+ shell = pkgs.zsh;
+ };
+ };
+ };
+}
diff --git a/nixos/users.nix b/nixos/users.nix
new file mode 100644
index 0000000..2327203
--- /dev/null
+++ b/nixos/users.nix
@@ -0,0 +1,22 @@
+{pkgs, ...}: {
+ users = {
+ groups = {
+ grm = {
+ gid = 1000;
+ };
+ };
+
+ users = {
+ grm = {
+ isNormalUser = true;
+ uid = 1000;
+ group = "grm";
+ extraGroups = ["wheel"];
+ createHome = true;
+ home = "/home/grm";
+ initialPassword = "password";
+ shell = pkgs.zsh;
+ };
+ };
+ };
+}
diff --git a/nixos/vim.nix b/nixos/vim.nix
new file mode 100644
index 0000000..4613390
--- /dev/null
+++ b/nixos/vim.nix
@@ -0,0 +1,92 @@
+{pkgs, ...}: {
+ environment = {
+ systemPackages = with pkgs; [
+ (
+ (vim_configurable.override {}).customize {
+ name = "vim";
+ vimrcConfig.packages.myplugins = with pkgs.vimPlugins; {
+ start = [
+ nerdcommenter
+ vim-airline
+ vim-airline-themes
+ vim-colors-solarized
+ vim-sleuth
+ vim-surround
+ undotree
+ ];
+ opt = [];
+ };
+ vimrcConfig.customRC = ''
+ filetype off
+ set nocompatible
+ set modelines=0
+ set encoding=utf-8
+ set scrolloff=3
+ set wildmode=list:longest
+ set visualbell
+ set backspace=indent,eol,start
+ set laststatus=2
+ set number
+ set history=1000
+ set title
+ set ignorecase
+ set smartcase
+ set gdefault
+ set incsearch
+ set showmatch
+ set hlsearch
+
+ let mapleader = ","
+ nmap <silent> <leader><space> :silent :nohlsearch<CR>
+
+ set wrap
+ set textwidth=0
+ set list
+ set listchars=tab:▸\ ,eol:¬
+ set mousehide
+ set mouse=a
+ set cursorline
+ set cursorcolumn
+
+ set backupdir=~/.local/vim/backup
+ set directory=~/.local/vim/swap
+ set undodir=~/.local/vim/undo
+
+ for _dir in ["backup", "swap", "undo"]
+ let target_path = expand("~/.local/vim/" . _dir)
+ if !isdirectory(target_path)
+ call mkdir(target_path, "p", 0700)
+ endif
+ endfor
+
+ au VimResized * exe "normal! \<c-w>="
+
+ augroup vimrc_autocmd
+ autocmd!
+
+ " jump to the last position when reopening a file
+ autocmd BufReadPost *
+ \ if line("'\"") > 1 && line("'\"") <= line("$") |
+ \ exe "normal! g`\"" |
+ \ endif
+ augroup END
+
+ syn on
+ set background=dark
+ colorscheme solarized
+
+ nnoremap <F5> :UndotreeToggle<CR>
+ if has("persistent_undo")
+ set undofile
+ endif
+ '';
+ }
+ )
+ ];
+
+ variables = {
+ EDITOR = "vim";
+ VISUAL = "vim";
+ };
+ };
+}
diff --git a/nixos/virt-manager.nix b/nixos/virt-manager.nix
new file mode 100644
index 0000000..fe4b5ed
--- /dev/null
+++ b/nixos/virt-manager.nix
@@ -0,0 +1,6 @@
+{
+ virtualisation.libvirtd.enable = true;
+ programs.virt-manager.enable = true;
+
+ users.users.grm.extraGroups = ["libvirtd"];
+}
diff --git a/nixos/zramswap.nix b/nixos/zramswap.nix
new file mode 100644
index 0000000..61c2961
--- /dev/null
+++ b/nixos/zramswap.nix
@@ -0,0 +1,11 @@
+{
+ # enable zram swap
+ zramSwap.enable = true;
+
+ boot.kernel.sysctl = {
+ "vm.page-cluster" = 0;
+ "vm.swappiness" = 180;
+ "vm.watermark_boost_factor" = 0;
+ "vm.watermark_scale_factor" = 125;
+ };
+}