consolidated users file

This commit is contained in:
John Lancaster
2024-11-26 06:05:02 +00:00
parent feeeba6221
commit 4448ee6247
3 changed files with 91 additions and 43 deletions

View File

@@ -1,8 +1,8 @@
{ pkgs, lib, modulesPath, ... }:
let
stateVersion = "24.05";
userName = "myuser";
repoPath = "/srv/nix-docker";
userName = "loki";
repoPath = "/srv/loki";
unstable = import <nixos-unstable> {};
in
{
@@ -11,12 +11,7 @@ in
(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
(import ./loki.nix { inherit pkgs; inherit userName; })
];
environment.systemPackages = with pkgs; [
@@ -26,7 +21,6 @@ in
busybox
git
eza
gh
];
# For SSH access
@@ -35,20 +29,7 @@ in
# Networking stuff
services.avahi = { enable = true; nssmdns4 = true; };
# 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 = {
@@ -57,4 +38,11 @@ in
wheelNeedsPassword = false; # allows sudo without password for those in the wheel group
};
home-manager = {
useGlobalPkgs = true;
users.root = {
home.stateVersion = stateVersion;
imports = [ (import ./git.nix { inherit repoPath; }) ];
};
};
}