Compare commits
No commits in common. "f522d2c36234a10250cfcab54f978be5903b6a11" and "dc7d7071d9c239e0584f8aece7d6235f751343e7" have entirely different histories.
f522d2c362
...
dc7d7071d9
6 changed files with 3 additions and 78 deletions
|
@ -50,14 +50,8 @@ def _vm(args):
|
||||||
vm_path = Path(f"/etc/nixos/hosts/virtual-machines/{vm_name}")
|
vm_path = Path(f"/etc/nixos/hosts/virtual-machines/{vm_name}")
|
||||||
if vm_path.exists():
|
if vm_path.exists():
|
||||||
c = colors.Colors
|
c = colors.Colors
|
||||||
|
|
||||||
if (vm_path / "flake.nix").exists():
|
|
||||||
build_vm_args.extend(["--flake", f"{vm_path}#nixos"])
|
|
||||||
elif (vm_path / "default.nix").exists():
|
|
||||||
build_vm_args.extend(["-I", f"nixos-config={vm_path}/default.nix", "--no-flake"])
|
|
||||||
|
|
||||||
print(f"{c.BLUE}Building virtual machine {c.YELLOW}{vm_name}{c.END}")
|
print(f"{c.BLUE}Building virtual machine {c.YELLOW}{vm_name}{c.END}")
|
||||||
run(["nixos-rebuild", "build-vm", *build_vm_args], cwd=vm_path)
|
run(["nixos-rebuild", "build-vm", "-I", "nixos-config=./default.nix", *build_vm_args, "--no-flake"], cwd=vm_path)
|
||||||
print(f"{c.BLUE}Starting virtual vachine {c.YELLOW}{vm_name}{c.END}")
|
print(f"{c.BLUE}Starting virtual vachine {c.YELLOW}{vm_name}{c.END}")
|
||||||
run(["./result/bin/run-nixos-vm"], cwd=vm_path)
|
run(["./result/bin/run-nixos-vm"], cwd=vm_path)
|
||||||
print(f"{c.BLUE}Virtual machine {c.YELLOW}{vm_name} {c.BLUE}has {c.RED}stopped.{c.END}")
|
print(f"{c.BLUE}Virtual machine {c.YELLOW}{vm_name} {c.BLUE}has {c.RED}stopped.{c.END}")
|
||||||
|
|
|
@ -1,32 +0,0 @@
|
||||||
{
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
packages = with pkgs; [ fastfetch ];
|
|
||||||
in
|
|
||||||
{
|
|
||||||
services = {
|
|
||||||
desktopManager.cosmic.enable = true;
|
|
||||||
displayManager.cosmic-greeter.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
virtualisation.vmVariant.virtualisation = {
|
|
||||||
memorySize = 8192;
|
|
||||||
cores = 6;
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.systemPackages = lib.lists.unique (packages);
|
|
||||||
|
|
||||||
nix = {
|
|
||||||
settings = {
|
|
||||||
substituters = [
|
|
||||||
"https://cosmic.cachix.org"
|
|
||||||
];
|
|
||||||
trusted-public-keys = [
|
|
||||||
"cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE="
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,37 +0,0 @@
|
||||||
{
|
|
||||||
description = "System Configuration @ cswimr 2024";
|
|
||||||
inputs = {
|
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
||||||
cosmic.url = "github:lilyinstarlight/nixos-cosmic";
|
|
||||||
};
|
|
||||||
outputs =
|
|
||||||
{
|
|
||||||
self,
|
|
||||||
nixpkgs,
|
|
||||||
cosmic,
|
|
||||||
...
|
|
||||||
}@inputs:
|
|
||||||
let
|
|
||||||
user = "nixos";
|
|
||||||
system = "x86_64-linux";
|
|
||||||
in
|
|
||||||
{
|
|
||||||
nixosConfigurations = {
|
|
||||||
nixos = nixpkgs.lib.nixosSystem {
|
|
||||||
system = system;
|
|
||||||
specialArgs = {
|
|
||||||
inherit inputs;
|
|
||||||
system = system;
|
|
||||||
hostname = "nixos";
|
|
||||||
user = user;
|
|
||||||
};
|
|
||||||
modules = [
|
|
||||||
# imports
|
|
||||||
../common.nix
|
|
||||||
./default.nix
|
|
||||||
cosmic.nixosModules.default
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -5,7 +5,7 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../common.nix
|
../template.nix
|
||||||
#../../../nixos/shell.nix
|
#../../../nixos/shell.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../common.nix
|
../template.nix
|
||||||
#../../../nixos/shell.nix
|
#../../../nixos/shell.nix
|
||||||
];
|
];
|
||||||
environment.systemPackages = with pkgs; [ fastfetch ];
|
environment.systemPackages = with pkgs; [ fastfetch ];
|
||||||
|
|
Loading…
Add table
Reference in a new issue