From 735f19049d51385d5999b8c9b1ccf5f2762df494 Mon Sep 17 00:00:00 2001 From: sam Date: Mon, 5 Jan 2026 22:01:55 +1100 Subject: [PATCH] Initial NixOS + Home Manager config for aspire-laptop --- README.md | 16 +++ flake.nix | 31 ++++ home/sam/home.nix | 72 ++++++++++ home/sam/hypr/hyprland.conf | 15 ++ home/sam/nvim/init.lua | 2 + home/sam/nvim/lazy-lock.json | 42 ++++++ home/sam/nvim/lua/current-theme.lua | 1 + home/sam/nvim/lua/sam/lazy.lua | 17 +++ home/sam/nvim/lua/sam/options.lua | 92 ++++++++++++ home/sam/nvim/lua/sam/plugins/autopairs.lua | 7 + home/sam/nvim/lua/sam/plugins/avante.lua | 70 ++++++++++ home/sam/nvim/lua/sam/plugins/cmp.lua | 39 ++++++ home/sam/nvim/lua/sam/plugins/colorscheme.lua | 11 ++ home/sam/nvim/lua/sam/plugins/comment.lua | 6 + home/sam/nvim/lua/sam/plugins/dap.lua | 20 +++ home/sam/nvim/lua/sam/plugins/filetree.lua | 14 ++ home/sam/nvim/lua/sam/plugins/formatter.lua | 34 +++++ home/sam/nvim/lua/sam/plugins/gitsigns.lua | 17 +++ home/sam/nvim/lua/sam/plugins/icons.lua | 5 + home/sam/nvim/lua/sam/plugins/lint.lua | 16 +++ home/sam/nvim/lua/sam/plugins/lsp.lua | 97 +++++++++++++ home/sam/nvim/lua/sam/plugins/lualine.lua | 9 ++ home/sam/nvim/lua/sam/plugins/markdown.lua | 75 ++++++++++ home/sam/nvim/lua/sam/plugins/mason-tools.lua | 17 +++ .../nvim/lua/sam/plugins/telescope-addons.lua | 3 + home/sam/nvim/lua/sam/plugins/telescope.lua | 21 +++ .../nvim/lua/sam/plugins/theme-catppuccin.lua | 8 ++ .../nvim/lua/sam/plugins/theme-dracula.lua | 1 + .../nvim/lua/sam/plugins/theme-everforest.lua | 1 + .../nvim/lua/sam/plugins/theme-gruvbox.lua | 1 + .../nvim/lua/sam/plugins/theme-kanagawa.lua | 1 + .../nvim/lua/sam/plugins/theme-onedark.lua | 1 + .../nvim/lua/sam/plugins/theme-tokyonight.lua | 1 + home/sam/nvim/lua/sam/plugins/treesitter.lua | 36 +++++ home/sam/nvim/lua/sam/plugins/vimtex.lua | 15 ++ home/sam/nvim/lua/sam/plugins/which-key.lua | 9 ++ hosts/aspire-laptop/configuration.nix | 132 ++++++++++++++++++ .../aspire-laptop/hardware-configuration.nix | 7 + scripts/install-from-iso.sh | 47 +++++++ 39 files changed, 1009 insertions(+) create mode 100644 flake.nix create mode 100644 home/sam/home.nix create mode 100644 home/sam/hypr/hyprland.conf create mode 100644 home/sam/nvim/init.lua create mode 100644 home/sam/nvim/lazy-lock.json create mode 100644 home/sam/nvim/lua/current-theme.lua create mode 100644 home/sam/nvim/lua/sam/lazy.lua create mode 100644 home/sam/nvim/lua/sam/options.lua create mode 100644 home/sam/nvim/lua/sam/plugins/autopairs.lua create mode 100644 home/sam/nvim/lua/sam/plugins/avante.lua create mode 100644 home/sam/nvim/lua/sam/plugins/cmp.lua create mode 100644 home/sam/nvim/lua/sam/plugins/colorscheme.lua create mode 100644 home/sam/nvim/lua/sam/plugins/comment.lua create mode 100644 home/sam/nvim/lua/sam/plugins/dap.lua create mode 100644 home/sam/nvim/lua/sam/plugins/filetree.lua create mode 100644 home/sam/nvim/lua/sam/plugins/formatter.lua create mode 100644 home/sam/nvim/lua/sam/plugins/gitsigns.lua create mode 100644 home/sam/nvim/lua/sam/plugins/icons.lua create mode 100644 home/sam/nvim/lua/sam/plugins/lint.lua create mode 100644 home/sam/nvim/lua/sam/plugins/lsp.lua create mode 100644 home/sam/nvim/lua/sam/plugins/lualine.lua create mode 100644 home/sam/nvim/lua/sam/plugins/markdown.lua create mode 100644 home/sam/nvim/lua/sam/plugins/mason-tools.lua create mode 100644 home/sam/nvim/lua/sam/plugins/telescope-addons.lua create mode 100644 home/sam/nvim/lua/sam/plugins/telescope.lua create mode 100644 home/sam/nvim/lua/sam/plugins/theme-catppuccin.lua create mode 100644 home/sam/nvim/lua/sam/plugins/theme-dracula.lua create mode 100644 home/sam/nvim/lua/sam/plugins/theme-everforest.lua create mode 100644 home/sam/nvim/lua/sam/plugins/theme-gruvbox.lua create mode 100644 home/sam/nvim/lua/sam/plugins/theme-kanagawa.lua create mode 100644 home/sam/nvim/lua/sam/plugins/theme-onedark.lua create mode 100644 home/sam/nvim/lua/sam/plugins/theme-tokyonight.lua create mode 100644 home/sam/nvim/lua/sam/plugins/treesitter.lua create mode 100644 home/sam/nvim/lua/sam/plugins/vimtex.lua create mode 100644 home/sam/nvim/lua/sam/plugins/which-key.lua create mode 100644 hosts/aspire-laptop/configuration.nix create mode 100644 hosts/aspire-laptop/hardware-configuration.nix create mode 100755 scripts/install-from-iso.sh diff --git a/README.md b/README.md index e69de29..4367b52 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,16 @@ +sam/nixos + +Host: aspire-laptop +- NixOS 25.11 (flakes) +- Home Manager 25.11 +- Plasma 6 + Hyprland via SDDM +- Btrfs root, zram swap +- zsh + kitty +- Neovim config in home/sam/nvim (lazy.nvim downloads plugins, pinned by lazy-lock.json) + +Install: +- Boot NixOS 25.11 Graphical ISO +- Run scripts/install-from-iso.sh (wipes disk) +- Clone this repo into /mnt/etc/nixos +- Replace hosts/aspire-laptop/hardware-configuration.nix with generated one +- nixos-install --flake /mnt/etc/nixos#aspire-laptop diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..fce19d5 --- /dev/null +++ b/flake.nix @@ -0,0 +1,31 @@ +{ + description = "sam: NixOS + Home Manager config (aspire-laptop)"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11"; + home-manager.url = "github:nix-community/home-manager/release-25.11"; + home-manager.inputs.nixpkgs.follows = "nixpkgs"; + }; + + outputs = + { self, nixpkgs, home-manager }: + let + system = "x86_64-linux"; + in + { + nixosConfigurations.aspire-laptop = nixpkgs.lib.nixosSystem { + inherit system; + + modules = [ + ./hosts/aspire-laptop/configuration.nix + home-manager.nixosModules.home-manager + + ({ ... }: { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.sam = import ./home/sam/home.nix; + }) + ]; + }; + }; +} diff --git a/home/sam/home.nix b/home/sam/home.nix new file mode 100644 index 0000000..76277de --- /dev/null +++ b/home/sam/home.nix @@ -0,0 +1,72 @@ +{ pkgs, ... }: + +{ + home.username = "sam"; + home.homeDirectory = "/home/sam"; + home.stateVersion = "25.11"; + + programs.home-manager.enable = true; + + home.sessionVariables = { + EDITOR = "nvim"; + VISUAL = "nvim"; + }; + + programs.zsh = { + enable = true; + enableCompletion = true; + autosuggestion.enable = true; + syntaxHighlighting.enable = true; + }; + + programs.starship = { + enable = true; + enableZshIntegration = true; + }; + + programs.fzf = { + enable = true; + enableZshIntegration = true; + }; + + programs.zoxide = { + enable = true; + enableZshIntegration = true; + }; + + programs.atuin = { + enable = true; + enableZshIntegration = true; + }; + + programs.kitty.enable = true; + + programs.git.enable = true; + programs.gh.enable = true; + + # Neovim Option 1: keep your config + lazy.nvim (downloads plugins), + # but Nix provides all the runtime deps (node/python/rg/fd/etc). + programs.neovim = { + enable = true; + viAlias = true; + vimAlias = true; + withNodeJs = true; + withPython3 = true; + }; + + home.packages = with pkgs; [ + nodejs + python3 + python3Packages.pynvim + ripgrep + fd + wl-clipboard + xclip + ]; + + # Hyprland minimal config so it is usable immediately + xdg.configFile."hypr/hyprland.conf".source = ./../sam/hypr/hyprland.conf; + + # Neovim config stored in this repo + xdg.configFile."nvim".source = ./nvim; +} diff --git a/home/sam/hypr/hyprland.conf b/home/sam/hypr/hyprland.conf new file mode 100644 index 0000000..cb8d695 --- /dev/null +++ b/home/sam/hypr/hyprland.conf @@ -0,0 +1,15 @@ +$mod = SUPER + +monitor = ,preferred,auto,1 + +exec-once = kitty + +bind = $mod, RETURN, exec, kitty +bind = $mod, E, exec, dolphin +bind = $mod, Q, killactive +bind = $mod, M, exit + +bind = $mod, H, movefocus, l +bind = $mod, J, movefocus, d +bind = $mod, K, movefocus, u +bind = $mod, L, movefocus, r diff --git a/home/sam/nvim/init.lua b/home/sam/nvim/init.lua new file mode 100644 index 0000000..fab500d --- /dev/null +++ b/home/sam/nvim/init.lua @@ -0,0 +1,2 @@ +require("sam.options") +require("sam.lazy") diff --git a/home/sam/nvim/lazy-lock.json b/home/sam/nvim/lazy-lock.json new file mode 100644 index 0000000..e671cbb --- /dev/null +++ b/home/sam/nvim/lazy-lock.json @@ -0,0 +1,42 @@ +{ + "Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" }, + "LuaSnip": { "branch": "master", "commit": "3732756842a2f7e0e76a7b0487e9692072857277" }, + "avante.nvim": { "branch": "main", "commit": "ca95e0386433da2077184719886fa658257261a3" }, + "catppuccin": { "branch": "main", "commit": "234fc048de931a0e42ebcad675bf6559d75e23df" }, + "cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "cbc7b02bb99fae35cb42f514762b89b5126651ef" }, + "cmp-path": { "branch": "main", "commit": "c642487086dbd9a93160e1679a1327be111cbc25" }, + "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, + "conform.nvim": { "branch": "master", "commit": "cde4da5c1083d3527776fee69536107d98dae6c9" }, + "dracula.nvim": { "branch": "main", "commit": "ae752c13e95fb7c5f58da4b5123cb804ea7568ee" }, + "dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" }, + "everforest-nvim": { "branch": "main", "commit": "557bce922401e247a596583679bc181d4d688554" }, + "gitsigns.nvim": { "branch": "main", "commit": "20ad4419564d6e22b189f6738116b38871082332" }, + "gruvbox.nvim": { "branch": "main", "commit": "5e0a460d8e0f7f669c158dedd5f9ae2bcac31437" }, + "kanagawa.nvim": { "branch": "master", "commit": "aef7f5cec0a40dbe7f3304214850c472e2264b10" }, + "lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" }, + "live-preview.nvim": { "branch": "main", "commit": "a1bb1b3a851df5276e53908276f5ae1d724d4812" }, + "lualine.nvim": { "branch": "master", "commit": "3946f0122255bc377d14a59b27b609fb3ab25768" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "b1d9a914b02ba5660f1e272a03314b31d4576fe2" }, + "mason.nvim": { "branch": "main", "commit": "57e5a8addb8c71fb063ee4acda466c7cf6ad2800" }, + "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, + "nvim-autopairs": { "branch": "master", "commit": "7a2c97cccd60abc559344042fefb1d5a85b3e33b" }, + "nvim-cmp": { "branch": "main", "commit": "106c4bcc053a5da783bf4a9d907b6f22485c2ea0" }, + "nvim-dap": { "branch": "master", "commit": "b38f7d30366d9169d0a623c4c85fbcf99d8d58bb" }, + "nvim-dap-ui": { "branch": "master", "commit": "cf91d5e2d07c72903d052f5207511bf7ecdb7122" }, + "nvim-lint": { "branch": "master", "commit": "2536f1b18ea389e6b078b3a47a5e273c74a46a34" }, + "nvim-lspconfig": { "branch": "master", "commit": "cc3d02065593d74b2fa7c0ff337c3e8b087fd788" }, + "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, + "nvim-tree.lua": { "branch": "master", "commit": "1eda2569394f866360e61f590f1796877388cb8a" }, + "nvim-treesitter": { "branch": "main", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, + "nvim-web-devicons": { "branch": "master", "commit": "8dcb311b0c92d460fac00eac706abd43d94d68af" }, + "onedark.nvim": { "branch": "master", "commit": "6c10964f91321c6a0f09bcc41dd64e7a6602bc4f" }, + "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, + "tabular": { "branch": "master", "commit": "12437cd1b53488e24936ec4b091c9324cafee311" }, + "telescope-themes": { "branch": "main", "commit": "65721365bd7a04a6c9679e76b6387b60320fd5f3" }, + "telescope.nvim": { "branch": "master", "commit": "3a12a853ebf21ec1cce9a92290e3013f8ae75f02" }, + "tokyonight.nvim": { "branch": "main", "commit": "5da1b76e64daf4c5d410f06bcb6b9cb640da7dfd" }, + "vim-markdown": { "branch": "master", "commit": "1bc9d0cd8e1cc3e901b0a49c2b50a843f1c89397" }, + "vimtex": { "branch": "master", "commit": "32bcb3922c20588e00de68f73c86312eda2141ad" }, + "which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" } +} diff --git a/home/sam/nvim/lua/current-theme.lua b/home/sam/nvim/lua/current-theme.lua new file mode 100644 index 0000000..c74694d --- /dev/null +++ b/home/sam/nvim/lua/current-theme.lua @@ -0,0 +1 @@ +vim.cmd("colorscheme kanagawa-wave") \ No newline at end of file diff --git a/home/sam/nvim/lua/sam/lazy.lua b/home/sam/nvim/lua/sam/lazy.lua new file mode 100644 index 0000000..06d8209 --- /dev/null +++ b/home/sam/nvim/lua/sam/lazy.lua @@ -0,0 +1,17 @@ +-- ~/.config/nvim/lua/sam/lazy.lua + +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not vim.loop.fs_stat(lazypath) then + vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "https://github.com/folke/lazy.nvim.git", + "--branch=stable", -- latest stable release + lazypath, + }) +end +vim.opt.rtp:prepend(lazypath) + +-- Tell lazy to load our plugin specs from the "plugins" directory +require("lazy").setup("sam.plugins", {}) diff --git a/home/sam/nvim/lua/sam/options.lua b/home/sam/nvim/lua/sam/options.lua new file mode 100644 index 0000000..ca2e337 --- /dev/null +++ b/home/sam/nvim/lua/sam/options.lua @@ -0,0 +1,92 @@ +-- ~/.config/nvim/lua/sam/options.lua + +vim.g.mapleader = " " -- Set the leader key to the space bar. +vim.g.maplocalleader = " " -- Set the local leader key to the space bar. +-- sam.options.lua +vim.opt.number = true -- Absolute numbers on all lines +vim.opt.relativenumber = true -- Relative numbers (hybrid when both enabled) + +-- =================================================================== +-- Clipboard Settings (Added) +-- =================================================================== + +-- Sync with system clipboard +vim.opt.clipboard = "unnamedplus" + +-- OSC 52 Support for SSH (Copy from Remote Nvim -> Local Computer) +if vim.env.SSH_TTY then + vim.g.clipboard = { + name = 'OSC 52', + copy = { + ['+'] = require('vim.ui.clipboard.osc52').copy('+'), + ['*'] = require('vim.ui.clipboard.osc52').copy('*'), + }, + paste = { + ['+'] = require('vim.ui.clipboard.osc52').paste('+'), + ['*'] = require('vim.ui.clipboard.osc52').paste('*'), + }, + } +end + +-- =================================================================== +-- Search Settings +-- =================================================================== + +vim.opt.hlsearch = true -- Highlight all matches on search +vim.opt.incsearch = true -- Show search results incrementally as you type +vim.opt.ignorecase = true -- Ignore case in search patterns +vim.opt.smartcase = true -- Override ignorecase if search pattern contains uppercase letters + +-- =================================================================== +-- Essential Keybindings +-- =================================================================== + +-- Set a timeout for which-key to respond (in milliseconds) +vim.opt.timeoutlen = 300 + +-- A helper function to make setting keymaps easier +local keymap = function(mode, lhs, rhs, opts) + local options = { noremap = true, silent = true } + if opts then + options = vim.tbl_extend("force", options, opts) + end + vim.api.nvim_set_keymap(mode, lhs, rhs, options) +end + +vim.api.nvim_create_autocmd("BufWritePost", { + group = vim.api.nvim_create_augroup("VimtexCompile", { clear = true }), + pattern = "*.tex", + callback = function() + vim.cmd("VimtexCompile") + end, +}) + +-- --- General --- +-- Save the current file +keymap("n", "w", ":w", { desc = "Write (Save) File" }) + +-- Quit the current buffer/window +keymap("n", "q", ":q", { desc = "Quit Window" }) + +-- --- Window Management (Splits) --- +-- Split window vertically +keymap("n", "sv", "v", { desc = "Split Vertically" }) + +-- Split window horizontally +keymap("n", "sh", "s", { desc = "Split Horizontally" }) + +-- --- Navigation Between Splits --- +-- Move to the window below/above/left/right +keymap("n", "", "j", { desc = "Move to Window Below" }) +keymap("n", "", "k", { desc = "Move to Window Above" }) +keymap("n", "", "h", { desc = "Move to Window Left" }) +keymap("n", "", "l", { desc = "Move to Window Right" }) + +-- --- Buffer Navigation --- +-- Go to the next buffer +keymap("n", "", ":bnext", { desc = "Next Buffer" }) + +-- Go to the previous buffer +keymap("n", "", ":bprevious", { desc = "Previous Buffer" }) +vim.keymap.set({'n', 'i', 'v'}, '', '', { desc = 'Enter Visual Block' }) +vim.keymap.set({'n', 'i'}, '', 'V', { desc = 'Enter Visual Line' }) diff --git a/home/sam/nvim/lua/sam/plugins/autopairs.lua b/home/sam/nvim/lua/sam/plugins/autopairs.lua new file mode 100644 index 0000000..d8fa862 --- /dev/null +++ b/home/sam/nvim/lua/sam/plugins/autopairs.lua @@ -0,0 +1,7 @@ +return { + "windwp/nvim-autopairs", + event = "InsertEnter", + config = function() + require("nvim-autopairs").setup({}) + end, +} diff --git a/home/sam/nvim/lua/sam/plugins/avante.lua b/home/sam/nvim/lua/sam/plugins/avante.lua new file mode 100644 index 0000000..05bbdd3 --- /dev/null +++ b/home/sam/nvim/lua/sam/plugins/avante.lua @@ -0,0 +1,70 @@ +return { + "yetone/avante.nvim", + dependencies = { + "nvim-treesitter/nvim-treesitter", + "nvim-lua/plenary.nvim", + "stevearc/dressing.nvim", + "MunifTanjim/nui.nvim", + "folke/which-key.nvim", -- For keymaps + }, + event = "VeryLazy", + config = function() + require("avante").setup({ + provider = "openai", + providers = { + openai = { + api_key_name = "OPENAI_API_KEY", + endpoint = "https://api.openai.com/v1", + model = "gpt-4o-mini", -- Your paid model + timeout = 30000, + extra_request_body = { + temperature = 0.1, + max_completion_tokens = 8192, + }, + }, + }, + behaviour = { + auto_suggestions = true, -- Inline completion + auto_set_highlight_group = true, -- Hints on hover + auto_apply_diff_after_generation = false, -- No auto-insert + }, + mappings = { + normal = { + ["gq"] = "AvanteAsk", + }, + insert = { + [""] = "AvanteToggleAutoSuggestions", + }, + visual = { + ["gq"] = "AvanteAsk", + }, + }, + hints = { enabled = true }, + }) + + -- Your keymap style + local keymap = function(mode, lhs, rhs, opts) + local options = { noremap = true, silent = true } + if opts then options = vim.tbl_extend("force", options, opts) end + vim.api.nvim_set_keymap(mode, lhs, rhs, options) + end + + keymap("n", "ai", ":AvanteAsk", { desc = "Avante Chat" }) + keymap("v", "ae", ":AvanteAsk explain simply", { desc = "Explain Selected" }) + keymap("v", "af", ":AvanteAsk fix: optimize", { desc = "Fix Selected" }) + keymap("i", "", "AvanteToggleAutoSuggestions", { desc = "Toggle Inline" }) + + -- Which-key + vim.schedule(function() + local status_ok, wk = pcall(require, "which-key") + if status_ok then + wk.add({ + { "a", group = "AI (Avante)" }, + { "ai", "AvanteAsk", desc = "Open Chat", mode = "n" }, + { "ae", desc = "Explain Selected", mode = "v" }, + { "af", desc = "Fix Selected", mode = "v" }, + }) + end + end) + end, +} diff --git a/home/sam/nvim/lua/sam/plugins/cmp.lua b/home/sam/nvim/lua/sam/plugins/cmp.lua new file mode 100644 index 0000000..997ed04 --- /dev/null +++ b/home/sam/nvim/lua/sam/plugins/cmp.lua @@ -0,0 +1,39 @@ +-- ~/.config/nvim/lua/sam/plugins/cmp.lua + +return { + "hrsh7th/nvim-cmp", + dependencies = { + "hrsh7th/cmp-nvim-lsp", -- Source for LSP completions + "hrsh7th/cmp-buffer", -- Source for buffer completions + "hrsh7th/cmp-path", -- Source for path completions + "L3MON4D3/LuaSnip", -- Snippet engine + "saadparwaiz1/cmp_luasnip", -- Bridge for snippet engine + }, + config = function() + local cmp = require("cmp") + local luasnip = require("luasnip") + + cmp.setup({ + snippet = { + expand = function(args) + luasnip.lsp_expand(args.body) + end, + }, + mapping = cmp.mapping.preset.insert({ + [""] = cmp.mapping.select_prev_item(), -- Previous item + [""] = cmp.mapping.select_next_item(), -- Next item + [""] = cmp.mapping.scroll_docs(-4), + [""] = cmp.mapping.scroll_docs(4), + [""] = cmp.mapping.complete(), -- Trigger completion + [""] = cmp.mapping.confirm({ select = true }), -- Confirm selection + }), + -- The sources for completion + sources = cmp.config.sources({ + { name = "nvim_lsp" }, + { name = "luasnip" }, + { name = "buffer" }, + { name = "path" }, + }), + }) + end, +} diff --git a/home/sam/nvim/lua/sam/plugins/colorscheme.lua b/home/sam/nvim/lua/sam/plugins/colorscheme.lua new file mode 100644 index 0000000..2b732ac --- /dev/null +++ b/home/sam/nvim/lua/sam/plugins/colorscheme.lua @@ -0,0 +1,11 @@ +-- ~/.config/nvim/lua/sam/plugins/colorscheme.lua + +return { + "catppuccin/nvim", + name = "catppuccin", + priority = 1000, -- Make sure to load this before all the other start plugins + config = function() + -- load the colorscheme here + vim.cmd.colorscheme("catppuccin") + end, +} diff --git a/home/sam/nvim/lua/sam/plugins/comment.lua b/home/sam/nvim/lua/sam/plugins/comment.lua new file mode 100644 index 0000000..8c00393 --- /dev/null +++ b/home/sam/nvim/lua/sam/plugins/comment.lua @@ -0,0 +1,6 @@ +return { + "numToStr/Comment.nvim", + config = function() + require("Comment").setup() + end, +} diff --git a/home/sam/nvim/lua/sam/plugins/dap.lua b/home/sam/nvim/lua/sam/plugins/dap.lua new file mode 100644 index 0000000..54cea28 --- /dev/null +++ b/home/sam/nvim/lua/sam/plugins/dap.lua @@ -0,0 +1,20 @@ +return { + "mfussenegger/nvim-dap", + dependencies = { + -- Installs the beautiful UI for DAP + "rcarriga/nvim-dap-ui", + -- Required by dap-ui + "nvim-neotest/nvim-nio", + }, + config = function() + local dap, dapui = require("dap"), require("dapui") + dapui.setup() + + -- Add your keymaps for debugging here + vim.keymap.set("n", "db", dap.toggle_breakpoint, { desc = "Toggle Breakpoint" }) + vim.keymap.set("n", "dc", dap.continue, { desc = "Continue" }) + vim.keymap.set("n", "do", dap.step_over, { desc = "Step Over" }) + vim.keymap.set("n", "di", dap.step_into, { desc = "Step Into" }) + vim.keymap.set("n", "du", dapui.toggle, { desc = "Toggle DAP UI" }) + end, +} diff --git a/home/sam/nvim/lua/sam/plugins/filetree.lua b/home/sam/nvim/lua/sam/plugins/filetree.lua new file mode 100644 index 0000000..36c2ad8 --- /dev/null +++ b/home/sam/nvim/lua/sam/plugins/filetree.lua @@ -0,0 +1,14 @@ +-- ~/.config/nvim/lua/sam/plugins/filetree.lua + +return { + "nvim-tree/nvim-tree.lua", + dependencies = { "nvim-tree/nvim-web-devicons" }, + config = function() + require("nvim-tree").setup({}) + + -- A keymap to toggle the file tree + vim.keymap.set("n", "e", ":NvimTreeToggle", { + desc = "Toggle file explorer", + }) + end, +} diff --git a/home/sam/nvim/lua/sam/plugins/formatter.lua b/home/sam/nvim/lua/sam/plugins/formatter.lua new file mode 100644 index 0000000..71b2471 --- /dev/null +++ b/home/sam/nvim/lua/sam/plugins/formatter.lua @@ -0,0 +1,34 @@ +-- ~/.config/nvim/lua/sam/plugins/formatter.lua + +return { + "stevearc/conform.nvim", + config = function() + require("conform").setup({ + formatters_by_ft = { + -- Web + javascript = { "prettier" }, + typescript = { "prettier" }, + javascriptreact = { "prettier" }, + typescriptreact = { "prettier" }, + html = { "prettier" }, + css = { "prettier" }, + json = { "prettier" }, + yaml = { "prettier" }, + markdown = { "prettier" }, + sh = { "shfmt" }, -- << ADD THIS LINE + bash = { "shfmt" }, -- << AND THIS ONE + -- PHP + php = { "pint" }, + -- Python + python = { "black" }, + -- Lua (for our config) + lua = { "stylua" }, + }, + }) + + -- A keymap to trigger formatting + vim.keymap.set({ "n", "v" }, "f", function() + require("conform").format({ async = true, lsp_fallback = true }) + end, { desc = "Format code" }) + end, +} diff --git a/home/sam/nvim/lua/sam/plugins/gitsigns.lua b/home/sam/nvim/lua/sam/plugins/gitsigns.lua new file mode 100644 index 0000000..e48dc9e --- /dev/null +++ b/home/sam/nvim/lua/sam/plugins/gitsigns.lua @@ -0,0 +1,17 @@ +-- ~/.config/nvim/lua/sam/plugins/gitsigns.lua + +return { + "lewis6991/gitsigns.nvim", + config = function() + require("gitsigns").setup({ + -- You can configure the signs here if you want + -- signs = { + -- add = { text = '+' }, + -- change = { text = '~' }, + -- delete = { text = '_' }, + -- topdelete = { text = '‾' }, + -- changedelete = { text = '~' }, + -- }, + }) + end, +} diff --git a/home/sam/nvim/lua/sam/plugins/icons.lua b/home/sam/nvim/lua/sam/plugins/icons.lua new file mode 100644 index 0000000..004c4e5 --- /dev/null +++ b/home/sam/nvim/lua/sam/plugins/icons.lua @@ -0,0 +1,5 @@ +-- ~/.config/nvim/lua/sam/plugins/icons.lua + +return { + "nvim-tree/nvim-web-devicons", +} diff --git a/home/sam/nvim/lua/sam/plugins/lint.lua b/home/sam/nvim/lua/sam/plugins/lint.lua new file mode 100644 index 0000000..4db1b2a --- /dev/null +++ b/home/sam/nvim/lua/sam/plugins/lint.lua @@ -0,0 +1,16 @@ +return { + "mfussenegger/nvim-lint", + event = "VeryLazy", + config = function() + require("lint").linters_by_ft = { + -- You can add your languages here. Examples: + -- javascript = { "eslint_d" }, + -- python = { "ruff" }, + } + vim.api.nvim_create_autocmd({ "BufWritePost" }, { + callback = function() + require("lint").try_lint() + end, + }) + end, +} diff --git a/home/sam/nvim/lua/sam/plugins/lsp.lua b/home/sam/nvim/lua/sam/plugins/lsp.lua new file mode 100644 index 0000000..f712b0e --- /dev/null +++ b/home/sam/nvim/lua/sam/plugins/lsp.lua @@ -0,0 +1,97 @@ +-- ~/.config/nvim/lua/sam/plugins/lsp.lua (emmet-ls for HTML Tag Completion + No Warning) + +return { + "neovim/nvim-lspconfig", + dependencies = { + "williamboman/mason.nvim", + "williamboman/mason-lspconfig.nvim", + "hrsh7th/nvim-cmp", + }, + config = function() + local capabilities = require("cmp_nvim_lsp").default_capabilities() + local on_attach = function(client, bufnr) + -- LSP keymaps + local nmap = function(keys, func, desc) + vim.keymap.set("n", keys, func, { buffer = bufnr, desc = "LSP: " .. desc }) + end + nmap("gD", vim.lsp.buf.declaration, "Go to Declaration") + nmap("gd", vim.lsp.buf.definition, "Go to Definition") + nmap("K", vim.lsp.buf.hover, "Hover Documentation") + nmap("rn", vim.lsp.buf.rename, "Rename Symbol") + nmap("ca", vim.lsp.buf.code_action, "Code Action") + end + + require("mason").setup() + + -- ADDING THE NEW LSP SERVERS HERE (emmet_ls replaces html for better tags) + local servers = { + "intelephense", -- PHP + "pyright", -- Python + "ts_ls", -- TS/JS + "clangd", -- C++ + "lua_ls", -- Lua + "emmet_ls", -- HTML/CSS (for tag completion/snippets) + "jsonls", -- JSON + "yamlls", -- YAML + "marksman", -- Markdown + "bashls", + } + local mason_lspconfig = require("mason-lspconfig") + mason_lspconfig.setup({ + ensure_installed = servers, + handlers = { + -- Global handler using new vim.lsp.config API (no global lspconfig require) + function(server_name) + vim.lsp.config(server_name, { + on_attach = on_attach, + capabilities = capabilities, + root_dir = function(fname) + if type(fname) ~= "string" then + return vim.fn.getcwd() + end + local util = require("lspconfig.util") + return util.root_pattern(".git", "composer.json", "package.json")(fname) + or util.path.dirname(fname) + end, + }) + end, + }, + }) + + -- emmet-ls Specific Setup (for HTML/CSS tag completion + snippets) + vim.lsp.config("emmet_ls", { + on_attach = on_attach, + capabilities = vim.tbl_deep_extend("force", capabilities, { + textDocument = { + completion = { + completionItem = { + snippetSupport = true, -- Enables
+ Emmet expansions + }, + }, + }, + }), + filetypes = { "html", "css", "javascriptreact", "typescriptreact" }, -- Broad for web files + root_dir = function(fname) + if type(fname) ~= "string" then + return vim.fn.getcwd() + end + local util = require("lspconfig.util") + return util.root_pattern(".git", "package.json")(fname) + or util.path.dirname(fname) + end, + init_options = { + html = { + options = { + ["bem.enabled"] = true, -- Optional: BEM naming support + }, + completions = true, + format = true, + extractColors = true, + includeLanguages = { + javascript = "javascriptreact", + }, + }, + }, + }) + end, +} diff --git a/home/sam/nvim/lua/sam/plugins/lualine.lua b/home/sam/nvim/lua/sam/plugins/lualine.lua new file mode 100644 index 0000000..acdcea5 --- /dev/null +++ b/home/sam/nvim/lua/sam/plugins/lualine.lua @@ -0,0 +1,9 @@ +-- ~/.config/nvim/lua/sam/plugins/lualine.lua + +return { + "nvim-lualine/lualine.nvim", + dependencies = { "nvim-tree/nvim-web-devicons" }, + config = function() + require("lualine").setup({}) + end, +} diff --git a/home/sam/nvim/lua/sam/plugins/markdown.lua b/home/sam/nvim/lua/sam/plugins/markdown.lua new file mode 100644 index 0000000..f85824b --- /dev/null +++ b/home/sam/nvim/lua/sam/plugins/markdown.lua @@ -0,0 +1,75 @@ +return { + -- Enhanced Markdown editing (only for .md) + { + "godlygeek/tabular", + ft = "markdown", + }, + { + "plasticboy/vim-markdown", + ft = "markdown", + dependencies = { "godlygeek/tabular" }, + config = function() + -- Core settings + vim.g.vim_markdown_folding_disabled = 0 + vim.g.vim_markdown_conceal = 1 + vim.g.vim_markdown_toc_autofit = 1 + vim.g.vim_markdown_strikethrough = 1 + + -- Prose-friendly wrapping + Pandoc exports (MD only) + vim.api.nvim_create_autocmd("FileType", { + pattern = "markdown", + callback = function() + -- Wrapping + vim.opt_local.wrap = true + vim.opt_local.linebreak = true + vim.opt_local.list = false + + -- HTML preview/export + vim.keymap.set("n", "mh", function() + local input = vim.fn.expand("%") + local output = "/tmp/" .. vim.fn.fnamemodify(input, ":t:r") .. ".html" + vim.fn.system("pandoc " .. vim.fn.shellescape(input) .. " -o " .. vim.fn.shellescape(output) .. " --standalone --self-contained") + vim.fn.system("open " .. vim.fn.shellescape(output)) + end, { desc = "Markdown to HTML Preview", buffer = true }) + + -- PDF export + vim.keymap.set("n", "mp", function() + local input = vim.fn.expand("%") + local output = vim.fn.fnamemodify(input, ":r") .. ".pdf" + vim.fn.system("pandoc " .. vim.fn.shellescape(input) .. " -o " .. vim.fn.shellescape(output) .. " --pdf-engine=pdflatex") + end, { desc = "Markdown to PDF", buffer = true }) + + -- TOC preview + vim.keymap.set("n", "mt", ":!pandoc % --toc -o /tmp/toc.html && open /tmp/toc.html", { desc = "Generate TOC Preview", buffer = true }) + end, + }) + end, + }, + + -- Live browser preview (MD + HTML) + { + "brianhuster/live-preview.nvim", + dependencies = { "nvim-telescope/telescope.nvim" }, + ft = { "markdown", "html" }, -- Load for both + lazy = false, + opts = { + usage_title = "Usage: lp to start preview", + picker_title = "Select file to preview", + templates = { -- Basic MD render (for .md); HTML serves raw + md = { + command = "pandoc % -o /tmp/preview.html --standalone --self-contained", -- Use Pandoc for MD + extension = "html" + }, + html = { + command = "echo 'Serving raw HTML'", -- No-op; serves file directly + extension = "html" + } + }, + debounce = 300, -- Refresh delay post-save + }, + keys = { + { "lp", "LivePreview start", desc = "Start Live Preview", ft = { "markdown", "html" } }, + { "ls", "LivePreview stop", desc = "Stop Live Preview", ft = { "markdown", "html" } }, + }, + }, +} diff --git a/home/sam/nvim/lua/sam/plugins/mason-tools.lua b/home/sam/nvim/lua/sam/plugins/mason-tools.lua new file mode 100644 index 0000000..d50d464 --- /dev/null +++ b/home/sam/nvim/lua/sam/plugins/mason-tools.lua @@ -0,0 +1,17 @@ +-- ~/.config/nvim/lua/sam/plugins/mason-tools.lua + +return { + "williamboman/mason.nvim", + opts = { + ensure_installed = { + -- Formatters + "html-ls", + "prettier", -- For web files + "pint", -- For PHP/Laravel + "black", -- For Python + "shfmt", + -- Linters (optional but recommended) + "eslint_d", -- For JS/TS + }, + }, +} diff --git a/home/sam/nvim/lua/sam/plugins/telescope-addons.lua b/home/sam/nvim/lua/sam/plugins/telescope-addons.lua new file mode 100644 index 0000000..abe0154 --- /dev/null +++ b/home/sam/nvim/lua/sam/plugins/telescope-addons.lua @@ -0,0 +1,3 @@ +return { + "andrewberty/telescope-themes", +} diff --git a/home/sam/nvim/lua/sam/plugins/telescope.lua b/home/sam/nvim/lua/sam/plugins/telescope.lua new file mode 100644 index 0000000..c20b81d --- /dev/null +++ b/home/sam/nvim/lua/sam/plugins/telescope.lua @@ -0,0 +1,21 @@ +return { + "nvim-telescope/telescope.nvim", + dependencies = { "nvim-lua/plenary.nvim" }, + config = function() + -- This section is unchanged + local builtin = require("telescope.builtin") + vim.keymap.set("n", "ff", builtin.find_files, { desc = "Find files" }) + vim.keymap.set("n", "fg", builtin.live_grep, { desc = "Live grep" }) + + -- ADD THIS LINE to load the new extension + require("telescope").load_extension("themes") + +vim.keymap.set("n", "f", builtin.find_files, { desc = "Find files" }) + + vim.keymap.set("n", "ff", builtin.find_files, { desc = "Find files" }) + vim.keymap.set("n", "fg", builtin.live_grep, { desc = "Live grep" }) + + -- ADD THIS LINE to create the new keymap + vim.keymap.set("n", "th", "Telescope themes", { desc = "Switch Theme" }) + end, +} diff --git a/home/sam/nvim/lua/sam/plugins/theme-catppuccin.lua b/home/sam/nvim/lua/sam/plugins/theme-catppuccin.lua new file mode 100644 index 0000000..6a30374 --- /dev/null +++ b/home/sam/nvim/lua/sam/plugins/theme-catppuccin.lua @@ -0,0 +1,8 @@ +return { + "catppuccin/nvim", + name = "catppuccin", + priority = 1000, -- Make sure this theme is loaded first + config = function() + -- You can add custom settings here if you like + end, +} diff --git a/home/sam/nvim/lua/sam/plugins/theme-dracula.lua b/home/sam/nvim/lua/sam/plugins/theme-dracula.lua new file mode 100644 index 0000000..339d7e2 --- /dev/null +++ b/home/sam/nvim/lua/sam/plugins/theme-dracula.lua @@ -0,0 +1 @@ +return { "Mofiqul/dracula.nvim" } diff --git a/home/sam/nvim/lua/sam/plugins/theme-everforest.lua b/home/sam/nvim/lua/sam/plugins/theme-everforest.lua new file mode 100644 index 0000000..3bdf843 --- /dev/null +++ b/home/sam/nvim/lua/sam/plugins/theme-everforest.lua @@ -0,0 +1 @@ +return { "neanias/everforest-nvim" } diff --git a/home/sam/nvim/lua/sam/plugins/theme-gruvbox.lua b/home/sam/nvim/lua/sam/plugins/theme-gruvbox.lua new file mode 100644 index 0000000..5ea7b1c --- /dev/null +++ b/home/sam/nvim/lua/sam/plugins/theme-gruvbox.lua @@ -0,0 +1 @@ +return { "ellisonleao/gruvbox.nvim" } diff --git a/home/sam/nvim/lua/sam/plugins/theme-kanagawa.lua b/home/sam/nvim/lua/sam/plugins/theme-kanagawa.lua new file mode 100644 index 0000000..8a4b8e9 --- /dev/null +++ b/home/sam/nvim/lua/sam/plugins/theme-kanagawa.lua @@ -0,0 +1 @@ +return { "rebelot/kanagawa.nvim" } diff --git a/home/sam/nvim/lua/sam/plugins/theme-onedark.lua b/home/sam/nvim/lua/sam/plugins/theme-onedark.lua new file mode 100644 index 0000000..7e3c0b3 --- /dev/null +++ b/home/sam/nvim/lua/sam/plugins/theme-onedark.lua @@ -0,0 +1 @@ +return { "navarasu/onedark.nvim" } diff --git a/home/sam/nvim/lua/sam/plugins/theme-tokyonight.lua b/home/sam/nvim/lua/sam/plugins/theme-tokyonight.lua new file mode 100644 index 0000000..5c7cb98 --- /dev/null +++ b/home/sam/nvim/lua/sam/plugins/theme-tokyonight.lua @@ -0,0 +1 @@ +return { "folke/tokyonight.nvim" } diff --git a/home/sam/nvim/lua/sam/plugins/treesitter.lua b/home/sam/nvim/lua/sam/plugins/treesitter.lua new file mode 100644 index 0000000..da46026 --- /dev/null +++ b/home/sam/nvim/lua/sam/plugins/treesitter.lua @@ -0,0 +1,36 @@ +-- ~/.config/nvim/lua/sam/plugins/treesitter.lua + +return { + "nvim-treesitter/nvim-treesitter", + build = ":TSUpdate", -- Installs and updates parsers + config = function() + require("nvim-treesitter.configs").setup({ + -- A list of parser names, or "all" + ensure_installed = { + "c", + "cpp", + "lua", + "vim", + "vimdoc", + "python", + "javascript", + "typescript", + "tsx", + "html", + "css", + "json", + "php", + }, + + -- Install parsers synchronously (only applied on startup) + sync_install = false, + + -- Automatically install missing parsers when entering buffer + auto_install = true, + + highlight = { + enable = true, + }, + }) + end, +} diff --git a/home/sam/nvim/lua/sam/plugins/vimtex.lua b/home/sam/nvim/lua/sam/plugins/vimtex.lua new file mode 100644 index 0000000..dc71737 --- /dev/null +++ b/home/sam/nvim/lua/sam/plugins/vimtex.lua @@ -0,0 +1,15 @@ +-- In your plugins configuration file +return { + -- ... other plugins + + { + "lervag/vimtex", + lazy = false, -- Or ft = "tex" to load it only for tex files + config = function() + -- Use Zathura as the PDF viewer + vim.g.vimtex_view_method = "zathura" + end, + }, + + -- ... other plugins +} diff --git a/home/sam/nvim/lua/sam/plugins/which-key.lua b/home/sam/nvim/lua/sam/plugins/which-key.lua new file mode 100644 index 0000000..385d528 --- /dev/null +++ b/home/sam/nvim/lua/sam/plugins/which-key.lua @@ -0,0 +1,9 @@ +return { + "folke/which-key.nvim", + config = function() + require("which-key").setup({ + -- your configuration comes here + -- or leave it empty to use the default settings + }) + end, +} diff --git a/hosts/aspire-laptop/configuration.nix b/hosts/aspire-laptop/configuration.nix new file mode 100644 index 0000000..a920ef1 --- /dev/null +++ b/hosts/aspire-laptop/configuration.nix @@ -0,0 +1,132 @@ +{ pkgs, ... }: + +{ + imports = [ + ./hardware-configuration.nix + ]; + + nixpkgs.config.allowUnfree = true; + + nix.settings.experimental-features = [ + "nix-command" + "flakes" + ]; + + networking.hostName = "aspire-laptop"; + networking.networkmanager.enable = true; + + time.timeZone = "Australia/Melbourne"; + i18n.defaultLocale = "en_AU.UTF-8"; + + console.useXkbConfig = true; + services.xserver.enable = true; + services.xserver.xkb.layout = "au"; + + services.displayManager.sddm.enable = true; + services.displayManager.sddm.wayland.enable = true; + + services.desktopManager.plasma6.enable = true; + + programs.hyprland.enable = true; + programs.hyprland.xwayland.enable = true; + + xdg.portal.enable = true; + xdg.portal.extraPortals = with pkgs; [ + xdg-desktop-portal-hyprland + xdg-desktop-portal-gtk + xdg-desktop-portal-kde + ]; + + security.polkit.enable = true; + programs.dconf.enable = true; + + services.libinput.enable = true; + + services.pipewire.enable = true; + services.pipewire.pulse.enable = true; + services.pipewire.alsa.enable = true; + services.pipewire.alsa.support32Bit = true; + security.rtkit.enable = true; + + zramSwap.enable = true; + + services.tailscale.enable = true; + + programs.zsh.enable = true; + users.defaultUserShell = pkgs.zsh; + + users.users.sam = { + isNormalUser = true; + description = "sam"; + extraGroups = [ + "wheel" + "networkmanager" + "audio" + "video" + ]; + shell = pkgs.zsh; + }; + + environment.systemPackages = with pkgs; [ + # Browsers / editors + google-chrome + vscode + thunderbird + + # KDE apps (Plasma includes Dolphin usually, but we pin it) + kdePackages.dolphin + + # Base tools + git + curl + wget + jq + + # CLI tools you listed + atuin + zellij + starship + fzf + ripgrep + fd + bat + btop + zoxide + eza + yazi + tealdeer + navi + dua + lazygit + gh + borgbackup + + # Terminal + kitty + + # Clipboard + wl-clipboard + xclip + + # Neovim + build deps for treesitter/etc. + neovim + gcc + gnumake + unzip + + # Markdown / LaTeX (small) + pandoc + texlive.combined.scheme-small + latexmk + zathura + zathura-pdf-mupdf + ]; + + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + boot.loader.systemd-boot.configurationLimit = 20; + + networking.firewall.enable = true; + + system.stateVersion = "25.11"; +} diff --git a/hosts/aspire-laptop/hardware-configuration.nix b/hosts/aspire-laptop/hardware-configuration.nix new file mode 100644 index 0000000..250c28d --- /dev/null +++ b/hosts/aspire-laptop/hardware-configuration.nix @@ -0,0 +1,7 @@ +{ modulesPath, ... }: + +{ + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; +} diff --git a/scripts/install-from-iso.sh b/scripts/install-from-iso.sh new file mode 100755 index 0000000..1f05b30 --- /dev/null +++ b/scripts/install-from-iso.sh @@ -0,0 +1,47 @@ +#!/usr/bin/env bash +set -euo pipefail + +DISK="${DISK:-/dev/sda}" + +echo "About to WIPE: ${DISK}" +lsblk "${DISK}" || true +read -r -p 'Type WIPE to continue: ' CONFIRM +if [ "${CONFIRM}" != "WIPE" ]; then + echo "Aborted." + exit 1 +fi + +wipefs -a "${DISK}" +parted -s "${DISK}" mklabel gpt +parted -s "${DISK}" mkpart ESP fat32 1MiB 513MiB +parted -s "${DISK}" set 1 esp on +parted -s "${DISK}" mkpart primary btrfs 513MiB 100% + +EFI_PART="${DISK}1" +ROOT_PART="${DISK}2" + +mkfs.fat -F 32 "${EFI_PART}" +mkfs.btrfs -f "${ROOT_PART}" + +mount "${ROOT_PART}" /mnt +btrfs subvolume create /mnt/@ +btrfs subvolume create /mnt/@home +umount /mnt + +mount -o subvol=@,compress=zstd,noatime "${ROOT_PART}" /mnt +mkdir -p /mnt/home +mount -o subvol=@home,compress=zstd,noatime "${ROOT_PART}" /mnt/home + +mkdir -p /mnt/boot/efi +mount "${EFI_PART}" /mnt/boot/efi + +nixos-generate-config --root /mnt + +echo +echo "Partitioning done." +echo "Generated /mnt/etc/nixos/hardware-configuration.nix" +echo "Next steps:" +echo "1) Put your flake repo at /mnt/etc/nixos (clone it there)." +echo "2) Copy /mnt/etc/nixos/hardware-configuration.nix into:" +echo " /mnt/etc/nixos/hosts/aspire-laptop/hardware-configuration.nix" +echo "3) Run: nixos-install --flake /mnt/etc/nixos#aspire-laptop"