Compare commits

..

3 Commits

Author SHA1 Message Date
John Lancaster 205d9ea867 added no password for soteria 2026-03-29 22:22:04 -05:00
John Lancaster 311ab760ea remove no password stuff from user factory 2026-03-29 18:47:05 -05:00
John Lancaster aebe978684 soteria fixes 2026-03-29 18:07:38 -05:00
4 changed files with 20 additions and 18 deletions
@@ -103,7 +103,6 @@
# media-session.enable = true; # media-session.enable = true;
}; };
home-manager.useGlobalPkgs = true;
home-manager.users.root = { home-manager.users.root = {
imports = with inputs.self.modules.homeManager; [ imports = with inputs.self.modules.homeManager; [
rebuild rebuild
+17 -4
View File
@@ -1,4 +1,4 @@
{ inputs, ... }: { inputs, lib, ... }:
let let
username = "john"; username = "john";
hostname = "soteria"; hostname = "soteria";
@@ -16,10 +16,23 @@ in
# nixos.restic-envoy # nixos.restic-envoy
{ {
networking.hostName = hostname; networking.hostName = hostname;
nix.settings.build-dir = "/var/tmp/nix-build";
systemd.tmpfiles.rules = [ # Removes password for sudo
"d /var/tmp/nix-build 1777 root root -" security.sudo-rs.extraRules = lib.mkAfter [
{
users = [ username ];
commands = [
{
command = "ALL";
options = [ "NOPASSWD" ];
}
];
}
]; ];
# nix.settings.build-dir = "/var/tmp/nix-build";
# systemd.tmpfiles.rules = [
# "d /var/tmp/nix-build 1777 root root -"
# ];
step-ssh-host = { step-ssh-host = {
hostname = hostname; hostname = hostname;
}; };
+3 -11
View File
@@ -27,18 +27,10 @@
]; ];
}; };
# Removes password for sudo
security.sudo-rs = lib.mkIf isAdmin { security.sudo-rs.enable = lib.mkIf isAdmin true;
enable = true;
extraRules = [{
users = [ "${username}" ];
commands = lib.mkIf noPassword [{
command = "ALL";
options = [ "NOPASSWD" ];
}];
}];
};
home-manager.useGlobalPkgs = true;
# https://github.com/Doc-Steve/dendritic-design-with-flake-parts/wiki/Dendritic_Aspects#multi-context-aspect # https://github.com/Doc-Steve/dendritic-design-with-flake-parts/wiki/Dendritic_Aspects#multi-context-aspect
home-manager.users."${username}" = { home-manager.users."${username}" = {
imports = [ self.modules.homeManager."${username}" ]; imports = [ self.modules.homeManager."${username}" ];
-2
View File
@@ -32,7 +32,6 @@ in
}; };
config = { config = {
cfg.certificates = lib.mkDefault true;
services.openssh = { services.openssh = {
enable = true; enable = true;
# require public key authentication for better security # require public key authentication for better security
@@ -190,7 +189,6 @@ in
"test-nix" = { "test-nix" = {
hostname = "fded:fb16:653e:25da:be24:11ff:fea0:753f"; hostname = "fded:fb16:653e:25da:be24:11ff:fea0:753f";
user = "john"; user = "john";
identityFile = identityFile;
}; };
}) })
]; ];