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 /hosts/vm | |
| parent | b0bd96459ff81aaf1a4e768b1a6222cdd86026f9 (diff) | |
pendrive setup
Diffstat (limited to 'hosts/vm')
| -rw-r--r-- | hosts/vm/configuration.nix | 95 | ||||
| -rw-r--r-- | hosts/vm/disko.nix | 104 | ||||
| -rw-r--r-- | hosts/vm/home.nix | 73 |
3 files changed, 272 insertions, 0 deletions
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"; + }; +} |
