initial commit

Change-Id: Icdf87c6c68d88c917468ad949f90af5bcb690831
diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000..0f112c3
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,9 @@
+root = true
+
+[*]
+end_of_line = lf
+insert_final_newline = true
+charset = utf-8
+indent_style = space
+indent_size = 2
+max_line_length = 80
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..07750ed
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "extensions/alacritty/themes"]
+	path = extensions/alacritty/themes
+	url = https://github.com/rajasegar/alacritty-themes
diff --git a/.gitreview b/.gitreview
new file mode 100644
index 0000000..8e686c3
--- /dev/null
+++ b/.gitreview
@@ -0,0 +1,5 @@
+[gerrit]
+host=ssh.clicks.codes
+port=29418
+project=Coded/NixFiles
+defaultBranch=main
diff --git a/TODO.md b/TODO.md
new file mode 100644
index 0000000..cbddaf3
--- /dev/null
+++ b/TODO.md
@@ -0,0 +1,3 @@
+# [home-manager:](https://mipmip.github.io/home-manager-option-search)
+- programs.eww
+- programs.nnn
diff --git a/extensions/chromium/adnauseam/adnauseam-3.18.0.chromium.crx b/extensions/chromium/adnauseam/adnauseam-3.18.0.chromium.crx
new file mode 100644
index 0000000..cb4a0a8
--- /dev/null
+++ b/extensions/chromium/adnauseam/adnauseam-3.18.0.chromium.crx
Binary files differ
diff --git a/flake.lock b/flake.lock
new file mode 100755
index 0000000..303f290
--- /dev/null
+++ b/flake.lock
@@ -0,0 +1,377 @@
+{
+  "nodes": {
+    "alacritty-themes": {
+      "flake": false,
+      "locked": {
+        "lastModified": 1687508054,
+        "narHash": "sha256-7V5oeya2ZJVs1VEEe79b63iMRu/gUmqFXfURePxBPng=",
+        "owner": "rajasegar",
+        "repo": "alacritty-themes",
+        "rev": "5438488f67665640987bde3033851d4081d7531c",
+        "type": "github"
+      },
+      "original": {
+        "owner": "rajasegar",
+        "repo": "alacritty-themes",
+        "type": "github"
+      }
+    },
+    "crane": {
+      "inputs": {
+        "nixpkgs": [
+          "lanzaboote",
+          "nixpkgs"
+        ]
+      },
+      "locked": {
+        "lastModified": 1697840921,
+        "narHash": "sha256-zXHwu104SQOxogkMgg+w22c3+zI/FvK83TAkfLmeKw0=",
+        "owner": "ipetkov",
+        "repo": "crane",
+        "rev": "758ae442227103fa501276e8225609a11c99718e",
+        "type": "github"
+      },
+      "original": {
+        "owner": "ipetkov",
+        "repo": "crane",
+        "type": "github"
+      }
+    },
+    "flake-compat": {
+      "flake": false,
+      "locked": {
+        "lastModified": 1696426674,
+        "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
+        "owner": "edolstra",
+        "repo": "flake-compat",
+        "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
+        "type": "github"
+      },
+      "original": {
+        "owner": "edolstra",
+        "repo": "flake-compat",
+        "type": "github"
+      }
+    },
+    "flake-compat_2": {
+      "flake": false,
+      "locked": {
+        "lastModified": 1673956053,
+        "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
+        "owner": "edolstra",
+        "repo": "flake-compat",
+        "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
+        "type": "github"
+      },
+      "original": {
+        "owner": "edolstra",
+        "repo": "flake-compat",
+        "type": "github"
+      }
+    },
+    "flake-parts": {
+      "inputs": {
+        "nixpkgs-lib": [
+          "lanzaboote",
+          "nixpkgs"
+        ]
+      },
+      "locked": {
+        "lastModified": 1696343447,
+        "narHash": "sha256-B2xAZKLkkeRFG5XcHHSXXcP7To9Xzr59KXeZiRf4vdQ=",
+        "owner": "hercules-ci",
+        "repo": "flake-parts",
+        "rev": "c9afaba3dfa4085dbd2ccb38dfade5141e33d9d4",
+        "type": "github"
+      },
+      "original": {
+        "owner": "hercules-ci",
+        "repo": "flake-parts",
+        "type": "github"
+      }
+    },
+    "flake-utils": {
+      "inputs": {
+        "systems": "systems"
+      },
+      "locked": {
+        "lastModified": 1694529238,
+        "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
+        "owner": "numtide",
+        "repo": "flake-utils",
+        "rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
+        "type": "github"
+      },
+      "original": {
+        "owner": "numtide",
+        "repo": "flake-utils",
+        "type": "github"
+      }
+    },
+    "flake-utils_2": {
+      "inputs": {
+        "systems": "systems_2"
+      },
+      "locked": {
+        "lastModified": 1681202837,
+        "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
+        "owner": "numtide",
+        "repo": "flake-utils",
+        "rev": "cfacdce06f30d2b68473a46042957675eebb3401",
+        "type": "github"
+      },
+      "original": {
+        "owner": "numtide",
+        "repo": "flake-utils",
+        "type": "github"
+      }
+    },
+    "gitignore": {
+      "inputs": {
+        "nixpkgs": [
+          "lanzaboote",
+          "pre-commit-hooks-nix",
+          "nixpkgs"
+        ]
+      },
+      "locked": {
+        "lastModified": 1660459072,
+        "narHash": "sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8=",
+        "owner": "hercules-ci",
+        "repo": "gitignore.nix",
+        "rev": "a20de23b925fd8264fd7fad6454652e142fd7f73",
+        "type": "github"
+      },
+      "original": {
+        "owner": "hercules-ci",
+        "repo": "gitignore.nix",
+        "type": "github"
+      }
+    },
+    "home-manager": {
+      "inputs": {
+        "nixpkgs": [
+          "nixpkgs"
+        ]
+      },
+      "locked": {
+        "lastModified": 1698250431,
+        "narHash": "sha256-qs2gTeH4wpnWPO6Oi6sOhp2IhG0i0DzcnrJxIY3/CP8=",
+        "owner": "nix-community",
+        "repo": "home-manager",
+        "rev": "09587fbbc6a669f7725613e044c2577dc5d43ab5",
+        "type": "github"
+      },
+      "original": {
+        "owner": "nix-community",
+        "repo": "home-manager",
+        "type": "github"
+      }
+    },
+    "lanzaboote": {
+      "inputs": {
+        "crane": "crane",
+        "flake-compat": "flake-compat",
+        "flake-parts": "flake-parts",
+        "flake-utils": "flake-utils",
+        "nixpkgs": "nixpkgs",
+        "pre-commit-hooks-nix": "pre-commit-hooks-nix",
+        "rust-overlay": "rust-overlay"
+      },
+      "locked": {
+        "lastModified": 1698100456,
+        "narHash": "sha256-Hx9ZVZYARVbzJB0fFNe/lPE9a4oP1dDGJnl3siRtBJ0=",
+        "owner": "nix-community",
+        "repo": "lanzaboote",
+        "rev": "bb380e19488ec6105d07b57c23ac518be51bf901",
+        "type": "github"
+      },
+      "original": {
+        "owner": "nix-community",
+        "repo": "lanzaboote",
+        "type": "github"
+      }
+    },
+    "nix-vscode-extensions": {
+      "inputs": {
+        "flake-compat": "flake-compat_2",
+        "flake-utils": "flake-utils_2",
+        "nixpkgs": "nixpkgs_2"
+      },
+      "locked": {
+        "lastModified": 1698196718,
+        "narHash": "sha256-/vKDW1HaKpoME4g7jTAFyap1fHEi7IM4OdmU6fVpB+0=",
+        "owner": "nix-community",
+        "repo": "nix-vscode-extensions",
+        "rev": "b4f9b971850b1265ea9f450070eb3badd88ae360",
+        "type": "github"
+      },
+      "original": {
+        "owner": "nix-community",
+        "repo": "nix-vscode-extensions",
+        "type": "github"
+      }
+    },
+    "nixpkgs": {
+      "locked": {
+        "lastModified": 1697935353,
+        "narHash": "sha256-dDwl5ziD24Gs0feke2seFXoQibHafb5XeNDWlUZxCbg=",
+        "owner": "NixOS",
+        "repo": "nixpkgs",
+        "rev": "8dfad603247387df1df4826b8bea58efc5d012d8",
+        "type": "github"
+      },
+      "original": {
+        "owner": "NixOS",
+        "ref": "nixos-unstable-small",
+        "repo": "nixpkgs",
+        "type": "github"
+      }
+    },
+    "nixpkgs-stable": {
+      "locked": {
+        "lastModified": 1685801374,
+        "narHash": "sha256-otaSUoFEMM+LjBI1XL/xGB5ao6IwnZOXc47qhIgJe8U=",
+        "owner": "NixOS",
+        "repo": "nixpkgs",
+        "rev": "c37ca420157f4abc31e26f436c1145f8951ff373",
+        "type": "github"
+      },
+      "original": {
+        "owner": "NixOS",
+        "ref": "nixos-23.05",
+        "repo": "nixpkgs",
+        "type": "github"
+      }
+    },
+    "nixpkgs_2": {
+      "locked": {
+        "lastModified": 1684570954,
+        "narHash": "sha256-FX5y4Sm87RWwfu9PI71XFvuRpZLowh00FQpIJ1WfXqE=",
+        "owner": "NixOS",
+        "repo": "nixpkgs",
+        "rev": "3005f20ce0aaa58169cdee57c8aa12e5f1b6e1b3",
+        "type": "github"
+      },
+      "original": {
+        "owner": "NixOS",
+        "ref": "nixos-unstable",
+        "repo": "nixpkgs",
+        "type": "github"
+      }
+    },
+    "nixpkgs_3": {
+      "locked": {
+        "lastModified": 1698134075,
+        "narHash": "sha256-foCD+nuKzfh49bIoiCBur4+Fx1nozo+4C/6k8BYk4sg=",
+        "owner": "nixos",
+        "repo": "nixpkgs",
+        "rev": "8efd5d1e283604f75a808a20e6cde0ef313d07d4",
+        "type": "github"
+      },
+      "original": {
+        "owner": "nixos",
+        "ref": "nixos-unstable",
+        "repo": "nixpkgs",
+        "type": "github"
+      }
+    },
+    "pre-commit-hooks-nix": {
+      "inputs": {
+        "flake-compat": [
+          "lanzaboote",
+          "flake-compat"
+        ],
+        "flake-utils": [
+          "lanzaboote",
+          "flake-utils"
+        ],
+        "gitignore": "gitignore",
+        "nixpkgs": [
+          "lanzaboote",
+          "nixpkgs"
+        ],
+        "nixpkgs-stable": "nixpkgs-stable"
+      },
+      "locked": {
+        "lastModified": 1697746376,
+        "narHash": "sha256-gu77VkgdfaHgNCVufeb6WP9oqFLjwK4jHcoPZmBVF3E=",
+        "owner": "cachix",
+        "repo": "pre-commit-hooks.nix",
+        "rev": "8cc349bfd082da8782b989cad2158c9ad5bd70fd",
+        "type": "github"
+      },
+      "original": {
+        "owner": "cachix",
+        "repo": "pre-commit-hooks.nix",
+        "type": "github"
+      }
+    },
+    "root": {
+      "inputs": {
+        "alacritty-themes": "alacritty-themes",
+        "home-manager": "home-manager",
+        "lanzaboote": "lanzaboote",
+        "nix-vscode-extensions": "nix-vscode-extensions",
+        "nixpkgs": "nixpkgs_3"
+      }
+    },
+    "rust-overlay": {
+      "inputs": {
+        "flake-utils": [
+          "lanzaboote",
+          "flake-utils"
+        ],
+        "nixpkgs": [
+          "lanzaboote",
+          "nixpkgs"
+        ]
+      },
+      "locked": {
+        "lastModified": 1697940838,
+        "narHash": "sha256-eyk92QqAoRNC0V99KOcKcBZjLPixxNBS0PRc4KlSQVs=",
+        "owner": "oxalica",
+        "repo": "rust-overlay",
+        "rev": "a3e829c06eadf848f13d109c7648570ce37ebccd",
+        "type": "github"
+      },
+      "original": {
+        "owner": "oxalica",
+        "repo": "rust-overlay",
+        "type": "github"
+      }
+    },
+    "systems": {
+      "locked": {
+        "lastModified": 1681028828,
+        "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
+        "owner": "nix-systems",
+        "repo": "default",
+        "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
+        "type": "github"
+      },
+      "original": {
+        "owner": "nix-systems",
+        "repo": "default",
+        "type": "github"
+      }
+    },
+    "systems_2": {
+      "locked": {
+        "lastModified": 1681028828,
+        "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
+        "owner": "nix-systems",
+        "repo": "default",
+        "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
+        "type": "github"
+      },
+      "original": {
+        "owner": "nix-systems",
+        "repo": "default",
+        "type": "github"
+      }
+    }
+  },
+  "root": "root",
+  "version": 7
+}
diff --git a/flake.nix b/flake.nix
new file mode 100755
index 0000000..45541f7
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,37 @@
+{
+  description = "Initialization flake";
+
+  inputs = {
+    nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
+    nix-vscode-extensions.url = "github:nix-community/nix-vscode-extensions";
+
+    alacritty-themes.url = "github:rajasegar/alacritty-themes";
+    alacritty-themes.flake = false;
+
+    home-manager.url = "github:nix-community/home-manager";
+    home-manager.inputs.nixpkgs.follows = "nixpkgs";
+
+    lanzaboote.url = "github:nix-community/lanzaboote";
+  };
+
+  outputs = { self, nixpkgs, home-manager, ... }@inputs: {
+    nixosConfigurations."codedPC" = nixpkgs.lib.nixosSystem {
+      system = "x86_64-linux";
+      modules = [
+        home-manager.nixosModules.home-manager
+        inputs.lanzaboote.nixosModules.lanzaboote
+        {
+          nix.settings.experimental-features = [ "nix-command" "flakes" ];
+          system.stateVersion = "23.05";
+        }
+      ] ++ (nixpkgs.lib.pipe ./modules [
+        (import ./utils/nixFilesIn.nix nixpkgs.lib)
+        (map import)
+      ]) ++ (nixpkgs.lib.pipe ./homes [
+        (import ./utils/nixFilesIn.nix nixpkgs.lib)
+        (map import)
+      ]);
+      specialArgs = { inherit inputs; };
+    };
+  };
+}
diff --git a/homes/coded.nix b/homes/coded.nix
new file mode 100644
index 0000000..e2c8392
--- /dev/null
+++ b/homes/coded.nix
@@ -0,0 +1,7 @@
+{ config, ... }: {
+  users.users.coded = {
+    isNormalUser = true;
+    description = "Samuel Shuert";
+    extraGroups = [ "networkmanager" "wheel" ];
+  };
+}
diff --git a/keys/u2f_mappings b/keys/u2f_mappings
new file mode 100644
index 0000000..7acab45
--- /dev/null
+++ b/keys/u2f_mappings
@@ -0,0 +1 @@
+coded:0juI+/ft8OG1GPOm0E3YcoD1xlcsohEsQUqPbkAUwuhzdBTqAHGjflzESReOLrIhxOea/A5OHSb3Ms5zaWSrIQ==,u7y9BgRX/bBqEWvKVta43EeBg2SB7tAYkvrzQZrkpetmJ+PMe+cKQXklBhaFeiuRKeAxB0mGhAOcQJX/KkHcvA==,es256,+presence
\ No newline at end of file
diff --git a/modules/audio.nix b/modules/audio.nix
new file mode 100644
index 0000000..14f2167
--- /dev/null
+++ b/modules/audio.nix
@@ -0,0 +1,17 @@
+{ config, pkgs, ... }: {
+  sound.enable = true;
+  hardware.pulseaudio.enable = false;
+  security.rtkit.enable = true;
+  services.pipewire = {
+    enable = true;
+    alsa.enable = true;
+    alsa.support32Bit = true;
+    pulse.enable = true;
+  };
+
+  home-manager.users.coded.home.packages =
+    with pkgs; [
+      helvum
+      lmms
+    ];
+}
diff --git a/modules/basicServices.nix b/modules/basicServices.nix
new file mode 100644
index 0000000..81eea42
--- /dev/null
+++ b/modules/basicServices.nix
@@ -0,0 +1 @@
+{ config, pkgs, ... }: { services.printing.enable = true; }
diff --git a/modules/boot.nix b/modules/boot.nix
new file mode 100644
index 0000000..1948e91
--- /dev/null
+++ b/modules/boot.nix
@@ -0,0 +1,23 @@
+{ lib, ... }: {
+  boot = {
+    supportedFilesystems = [ "ntfs" ];
+    bootspec.enable = true;
+    loader.systemd-boot = {
+      enable = lib.mkForce false;
+    };
+    lanzaboote = {
+      enable = true;
+      pkiBundle = "/etc/secureboot";
+
+      settings = {
+        auto-entries = true;
+      };
+
+    };
+    loader.efi.canTouchEfiVariables = true;
+    initrd.luks.devices."luks-bf23eee1-7cb7-43b9-822f-a9f49ea0a768".device =
+      "/dev/disk/by-uuid/bf23eee1-7cb7-43b9-822f-a9f49ea0a768";
+    
+    initrd.kernelModules = [ "amdgpu" ];
+  };
+}
diff --git a/modules/browser.nix b/modules/browser.nix
new file mode 100644
index 0000000..f82cfc4
--- /dev/null
+++ b/modules/browser.nix
@@ -0,0 +1,17 @@
+{ pkgs, ... }: {
+  home-manager.users.coded.programs.chromium = {
+    enable = true;
+    extensions = [
+      { id = "nngceckbapebfimnlniiiahkandclblb"; } # bitwarden
+      {
+        id = "dkoaabhijcomjinndlgbmfnmnjnmdeeb";
+        crxPath =
+          ../extensions/chromium/adnauseam/adnauseam-3.18.0.chromium.crx;
+        version = "3.18.0";
+      }
+      { id = "kekjfbackdeiabghhcdklcdoekaanoel"; } #MAL Sync
+      { id = "mnjggcdmjocbbbhaepdhchncahnbgone"; } #Sponsor Block
+      { id = "gebbhagfogifgggkldgodflihgfeippi"; } #return youtube dislike
+    ];
+  };
+}
diff --git a/modules/direnv.nix b/modules/direnv.nix
new file mode 100644
index 0000000..ac6fc9b
--- /dev/null
+++ b/modules/direnv.nix
@@ -0,0 +1,6 @@
+{ 
+  home-manager.users.coded.programs.direnv = {
+    enable = true;
+    nix-direnv.enable = true;
+  };
+}
diff --git a/modules/docker.nix b/modules/docker.nix
new file mode 100644
index 0000000..c4cb81e
--- /dev/null
+++ b/modules/docker.nix
@@ -0,0 +1,6 @@
+{ pkgs, ... }: {
+  home-manager.users.coded.home.packages = [
+    pkgs.docker
+  ];
+  virtualisation.docker.enable = true;
+}
diff --git a/modules/games.nix b/modules/games.nix
new file mode 100644
index 0000000..84da9b2
--- /dev/null
+++ b/modules/games.nix
@@ -0,0 +1,8 @@
+{ pkgs, ... }: {
+  home-manager.users.coded.home.packages = with pkgs; [ minecraft ];
+  programs.steam = {
+    enable = true;
+    remotePlay.openFirewall = true;
+    dedicatedServer.openFirewall = true;
+  };
+}
diff --git a/modules/git.nix b/modules/git.nix
new file mode 100644
index 0000000..b17afe4
--- /dev/null
+++ b/modules/git.nix
@@ -0,0 +1,28 @@
+{ pkgs, ... }: {
+
+  home-manager.users.coded.programs.gpg.enable = true;
+  home-manager.users.coded.home.packages = [
+    pkgs.git-review
+    pkgs.gh
+  ];
+
+  home-manager.users.coded.programs.git = {
+    enable = true;
+    extraConfig = {
+      init.defaultbranch = "main";
+      user = {
+        email = "coded@clicks.codes";
+        name = "Samuel Shuert";
+      };
+      pull.rebase = true;
+      advice.skippedcherrypicks = false;
+      gpg.sign = true;
+      core = {
+        repositoryformatversion = 0;
+        filemode = true;
+        bare = false;
+        logallrefupdates = true;
+      };
+    };
+  };
+}
diff --git a/modules/hardware-configuration.nix b/modules/hardware-configuration.nix
new file mode 100755
index 0000000..ae6ebae
--- /dev/null
+++ b/modules/hardware-configuration.nix
@@ -0,0 +1,42 @@
+# Do not modify this file!  It was generated by ‘nixos-generate-config’
+# and may be overwritten by future invocations.  Please make changes
+# to /etc/nixos/configuration.nix instead.
+{ config, lib, pkgs, modulesPath, ... }:
+
+{
+  imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
+
+  boot.initrd.availableKernelModules =
+    [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" "sr_mod" ];
+  boot.initrd.kernelModules = [ ];
+  boot.kernelModules = [ "kvm-amd" ];
+  boot.extraModulePackages = [ ];
+
+  fileSystems."/" = {
+    device = "/dev/disk/by-uuid/63caf2b5-90d4-49a7-99e9-98dcdd797859";
+    fsType = "ext4";
+  };
+
+  boot.initrd.luks.devices."luks-c38bc921-8979-4a25-9520-f3354dee3557".device =
+    "/dev/disk/by-uuid/c38bc921-8979-4a25-9520-f3354dee3557";
+
+  fileSystems."/boot" = {
+    device = "/dev/disk/by-uuid/5B78-4B2D";
+    fsType = "vfat";
+  };
+
+  swapDevices =
+    [{ device = "/dev/disk/by-uuid/3a9212d4-6c39-4d5b-abf0-49294bd991c9"; }];
+
+  # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
+  # (the default) this is the recommended approach. When using systemd-networkd it's
+  # still possible to use this option, but it's recommended to use it in conjunction
+  # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
+  networking.useDHCP = lib.mkDefault true;
+  # networking.interfaces.enp42s0.useDHCP = lib.mkDefault true;
+  # networking.interfaces.wlo1.useDHCP = lib.mkDefault true;
+
+  nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
+  hardware.cpu.amd.updateMicrocode =
+    lib.mkDefault config.hardware.enableRedistributableFirmware;
+}
diff --git a/modules/home-manager.nix b/modules/home-manager.nix
new file mode 100644
index 0000000..d7fe38c
--- /dev/null
+++ b/modules/home-manager.nix
@@ -0,0 +1,19 @@
+{ lib, config, options, ... }: {
+
+  # options = {
+  #   home = lib.mkOption {
+  #     type = options.home-manager.users.type.nestedTypes.elemType;
+  #   };
+  # };
+
+  config = {
+    home-manager = {
+      useGlobalPkgs = true;
+      useUserPackages = true;
+
+      # users.coded = config.home;
+    };
+
+    home-manager.users.coded.home.stateVersion = config.system.stateVersion;
+  };
+}
diff --git a/modules/locale.nix b/modules/locale.nix
new file mode 100644
index 0000000..e4e95a4
--- /dev/null
+++ b/modules/locale.nix
@@ -0,0 +1,17 @@
+{
+  time.timeZone = "America/New_York";
+  i18n.defaultLocale = "en_US.UTF-8";
+
+  i18n.extraLocaleSettings = {
+    LC_ADDRESS = "en_US.UTF-8";
+    LC_IDENTIFICATION = "en_US.UTF-8";
+    LC_MEASUREMENT = "en_US.UTF-8";
+    LC_MONETARY = "en_US.UTF-8";
+    LC_NAME = "en_US.UTF-8";
+    LC_NUMERIC = "en_US.UTF-8";
+    LC_PAPER = "en_US.UTF-8";
+    LC_TELEPHONE = "en_US.UTF-8";
+    LC_TIME = "en_US.UTF-8";
+  };
+
+}
diff --git a/modules/mongo.nix b/modules/mongo.nix
new file mode 100644
index 0000000..bb17552
--- /dev/null
+++ b/modules/mongo.nix
@@ -0,0 +1,5 @@
+{ config, pkgs, ... }: {
+  environment.systemPackages = [ pkgs.mongosh pkgs.mongodb-tools ];
+  services.mongodb.enable = true;
+  services.mongodb.package = pkgs.mongodb-6_0;
+}
diff --git a/modules/networking.nix b/modules/networking.nix
new file mode 100644
index 0000000..ef432e7
--- /dev/null
+++ b/modules/networking.nix
@@ -0,0 +1,11 @@
+{
+  networking.hostName = "codedPC";
+  networking.networkmanager.enable = true;
+
+  networking.hosts = {
+    "192.168.0.4" = [ "CodedPi" ];
+    "192.168.0.5" = [ "SamuelDesktop" ];
+    "192.168.0.6" = [ "a1d2" ];
+    "localhost:5000" = [ "ollama" ];
+  };
+}
diff --git a/modules/node.nix b/modules/node.nix
new file mode 100644
index 0000000..24c3e32
--- /dev/null
+++ b/modules/node.nix
@@ -0,0 +1,8 @@
+{ pkgs, ... }: {
+    home-manager.users.coded.home.packages = with pkgs; [
+      nodejs_20
+      bun
+      nodePackages.pnpm
+      nodePackages.typescript
+    ];
+}
diff --git a/modules/packages.nix b/modules/packages.nix
new file mode 100644
index 0000000..fac3c63
--- /dev/null
+++ b/modules/packages.nix
@@ -0,0 +1,16 @@
+{ pkgs, ... }: {
+  hardware.enableRedistributableFirmware = true;
+  nixpkgs.config.allowUnfree = true;
+  nixpkgs.config.permittedInsecurePackages = with pkgs; [
+    "mailspring-1.11.0"
+  ];
+  home-manager.users.coded.home.packages = with pkgs; [
+    bitwarden
+    sops
+    nixfmt
+    nextcloud-client
+    email
+    mailspring
+    ollama
+  ];
+}
diff --git a/modules/security.nix b/modules/security.nix
new file mode 100644
index 0000000..2ed9cc3
--- /dev/null
+++ b/modules/security.nix
@@ -0,0 +1,8 @@
+{
+  security.pam.services = {
+    login.u2fAuth = true;
+    sudo.u2fAuth = true;
+  };
+
+  security.pam.u2f.authFile = ../keys/u2f_mappings;
+}
diff --git a/modules/shell.nix b/modules/shell.nix
new file mode 100644
index 0000000..6d66e7b
--- /dev/null
+++ b/modules/shell.nix
@@ -0,0 +1,96 @@
+{ pkgs, config, inputs, ... }: {
+  programs.zsh.enable = true;
+  users.users.coded.shell = pkgs.zsh;
+
+  home-manager.users.coded.programs = {
+    # ZSH
+    zsh = {
+      enable = true;
+      enableAutosuggestions = true;
+      enableCompletion = true;
+      autocd = true;
+      defaultKeymap = "emacs";
+
+      shellAliases = {
+        rebuild = "sudo nixos-rebuild switch --flake /home/coded/nixConfig/";
+        "gr!" = "git review";
+        clr = "clear";
+        pnpx = "pnpm dlx";
+      };
+
+      dirHashes = { code = "$HOME/Documents/programming"; };
+
+      history = { extended = true; };
+      historySubstringSearch.enable = true;
+
+      oh-my-zsh = {
+        enable = true;
+        plugins = [ "git" ];
+      };
+    };
+
+    # Starship
+    starship = {
+      enable = true;
+      settings = { format = "$all"; };
+    };
+    
+    # Alacritty
+    alacritty = {
+      enable = true;
+      settings = {
+        window.dimensions = {
+          lines = 40;
+          columns = 150;
+        };
+        import = [
+          "${inputs.alacritty-themes}/themes/Catppuccin-Mocha.yml"
+        ];
+      };
+    };
+
+    # htop
+    # htop = {
+    #   enable = true;
+    #   settings = {
+    #     color_scheme = 6;
+    #     cpu_count_from_one = 0;
+    #     delay = 15;
+    #     fields = with home-manager.config.lib.htop.fields; [
+    #       PID
+    #       USER
+    #       PERCENT_CPU
+    #       PERCENT_MEM
+    #       M_SIZE
+    #       M_RESIDENT
+    #       M_SHARE
+    #       STATE
+    #       TIME
+    #       COMM
+    #     ];
+    #   } // (with home-manager.config.lib.htop; leftMeters [
+    #     (bar "AllCPUs2")
+    #     (bar "Memory")
+    #     (bar "Swap")
+    #     (text "Zram")
+    #   ]) // (with home-manager.config.lib.htop; rightMeters [
+    #     (text "Tasks")
+    #     (text "LoadAverage")
+    #     (text "Uptime")
+    #     (text "Systemd")
+    #   ]);
+    # };
+
+    # Nix-index
+    nix-index.enable = true;
+
+    # thefuck
+    thefuck = {
+      enable = true;
+      enableInstantMode = true;
+    };
+  };
+
+  environment.pathsToLink =
+    [ "/share/zsh" ]; # needed for completing system packages
+}
diff --git a/modules/social.nix b/modules/social.nix
new file mode 100644
index 0000000..bee39ce
--- /dev/null
+++ b/modules/social.nix
@@ -0,0 +1,3 @@
+{ pkgs, ... }: {
+  home-manager.users.coded.home.packages = with pkgs; [ discord ];
+}
diff --git a/modules/video.nix b/modules/video.nix
new file mode 100644
index 0000000..6ba96d0
--- /dev/null
+++ b/modules/video.nix
@@ -0,0 +1,16 @@
+{
+  services.xserver.enable = true;
+  services.xserver.videoDrivers = [ "amdgpu" ];
+
+  services.xserver.displayManager.sddm.enable = true;
+  services.xserver.desktopManager.plasma5.enable = true;
+
+  hardware.opengl.driSupport = true;
+  # For 32 bit applications
+  hardware.opengl.driSupport32Bit = true;
+
+  services.xserver = {
+    layout = "us";
+    xkbVariant = "";
+  };
+}
diff --git a/modules/vscode.nix b/modules/vscode.nix
new file mode 100644
index 0000000..2cb2d3d
--- /dev/null
+++ b/modules/vscode.nix
@@ -0,0 +1,18 @@
+{ pkgs, nix-vscode-extensions, ... }: {
+  home-manager.users.coded.programs.vscode = {
+    enable = true;
+    extensions = with pkgs.vscode-extensions;
+      [
+        ms-vsliveshare.vsliveshare
+        codezombiech.gitignore
+        editorconfig.editorconfig
+        zhuangtongfa.material-theme
+        bbenoist.nix
+      ] ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [{
+        name = "helium-icon-theme";
+        publisher = "helgardrichard";
+        version = "1.0.0";
+        sha256 = "sha256-uSApuTXQgvPiJpBL91d3mX35Sa2l2vLIAFpBo+cZ4h4=";
+      }];
+  };
+}
diff --git a/modules/yubikey.nix b/modules/yubikey.nix
new file mode 100644
index 0000000..752b77b
--- /dev/null
+++ b/modules/yubikey.nix
@@ -0,0 +1,3 @@
+{ pkgs, ... }: {
+  home-manager.users.coded.home.packages = with pkgs; [ yubikey-manager ];
+}
diff --git a/utils/nixFilesIn.nix b/utils/nixFilesIn.nix
new file mode 100644
index 0000000..c3ff263
--- /dev/null
+++ b/utils/nixFilesIn.nix
@@ -0,0 +1,4 @@
+lib: dir:
+map (name: dir + "/${name}") (lib.attrNames
+  (lib.filterAttrs (name: type: type == "regular" && lib.hasSuffix ".nix" name)
+    (builtins.readDir dir)))