Initial commit
This commit is contained in:
19
nixos-modules/1password.nix
Normal file
19
nixos-modules/1password.nix
Normal file
@@ -0,0 +1,19 @@
|
||||
{ config, lib, ... }:
|
||||
|
||||
let
|
||||
cfg = config._1password;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
_1password.enable = lib.mkEnableOption "enable _1password module";
|
||||
};
|
||||
|
||||
config.programs._1password = lib.mkIf cfg.enable {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
config.programs._1password-gui = lib.mkIf cfg.enable {
|
||||
enable = true;
|
||||
polkitPolicyOwners = [ "mbessette" ];
|
||||
};
|
||||
}
|
||||
6
nixos-modules/default.nix
Normal file
6
nixos-modules/default.nix
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
imports = [
|
||||
./1password.nix
|
||||
./main-user.nix
|
||||
];
|
||||
}
|
||||
25
nixos-modules/main-user.nix
Normal file
25
nixos-modules/main-user.nix
Normal file
@@ -0,0 +1,25 @@
|
||||
{ lib, config, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.main-user;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
main-user.enable = lib.mkEnableOption "enable user module";
|
||||
main-user.userName = lib.mkOption {
|
||||
default = "mbessette";
|
||||
description = "username";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
users.users.${cfg.userName} = {
|
||||
isNormalUser = true;
|
||||
initialPassword = "12345";
|
||||
description = "main user";
|
||||
shell = pkgs.zsh;
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
packages = with pkgs; [];
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user