feat: add hyprland image
This commit is contained in:
parent
892837db3f
commit
0bbfe28abf
3 changed files with 53 additions and 32 deletions
|
@ -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
32
common.nix
Normal 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"
|
||||||
|
];
|
||||||
|
}
|
46
flake.nix
46
flake.nix
|
@ -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;
|
|
||||||
};
|
|
||||||
|
|
||||||
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 ];
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue