My Nix Configuration

[modules.nixos] Fix eval errors

Changed files
+35 -15
modules
nixos
default-config
default-users
programs
neovim
services
buildbot
+2 -13
modules/nixos/default-config/users.nix
···
-
{ lib, pkgs, ... }:
+
{ lib, ... }:
{
users.users = {
-
pyrox = {
+
pyrox = lib.mkDefault {
isNormalUser = true;
description = lib.mkDefault "Pyrox";
extraGroups = [
···
"wireshark"
];
};
-
};
-
# Set default editor
-
programs.neovim = {
-
enable = true;
-
defaultEditor = true;
-
viAlias = true;
-
vimAlias = true;
-
withNodeJs = true;
-
withPython3 = true;
-
withRuby = false;
-
package = pkgs.py.nvim;
};
}
+26
modules/nixos/default-users/default.nix
···
options.py.users.default.enable = lib.mkEnableOption "Default PyroNet Users";
config = lib.mkIf cfg.enable {
+
users.users.pyrox = {
+
description = "Pyrox";
+
isNormalUser = true;
+
extraGroups = [
+
"adbusers"
+
"wheel"
+
"networkmanager"
+
"video"
+
"docker"
+
"wireshark"
+
"input"
+
];
+
hashedPassword = "$6$6EtuZhVOJdfI9DYP$1Qnd7R8qdN.E5yE2kDQCNg2zgJ5cIjNBKsIW/qJgb8wcKlUpIoVg/fEKvBkAgCiLyojVG2kzfu4J9LR8rA8a2/";
+
shell = pkgs.fish;
+
openssh = {
+
authorizedKeys = {
+
keyFiles = [
+
./yubikey-new.pub
+
./yubikey-main.pub
+
./yubikey-back.pub
+
./backup.pub
+
];
+
keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIP532AB5mkNvE29MkDDY8HEf8ZdktGWiI0PzLrvbmLQe" ];
+
};
+
};
+
};
users.users.thehedgehog = {
description = "The Hedgehog";
isNormalUser = true;
+1 -1
modules/nixos/programs/neovim/default.nix
···
cfg = config.py.programs.neovim;
in
{
-
options.py.programs.neovim = lib.mkEnableOption "Neovim configuration";
+
options.py.programs.neovim.enable = lib.mkEnableOption "Neovim configuration";
config.programs.neovim = lib.mkIf cfg.enable {
enable = true;
+6 -1
modules/nixos/services/buildbot/default.nix
···
{
options.py.services.buildbot.worker = {
enable = lib.mkEnableOption "buildbot worker";
+
passwordFile = lib.mkOption {
+
type = lib.types.path;
+
description = "Password file for the worker";
+
default = null;
+
};
};
config.services.buildbot-nix.worker = lib.mkIf cfg.enable {
enable = true;
name = config.networking.hostName;
masterUrl = "tcp:host=marvin:port=6915";
-
workerPasswordFile = config.age.secrets.buildbot-worker-password.path;
+
workerPasswordFile = cfg.passwordFile;
};
}