diff options
Diffstat (limited to 'modules/core')
-rw-r--r-- | modules/core/default.nix | 10 | ||||
-rw-r--r-- | modules/core/packages.nix | 21 | ||||
-rw-r--r-- | modules/core/services.nix | 10 | ||||
-rw-r--r-- | modules/core/settings.nix | 8 | ||||
-rw-r--r-- | modules/core/tailscale.nix | 6 | ||||
-rw-r--r-- | modules/core/users.nix | 44 |
6 files changed, 99 insertions, 0 deletions
diff --git a/modules/core/default.nix b/modules/core/default.nix new file mode 100644 index 0000000..7ec63e4 --- /dev/null +++ b/modules/core/default.nix @@ -0,0 +1,10 @@ +{ ... }: +{ + imports = [ + ./users.nix + ./services.nix + ./settings.nix + ./packages.nix + ./tailscale.nix + ]; +} diff --git a/modules/core/packages.nix b/modules/core/packages.nix new file mode 100644 index 0000000..37d1562 --- /dev/null +++ b/modules/core/packages.nix @@ -0,0 +1,21 @@ +{ pkgs, ... }: +{ + environment.systemPackages = with pkgs; [ + git + git-crypt + helix + devenv + + busybox + usbutils + dig + file + gcc + jq + netcat + tcpdump + wget + iftop + htop + ]; +} diff --git a/modules/core/services.nix b/modules/core/services.nix new file mode 100644 index 0000000..f3d1d24 --- /dev/null +++ b/modules/core/services.nix @@ -0,0 +1,10 @@ +{ lib, ... }: +{ + services = { + openssh = { + enable = true; + openFirewall = lib.mkDefault false; + settings.AllowUsers = [ "jras" ]; + }; + }; +} diff --git a/modules/core/settings.nix b/modules/core/settings.nix new file mode 100644 index 0000000..e7a7b2e --- /dev/null +++ b/modules/core/settings.nix @@ -0,0 +1,8 @@ +{ ... }: +{ + nixpkgs.config.allowUnfree = true; + nix.settings = { + experimental-features = [ "nix-command" "flakes" ]; + trusted-users = [ "root" "jras" ]; + }; +} diff --git a/modules/core/tailscale.nix b/modules/core/tailscale.nix new file mode 100644 index 0000000..0d7c456 --- /dev/null +++ b/modules/core/tailscale.nix @@ -0,0 +1,6 @@ +{ ... }: +{ + services.tailscale = { + enable = true; + }; +} diff --git a/modules/core/users.nix b/modules/core/users.nix new file mode 100644 index 0000000..b1a30ed --- /dev/null +++ b/modules/core/users.nix @@ -0,0 +1,44 @@ +{ lib, pkgs, inputs, ... }: +{ + programs.zsh.enable = true; + + security.sudo.execWheelOnly = lib.mkDefault true; + security.sudo.wheelNeedsPassword = lib.mkDefault false; + + users.users.jras = { + createHome = true; + isNormalUser = true; + extraGroups = [ "wheel" ]; + shell = pkgs.zsh; + packages = with pkgs; [ git helix curl ]; + openssh.authorizedKeys.keyFiles = [ ../../keys/id_tarrel.pub ../../keys/id_work.pub ]; + }; + + i18n.defaultLocale = "en_US.UTF-8"; + i18n.extraLocaleSettings = { + LC_ADDRESS = "nl_NL.UTF-8"; + LC_IDENTIFICATION = "nl_NL.UTF-8"; + LC_MEASUREMENT = "nl_NL.UTF-8"; + LC_MONETARY = "nl_NL.UTF-8"; + LC_NAME = "nl_NL.UTF-8"; + LC_NUMERIC = "nl_NL.UTF-8"; + LC_PAPER = "nl_NL.UTF-8"; + LC_TELEPHONE = "nl_NL.UTF-8"; + LC_TIME = "nl_NL.UTF-8"; + }; + + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.extraSpecialArgs = { inherit inputs; }; + home-manager.users.jras = { + imports = [ ../home-manager/core ]; + + home.username = "jras"; + home.homeDirectory = "/home/jras"; + + programs.git = { + userName = lib.mkDefault "Jasper Ras"; + userEmail = lib.mkDefault "jaspert.ras@gmail.com"; + }; + }; +} |