Initial commit
Signed-off-by: TheArcaneBrony <myrainbowdash949@gmail.com>
3 files changed, 113 insertions, 0 deletions
diff --git a/modules/base.nix b/modules/base.nix
new file mode 100644
index 0000000..8f2102b
--- /dev/null
+++ b/modules/base.nix
@@ -0,0 +1,78 @@
+{ config, pkgs, ... }:
+
+{
+ imports =
+ [
+ ./hardware-configuration.nix
+ ./packages/vim.nix
+ ./users.nix
+ ];
+
+ boot = {
+ loader = {
+ grub = {
+ enable = true;
+ version = 2;
+ device = "/dev/sda"; # nodev for EFI only
+
+ # EFI
+ efiSupport = false;
+ efiInstallAsRemovable = false;
+ };
+ };
+ };
+
+ networking = {
+ hostName = lib.mkDefault "Rory-nix-base";
+
+ firewall = {
+ enable = false;
+ # allowedTCPPorts = [ ... ];
+ # allowedUDPPorts = [ ... ];
+ };
+ };
+
+ #time.timeZone = "Europe/Brussels";
+ i18n.defaultLocale = "en_US.UTF-8";
+
+ services = {
+ openssh = {
+ enable = true;
+ #allow more logins in cases where i have many ssh keys on a system
+ extraConfig = ''
+ MaxAuthTries 32
+ '';
+ };
+ };
+
+ security.sudo.wheelNeedsPassword = false;
+ nixpkgs.config.allowUnfree = true;
+
+ sound.enable = true;
+ hardware.pulseaudio.enable = true;
+
+ users.users.Rory = {
+ isNormalUser = true;
+ extraGroups = [ "wheel" ];
+ packages = with pkgs; [
+ ];
+ initialPassword = "password";
+ };
+
+ environment.systemPackages = with pkgs; [
+ wget
+ neofetch
+ lnav
+ zsh
+ feh
+ git
+ lsd
+ #sshfs
+ kitty.terminfo
+ vimPlugins.vim-nix
+ ];
+
+
+ system.stateVersion = "22.11"; # DO NOT EDIT!
+}
+
diff --git a/modules/packages/vim.nix b/modules/packages/vim.nix
new file mode 100644
index 0000000..3524e2c
--- /dev/null
+++ b/modules/packages/vim.nix
@@ -0,0 +1,22 @@
+{ pkgs, ... }:
+{
+ environment.variables = { EDITOR = "vim"; };
+
+ environment.systemPackages = with pkgs; [
+ (neovim.override {
+ vimAlias = true;
+ configure = {
+ packages.myPlugins = with pkgs.vimPlugins; {
+ start = [ vim-lastplace vim-nix vim-airline ];
+ opt = [];
+ };
+ customRC = ''
+ " your custom vimrc
+ set nocompatible
+ set backspace=indent,eol,start
+ " ...
+ '';
+ };
+ }
+ )];
+}
diff --git a/modules/users.nix b/modules/users.nix
new file mode 100644
index 0000000..15e76a0
--- /dev/null
+++ b/modules/users.nix
@@ -0,0 +1,13 @@
+{ config, pkgs, ... }:
+
+{
+
+ users.users.Rory = {
+ isNormalUser = true;
+ extraGroups = [ "wheel" ];
+ packages = with pkgs; [
+ ];
+ initialPassword = "password";
+ };
+}
+
|