converted to flake

This commit is contained in:
John Lancaster
2024-12-18 01:05:41 +00:00
parent aab33e4786
commit e210bca113
5 changed files with 166 additions and 35 deletions

View File

@@ -1,22 +1,10 @@
{ pkgs, lib, modulesPath, ... }:
{ pkgs, lib, config, ... }:
let
stateVersion = "24.05";
userName = "myuser";
repoPath = "/srv/nix-docker";
unstable = import <nixos-unstable> {};
in
{
system.stateVersion = stateVersion;
imports = [
(modulesPath + "/virtualisation/proxmox-lxc.nix")
(import "${builtins.fetchTarball https://github.com/nix-community/home-manager/archive/release-24.05.tar.gz}/nixos")
(fetchTarball "https://github.com/nix-community/nixos-vscode-server/tarball/master")
(import ./users.nix {
inherit stateVersion;
inherit userName;
inherit repoPath;
})
# ./mounts.nix
./users.nix
];
environment.systemPackages = with pkgs; [
@@ -38,23 +26,9 @@ in
# https://nixos.wiki/wiki/Docker
virtualisation.docker = {
enable = true;
# https://docs.docker.com/engine/security/rootless/
# rootless = {
# enable = true;
# setSocketVariable = true;
# };
};
services.vscode-server.enable = true;
system.activationScripts.startup = ''
echo "Starting Nix-Docker container"
'';
# Uses rust-based sudo
security.sudo-rs = {
enable = true;
execWheelOnly = false;
wheelNeedsPassword = false; # allows sudo without password for those in the wheel group
};
}