feat: add hyprland image

main
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
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`.

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-
# agnostic ones like nixosModule and system-enumerating ones, although
# those are more easily expressed in perSystem.
nixosConfigurations.default = inputs.nixpkgs.lib.nixosSystem {
nixosConfigurations.plasma = inputs.nixpkgs.lib.nixosSystem {
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 = {
enable = true;
displayManager = {
sddm.enable = true;
autoLogin.enable = true;
autoLogin.user = "test";
};
displayManager.sddm.enable = true;
desktopManager.plasma6.enable = true;
};
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"
];
})
];
};
nixosConfigurations.hyprland = inputs.nixpkgs.lib.nixosSystem {
modules = [
./common.nix
({ pkgs, ... }:
{
services.xserver.displayManager.lightdm.enable = true;
services.xserver.displayManager.defaultSession = "hyprland";
programs.hyprland.enable = true;
hardware.opengl.enable = true;
users.users.test.packages = with pkgs; [ kitty ];
})
];
};