Initial configuration

This commit is contained in:
John Lancaster
2024-11-17 17:26:45 +00:00
parent eb7b28859a
commit 6d741872a1

43
configuration.nix Normal file
View File

@@ -0,0 +1,43 @@
{ pkgs, lib, modulesPath, ... }:
let
stateVersion = "24.05";
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")
];
environment.systemPackages = with pkgs; [
(pkgs.writeShellScriptBin "nrbs" "sudo nixos-rebuild switch")
(pkgs.writeShellScriptBin "nrbsu" "sudo nix-channel --update && sudo nixos-rebuild switch")
bash
git
eza
gh
];
virtualisation.docker.enable = true;
services.vscode-server.enable = true;
services.openssh.enable = true;
system.activationScripts.startup = ''
echo "Starting Nix-Docker container"
'';
security.sudo-rs = {
enable = true;
execWheelOnly = false;
wheelNeedsPassword = false;
};
users.users.myuser = {
isNormalUser = true;
extraGroups = [ "docker" ];
openssh.authorizedKeys.keyFiles = [ "/root/.ssh/authorized_keys" ];
};
}