mirror of
https://github.com/nmasur/dotfiles
synced 2025-07-05 15:00:14 +00:00
convert to proper module layout
This commit is contained in:
@ -1,9 +1,13 @@
|
||||
{ config, ... }: {
|
||||
{ config, pkgs, lib, ... }: {
|
||||
|
||||
imports = [ ./user.nix ./timezone.nix ./doas.nix ];
|
||||
|
||||
# Pin a state version to prevent warnings
|
||||
system.stateVersion =
|
||||
config.home-manager.users.${config.user}.home.stateVersion;
|
||||
config = lib.mkIf pkgs.stdenv.isLinux {
|
||||
|
||||
# Pin a state version to prevent warnings
|
||||
system.stateVersion =
|
||||
config.home-manager.users.${config.user}.home.stateVersion;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -1,30 +1,35 @@
|
||||
# Replace sudo with doas
|
||||
|
||||
{ config, ... }: {
|
||||
{ config, pkgs, lib, ... }: {
|
||||
|
||||
security = {
|
||||
config = lib.mkIf pkgs.stdenv.isLinux {
|
||||
|
||||
# Remove sudo
|
||||
sudo.enable = false;
|
||||
security = {
|
||||
|
||||
# Add doas
|
||||
doas = {
|
||||
enable = true;
|
||||
# Remove sudo
|
||||
sudo.enable = false;
|
||||
|
||||
# No password required
|
||||
wheelNeedsPassword = false;
|
||||
# Add doas
|
||||
doas = {
|
||||
enable = true;
|
||||
|
||||
# Pass environment variables from user to root
|
||||
# Also requires removing password here
|
||||
extraRules = [{
|
||||
groups = [ "wheel" ];
|
||||
noPass = true;
|
||||
keepEnv = true;
|
||||
}];
|
||||
# No password required
|
||||
wheelNeedsPassword = false;
|
||||
|
||||
# Pass environment variables from user to root
|
||||
# Also requires removing password here
|
||||
extraRules = [{
|
||||
groups = [ "wheel" ];
|
||||
noPass = true;
|
||||
keepEnv = true;
|
||||
}];
|
||||
};
|
||||
};
|
||||
|
||||
home-manager.users.${config.user}.programs.fish.shellAliases = {
|
||||
sudo = "doas";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
home-manager.users.${config.user}.programs.fish.shellAliases = {
|
||||
sudo = "doas";
|
||||
};
|
||||
}
|
||||
|
@ -1,15 +1,19 @@
|
||||
{ ... }: {
|
||||
{ config, pkgs, lib, ... }: {
|
||||
|
||||
# Service to determine location for time zone
|
||||
services.geoclue2.enable = true;
|
||||
services.geoclue2.enableWifi = false; # Breaks when it can't connect
|
||||
location = { provider = "geoclue2"; };
|
||||
config = lib.mkIf pkgs.stdenv.isLinux {
|
||||
|
||||
# Enable local time based on time zone
|
||||
services.localtimed.enable = true;
|
||||
# Service to determine location for time zone
|
||||
services.geoclue2.enable = true;
|
||||
services.geoclue2.enableWifi = false; # Breaks when it can't connect
|
||||
location = { provider = "geoclue2"; };
|
||||
|
||||
# Required to get localtimed to talk to geoclue2
|
||||
services.geoclue2.appConfig.localtimed.isSystem = true;
|
||||
services.geoclue2.appConfig.localtimed.isAllowed = true;
|
||||
# Enable local time based on time zone
|
||||
services.localtimed.enable = true;
|
||||
|
||||
# Required to get localtimed to talk to geoclue2
|
||||
services.geoclue2.appConfig.localtimed.isSystem = true;
|
||||
services.geoclue2.appConfig.localtimed.isAllowed = true;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ config, lib, ... }: {
|
||||
{ config, pkgs, lib, ... }: {
|
||||
|
||||
options = {
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
|
||||
};
|
||||
|
||||
config = {
|
||||
config = lib.mkIf (pkgs.stdenv.isLinux) {
|
||||
|
||||
# Allows us to declaritively set password
|
||||
users.mutableUsers = false;
|
||||
|
Reference in New Issue
Block a user