Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 205d9ea867 | |||
| 311ab760ea | |||
| aebe978684 |
@@ -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
|
||||||
|
|||||||
@@ -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;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -27,18 +27,10 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
# Removes password for sudo
|
|
||||||
security.sudo-rs = lib.mkIf isAdmin {
|
|
||||||
enable = true;
|
|
||||||
extraRules = [{
|
|
||||||
users = [ "${username}" ];
|
|
||||||
commands = lib.mkIf noPassword [{
|
|
||||||
command = "ALL";
|
|
||||||
options = [ "NOPASSWD" ];
|
|
||||||
}];
|
|
||||||
}];
|
|
||||||
};
|
|
||||||
|
|
||||||
|
security.sudo-rs.enable = lib.mkIf isAdmin true;
|
||||||
|
|
||||||
|
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}" ];
|
||||||
|
|||||||
@@ -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;
|
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user