diff --git a/configuration.nix b/configuration.nix deleted file mode 100644 index ca22130..0000000 --- a/configuration.nix +++ /dev/null @@ -1,158 +0,0 @@ -{ config, pkgs, ... }: - -{ - # List packages installed in system profile. To search by name, run: - # $ nix-env -qaP | grep curl - environment.systemPackages = with pkgs; [ - aria - asdf-vm - bat - colima - coreutils - curl - direnv - docker - fd - fzf - gh - git - gnupg - go - jq - k9s - kubectl - kubectl-tree - kubectx - kubernetes-helm - kustomize - mosh - neovim - nnn - nodePackages.npm - nodePackages.yarn - nodejs - pinentry - rbw - ripgrep - tree - unzip - watch - - # Language server - lua-language-server - terraform-ls - - (pass.withExtensions (ext: with ext; [ - pass-otp - ])) - ]; - - environment.systemPath = [ - config.homebrew.brewPrefix # TODO https://github.com/LnL7/nix-darwin/issues/596 - ]; - - fonts = { - fontDir.enable = true; - fonts = [ - (pkgs.nerdfonts.override { - fonts = [ - "FiraCode" - ]; - }) - ]; - }; - - # Homebrew packages - homebrew = { - enable = true; - onActivation.cleanup = "zap"; - taps = [ - # { name = "homebrew/foobar"; } - ]; - brews = [ - # "foobar" - ]; - casks = [ - "alacritty" # TODO https://github.com/neovim/neovim/issues/3344 - "kitty" - "utm" - "zerotier-one" - ]; - }; - - system.defaults = { - alf = { - globalstate = 1; - }; - dock = { - autohide = true; - minimize-to-application = true; - mru-spaces = false; - showhidden = true; - }; - NSGlobalDomain = { - AppleInterfaceStyle = "Dark"; - AppleKeyboardUIMode = 3; - ApplePressAndHoldEnabled = false; - NSAutomaticCapitalizationEnabled = false; - NSAutomaticDashSubstitutionEnabled = false; - NSAutomaticPeriodSubstitutionEnabled = false; - NSAutomaticQuoteSubstitutionEnabled = false; - NSAutomaticSpellingCorrectionEnabled = false; - }; - CustomUserPreferences = { - "com.apple.Safari" = { - AlwaysRestoreSessionAtLaunch = true; - AutoOpenSafeDownloads = false; - EnableNarrowTabs = false; - IncludeDevelopMenu = true; - NeverUseBackgroundColorInToolbar = true; - ShowFullURLInSmartSearchField = true; - ShowOverlayStatusBar = true; - ShowStandaloneTabBar = false; - }; - }; - }; - - services = { - karabiner-elements.enable = true; - tailscale.enable = true; - }; - - nix.extraOptions = '' - auto-optimise-store = true - experimental-features = nix-command flakes - extra-platforms = x86_64-darwin aarch64-darwin - ''; - - # Auto upgrade nix package and the daemon service. - services.nix-daemon.enable = true; - - nix = { - # configureBuildUsers = true; - settings = { - auto-optimise-store = true; - experimental-features = [ - "nix-command" - "flakes" - ]; - allowed-users = [ - "@admin" - ]; - }; - }; - - # Create /etc/zshrc that loads the nix-darwin environment. - programs.zsh = { - enable = true; - enableBashCompletion = false; - enableCompletion = false; - promptInit = ""; - }; - - security.pam.enableSudoTouchIdAuth = true; - - # Used for backwards compatibility, please read the changelog before changing. - # $ darwin-rebuild changelog - system.stateVersion = 4; -} diff --git a/flake.lock b/flake.lock index 11cd716..784a596 100644 --- a/flake.lock +++ b/flake.lock @@ -64,19 +64,18 @@ "inputs": { "fenix": "fenix_2", "flake-compat": "flake-compat", - "flake-schemas": "flake-schemas", "naersk": "naersk", "nixpkgs": [ "nixpkgs" ] }, "locked": { - "lastModified": 1720661053, - "narHash": "sha256-CI6tD6B4CTrC1yCAK03faUm63hyLUBJhseB8oBdIlrc=", - "rev": "0da4df06c07d83292b649ee9008f53f2b309c7d6", - "revCount": 492, + "lastModified": 1718572120, + "narHash": "sha256-zmnW3n1Adg47MaoBTIXDDcgFy4HCxcgNuc8LrmPK4F0=", + "rev": "5b7e079a747f22ee1d2450c0c972d466308a928a", + "revCount": 455, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/fh/0.1.13/0190a257-196d-7492-a396-9bd014391ad5/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/fh/0.1.12/019022e3-a731-7729-af25-f7717f950ec4/source.tar.gz" }, "original": { "type": "tarball", @@ -181,27 +180,63 @@ }, "original": { "type": "tarball", - "url": "https://flakehub.com/f/DeterminateSystems/flake-schemas/%2A.tar.gz" + "url": "https://flakehub.com/f/DeterminateSystems/flake-schemas/0.1.%2A" } }, "flake-schemas_2": { "locked": { - "lastModified": 1721078157, - "narHash": "sha256-c2AZH9cOnSpPXV8Lwy19/I8EgW7G+E+Zh6YQBZZwzxI=", - "rev": "29e53dd33b1a38f235ef073e768c62821cb6146e", - "revCount": 66, + "lastModified": 1697467827, + "narHash": "sha256-j8SR19V1SRysyJwpOBF4TLuAvAjF5t+gMiboN4gYQDU=", + "rev": "764932025c817d4e500a8d2a4d8c565563923d29", + "revCount": 29, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/flake-schemas/0.1.3/0190b841-54d3-7b7a-8550-24942bc38caf/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/flake-schemas/0.1.2/018b3da8-4cc3-7fbb-8ff7-1588413c53e2/source.tar.gz" }, "original": { "type": "tarball", - "url": "https://flakehub.com/f/DeterminateSystems/flake-schemas/0.1.%2A" + "url": "https://flakehub.com/f/DeterminateSystems/flake-schemas/%2A" } }, "flake-utils": { "inputs": { "systems": "systems" }, + "locked": { + "lastModified": 1705309234, + "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", + "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" + } + }, + "flake-utils_3": { + "inputs": { + "systems": "systems_3" + }, "locked": { "lastModified": 1681202837, "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=", @@ -235,6 +270,28 @@ "url": "https://flakehub.com/f/nix-community/home-manager/0.2405.%2A" } }, + "jelly": { + "inputs": { + "flake-schemas": "flake-schemas_2", + "nixpkgs": [ + "nixpkgs" + ], + "rust-overlay": "rust-overlay_2" + }, + "locked": { + "lastModified": 1719788933, + "narHash": "sha256-qZcmv6iJX1oq2kq9OKUahLGxumEckM3ID+h6uGhTJsc=", + "owner": "lucperkins", + "repo": "jelly", + "rev": "2d4a6b9aeb2d5ba7373f6347fc2a034d8e550151", + "type": "github" + }, + "original": { + "owner": "lucperkins", + "repo": "jelly", + "type": "github" + } + }, "libgit2": { "flake": false, "locked": { @@ -277,16 +334,16 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1719508126, - "narHash": "sha256-FiQVX3mwExssB1JwqdW48cPBXJ2V+iXYKOtsqTkPlVw=", - "rev": "de0528b5fac30b802134ca9a84c73ae6626a492f", - "revCount": 64, + "lastModified": 1720535336, + "narHash": "sha256-l8Q5/8DwzkW2FgT9Iicxtzxj/MMNE2YlTKWlCV5ybko=", + "rev": "c6cc168785f687a3e51e9321628c33925f1a6a68", + "revCount": 73, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/nix/2.23.1/01905aba-7c85-727f-ab95-e78f10889dd3/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/nix/2.23.3/019097ec-5f84-7a24-9af5-79a2dfa6fe73/source.tar.gz" }, "original": { "type": "tarball", - "url": "https://flakehub.com/f/DeterminateSystems/nix/%3D2.23.1" + "url": "https://flakehub.com/f/DeterminateSystems/nix/%3D2.23.3" } }, "nix-darwin": { @@ -296,11 +353,11 @@ ] }, "locked": { - "lastModified": 1721086468, - "narHash": "sha256-OF642LVDj5Icr0tXlY9P54vna4OP10IMhIhhiKwIRpw=", + "lastModified": 1719845423, + "narHash": "sha256-ZLHDmWAsHQQKnmfyhYSHJDlt8Wfjv6SQhl2qek42O7A=", "owner": "LnL7", "repo": "nix-darwin", - "rev": "7522a30d328f885d20c2815bd05eb711bc69644c", + "rev": "ec12b88104d6c117871fad55e931addac4626756", "type": "github" }, "original": { @@ -319,16 +376,16 @@ "pre-commit-hooks": "pre-commit-hooks" }, "locked": { - "lastModified": 1719442162, - "narHash": "sha256-US+UsPhFeYoJH0ncjERRtVD1U20JtVtjsG+xhZqr/nY=", - "rev": "20ac7811904d5ee00d1d16ed811544c9d3297e15", - "revCount": 17394, + "lastModified": 1720213208, + "narHash": "sha256-lAoLGVIhRFrfgv7wcyduEkyc83QKrtsfsq4of+WrBeg=", + "rev": "f1deb42176cadfb412eb6f92315e6aeef7f2ad75", + "revCount": 17415, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/NixOS/nix/2.23.1/01905a9c-511f-7df0-910f-096ac5276124/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/NixOS/nix/2.23.3/0190936a-a531-7743-88ed-025ecd4d0835/source.tar.gz" }, "original": { "type": "tarball", - "url": "https://flakehub.com/f/NixOS/nix/%3D2.23.1" + "url": "https://flakehub.com/f/NixOS/nix/%3D2.23.3" } }, "nixpkgs": { @@ -379,24 +436,40 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1720954236, - "narHash": "sha256-1mEKHp4m9brvfQ0rjCca8P1WHpymK3TOr3v34ydv9bs=", - "rev": "53e81e790209e41f0c1efa9ff26ff2fd7ab35e27", - "revCount": 632950, + "lastModified": 1717952948, + "narHash": "sha256-mJi4/gjiwQlSaxjA6AusXBN/6rQRaPCycR7bd8fydnQ=", + "rev": "2819fffa7fa42156680f0d282c60d81e8fb185b7", + "revCount": 631440, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2405.632950%2Brev-53e81e790209e41f0c1efa9ff26ff2fd7ab35e27/0190b413-2f9e-7387-a503-a8e698e0f2f3/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2405.631440%2Brev-2819fffa7fa42156680f0d282c60d81e8fb185b7/0190034c-678d-7039-b45c-fa38168f2500/source.tar.gz" }, "original": { "type": "tarball", "url": "https://flakehub.com/f/NixOS/nixpkgs/0.2405.%2A" } }, + "nixpkgs_4": { + "locked": { + "lastModified": 1681358109, + "narHash": "sha256-eKyxW4OohHQx9Urxi7TQlFBTDWII+F+x2hklDOQPB50=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "96ba1c52e54e74c3197f4d43026b3f3d92e83ff9", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nuenv": { "inputs": { "nixpkgs": [ "nixpkgs" ], - "rust-overlay": "rust-overlay_2" + "rust-overlay": "rust-overlay_3" }, "locked": { "lastModified": 1, @@ -451,12 +524,14 @@ "fenix": "fenix", "fh": "fh", "flake-checker": "flake-checker", - "flake-schemas": "flake-schemas_2", + "flake-schemas": "flake-schemas", "home-manager": "home-manager", + "jelly": "jelly", "nix": "nix", "nix-darwin": "nix-darwin", "nixpkgs": "nixpkgs_3", - "nuenv": "nuenv" + "nuenv": "nuenv", + "uuidv7": "uuidv7" } }, "rust-analyzer-src": { @@ -517,6 +592,28 @@ "rust-overlay_2": { "inputs": { "flake-utils": "flake-utils", + "nixpkgs": [ + "jelly", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1712715149, + "narHash": "sha256-uOx7GaLV+5hekAYtm/CBr627Pi7+d1Yh70hwKmVjYYo=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "9ef1eca23bee5fb8080863909af3802130b2ee57", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, + "rust-overlay_3": { + "inputs": { + "flake-utils": "flake-utils_2", "nixpkgs": [ "nuenv", "nixpkgs" @@ -536,6 +633,25 @@ "type": "github" } }, + "rust-overlay_4": { + "inputs": { + "flake-utils": "flake-utils_3", + "nixpkgs": "nixpkgs_4" + }, + "locked": { + "lastModified": 1689302058, + "narHash": "sha256-yD74lcHTrw4niXcE9goJLbzsgyce48rQQoy5jK5ZK40=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "7b8dbbf4c67ed05a9bf3d9e658c12d4108bc24c8", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, "systems": { "locked": { "lastModified": 1681028828, @@ -550,8 +666,59 @@ "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" + } + }, + "systems_3": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "uuidv7": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ], + "rust-overlay": "rust-overlay_4" + }, + "locked": { + "lastModified": 1696968970, + "narHash": "sha256-lc6kLGx0pyq2lDXCWNAMjw5dZ4WAN/+sW8fE+4Ik8+I=", + "ref": "refs/heads/main", + "rev": "28bc94a922960a32a8e7b88676a99c95b189221d", + "revCount": 7, + "type": "git", + "url": "ssh://git@github.com/DeterminateSystems/uuidv7.git" + }, + "original": { + "type": "git", + "url": "ssh://git@github.com/DeterminateSystems/uuidv7.git" + } } }, "root": "root", "version": 7 -} +} \ No newline at end of file diff --git a/flake.nix b/flake.nix index 7a6bb15..ad80291 100644 --- a/flake.nix +++ b/flake.nix @@ -8,11 +8,11 @@ flake-checker = { url = "https://flakehub.com/f/DeterminateSystems/flake-checker/*"; inputs.nixpkgs.follows = "nixpkgs"; }; flake-schemas.url = "https://flakehub.com/f/DeterminateSystems/flake-schemas/0.1.*"; home-manager = { url = "https://flakehub.com/f/nix-community/home-manager/0.2405.*"; inputs.nixpkgs.follows = "nixpkgs"; }; - nix.url = "https://flakehub.com/f/DeterminateSystems/nix/=2.23.1"; + nix.url = "https://flakehub.com/f/DeterminateSystems/nix/=2.23.3"; nix-darwin = { url = "github:LnL7/nix-darwin"; inputs.nixpkgs.follows = "nixpkgs"; }; nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.2405.*"; nuenv = { url = "https://flakehub.com/f/DeterminateSystems/nuenv/0.1.*"; inputs.nixpkgs.follows = "nixpkgs"; }; - # uuidv7 = { url = "git+ssh://git@github.com/DeterminateSystems/uuidv7.git"; inputs.nixpkgs.follows = "nixpkgs"; }; + uuidv7 = { url = "git+ssh://git@github.com/DeterminateSystems/uuidv7.git"; inputs.nixpkgs.follows = "nixpkgs"; }; }; outputs = inputs: @@ -27,7 +27,7 @@ stateVersion = "24.05"; system = "aarch64-darwin"; - username = "romelbenavides"; + username = "lucperkins"; caches = { nixos-org = { cache = "https://cache.nixos.org"; @@ -46,15 +46,15 @@ default = let reload = pkgs.writeScriptBin "reload" '' - #CONFIG_NAME=$(scutil --get LocalHostName) - FLAKE_OUTPUT=".#darwinConfigurations.${username}-aarch64-darwin.system" + CONFIG_NAME=$(scutil --get LocalHostName) + FLAKE_OUTPUT=".#darwinConfigurations.''${CONFIG_NAME}.system" ${pkgs.nixFlakes}/bin/nix build "''${FLAKE_OUTPUT}" && \ ./result/sw/bin/darwin-rebuild activate && \ ${pkgs.zsh}/bin/zsh -c "source ${pkgs.homeDirectory}/.zshrc" ''; in pkgs.mkShell { - name = "playground"; + name = "romelbenavides"; packages = with pkgs; [ nixpkgs-fmt reload @@ -71,7 +71,7 @@ rev = inputs.self.rev or inputs.self.dirtyRev or null; flake-checker = inputs.flake-checker.packages.${system}.default; fh = inputs.fh.packages.${system}.default; - # uuidv7 = inputs.uuidv7.packages.${system}.default; + uuidv7 = inputs.uuidv7.packages.${system}.default; }; darwinConfigurations."${username}-${system}" = inputs.nix-darwin.lib.darwinSystem { @@ -115,4 +115,4 @@ templates = import ./templates; }; -} +} \ No newline at end of file diff --git a/home-manager/config/kitty.conf b/home-manager/config/kitty.conf deleted file mode 100644 index eccef98..0000000 --- a/home-manager/config/kitty.conf +++ /dev/null @@ -1,21 +0,0 @@ -# Fonts - -font_family Monaco -font_size 12 - -# Keymaps - -kitty_mod cmd - -map cmd+c copy_to_clipboard -map cmd+v paste_from_clipboard - -map cmd+equal change_font_size all +1.0 -map cmd+minus change_font_size all -1.0 -map cmd+0 change_font_size all 0 - -# macOS specific tweaks - -hide_window_decorations titlebar-only -macos_option_as_alt yes -macos_quit_when_last_window_closed yes \ No newline at end of file diff --git a/home-manager/config/tmux.conf b/home-manager/config/tmux.conf new file mode 100644 index 0000000..91e55af --- /dev/null +++ b/home-manager/config/tmux.conf @@ -0,0 +1,18 @@ +set-option -g mouse on +set-option -g default-shell ${SHELL} +set-option -g default-terminal "screen-256color" +set -g mode-keys emacs +set -g status-keys emacs +bind Escape copy-mode +bind | split-window -h -c "#{pane_current_path}" +bind - split-window -v -c "#{pane_current_path}" +bind c new-window -c "#{pane_current_path}" +bind h select-pane -L +bind j select-pane -D +bind k select-pane -U +bind l select-pane -R +bind-key J resize-pane -D 5 +bind-key K resize-pane -U 5 +bind-key H resize-pane -L 5 +bind-key L resize-pane -R 5 +bind N previous-window \ No newline at end of file diff --git a/home-manager/packages.nix b/home-manager/packages.nix index 859af09..54a821a 100644 --- a/home-manager/packages.nix +++ b/home-manager/packages.nix @@ -86,13 +86,13 @@ let cue elixir elixir-ls - jelly mprocs neofetch ngrok process-compose protobuf - # uuidv7 + reattach-to-user-namespace # for tmux + uuidv7 yt-dlp ]; @@ -107,14 +107,6 @@ let httpie ]); - rustTools = with pkgs; [ - bacon - cargo-edit - cargo-machete - cargo-watch - rust-analyzer - ]; - scripts = with pkgs; [ (writeScriptBin "pk" '' if [ $# -eq 0 ]; then diff --git a/home-manager/programs.nix b/home-manager/programs.nix index 6147a57..2a21a93 100644 --- a/home-manager/programs.nix +++ b/home-manager/programs.nix @@ -38,7 +38,8 @@ enable = true; enableNushellIntegration = true; enableZshIntegration = true; - nix-direnv.enable = true; + # Re-enable when Nix versioning issue is sorted + #nix-direnv.enable = true; }; # Replacement for ls @@ -95,6 +96,8 @@ # The provider of my shell aesthetic starship = import ./starship.nix { inherit pkgs; }; + tmux = import ./tmux.nix; + # My most-used editor vscode = import ./vscode.nix { inherit pkgs; }; @@ -102,4 +105,4 @@ zsh = import ./zsh.nix { inherit pkgs; }; -} +} \ No newline at end of file diff --git a/home-manager/tmux.nix b/home-manager/tmux.nix new file mode 100644 index 0000000..32ac942 --- /dev/null +++ b/home-manager/tmux.nix @@ -0,0 +1,9 @@ +{ + enable = true; + clock24 = true; + escapeTime = 0; + baseIndex = 1; + keyMode = "vi"; + shortcut = "b"; + extraConfig = (builtins.readFile ./config/tmux.conf); +} \ No newline at end of file diff --git a/nix-darwin/base/default.nix b/nix-darwin/base/default.nix index 02a9eb8..e58144b 100644 --- a/nix-darwin/base/default.nix +++ b/nix-darwin/base/default.nix @@ -32,7 +32,7 @@ ssh = { knownHosts = { nixbuild = { - hostNames = [ "us.nixbuild.net" ]; + hostNames = [ "eu.nixbuild.net" ]; publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPIQCZc54poJ8vqawd8TraNryQeJnvH1eLpIDgbiqymM"; }; }; diff --git a/nixos/configuration.nix b/nixos/configuration.nix new file mode 100644 index 0000000..697f96f --- /dev/null +++ b/nixos/configuration.nix @@ -0,0 +1,71 @@ +{ pkgs +, ... +}: + +{ + imports = [ + ./hardware-configuration.nix + ]; + + environment = { + systemPackages = with pkgs; [ cachix ]; + }; + + nix = { + package = pkgs.nixUnstable; + extraOptions = '' + experimental-features = nix-command flakes + keep-outputs = true + keep-derivations = true + ''; + settings = { + substituters = [ ]; + trusted-public-keys = [ ]; + }; + }; + + nixpkgs = { + config = { + allowUnfree = true; + }; + }; + + boot = { + kernelPackages = pkgs.linuxPackages_latest; + loader = { + grub.device = "/dev/sda"; + systemd-boot = { + enable = true; + consoleMode = "0"; + }; + }; + }; + + users.users.lucperkins = { + isNormalUser = true; + extraGroups = [ "wheel" ]; + packages = with pkgs; [ + starship + vim + zsh + ]; + }; + + services = { + openssh = { + enable = true; + settings = { + PasswordAuthentication = true; + PermitRootLogin = "no"; + }; + }; + + sshd = { + enable = true; + }; + }; + + system = { + stateVersion = "22.11"; + }; +} \ No newline at end of file diff --git a/nixos/hardware-configuration.nix b/nixos/hardware-configuration.nix new file mode 100644 index 0000000..b543212 --- /dev/null +++ b/nixos/hardware-configuration.nix @@ -0,0 +1,32 @@ +{ modulesPath +, ... +}: + +{ + imports = [ + "${modulesPath}/profiles/qemu-guest.nix" + ]; + + boot = { + extraModulePackages = [ ]; + + initrd = { + availableKernelModules = [ "ehci_pci" "uhci_hcd" "ahci" "usbhid" "sd_mod" "sr_mod" ]; + kernelModules = [ ]; + }; + + kernelModules = [ ]; + }; + + fileSystems."/" = { + device = "/dev/disk/by-label/nixos"; + fsType = "ext4"; + }; + + fileSystems."/boot" = { + device = "/dev/disk/by-label/boot"; + fsType = "vfat"; + }; + + swapDevices = [ ]; +} \ No newline at end of file