summaryrefslogtreecommitdiff
path: root/hosts
diff options
context:
space:
mode:
Diffstat (limited to 'hosts')
-rw-r--r--hosts/common/security.nix20
-rw-r--r--hosts/common/users.nix15
-rw-r--r--hosts/glados-wsl/default.nix63
-rw-r--r--hosts/glados-wsl/packages.nix6
4 files changed, 61 insertions, 43 deletions
diff --git a/hosts/common/security.nix b/hosts/common/security.nix
index debd6b7..2d473be 100644
--- a/hosts/common/security.nix
+++ b/hosts/common/security.nix
@@ -1,7 +1,10 @@
-{ lib, config, ... }:
-
-with builtins; with lib;
{
+ lib,
+ config,
+ ...
+}:
+with builtins;
+with lib; {
security.sudo = {
configFile = ''
Defaults env_reset
@@ -10,8 +13,15 @@ with builtins; with lib;
'';
execWheelOnly = true;
extraRules = [
- { users = [ "root" ]; groups = [ "root" ]; commands = [ "ALL" ]; }
- { users = [ "seth" ]; commands = [ "ALL" ]; }
+ {
+ users = ["root"];
+ groups = ["root"];
+ commands = ["ALL"];
+ }
+ {
+ users = ["seth"];
+ commands = ["ALL"];
+ }
];
};
}
diff --git a/hosts/common/users.nix b/hosts/common/users.nix
index 1dd219e..0d2681e 100644
--- a/hosts/common/users.nix
+++ b/hosts/common/users.nix
@@ -1,18 +1,23 @@
-{ config, lib, pkgs, ... }:
-
-with config; with lib; with pkgs;
{
+ config,
+ lib,
+ pkgs,
+ ...
+}:
+with config;
+with lib;
+with pkgs; {
users = {
defaultUserShell = bash;
mutableUsers = false;
users = {
-
root = {
home = "/root";
uid = ids.uids.root;
group = "root";
initialHashedPassword = mkDefault "!";
};
-
+ };
+ };
}
diff --git a/hosts/glados-wsl/default.nix b/hosts/glados-wsl/default.nix
index b7efacd..49db2ae 100644
--- a/hosts/glados-wsl/default.nix
+++ b/hosts/glados-wsl/default.nix
@@ -1,40 +1,41 @@
{
- config,
- modulesPath,
- pkgs,
- ...
+ config,
+ modulesPath,
+ pkgs,
+ ...
}: {
- imports = [
- (modulesPath + "/profiles/minimal.nix")
- ./packages.nix
- ../../users/seth
- ];
+ imports = [
+ (modulesPath + "/profiles/minimal.nix")
+ ../common
+ ./packages.nix
+ ../../users/seth
+ ];
- # enable non-free packages
- nixpkgs.config.allowUnfree = true;
+ # enable non-free packages
+ nixpkgs.config.allowUnfree = true;
- # Enable nix flakes
- nix.package = pkgs.nixFlakes;
- nix.settings.experimental-features = ["nix-command" "flakes"];
+ # Enable nix flakes
+ nix.package = pkgs.nixFlakes;
+ nix.settings.experimental-features = ["nix-command" "flakes"];
- system.stateVersion = "22.11";
+ system.stateVersion = "22.11";
- # hardware = {
- # nvidia.package = boot.kernelPackages.nvidiaPackages.stable;
- # xserver = {
- # videoDrivers = [ "nvidia" ];
- # };
- # opengl.enable = true;
- # };
+ # hardware = {
+ # nvidia.package = boot.kernelPackages.nvidiaPackages.stable;
+ # xserver = {
+ # videoDrivers = [ "nvidia" ];
+ # };
+ # opengl.enable = true;
+ # };
- networking.hostName = "glados-wsl";
+ networking.hostName = "glados-wsl";
- programs = {
- gnupg = {
- agent = {
- enable = true;
- pinentryFlavor = "curses";
- };
- };
- };
+ programs = {
+ gnupg = {
+ agent = {
+ enable = true;
+ pinentryFlavor = "curses";
+ };
+ };
+ };
}
diff --git a/hosts/glados-wsl/packages.nix b/hosts/glados-wsl/packages.nix
index 9478ac5..39e7546 100644
--- a/hosts/glados-wsl/packages.nix
+++ b/hosts/glados-wsl/packages.nix
@@ -1,6 +1,8 @@
-{ confg, pkgs, ... }:
-
{
+ confg,
+ pkgs,
+ ...
+}: {
environment.systemPackages = with pkgs; [
git
neofetch