mirror of
https://github.com/larstvei/nix-config.git
synced 2025-09-17 04:20:12 +00:00
Try generating a vm with the config
This commit is contained in:
parent
f71e57df51
commit
fc51b84abd
77
flake.lock
77
flake.lock
@ -155,6 +155,24 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_2": {
|
||||
"inputs": {
|
||||
"systems": "systems_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
@ -199,14 +217,15 @@
|
||||
"nanostatus": {
|
||||
"inputs": {
|
||||
"ags": "ags",
|
||||
"flake-utils": "flake-utils_2",
|
||||
"nixpkgs": "nixpkgs_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1757604536,
|
||||
"narHash": "sha256-q0zKPGRi5oW59IpYkxmjyRRLtqwsDaDFbb+oOcFpg2s=",
|
||||
"lastModified": 1757689076,
|
||||
"narHash": "sha256-RcNvTv6R/Kl5k/Pe9ZENZGbuw82ZU6Ssx6zOqkjdFPE=",
|
||||
"owner": "larstvei",
|
||||
"repo": "nanostatus",
|
||||
"rev": "9338759e13edeca8d8dc14a3b3b8485d5c2fa22e",
|
||||
"rev": "ab494b22a5c4fc6e8f07423d5f3b585dee790c6d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -251,6 +270,21 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixlib_2": {
|
||||
"locked": {
|
||||
"lastModified": 1736643958,
|
||||
"narHash": "sha256-tmpqTSWVRJVhpvfSN9KXBvKEXplrwKnSZNAoNPf/S/s=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs.lib",
|
||||
"rev": "1418bc28a52126761c02dd3d89b2d8ca0f521181",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs.lib",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixos-generators": {
|
||||
"inputs": {
|
||||
"nixlib": "nixlib",
|
||||
@ -273,6 +307,27 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixos-generators_2": {
|
||||
"inputs": {
|
||||
"nixlib": "nixlib_2",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1751903740,
|
||||
"narHash": "sha256-PeSkNMvkpEvts+9DjFiop1iT2JuBpyknmBUs0Un0a4I=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixos-generators",
|
||||
"rev": "032decf9db65efed428afd2fa39d80f7089085eb",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "nixos-generators",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1754498491,
|
||||
@ -360,6 +415,7 @@
|
||||
"home-manager": "home-manager",
|
||||
"nanostatus": "nanostatus",
|
||||
"nix-rosetta-builder": "nix-rosetta-builder",
|
||||
"nixos-generators": "nixos-generators_2",
|
||||
"nixpkgs": "nixpkgs_4",
|
||||
"zen-browser": "zen-browser"
|
||||
}
|
||||
@ -379,6 +435,21 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_2": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"zen-browser": {
|
||||
"inputs": {
|
||||
"home-manager": "home-manager_2",
|
||||
|
26
flake.nix
26
flake.nix
@ -13,6 +13,10 @@
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nixos-generators = {
|
||||
url = "github:nix-community/nixos-generators";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nix-rosetta-builder = {
|
||||
url = "github:cpick/nix-rosetta-builder";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
@ -30,6 +34,7 @@
|
||||
darwin,
|
||||
nixpkgs,
|
||||
home-manager,
|
||||
nixos-generators,
|
||||
nix-rosetta-builder,
|
||||
nanostatus,
|
||||
emacs-larstvei,
|
||||
@ -60,5 +65,26 @@
|
||||
./machines/thinkpad
|
||||
];
|
||||
};
|
||||
|
||||
packages.x86_64-linux.vm = nixos-generators.nixosGenerate {
|
||||
system = "x86_64-linux";
|
||||
format = "qcow-efi";
|
||||
specialArgs = { inherit emacs-larstvei nanostatus zen-browser; };
|
||||
modules = [
|
||||
home-manager.nixosModules.default
|
||||
./machines/vm
|
||||
];
|
||||
};
|
||||
|
||||
packages.aarch64-linux.vm = nixos-generators.nixosGenerate {
|
||||
system = "aarch64-linux";
|
||||
format = "qcow-efi";
|
||||
specialArgs = { inherit emacs-larstvei nanostatus zen-browser; };
|
||||
modules = [
|
||||
home-manager.nixosModules.default
|
||||
./machines/vm
|
||||
];
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
21
machines/vm/default.nix
Normal file
21
machines/vm/default.nix
Normal file
@ -0,0 +1,21 @@
|
||||
{
|
||||
imports = [
|
||||
../../modules/base
|
||||
../../modules/nixos
|
||||
];
|
||||
|
||||
networking.hostName = "larstvei-vm";
|
||||
|
||||
# VM-friendly bits
|
||||
services.qemuGuest.enable = true; # qemu-guest-agent
|
||||
services.spice-vdagentd.enable = true; # better clipboard/display if using SPICE
|
||||
|
||||
# In VMs Hyprland can benefit from this
|
||||
environment.sessionVariables.WLR_NO_HARDWARE_CURSORS = "1";
|
||||
|
||||
# Use EFI boot in the image
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
system.stateVersion = "25.05";
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
zotero
|
||||
# zotero
|
||||
];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user