Skip to content

Commit

Permalink
Apply some statix suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
alapshin committed Sep 1, 2024
1 parent 0dd0aba commit 6aecc84
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 22 deletions.
16 changes: 9 additions & 7 deletions hosts/niflheim/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,13 @@
# Create media group
users.groups.media = { };

users.users.root.hashedPasswordFile = config.sops.secrets."linux/root".path;
users.users.root.openssh.authorizedKeys.keys = [
# desktop
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFDz59Mf8DGoOjluY9T4FNFaOvXH1s/VVZ9awHcyNVHJ"
#laptop
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGlJo3xdypmwSS2lsHCzf6GsqyEGvr+HzvbU+TGuPjmA"
];
users.users.root = {
hashedPasswordFile = config.sops.secrets."linux/root".path;
openssh.authorizedKeys.keys = [
# desktop
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFDz59Mf8DGoOjluY9T4FNFaOvXH1s/VVZ9awHcyNVHJ"
# laptop
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGlJo3xdypmwSS2lsHCzf6GsqyEGvr+HzvbU+TGuPjmA"
];
};
}
9 changes: 5 additions & 4 deletions hosts/niflheim/networking.nix
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@
hostKeys = [ /etc/ssh/ssh_initrd_ed25519_key ];
};
};
systemd.network = {
enable = true;
# Network configuration i.e. when we unlock machines with openssh in the initrd
networks."10-uplink" = config.systemd.network.networks."10-uplink";
};
};

boot.initrd.systemd.network.enable = true;
# Network configuration i.e. when we unlock machines with openssh in the initrd
boot.initrd.systemd.network.networks."10-uplink" = config.systemd.network.networks."10-uplink";
}
8 changes: 5 additions & 3 deletions hosts/personal/nix.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{ lib, ... }:

{
nix.daemonIOSchedClass = "idle";
nix.daemonIOSchedPriority = 7;
nix.daemonCPUSchedPolicy = "idle";
nix = {
daemonIOSchedClass = "idle";
daemonIOSchedPriority = 7;
daemonCPUSchedPolicy = "idle";
};
}
8 changes: 5 additions & 3 deletions hosts/server/nix.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{ lib, ... }:

{
nix.daemonIOSchedClass = "best-effort";
nix.daemonIOSchedPriority = 4;
nix.daemonCPUSchedPolicy = "batch";
nix = {
daemonIOSchedClass = "best-effort";
daemonIOSchedPriority = 4;
daemonCPUSchedPolicy = "batch";
};
}
2 changes: 1 addition & 1 deletion modules/nixos/nginx-ext.nix
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ in
}
// attrsets.mapAttrs' (
app: opts:
nameValuePair ("${app}.${cfg.basedomain}") {
nameValuePair "${app}.${cfg.basedomain}" {
forceSSL = true;
useACMEHost = cfg.basedomain;
locations = {
Expand Down
9 changes: 5 additions & 4 deletions users/alapshin/home/home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@
...
}:
{
home.stateVersion = "23.11";

home.username = username;
home.homeDirectory = "/home/${username}";
home = {
username = username;
stateVersion = "23.11";
homeDirectory = "/home/${username}";
};

imports =
[
Expand Down

0 comments on commit 6aecc84

Please sign in to comment.