~ruther/nixos-config

ref: 45660c0877ba14139999e47b47d48b79c3c232dc nixos-config/hosts/vm/default.nix -rw-r--r-- 1.6 KiB
45660c08 — Frantisek Bohacek feat: use user packages instead of global 1 year, 6 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#
#  Specific system configuration settings for desktop
#
#  flake.nix
#   ├─ ./hosts
#   │   └─ ./vm
#   │       ├─ default.nix *
#   │       └─ hardware-configuration.nix
#   └─ ./modules
#       └─ ./desktop
#           └─ ./bspwm
#               └─ bspwm.nix
#

{ config, pkgs, lib, ... }:

let
  mkSure = lib.mkOverride 0;
in {
  imports =  [                                  # For now, if applying to other system, swap files
    ./hardware-configuration.nix                # Current system hardware config @ /etc/nixos/hardware-configuration.nix
    ../../modules/desktop/dm/sddm.nix           # Desktop Manager
    ../../modules/desktop/qtile/default.nix           # Qtile
  ];

  services.spice-vdagentd.enable = mkSure true;
  services.qemuGuest.enable = true;
  environment.systemPackages = with pkgs; [
    spice-vdagent
    pkgs.xorg.xf86videoqxl
  ];

  boot = {                                      # Boot options
    kernelPackages = pkgs.linuxPackages_latest;

    loader = {                                  # For legacy boot
      grub = {
        enable = true;
        device = "/dev/vda";                    # Name of hard drive (can also be vda)
      };
      timeout = 1;                              # Grub auto select timeout
    };
  };

  networking.wireguard.interfaces = {
    wg0 = {
      ips = [ "${inputs.semi-secrets.wg.lan.laptopIp}/32" ];
    };
  };

  services = {
    xserver = {                                 
      resolutions = [
        { x = 1920; y = 1080; }
        { x = 1920; y = 1080; }
      ];
    };
  };
}
Do not follow this link