Commit ef2a52bf authored by Christopher League's avatar Christopher League
Browse files

Refactor into something that supports virtualbox too

parent 7570149e
default:
up:
tar --create --xz --exclude=result --exclude='*.qcow2' vm |\
ssh liucs.net 'cat >! w/contrapunctus/_site/tmp/ligo/nixexprs.tar.xz'
{pkgs, lib, ...}:
let
home-manager = builtins.fetchTarball
{ url = "https://github.com/rycee/home-manager/archive/e68d6e7924925b28ddd46bd7748be7aa3e5c57bd.tar.gz";
sha256 = "0ak46iqm0fcwmjggqrp6xk9yh9q8wwj26bdgikmibs0v71wa9w4r";
};
pinned-nixpkgs = builtins.fetchTarball
{ url = "https://github.com/NixOS/nixpkgs-channels/archive/7e88992a8c7b2de0bcb89182d8686b27bd93e46a.tar.gz";
sha256 = "1f6lf4addczi81hchqbzjlhrsmkrj575dmdjdhyl0jkm7ypy2lgk";
};
in
{
imports = [
"${home-manager}/nixos"
];
config = {
nixpkgs.pkgs = import pinned-nixpkgs {};
powerManagement.enable = false;
sound.enable = false;
services.xserver.enable = true;
services.xserver.displayManager.slim = {
enable = true;
autoLogin = true;
defaultUser = "student";
};
services.xserver.desktopManager.lxqt.enable = true;
users.extraUsers.root.initialPassword = lib.mkDefault "root";
users.extraUsers.student = {
isNormalUser = true;
initialPassword = lib.mkDefault "student";
extraGroups = ["wheel"];
};
home-manager.users.student =
let
skel = pkgs.callPackage ./skel {};
rsync-skel =
"--copy-links --chmod u+w --verbose --recursive ${skel}/ $HOME";
in
{
programs.bash.enable = true;
programs.bash.shellAliases = {
# Could suggest/enforce running `sudo poweroff` after this
liucs-factory-config = "rsync ${rsync-skel}";
};
home.activation.copyDotFiles = {
before = [];
after = [];
data = "$DRY_RUN_CMD rsync --ignore-existing ${rsync-skel}";
};
};
nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [
tmux
firefox
atom
elementary-xfce-icon-theme
];
};
}
{pkgs, lib, ...}:
let
home-manager = builtins.fetchTarball
{ url = "https://github.com/rycee/home-manager/archive/e68d6e7924925b28ddd46bd7748be7aa3e5c57bd.tar.gz";
sha256 = "0ak46iqm0fcwmjggqrp6xk9yh9q8wwj26bdgikmibs0v71wa9w4r";
};
in
{
imports = [
<nixpkgs/nixos/modules/virtualisation/qemu-vm.nix>
"${home-manager}/nixos"
./desktop.nix
];
config = {
......@@ -16,56 +10,5 @@ in
memorySize = 1536;
writableStoreUseTmpfs = false;
};
nixpkgs.pkgs = import (builtins.fetchTarball
{ url = "https://github.com/NixOS/nixpkgs-channels/archive/7e88992a8c7b2de0bcb89182d8686b27bd93e46a.tar.gz";
sha256 = "1f6lf4addczi81hchqbzjlhrsmkrj575dmdjdhyl0jkm7ypy2lgk";
}) {};
powerManagement.enable = false;
sound.enable = false;
services.xserver.enable = true;
services.xserver.displayManager.slim = {
enable = true;
autoLogin = true;
defaultUser = "student";
};
services.xserver.desktopManager.lxqt.enable = true;
users.extraUsers.root.initialPassword = lib.mkDefault "root";
users.extraUsers.student = {
isNormalUser = true;
initialPassword = lib.mkDefault "student";
extraGroups = ["wheel"];
};
home-manager.users.student =
let
skel = pkgs.callPackage ./skel {};
rsync-skel =
"--copy-links --chmod u+w --verbose --recursive ${skel}/ $HOME";
in
{
home.file.".HM-HERE".text = "LIUCS!\n";
programs.bash.enable = true;
programs.bash.shellAliases = {
# Could suggest/enforce running `sudo poweroff` after this
liucs-factory-config = "rsync ${rsync-skel}";
};
home.activation.copyDotFiles = {
before = [];
after = [];
data = "$DRY_RUN_CMD rsync --ignore-existing ${rsync-skel}";
};
};
nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [
tmux
firefox
atom
elementary-xfce-icon-theme
];
};
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment