diff options
| author | adikro <adikro@disroot.org> | 2026-01-25 17:01:14 +0100 |
|---|---|---|
| committer | adikro <adikro@disroot.org> | 2026-01-25 17:01:14 +0100 |
| commit | 6975866817064eb2edab6825b4905ca7500cf813 (patch) | |
| tree | 4f07153d43d78c539b87b63a6afb0a04f60b465e | |
| parent | b0bd96459ff81aaf1a4e768b1a6222cdd86026f9 (diff) | |
pendrive setup
| -rw-r--r-- | flake.lock | 121 | ||||
| -rw-r--r-- | flake.nix | 5 | ||||
| -rw-r--r-- | hm/soft/browser.nix | 6 | ||||
| -rw-r--r-- | hm/soft/nixcord.nix | 24 | ||||
| -rw-r--r-- | hosts/desktop/configuration.nix | 5 | ||||
| -rw-r--r-- | hosts/oci/configuration.nix | 95 | ||||
| -rw-r--r-- | hosts/oci/disko.nix | 104 | ||||
| -rw-r--r-- | hosts/oci/home.nix | 73 | ||||
| -rw-r--r-- | hosts/pendrive/configuration.nix | 49 | ||||
| -rw-r--r-- | hosts/pendrive/disko.nix | 84 | ||||
| -rw-r--r-- | hosts/pendrive/home.nix | 48 | ||||
| -rw-r--r-- | hosts/vm/configuration.nix | 95 | ||||
| -rw-r--r-- | hosts/vm/disko.nix | 104 | ||||
| -rw-r--r-- | hosts/vm/home.nix | 73 | ||||
| -rw-r--r-- | os/srv/monero.nix | 35 |
15 files changed, 835 insertions, 86 deletions
@@ -77,11 +77,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1765835352, - "narHash": "sha256-XswHlK/Qtjasvhd1nOa1e8MgZ8GS//jBoTqWtrS1Giw=", + "lastModified": 1768135262, + "narHash": "sha256-PVvu7OqHBGWN16zSi6tEmPwwHQ4rLPU9Plvs8/1TUBY=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "a34fae9c08a15ad73f295041fec82323541400a9", + "rev": "80daad04eddbbf5a4d883996a73f3f542fa437ac", "type": "github" }, "original": { @@ -98,11 +98,32 @@ ] }, "locked": { - "lastModified": 1765835352, - "narHash": "sha256-XswHlK/Qtjasvhd1nOa1e8MgZ8GS//jBoTqWtrS1Giw=", + "lastModified": 1768135262, + "narHash": "sha256-PVvu7OqHBGWN16zSi6tEmPwwHQ4rLPU9Plvs8/1TUBY=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "80daad04eddbbf5a4d883996a73f3f542fa437ac", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_4": { + "inputs": { + "nixpkgs-lib": [ + "nur", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1733312601, + "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "a34fae9c08a15ad73f295041fec82323541400a9", + "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9", "type": "github" }, "original": { @@ -136,11 +157,11 @@ ] }, "locked": { - "lastModified": 1769187349, - "narHash": "sha256-clG+nT6I2qxjIgk5WoSDKJyNhzKJs9jzbCujPF2S/yg=", + "lastModified": 1769289524, + "narHash": "sha256-6Cwtvzrw79cOk1lCzN2aKSVrpgSOSQoYhyMmhXXZjTA=", "owner": "nix-community", "repo": "home-manager", - "rev": "082a4cd87c6089d1d9c58ebe52655f9e07245fcb", + "rev": "2539eba97a6df237d75617c25cd2dbef92df3d5b", "type": "github" }, "original": { @@ -175,11 +196,11 @@ ] }, "locked": { - "lastModified": 1769126721, - "narHash": "sha256-vMWf9C4LK2fshCKgUYGR0fn4/3qg2/sWyFILv4YYTB8=", + "lastModified": 1769299463, + "narHash": "sha256-RxUJUDLWIvBJ6Dv6p//Ept7gUPb03ZURSWGirjlYwSQ=", "owner": "nix-community", "repo": "neovim-nightly-overlay", - "rev": "7c77dcce004c0845da25e0fe9a6c8b11bd46e614", + "rev": "041b08bc200ba1b08850943797a7e1a7f4ad142b", "type": "github" }, "original": { @@ -191,11 +212,11 @@ "neovim-src": { "flake": false, "locked": { - "lastModified": 1769125444, - "narHash": "sha256-KOVSBncEUsn5ZqbkaDo5GhXWCoKqdZGij/KnLH5CoVI=", + "lastModified": 1769260606, + "narHash": "sha256-hTJJSGgYrPkVnpJCLXeCIKia6PM9y7D9/KBNmNafwOA=", "owner": "neovim", "repo": "neovim", - "rev": "c39d18ee939cba5f905416fcc97661b1836f4de4", + "rev": "57574db15460be27f056eb21a71b96312396a615", "type": "github" }, "original": { @@ -216,11 +237,11 @@ "xwayland-satellite-unstable": "xwayland-satellite-unstable" }, "locked": { - "lastModified": 1769170609, - "narHash": "sha256-LiyaKNga2z/iG4pNr86iQLySEDoOytEzTCblxzRjnCk=", + "lastModified": 1769341564, + "narHash": "sha256-GR5luiDUMEZgfp5sl2hBsnR3Sv69UFwLlyDUZ26jA20=", "owner": "sodiboo", "repo": "niri-flake", - "rev": "08d6e6adf34b0af12be7eaeacc0b4c1a8580b3da", + "rev": "23264c0565ec7a4b1bd0dfe5caa4944c2a00dfdd", "type": "github" }, "original": { @@ -249,11 +270,11 @@ "niri-unstable": { "flake": false, "locked": { - "lastModified": 1768678265, - "narHash": "sha256-Ub8eed4DsfIDWyg30xEe+8bSxL/z5Af/gCjmvJ0V/Hs=", + "lastModified": 1769337195, + "narHash": "sha256-pPKBlYD2QFCwLlCR+wJhwGDsDfeXXHMuf1dGCzG0plg=", "owner": "YaLTeR", "repo": "niri", - "rev": "d7184a04b904e07113f4623610775ae78d32394c", + "rev": "e11abe554fb05242462b8b5b2b3cf64ea45f0fa5", "type": "github" }, "original": { @@ -271,11 +292,11 @@ ] }, "locked": { - "lastModified": 1769187435, - "narHash": "sha256-kxMx16F9hS7xUozxJouEUXZeSjRcLgBL9V5a4it4cos=", + "lastModified": 1769337638, + "narHash": "sha256-xJvTZGJWaSBq857V/PVL5GblIpiuO0IuUupLvBxNqr0=", "owner": "KaylorBen", "repo": "nixcord", - "rev": "af7f4d4b54a397f574fe950000862ae8c4cdb9ea", + "rev": "ef69bfad63be091496c444675aee2e8af6a8973c", "type": "github" }, "original": { @@ -286,11 +307,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1769018530, - "narHash": "sha256-MJ27Cy2NtBEV5tsK+YraYr2g851f3Fl1LpNHDzDX15c=", + "lastModified": 1769170682, + "narHash": "sha256-oMmN1lVQU0F0W2k6OI3bgdzp2YOHWYUAw79qzDSjenU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "88d3861acdd3d2f0e361767018218e51810df8a1", + "rev": "c5296fdd05cfa2c187990dd909864da9658df755", "type": "github" }, "original": { @@ -356,11 +377,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1768910181, - "narHash": "sha256-YRU0IHMzXluZxr0JDfq9jtblb4DV7MIB5wj2jYMFKQc=", + "lastModified": 1769247851, + "narHash": "sha256-fbsopU0qWfqq1WRKjWYpYCMxmEYyq+Cmw++VXVke5Ns=", "owner": "nix-community", "repo": "nixvim", - "rev": "5b138edcb2f1c3ed4b29eca3658f04f0639b98b3", + "rev": "34a7d94cdcd2b034eb06202992bed1345aa046c9", "type": "github" }, "original": { @@ -369,6 +390,27 @@ "type": "github" } }, + "nur": { + "inputs": { + "flake-parts": "flake-parts_4", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1769354239, + "narHash": "sha256-MhbptUY7ancteazxhCR+cFZYbitaX5CR+F86XHoAJZM=", + "owner": "nix-community", + "repo": "NUR", + "rev": "1cd64d78f51a4f341ee33e718699e6b74437e8e0", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "NUR", + "type": "github" + } + }, "root": { "inputs": { "disko": "disko", @@ -379,6 +421,7 @@ "nixcord": "nixcord", "nixpkgs": "nixpkgs", "nixvim": "nixvim", + "nur": "nur", "satty": "satty", "spicetify-nix": "spicetify-nix", "waybar": "waybar", @@ -453,11 +496,11 @@ "systems": "systems_2" }, "locked": { - "lastModified": 1768656845, - "narHash": "sha256-xNlXMyn7yc3Z/NOsz4NchO7gWFwsoCvtJ26pys4s2/M=", + "lastModified": 1769316930, + "narHash": "sha256-4EOGHYLpIscwr+6drHE28Qj7NDjjowp2Vd8QkXjdBBE=", "owner": "Gerg-L", "repo": "spicetify-nix", - "rev": "8bd7e49d5ac62756bee6e4b02221fb96bfc3c99a", + "rev": "b2ce438f386943ef611e196a178af2d79042903b", "type": "github" }, "original": { @@ -552,11 +595,11 @@ "xwayland-satellite-unstable": { "flake": false, "locked": { - "lastModified": 1768765571, - "narHash": "sha256-C1JbyJ3ftogmN3vmLNfyPtnJw2wY64TiUTIhFtk1Leg=", + "lastModified": 1769279212, + "narHash": "sha256-LAd6DYp6bbnQqtzMm62BE/0IMy67A4CgyYVi4xvyD6s=", "owner": "Supreeeme", "repo": "xwayland-satellite", - "rev": "ed1cef792b4def3321ff9ab5479df09609f17a69", + "rev": "3af3e3ab78d0eb96fb9b5161693811e050b90991", "type": "github" }, "original": { @@ -574,11 +617,11 @@ "rust-overlay": "rust-overlay_2" }, "locked": { - "lastModified": 1769174081, - "narHash": "sha256-XlvB9gRDLMKpQDiNAqGs9x/uOHRtq65lZuxlPbhRTN8=", + "lastModified": 1769281610, + "narHash": "sha256-T/4fz5vHiTzUZDH6/qZoTCHzO2RH2Qhn0OGil1R3jM8=", "owner": "sxyazi", "repo": "yazi", - "rev": "49b8324bbfc548f4190e3362e304480948539fdb", + "rev": "face6aed40b37f86be4320bab934b2dcf98277fe", "type": "github" }, "original": { @@ -7,6 +7,11 @@ # Snapshot of nixpkgs with the 6.17.13 kernel for compatibility kernelv.url = "github:NixOS/nixpkgs/52e64396e98aef211f4127416dbdae17a01b3d3f"; + nur = { + url = "github:nix-community/NUR"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + home-manager = { url = "github:nix-community/home-manager/master"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/hm/soft/browser.nix b/hm/soft/browser.nix index dfbf92d..72f13c3 100644 --- a/hm/soft/browser.nix +++ b/hm/soft/browser.nix @@ -34,6 +34,12 @@ in keyword = "yt"; url = "https://www.youtube.com"; } + { + name = "cwel"; + tags = [ "cwel" ]; + keyword = "cwel"; + url = "https://gemini.google.com/app"; + } ]; } ]; diff --git a/hm/soft/nixcord.nix b/hm/soft/nixcord.nix index a32a0b0..77d4adb 100644 --- a/hm/soft/nixcord.nix +++ b/hm/soft/nixcord.nix @@ -47,10 +47,10 @@ in }; anammox.enable = true; betterGifAltText.enable = true; - betterGifPicker = { - enable = true; - keepOpen = true; - }; + # betterGifPicker = { + # enable = true; + # keepOpen = true; + # }; betterInvites.enable = true; betterNotesBox = { enable = true; @@ -58,10 +58,10 @@ in }; betterRoleContext.enable = true; betterUploadButton.enable = true; - betterUserArea = { - enable = true; - alwaysShowUsername = false; - }; + # betterUserArea = { + # enable = true; + # alwaysShowUsername = false; + # }; biggerStreamPreview.enable = true; bypassPinPrompt.enable = true; callTimer.enable = true; @@ -76,10 +76,10 @@ in noMirroredCamera = true; removeActivitySection = true; }; - equicordToolbox = { - enable = true; - showPluginMenu = false; - }; + # equicordToolbox = { + # enable = true; + # showPluginMenu = false; + # }; expressionCloner.enable = true; fakeNitro = { enable = true; diff --git a/hosts/desktop/configuration.nix b/hosts/desktop/configuration.nix index 210ac08..cc3cbf4 100644 --- a/hosts/desktop/configuration.nix +++ b/hosts/desktop/configuration.nix @@ -2,7 +2,6 @@ config, inputs, username, - pkgs, ... }: { @@ -70,7 +69,7 @@ kdeconnect.enable = true; monero = { enable = true; - # mining.enable = true; + service.enable = true; }; }; wm = { @@ -79,8 +78,6 @@ }; }; - programs.nix-ld.enable = true; - xdg.terminal-exec = { enable = true; settings = { diff --git a/hosts/oci/configuration.nix b/hosts/oci/configuration.nix new file mode 100644 index 0000000..cc3cbf4 --- /dev/null +++ b/hosts/oci/configuration.nix @@ -0,0 +1,95 @@ +{ + config, + inputs, + username, + ... +}: +{ + system.stateVersion = "25.05"; + + imports = [ + inputs.disko.nixosModules.disko + + ./hardware-configuration.nix + ../../os/default.nix + ]; + + os = { + core = { + allowUnfree.enable = true; + flatpak.enable = true; + + audio = { + enable = true; + disable-devices.enable = true; + }; + bootloader = "systemd-boot"; + drivers = { + enable = true; + amdgpu.enable = true; + stability = "unstable"; + }; + fonts.enable = true; + greet.enable = true; + home-manager = { + enable = true; + users.${username}.path = ./home.nix; + }; + locale.enable = true; + memory = { + zram = { + enable = true; + percent = 25; + }; + swapfile = { + enable = true; + size = 32; + }; + }; + network.enable = true; + security.enable = true; + ssh.enable = true; + storage.enable = true; + users.enable = true; + }; + srv = { + files = { + thunar.enable = true; + krusader.enable = true; + utils.enable = true; + }; + gaming = { + enable = true; + steam.enable = true; + vr.enable = true; + }; + virtualization.enable = true; + nix-helper.enable = true; + ollama.enable = true; + kdeconnect.enable = true; + monero = { + enable = true; + service.enable = true; + }; + }; + wm = { + enable = true; + niri.enable = true; + }; + }; + + xdg.terminal-exec = { + enable = true; + settings = { + default = [ "foot.desktop" ]; + }; + }; + + boot = { + kernelParams = [ "video=DP-1:2560x1440@240" ]; + kernelModules = [ "nct6687" ]; + extraModulePackages = [ + config.boot.kernelPackages.nct6687d + ]; + }; +} diff --git a/hosts/oci/disko.nix b/hosts/oci/disko.nix new file mode 100644 index 0000000..edc4008 --- /dev/null +++ b/hosts/oci/disko.nix @@ -0,0 +1,104 @@ +{ + disko.devices = { + disk = { + main = { + type = "disk"; + device = "/dev/nvme0n1"; + content = { + type = "gpt"; + partitions = { + ESP = { + size = "2G"; + type = "EF00"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + mountOptions = [ "umask=0077" ]; + }; + }; + root = { + size = "100%"; + content = { + type = "btrfs"; + extraArgs = [ "-f" ]; + subvolumes = { + "@" = { + mountpoint = "/"; + mountOptions = [ "compress=zstd:1" "noatime" ]; + }; + "@home" = { + mountpoint = "/home"; + mountOptions = [ "compress=zstd:1" "noatime" ]; + }; + "@nix" = { + mountpoint = "/nix"; + mountOptions = [ "compress=zstd:1" "noatime" ]; + }; + "@log" = { + mountpoint = "/var/log"; + mountOptions = [ "compress=zstd:1" "noatime" ]; + }; + "@games" = { + mountpoint = "/games"; + mountOptions = [ "compress=zstd:1" "noatime" ]; + }; + "@llms" = { + mountpoint = "/llms"; + mountOptions = [ "nodatacow" "noatime"]; + }; + "@vms" = { + mountpoint = "/vms"; + mountOptions = [ "nodatacow" "noatime" ]; + }; + "@swap" = { + mountpoint = "/.swapvol"; + mountOptions = [ "nodatacow" "noatime" ]; + }; + }; + }; + }; + }; + }; + }; + media = { + type = "disk"; + device = "/dev/sda"; + content = { + type = "gpt"; + partitions = { + media = { + size = "100%"; + content = { + type = "btrfs"; + extraArgs = [ "-f" ]; + subvolumes = { + "@archive" = { + mountpoint = "/media/archive"; + mountOptions = [ "compress=zstd:1" "autodefrag" "noatime" ]; + }; + "@movies" = { + mountpoint = "/media/movies"; + mountOptions = [ "autodefrag" "noatime" ]; + }; + "@anime" = { + mountpoint = "/media/anime"; + mountOptions = [ "autodefrag" "noatime" ]; + }; + "@pictures" = { + mountpoint = "/media/pics"; + mountOptions = [ "autodefrag" "noatime" ]; + }; + "@videos" = { + mountpoint = "/media/vids"; + mountOptions = [ "autodefrag" "noatime" ]; + }; + }; + }; + }; + }; + }; + }; + }; + }; +} diff --git a/hosts/oci/home.nix b/hosts/oci/home.nix new file mode 100644 index 0000000..e274907 --- /dev/null +++ b/hosts/oci/home.nix @@ -0,0 +1,73 @@ +{ username, ... }: +{ + imports = [ ../../hm/default.nix ]; + + home = { + username = "${username}"; + homeDirectory = "/home/${username}"; + stateVersion = "25.05"; + }; + + hm = { + conf = { + clip = { + enable = true; + backend = "wayland"; + }; + git.enable = true; + xdg-dirs = { + enable = true; + mediaPath = /storage; + }; + }; + editors.nixvim.enable = true; + env = { + niri.enable = true; + cursor = { + size = 48; + enableMiyabi = true; + }; + + waybar.enable = true; + themes = { + enable = true; + gtk.enable = true; + qt.enable = true; + }; + }; + shell = { + cli.enable = true; + fish.enable = true; + foot.enable = true; + starship.enable = true; + }; + soft = { + browser = { + librewolf.enable = true; + brave.enable = true; + }; + email.evolution.enable = true; + media.enable = true; + mpv.enable = true; + nixcord.enable = true; + obs.enable = true; + obsidian.enable = true; + spicetify.enable = true; + torrent.enable = true; + vpn.protonvpn.enable = true; + yt-dlp.enable = true; + }; + }; + + xdg.mimeApps = { + enable = true; + defaultApplications = { + "x-scheme-handler/terminal" = [ "foot.desktop" ]; + "inode/directory" = [ "thunar.desktop" ]; + }; + }; + + home.sessionVariables = { + XDG_UTILS_TERMINAL = "foot"; + }; +} diff --git a/hosts/pendrive/configuration.nix b/hosts/pendrive/configuration.nix new file mode 100644 index 0000000..56a2aad --- /dev/null +++ b/hosts/pendrive/configuration.nix @@ -0,0 +1,49 @@ +{ inputs, username, ... }: +{ + system.stateVersion = "25.05"; + + imports = [ + inputs.disko.nixosModules.disko + ./disko.nix + + ./hardware-configuration.nix + ../../os/default.nix + ]; + + os = { + core = { + allowUnfree.enable = true; + + audio.enable = true; + bootloader = "systemd-boot"; + drivers.enable = true; + fonts.enable = true; + greet.enable = true; + home-manager = { + enable = true; + users.${username}.path = ./home.nix; + }; + locale.enable = true; + memory.zram = { + enable = true; + percent = 25; + }; + network.enable = true; + security.enable = true; + ssh.enable = true; + storage.enable = true; + users.enable = true; + }; + srv = { + files = { + thunar.enable = true; + utils.enable = true; + }; + nix-helper.enable = true; + }; + wm = { + enable = true; + niri.enable = true; + }; + }; +} diff --git a/hosts/pendrive/disko.nix b/hosts/pendrive/disko.nix new file mode 100644 index 0000000..24674b7 --- /dev/null +++ b/hosts/pendrive/disko.nix @@ -0,0 +1,84 @@ +{ + disko.devices = { + disk = { + main = { + type = "disk"; + device = "/dev/sda"; + content = { + type = "gpt"; + partitions = { + ESP = { + size = "1G"; + type = "EF00"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + mountOptions = [ "umask=0077" ]; + }; + }; + luks = { + size = "75%"; + content = { + type = "luks"; + name = "crypted"; + settings = { + allowDiscards = true; + }; + content = { + type = "btrfs"; + extraArgs = [ "-f" ]; + subvolumes = { + "@" = { + mountpoint = "/"; + mountOptions = [ + "compress=zstd:1" + "noatime" + ]; + }; + "@home" = { + mountpoint = "/home"; + mountOptions = [ + "compress=zstd:1" + "noatime" + ]; + }; + "@nix" = { + mountpoint = "/nix"; + mountOptions = [ + "compress=zstd:1" + "noatime" + ]; + }; + "@log" = { + mountpoint = "/var/log"; + mountOptions = [ + "compress=zstd:1" + "noatime" + ]; + }; + "@swap" = { + mountpoint = "/.swapvol"; + mountOptions = [ + "nodatacow" + "noatime" + ]; + }; + }; + }; + }; + }; + shared = { + size = "100%"; + content = { + type = "filesystem"; + format = "exfat"; + mountpoint = "/shared"; + }; + }; + }; + }; + }; + }; + }; +} diff --git a/hosts/pendrive/home.nix b/hosts/pendrive/home.nix new file mode 100644 index 0000000..9ae18ad --- /dev/null +++ b/hosts/pendrive/home.nix @@ -0,0 +1,48 @@ +{ username, ... }: +{ + imports = [ ../../hm/default.nix ]; + + home = { + username = "${username}"; + homeDirectory = "/home/${username}"; + stateVersion = "25.05"; + }; + + hm = { + conf = { + clip = { + enable = true; + backend = "wayland"; + }; + git.enable = true; + xdg-dirs.enable = true; + }; + editors.nixvim.enable = true; + env = { + niri.enable = true; + cursor.enableMiyabi = true; + + waybar.enable = true; + themes = { + enable = true; + gtk.enable = true; + qt.enable = true; + }; + }; + shell = { + cli.enable = true; + fish.enable = true; + foot.enable = true; + starship.enable = true; + }; + soft = { + browser.librewolf.enable = true; + mpv.enable = true; + nixcord.enable = true; + obsidian.enable = true; + spicetify.enable = true; + torrent.enable = true; + yt-dlp.enable = true; + }; + }; +} diff --git a/hosts/vm/configuration.nix b/hosts/vm/configuration.nix new file mode 100644 index 0000000..cc3cbf4 --- /dev/null +++ b/hosts/vm/configuration.nix @@ -0,0 +1,95 @@ +{ + config, + inputs, + username, + ... +}: +{ + system.stateVersion = "25.05"; + + imports = [ + inputs.disko.nixosModules.disko + + ./hardware-configuration.nix + ../../os/default.nix + ]; + + os = { + core = { + allowUnfree.enable = true; + flatpak.enable = true; + + audio = { + enable = true; + disable-devices.enable = true; + }; + bootloader = "systemd-boot"; + drivers = { + enable = true; + amdgpu.enable = true; + stability = "unstable"; + }; + fonts.enable = true; + greet.enable = true; + home-manager = { + enable = true; + users.${username}.path = ./home.nix; + }; + locale.enable = true; + memory = { + zram = { + enable = true; + percent = 25; + }; + swapfile = { + enable = true; + size = 32; + }; + }; + network.enable = true; + security.enable = true; + ssh.enable = true; + storage.enable = true; + users.enable = true; + }; + srv = { + files = { + thunar.enable = true; + krusader.enable = true; + utils.enable = true; + }; + gaming = { + enable = true; + steam.enable = true; + vr.enable = true; + }; + virtualization.enable = true; + nix-helper.enable = true; + ollama.enable = true; + kdeconnect.enable = true; + monero = { + enable = true; + service.enable = true; + }; + }; + wm = { + enable = true; + niri.enable = true; + }; + }; + + xdg.terminal-exec = { + enable = true; + settings = { + default = [ "foot.desktop" ]; + }; + }; + + boot = { + kernelParams = [ "video=DP-1:2560x1440@240" ]; + kernelModules = [ "nct6687" ]; + extraModulePackages = [ + config.boot.kernelPackages.nct6687d + ]; + }; +} diff --git a/hosts/vm/disko.nix b/hosts/vm/disko.nix new file mode 100644 index 0000000..edc4008 --- /dev/null +++ b/hosts/vm/disko.nix @@ -0,0 +1,104 @@ +{ + disko.devices = { + disk = { + main = { + type = "disk"; + device = "/dev/nvme0n1"; + content = { + type = "gpt"; + partitions = { + ESP = { + size = "2G"; + type = "EF00"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + mountOptions = [ "umask=0077" ]; + }; + }; + root = { + size = "100%"; + content = { + type = "btrfs"; + extraArgs = [ "-f" ]; + subvolumes = { + "@" = { + mountpoint = "/"; + mountOptions = [ "compress=zstd:1" "noatime" ]; + }; + "@home" = { + mountpoint = "/home"; + mountOptions = [ "compress=zstd:1" "noatime" ]; + }; + "@nix" = { + mountpoint = "/nix"; + mountOptions = [ "compress=zstd:1" "noatime" ]; + }; + "@log" = { + mountpoint = "/var/log"; + mountOptions = [ "compress=zstd:1" "noatime" ]; + }; + "@games" = { + mountpoint = "/games"; + mountOptions = [ "compress=zstd:1" "noatime" ]; + }; + "@llms" = { + mountpoint = "/llms"; + mountOptions = [ "nodatacow" "noatime"]; + }; + "@vms" = { + mountpoint = "/vms"; + mountOptions = [ "nodatacow" "noatime" ]; + }; + "@swap" = { + mountpoint = "/.swapvol"; + mountOptions = [ "nodatacow" "noatime" ]; + }; + }; + }; + }; + }; + }; + }; + media = { + type = "disk"; + device = "/dev/sda"; + content = { + type = "gpt"; + partitions = { + media = { + size = "100%"; + content = { + type = "btrfs"; + extraArgs = [ "-f" ]; + subvolumes = { + "@archive" = { + mountpoint = "/media/archive"; + mountOptions = [ "compress=zstd:1" "autodefrag" "noatime" ]; + }; + "@movies" = { + mountpoint = "/media/movies"; + mountOptions = [ "autodefrag" "noatime" ]; + }; + "@anime" = { + mountpoint = "/media/anime"; + mountOptions = [ "autodefrag" "noatime" ]; + }; + "@pictures" = { + mountpoint = "/media/pics"; + mountOptions = [ "autodefrag" "noatime" ]; + }; + "@videos" = { + mountpoint = "/media/vids"; + mountOptions = [ "autodefrag" "noatime" ]; + }; + }; + }; + }; + }; + }; + }; + }; + }; +} diff --git a/hosts/vm/home.nix b/hosts/vm/home.nix new file mode 100644 index 0000000..e274907 --- /dev/null +++ b/hosts/vm/home.nix @@ -0,0 +1,73 @@ +{ username, ... }: +{ + imports = [ ../../hm/default.nix ]; + + home = { + username = "${username}"; + homeDirectory = "/home/${username}"; + stateVersion = "25.05"; + }; + + hm = { + conf = { + clip = { + enable = true; + backend = "wayland"; + }; + git.enable = true; + xdg-dirs = { + enable = true; + mediaPath = /storage; + }; + }; + editors.nixvim.enable = true; + env = { + niri.enable = true; + cursor = { + size = 48; + enableMiyabi = true; + }; + + waybar.enable = true; + themes = { + enable = true; + gtk.enable = true; + qt.enable = true; + }; + }; + shell = { + cli.enable = true; + fish.enable = true; + foot.enable = true; + starship.enable = true; + }; + soft = { + browser = { + librewolf.enable = true; + brave.enable = true; + }; + email.evolution.enable = true; + media.enable = true; + mpv.enable = true; + nixcord.enable = true; + obs.enable = true; + obsidian.enable = true; + spicetify.enable = true; + torrent.enable = true; + vpn.protonvpn.enable = true; + yt-dlp.enable = true; + }; + }; + + xdg.mimeApps = { + enable = true; + defaultApplications = { + "x-scheme-handler/terminal" = [ "foot.desktop" ]; + "inode/directory" = [ "thunar.desktop" ]; + }; + }; + + home.sessionVariables = { + XDG_UTILS_TERMINAL = "foot"; + }; +} diff --git a/os/srv/monero.nix b/os/srv/monero.nix index e09bc50..40675e0 100644 --- a/os/srv/monero.nix +++ b/os/srv/monero.nix @@ -6,50 +6,23 @@ }: let cfg = config.os.srv.monero; - address = "82cAm7hTDr5EPjf9um4zQdYBhH4cxSRFZfzgN9St3jNt1N8ia2Qi6Yj4J5Bwe5aKNBM1fwsrRFkCZUqfHuiAHy11Qy7Z8aF"; in { options.os.srv.monero = { enable = lib.mkEnableOption "enables the daemon and wallet"; - mining.enable = lib.mkEnableOption "enables mining monero"; + service.enable = lib.mkEnableOption "enables hosting a monero node"; }; config = lib.mkMerge [ (lib.mkIf cfg.enable { + environment.systemPackages = [ pkgs.monero-cli ]; + }) + (lib.mkIf cfg.service.enable { services.monero = { enable = true; prune = true; dataDir = "/home/monero"; }; - environment.systemPackages = [ pkgs.monero-cli ]; - }) - (lib.mkIf cfg.mining.enable { - services.xmrig = { - enable = true; - settings = { - autosave = true; - cpu = true; - opencl = true; - pools = [ - { - url = "pool.supportxmr.com:443"; - user = "${address}"; - keepalive = true; - tls = true; - } - { - url = "xmr-eu1.nanopool.org:10343"; - user = "${address}"; - keepalive = true; - tls = true; - } - ]; - }; - }; - boot = { - kernel.sysctl."vm.nr_hugepages" = lib.mkDefault 1280; - initrd.kernelModules = [ "msr" ]; - }; }) ]; } |
