feat: add hyprland image

This commit is contained in:
Moritz Böhme 2024-07-01 11:42:52 +02:00
parent 892837db3f
commit 0bbfe28abf
Signed by: moritz
GPG key ID: 970C6E89EB0547A9
3 changed files with 53 additions and 32 deletions

View file

@ -1,3 +1,6 @@
# Usage # Usage
Run `nixos-rebuild build-vm --flake .#default` and then execute `result/bin/run-nixos-vm`. Run `nixos-rebuild build-vm --flake .#plasma` or `nixos-rebuild build-vm --flake .#hyprland`.
Then execute `result/bin/run-nixos-vm -device virtio-vga`.
You should get logged in an can start `synology-drive-client`. You should get logged in an can start `synology-drive-client`.

32
common.nix Normal file
View file

@ -0,0 +1,32 @@
{ lib, pkgs, ... }:
{
nixpkgs.hostPlatform = "x86_64-linux";
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.systemd-boot.enable = true;
users.users.test = {
isNormalUser = true;
extraGroups = [ "wheel" ];
initialPassword = "test";
};
services.xserver = {
enable = true;
displayManager = {
autoLogin.enable = true;
autoLogin.user = "test";
};
};
virtualisation.vmVariant.virtualisation = {
memorySize = 2048;
cores = 3;
};
environment.systemPackages = with pkgs; [ synology-drive-client ];
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
"synology-drive-client"
];
}

View file

@ -26,42 +26,28 @@
# The usual flake attributes can be defined here, including system- # The usual flake attributes can be defined here, including system-
# agnostic ones like nixosModule and system-enumerating ones, although # agnostic ones like nixosModule and system-enumerating ones, although
# those are more easily expressed in perSystem. # those are more easily expressed in perSystem.
nixosConfigurations.default = inputs.nixpkgs.lib.nixosSystem { nixosConfigurations.plasma = inputs.nixpkgs.lib.nixosSystem {
modules = [ modules = [
({ lib, pkgs, ... }: ./common.nix
(_:
{ {
nixpkgs.hostPlatform = "x86_64-linux";
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.systemd-boot.enable = true;
users.users.test = {
isNormalUser = true;
extraGroups = [ "wheel" ];
initialPassword = "test";
};
services.xserver = { services.xserver = {
enable = true; displayManager.sddm.enable = true;
displayManager = {
sddm.enable = true;
autoLogin.enable = true;
autoLogin.user = "test";
};
desktopManager.plasma6.enable = true; desktopManager.plasma6.enable = true;
}; };
})
virtualisation.vmVariant.virtualisation = { ];
memorySize = 2048; };
cores = 3; nixosConfigurations.hyprland = inputs.nixpkgs.lib.nixosSystem {
}; modules = [
./common.nix
environment.systemPackages = with pkgs; [ synology-drive-client ]; ({ pkgs, ... }:
{
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ services.xserver.displayManager.lightdm.enable = true;
"synology-drive-client" services.xserver.displayManager.defaultSession = "hyprland";
]; programs.hyprland.enable = true;
hardware.opengl.enable = true;
users.users.test.packages = with pkgs; [ kitty ];
}) })
]; ];
}; };