From 0dd840f25e817b45b1c0ff1079f8c7a18bb8fda5 Mon Sep 17 00:00:00 2001 From: pagedMov Date: Sat, 12 Oct 2024 12:02:36 -0400 Subject: [PATCH] still trying to resolve merge conflict --- flake.lock | 12 +- flake.nix | 6 +- .../home}/nixvim/config/autocmd.nix | 0 .../home}/nixvim/config/default.nix | 0 .../home}/nixvim/config/keymaps.nix | 0 .../home}/nixvim/config/options.nix | 0 .../home}/nixvim/config/plugins/alpha.nix | 0 .../home}/nixvim/config/plugins/barbar.nix | 0 .../home}/nixvim/config/plugins/cmp.nix | 0 .../home}/nixvim/config/plugins/coq.nix | 0 .../nixvim/config/plugins/extra_plugins.nix | 0 .../home}/nixvim/config/plugins/lsp.nix | 0 .../home}/nixvim/config/plugins/lualine.nix | 0 .../home}/nixvim/config/plugins/nvim-tree.nix | 0 .../home}/nixvim/config/plugins/plugins.nix | 0 .../home}/nixvim/config/plugins/telescope.nix | 0 .../nixvim/config/plugins/vim-matchup.nix | 0 .../home}/nixvim/flake.lock | 0 .../home}/nixvim/flake.nix | 0 .../home/scripts/scripts/nixcommit.sh | 2 +- .../home}/toilet/flake.lock | 0 .../home}/toilet/flake.nix | 0 .../home}/toilet/result | 0 glasshouse-laptop/home/default.nix | 3 +- glasshouse-laptop/home/git.nix | 9 - glasshouse-laptop/home/hyprland/config.nix | 15 +- glasshouse-laptop/home/hyprland/hyprpaper.nix | 3 +- .../home/nixvim/config/autocmd.nix | 24 ++ .../home/nixvim/config/default.nix | 18 + .../home/nixvim/config/keymaps.nix | 29 ++ .../home/nixvim/config/options.nix | 41 ++ .../home/nixvim/config/plugins/alpha.nix | 6 + .../home/nixvim/config/plugins/barbar.nix | 8 + .../home/nixvim/config/plugins/cmp.nix | 10 + .../home/nixvim/config/plugins/coq.nix | 8 + .../nixvim/config/plugins/extra_plugins.nix | 51 +++ .../home/nixvim/config/plugins/lsp.nix | 17 + .../home/nixvim/config/plugins/lualine.nix | 36 ++ .../home/nixvim/config/plugins/nvim-tree.nix | 84 ++++ .../home/nixvim/config/plugins/plugins.nix | 22 + .../home/nixvim/config/plugins/telescope.nix | 12 + glasshouse-laptop/home/nixvim/flake.lock | 390 ++++++++++++++++++ glasshouse-laptop/home/nixvim/flake.nix | 72 ++++ .../home/scripts/scripts/nixcommit.sh | 2 +- glasshouse-laptop/home/toilet/flake.lock | 27 ++ glasshouse-laptop/home/toilet/flake.nix | 47 +++ glasshouse-laptop/home/toilet/result | 1 + glasshouse-laptop/sys/default.nix | 3 +- glasshouse-laptop/sys/hardware.nix | 70 ++-- glasshouse-laptop/sys/keyd.nix | 17 - glasshouse-laptop/sys/system.nix | 1 - 51 files changed, 969 insertions(+), 77 deletions(-) rename {pkgs => glasshouse-desktop/home}/nixvim/config/autocmd.nix (100%) rename {pkgs => glasshouse-desktop/home}/nixvim/config/default.nix (100%) rename {pkgs => glasshouse-desktop/home}/nixvim/config/keymaps.nix (100%) rename {pkgs => glasshouse-desktop/home}/nixvim/config/options.nix (100%) rename {pkgs => glasshouse-desktop/home}/nixvim/config/plugins/alpha.nix (100%) rename {pkgs => glasshouse-desktop/home}/nixvim/config/plugins/barbar.nix (100%) rename {pkgs => glasshouse-desktop/home}/nixvim/config/plugins/cmp.nix (100%) rename {pkgs => glasshouse-desktop/home}/nixvim/config/plugins/coq.nix (100%) rename {pkgs => glasshouse-desktop/home}/nixvim/config/plugins/extra_plugins.nix (100%) rename {pkgs => glasshouse-desktop/home}/nixvim/config/plugins/lsp.nix (100%) rename {pkgs => glasshouse-desktop/home}/nixvim/config/plugins/lualine.nix (100%) rename {pkgs => glasshouse-desktop/home}/nixvim/config/plugins/nvim-tree.nix (100%) rename {pkgs => glasshouse-desktop/home}/nixvim/config/plugins/plugins.nix (100%) rename {pkgs => glasshouse-desktop/home}/nixvim/config/plugins/telescope.nix (100%) rename {pkgs => glasshouse-desktop/home}/nixvim/config/plugins/vim-matchup.nix (100%) rename {pkgs => glasshouse-desktop/home}/nixvim/flake.lock (100%) rename {pkgs => glasshouse-desktop/home}/nixvim/flake.nix (100%) rename {pkgs => glasshouse-desktop/home}/toilet/flake.lock (100%) rename {pkgs => glasshouse-desktop/home}/toilet/flake.nix (100%) rename {pkgs => glasshouse-desktop/home}/toilet/result (100%) delete mode 100644 glasshouse-laptop/home/git.nix create mode 100644 glasshouse-laptop/home/nixvim/config/autocmd.nix create mode 100644 glasshouse-laptop/home/nixvim/config/default.nix create mode 100644 glasshouse-laptop/home/nixvim/config/keymaps.nix create mode 100644 glasshouse-laptop/home/nixvim/config/options.nix create mode 100644 glasshouse-laptop/home/nixvim/config/plugins/alpha.nix create mode 100644 glasshouse-laptop/home/nixvim/config/plugins/barbar.nix create mode 100644 glasshouse-laptop/home/nixvim/config/plugins/cmp.nix create mode 100644 glasshouse-laptop/home/nixvim/config/plugins/coq.nix create mode 100644 glasshouse-laptop/home/nixvim/config/plugins/extra_plugins.nix create mode 100644 glasshouse-laptop/home/nixvim/config/plugins/lsp.nix create mode 100644 glasshouse-laptop/home/nixvim/config/plugins/lualine.nix create mode 100644 glasshouse-laptop/home/nixvim/config/plugins/nvim-tree.nix create mode 100644 glasshouse-laptop/home/nixvim/config/plugins/plugins.nix create mode 100644 glasshouse-laptop/home/nixvim/config/plugins/telescope.nix create mode 100644 glasshouse-laptop/home/nixvim/flake.lock create mode 100644 glasshouse-laptop/home/nixvim/flake.nix create mode 100644 glasshouse-laptop/home/toilet/flake.lock create mode 100644 glasshouse-laptop/home/toilet/flake.nix create mode 120000 glasshouse-laptop/home/toilet/result delete mode 100644 glasshouse-laptop/sys/keyd.nix diff --git a/flake.lock b/flake.lock index 0def4e7..55fef09 100644 --- a/flake.lock +++ b/flake.lock @@ -854,13 +854,13 @@ "pre-commit-hooks": "pre-commit-hooks_2" }, "locked": { - "lastModified": 1, + "lastModified": 1728747549, "narHash": "sha256-9n6nu8BS4MWpoQLyDqyGXaeJb6G9IzwQgbFjwvBdPL0=", - "path": "./pkgs/nixvim", + "path": "/home/pagedmov/sysflakes/glasshouse-desktop/home/nixvim", "type": "path" }, "original": { - "path": "./pkgs/nixvim", + "path": "/home/pagedmov/sysflakes/glasshouse-desktop/home/nixvim", "type": "path" } }, @@ -999,13 +999,13 @@ "nixpkgs": "nixpkgs_6" }, "locked": { - "lastModified": 1, + "lastModified": 1728587838, "narHash": "sha256-S3crmqg/CDKf+QTwnZUR6udyjsvqS0P0y56wGuJmOno=", - "path": "./pkgs/toilet", + "path": "/home/pagedmov/sysflakes/glasshouse-desktop/home/toilet", "type": "path" }, "original": { - "path": "./pkgs/toilet", + "path": "/home/pagedmov/sysflakes/glasshouse-desktop/home/toilet", "type": "path" } }, diff --git a/flake.nix b/flake.nix index 6701e57..d4c7757 100644 --- a/flake.nix +++ b/flake.nix @@ -38,9 +38,9 @@ inputs.nixpkgs.follows = "nixpkgs"; }; - #glasshouse dots - nvim.url = "path:./pkgs/nixvim"; - toilet.url = "path:./pkgs/toilet"; + #glasshouse-desktop dots + nvim.url = "path:/home/pagedmov/sysflakes/glasshouse-desktop/home/nixvim"; + toilet.url = "path:/home/pagedmov/sysflakes/glasshouse-desktop/home/toilet"; }; outputs = { nixpkgs, home-manager, self, nvim, toilet, ... }@inputs: diff --git a/pkgs/nixvim/config/autocmd.nix b/glasshouse-desktop/home/nixvim/config/autocmd.nix similarity index 100% rename from pkgs/nixvim/config/autocmd.nix rename to glasshouse-desktop/home/nixvim/config/autocmd.nix diff --git a/pkgs/nixvim/config/default.nix b/glasshouse-desktop/home/nixvim/config/default.nix similarity index 100% rename from pkgs/nixvim/config/default.nix rename to glasshouse-desktop/home/nixvim/config/default.nix diff --git a/pkgs/nixvim/config/keymaps.nix b/glasshouse-desktop/home/nixvim/config/keymaps.nix similarity index 100% rename from pkgs/nixvim/config/keymaps.nix rename to glasshouse-desktop/home/nixvim/config/keymaps.nix diff --git a/pkgs/nixvim/config/options.nix b/glasshouse-desktop/home/nixvim/config/options.nix similarity index 100% rename from pkgs/nixvim/config/options.nix rename to glasshouse-desktop/home/nixvim/config/options.nix diff --git a/pkgs/nixvim/config/plugins/alpha.nix b/glasshouse-desktop/home/nixvim/config/plugins/alpha.nix similarity index 100% rename from pkgs/nixvim/config/plugins/alpha.nix rename to glasshouse-desktop/home/nixvim/config/plugins/alpha.nix diff --git a/pkgs/nixvim/config/plugins/barbar.nix b/glasshouse-desktop/home/nixvim/config/plugins/barbar.nix similarity index 100% rename from pkgs/nixvim/config/plugins/barbar.nix rename to glasshouse-desktop/home/nixvim/config/plugins/barbar.nix diff --git a/pkgs/nixvim/config/plugins/cmp.nix b/glasshouse-desktop/home/nixvim/config/plugins/cmp.nix similarity index 100% rename from pkgs/nixvim/config/plugins/cmp.nix rename to glasshouse-desktop/home/nixvim/config/plugins/cmp.nix diff --git a/pkgs/nixvim/config/plugins/coq.nix b/glasshouse-desktop/home/nixvim/config/plugins/coq.nix similarity index 100% rename from pkgs/nixvim/config/plugins/coq.nix rename to glasshouse-desktop/home/nixvim/config/plugins/coq.nix diff --git a/pkgs/nixvim/config/plugins/extra_plugins.nix b/glasshouse-desktop/home/nixvim/config/plugins/extra_plugins.nix similarity index 100% rename from pkgs/nixvim/config/plugins/extra_plugins.nix rename to glasshouse-desktop/home/nixvim/config/plugins/extra_plugins.nix diff --git a/pkgs/nixvim/config/plugins/lsp.nix b/glasshouse-desktop/home/nixvim/config/plugins/lsp.nix similarity index 100% rename from pkgs/nixvim/config/plugins/lsp.nix rename to glasshouse-desktop/home/nixvim/config/plugins/lsp.nix diff --git a/pkgs/nixvim/config/plugins/lualine.nix b/glasshouse-desktop/home/nixvim/config/plugins/lualine.nix similarity index 100% rename from pkgs/nixvim/config/plugins/lualine.nix rename to glasshouse-desktop/home/nixvim/config/plugins/lualine.nix diff --git a/pkgs/nixvim/config/plugins/nvim-tree.nix b/glasshouse-desktop/home/nixvim/config/plugins/nvim-tree.nix similarity index 100% rename from pkgs/nixvim/config/plugins/nvim-tree.nix rename to glasshouse-desktop/home/nixvim/config/plugins/nvim-tree.nix diff --git a/pkgs/nixvim/config/plugins/plugins.nix b/glasshouse-desktop/home/nixvim/config/plugins/plugins.nix similarity index 100% rename from pkgs/nixvim/config/plugins/plugins.nix rename to glasshouse-desktop/home/nixvim/config/plugins/plugins.nix diff --git a/pkgs/nixvim/config/plugins/telescope.nix b/glasshouse-desktop/home/nixvim/config/plugins/telescope.nix similarity index 100% rename from pkgs/nixvim/config/plugins/telescope.nix rename to glasshouse-desktop/home/nixvim/config/plugins/telescope.nix diff --git a/pkgs/nixvim/config/plugins/vim-matchup.nix b/glasshouse-desktop/home/nixvim/config/plugins/vim-matchup.nix similarity index 100% rename from pkgs/nixvim/config/plugins/vim-matchup.nix rename to glasshouse-desktop/home/nixvim/config/plugins/vim-matchup.nix diff --git a/pkgs/nixvim/flake.lock b/glasshouse-desktop/home/nixvim/flake.lock similarity index 100% rename from pkgs/nixvim/flake.lock rename to glasshouse-desktop/home/nixvim/flake.lock diff --git a/pkgs/nixvim/flake.nix b/glasshouse-desktop/home/nixvim/flake.nix similarity index 100% rename from pkgs/nixvim/flake.nix rename to glasshouse-desktop/home/nixvim/flake.nix diff --git a/glasshouse-desktop/home/scripts/scripts/nixcommit.sh b/glasshouse-desktop/home/scripts/scripts/nixcommit.sh index d692589..c6691c2 100755 --- a/glasshouse-desktop/home/scripts/scripts/nixcommit.sh +++ b/glasshouse-desktop/home/scripts/scripts/nixcommit.sh @@ -18,7 +18,7 @@ if [ -n "$diffcheck" ]; then exit fi git add . -git commit -m "(Desktop) Gen $gen: $1" +git commit -m "Gen $gen: $1" git push scheck && runbg aplay ~/media/sound/sys/gitpush.wav builtin cd - || exit diff --git a/pkgs/toilet/flake.lock b/glasshouse-desktop/home/toilet/flake.lock similarity index 100% rename from pkgs/toilet/flake.lock rename to glasshouse-desktop/home/toilet/flake.lock diff --git a/pkgs/toilet/flake.nix b/glasshouse-desktop/home/toilet/flake.nix similarity index 100% rename from pkgs/toilet/flake.nix rename to glasshouse-desktop/home/toilet/flake.nix diff --git a/pkgs/toilet/result b/glasshouse-desktop/home/toilet/result similarity index 100% rename from pkgs/toilet/result rename to glasshouse-desktop/home/toilet/result diff --git a/glasshouse-laptop/home/default.nix b/glasshouse-laptop/home/default.nix index 4aa84dd..fd22530 100644 --- a/glasshouse-laptop/home/default.nix +++ b/glasshouse-laptop/home/default.nix @@ -17,6 +17,5 @@ ++ [ (import ./userpkgs.nix) ] ++ [ (import ./waybar) ] ++ [ (import ./eza.nix) ] - ++ [ (import ./zshell.nix) ] - ++ [ (import ./git.nix) ]; + ++ [ (import ./zshell.nix) ]; } diff --git a/glasshouse-laptop/home/git.nix b/glasshouse-laptop/home/git.nix deleted file mode 100644 index 26df010..0000000 --- a/glasshouse-laptop/home/git.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ ... }: - -{ - programs.git = { - enable = true; - userName = "pagedMov"; - userEmail = "pagedMov@gmail.com"; - }; -} diff --git a/glasshouse-laptop/home/hyprland/config.nix b/glasshouse-laptop/home/hyprland/config.nix index 2be7436..eb74ec5 100644 --- a/glasshouse-laptop/home/hyprland/config.nix +++ b/glasshouse-laptop/home/hyprland/config.nix @@ -5,7 +5,8 @@ settings = { monitor = [ - "eDP-1, 1920x1080@144, 1920x0, 1" + "DP-1, 1920x1080@144, 1920x0, 1" + "HDMI-A-1, 1920x1080, 0x0, 1" ]; exec-once = [ @@ -20,12 +21,12 @@ ]; workspace = [ - "1,persistent=true,monitor:eDP-1" - "2,persistent=true,monitor:eDP-1" - "3,persistent=true,monitor:eDP-1" - "4,persistent=true,monitor:eDP-1" - "5,persistent=true,monitor:eDP-1" - "6,persistent=true,monitor:eDP-1" + "1,persistent=true,monitor:HDMI-A-1" + "2,persistent=true,monitor:HDMI-A-1" + "3,persistent=true,monitor:HDMI-A-1" + "4,persistent=true,monitor:DP-1" + "5,persistent=true,monitor:DP-1" + "6,persistent=true,monitor:DP-1" ]; input = { diff --git a/glasshouse-laptop/home/hyprland/hyprpaper.nix b/glasshouse-laptop/home/hyprland/hyprpaper.nix index 7a2707c..6df7733 100644 --- a/glasshouse-laptop/home/hyprland/hyprpaper.nix +++ b/glasshouse-laptop/home/hyprland/hyprpaper.nix @@ -10,7 +10,8 @@ preload = [ "/home/${username}/Pictures/Wallpapers/cat-leaves.png" ]; wallpaper = [ - "eDP-1,/home/${username}/Pictures/Wallpapers/cat-leaves.png" + "DP-1,/home/${username}/Pictures/Wallpapers/cat-leaves.png" + "HDMI-A-1,/home/${username}/Pictures/Wallpapers/cat-leaves.png" ]; }; }; diff --git a/glasshouse-laptop/home/nixvim/config/autocmd.nix b/glasshouse-laptop/home/nixvim/config/autocmd.nix new file mode 100644 index 0000000..f44c6d1 --- /dev/null +++ b/glasshouse-laptop/home/nixvim/config/autocmd.nix @@ -0,0 +1,24 @@ +{ + autoCmd = [ + { + command = "FloatermNew --wintype=float --name=shadeterm --position=topright --autoclose=0 --silent --cwd= --titleposition=left zsh"; + event = [ "VimEnter" ]; + pattern = [ "*" ]; + } + { + command = "silent! mkview"; + event = [ "BufWinLeave" ]; + pattern = [ "*" ]; + } + { + command = "silent! !aplay ~/sound/sys/cd.wav > /dev/null 2>&1 &"; + event = [ "BufWinLeave" ]; + pattern = [ "*" ]; + } + { + command = "silent! loadview"; + event = [ "BufWinEnter" ]; + pattern = [ "*" ]; + } + ]; +} diff --git a/glasshouse-laptop/home/nixvim/config/default.nix b/glasshouse-laptop/home/nixvim/config/default.nix new file mode 100644 index 0000000..d387b6a --- /dev/null +++ b/glasshouse-laptop/home/nixvim/config/default.nix @@ -0,0 +1,18 @@ +{ + imports = [ + ./plugins/alpha.nix + ./plugins/coq.nix + ./plugins/barbar.nix + ./plugins/cmp.nix + ./plugins/lsp.nix + ./plugins/lualine.nix + ./plugins/plugins.nix + ./plugins/nvim-tree.nix + ./plugins/telescope.nix + ./plugins/extra_plugins.nix + ./options.nix + ./keymaps.nix + ./autocmd.nix + ]; +} + diff --git a/glasshouse-laptop/home/nixvim/config/keymaps.nix b/glasshouse-laptop/home/nixvim/config/keymaps.nix new file mode 100644 index 0000000..ad26586 --- /dev/null +++ b/glasshouse-laptop/home/nixvim/config/keymaps.nix @@ -0,0 +1,29 @@ +{ + keymaps = [ + { + action = "W"; + key = ""; + mode = "n"; + } + { + action = "w"; + key = ""; + mode = "n"; + } + { + action = "FloatermToggle shadeterm"; + key = ""; + mode = "n"; + } + { + action = "NvimTreeToggle"; + key = ""; + mode = "n"; + } + { + action = "FloatermToggle shadeterm"; + key = ""; + mode = "t"; + } + ]; +} diff --git a/glasshouse-laptop/home/nixvim/config/options.nix b/glasshouse-laptop/home/nixvim/config/options.nix new file mode 100644 index 0000000..19b85a7 --- /dev/null +++ b/glasshouse-laptop/home/nixvim/config/options.nix @@ -0,0 +1,41 @@ +{ + colorschemes = { + catppuccin = { + enable = true; + settings.flavour = "mocha"; + }; + kanagawa = { + enable = false; + }; + }; + + diagnostics.signs = false; + extraConfigLua = '' + if vim.g.started_by_firenvim == true then + vim.o.laststatus = 0 + end + if vim.g.neovide then + vim.g.neovide_refresh_rate = 144 + vim.g.neovide_cursor_vfx_mode = "sonicboom" + vim.g.neovide_cursor_animate_in_insert_mode = false + end + + vim.opt.number = true + vim.opt.relativenumber = true + vim.opt.hlsearch = true + vim.opt.incsearch = true + vim.opt.shiftwidth = 4 + vim.opt.tabstop = 4 + vim.opt.termguicolors = true + vim.opt.ruler = true + vim.opt.scrolloff = 6 + vim.opt.undofile = true + vim.opt.foldmethod = "manual" + vim.opt.wrap = true + vim.opt.linebreak = true + vim.opt.textwidth = 135 + vim.opt.breakat = " \t!@*-+;:,./?" + + vim.g.mapleader = "!" + ''; +} diff --git a/glasshouse-laptop/home/nixvim/config/plugins/alpha.nix b/glasshouse-laptop/home/nixvim/config/plugins/alpha.nix new file mode 100644 index 0000000..c4296cb --- /dev/null +++ b/glasshouse-laptop/home/nixvim/config/plugins/alpha.nix @@ -0,0 +1,6 @@ +{ + plugins.alpha = { + enable = true; + theme = "dashboard"; + }; +} diff --git a/glasshouse-laptop/home/nixvim/config/plugins/barbar.nix b/glasshouse-laptop/home/nixvim/config/plugins/barbar.nix new file mode 100644 index 0000000..21da2f1 --- /dev/null +++ b/glasshouse-laptop/home/nixvim/config/plugins/barbar.nix @@ -0,0 +1,8 @@ +{ + plugins.barbar = { + enable = true; + settings = { + auto_hide = 1; + }; + }; +} diff --git a/glasshouse-laptop/home/nixvim/config/plugins/cmp.nix b/glasshouse-laptop/home/nixvim/config/plugins/cmp.nix new file mode 100644 index 0000000..dadf763 --- /dev/null +++ b/glasshouse-laptop/home/nixvim/config/plugins/cmp.nix @@ -0,0 +1,10 @@ +{ + plugins.cmp = { + autoEnableSources = true; + settings.sources = [ + { name = "nvim_lsp"; } + { name = "path"; } + { name = "buffer"; } + ]; + }; +} diff --git a/glasshouse-laptop/home/nixvim/config/plugins/coq.nix b/glasshouse-laptop/home/nixvim/config/plugins/coq.nix new file mode 100644 index 0000000..39bc606 --- /dev/null +++ b/glasshouse-laptop/home/nixvim/config/plugins/coq.nix @@ -0,0 +1,8 @@ +{ + plugins.coq-nvim = { + enable = true; + settings = { + auto_start = true; + }; + }; +} diff --git a/glasshouse-laptop/home/nixvim/config/plugins/extra_plugins.nix b/glasshouse-laptop/home/nixvim/config/plugins/extra_plugins.nix new file mode 100644 index 0000000..f474d0d --- /dev/null +++ b/glasshouse-laptop/home/nixvim/config/plugins/extra_plugins.nix @@ -0,0 +1,51 @@ +{ pkgs, ... }: + +{ + extraPlugins = [ + (pkgs.vimUtils.buildVimPlugin { # vimwiki + name = "vimwiki"; + src = pkgs.fetchFromGitHub { + owner = "vimwiki"; + repo = "vimwiki"; + rev = "705ad1e0dded0e3b7ff5fac78547ab67c9d39bdf"; + hash = "sha256-Upx29rIPwW/e7Lkmf0PNOpIACnAXIzlkfa6V1p2nYHM="; + }; + }) + (pkgs.vimUtils.buildVimPlugin { + name = "vim-markdown"; + src = pkgs.fetchFromGitHub { + owner = "preservim"; + repo = "vim-markdown"; + rev = "8f6cb3a6ca4e3b6bcda0730145a0b700f3481b51"; + hash = "sha256-ZCCSjZ5Xok4rnIwfa4VUEaz6d3oW9066l0EkoqiTppM="; + }; + }) + (pkgs.vimUtils.buildVimPlugin { + name = "vim-sneak"; + src = pkgs.fetchFromGitHub { + owner = "justinmk"; + repo = "vim-sneak"; + rev = "c13d0497139b8796ff9c44ddb9bc0dc9770ad2dd"; + hash = "sha256-ndWhnV0fgCcqCGwVyM07GfmUB3CitBZbOWvZtsB1tBk="; + }; + }) + (pkgs.vimUtils.buildVimPlugin { + name = "vim-slash"; + src = pkgs.fetchFromGitHub { + owner = "junegunn"; + repo = "vim-slash"; + rev = "31aee09b7ea8893a18fa34f65e63e364fc998444"; + hash = "sha256-hC590lmKBssLCSKPF9O2cnt6TCJkklzbbhDNhf1ozUU="; + }; + }) + (pkgs.vimUtils.buildVimPlugin { + name = "automkdir.nvim"; + src = pkgs.fetchFromGitHub { + owner = "mateuszwieloch"; + repo = "automkdir.nvim"; + rev = "beeb2dd76f1c3ac776d901c43217a774f1f045de"; + hash = "sha256-lKSCZ80b/+OV56858FDK7x/zhcuU/AWuCDe+8NdhziU="; + }; + }) + ]; +} diff --git a/glasshouse-laptop/home/nixvim/config/plugins/lsp.nix b/glasshouse-laptop/home/nixvim/config/plugins/lsp.nix new file mode 100644 index 0000000..923503c --- /dev/null +++ b/glasshouse-laptop/home/nixvim/config/plugins/lsp.nix @@ -0,0 +1,17 @@ +{ + plugins.lsp = { + enable = true; + servers = { + bashls.enable = true; + ccls.enable = true; + clangd.enable = true; + cmake.enable = true; + html.enable = true; + jsonls.enable = true; + lua-ls.enable = true; + nil-ls.enable = true; + pyright.enable = true; + sqls.enable = true; + }; + }; +} diff --git a/glasshouse-laptop/home/nixvim/config/plugins/lualine.nix b/glasshouse-laptop/home/nixvim/config/plugins/lualine.nix new file mode 100644 index 0000000..8ed1050 --- /dev/null +++ b/glasshouse-laptop/home/nixvim/config/plugins/lualine.nix @@ -0,0 +1,36 @@ +{ + plugins.lualine = { + enable = true; + settings = { + options = { + icons_enabled = true; + theme = "auto"; + component_separators = {left = ""; right = "";}; + section_separators = {left = ""; right = "";}; + always_divide_middle = true; + globalstatus = false; + refresh = { + statusline = 1000; + tabline = 1000; + winbar = 1000; + }; + }; + sections = { + lualine_a = ["mode"]; + lualine_b = ["buffers"]; + lualine_c = [""]; + lualine_x = ["searchcount" "fileformat" "filetype"]; + lualine_y = ["branch" "diff" "diagnostics"]; + lualine_z = ["location"]; + }; + inactive_sections = { + lualine_a = []; + lualine_b = []; + lualine_c = ["filename"]; + lualine_x = ["location"]; + lualine_y = []; + lualine_z = []; + }; + }; +}; +} diff --git a/glasshouse-laptop/home/nixvim/config/plugins/nvim-tree.nix b/glasshouse-laptop/home/nixvim/config/plugins/nvim-tree.nix new file mode 100644 index 0000000..dcf5d49 --- /dev/null +++ b/glasshouse-laptop/home/nixvim/config/plugins/nvim-tree.nix @@ -0,0 +1,84 @@ +{ + plugins.nvim-tree = { + enable = true; + hijackUnnamedBufferWhenOpening = false; + openOnSetup = false; + onAttach = { __raw = '' + function(bufnr) +local api = require('nvim-tree.api') + + local function opts(desc) + return { desc = 'nvim-tree: ' .. desc, buffer = bufnr, noremap = true, silent = true, nowait = true } + end + + -- BEGIN_DEFAULT_ON_ATTACH + vim.keymap.set('n', '', api.tree.change_root_to_node, opts('CD')) + vim.keymap.set('n', '', api.node.open.replace_tree_buffer, opts('Open: In Place')) + vim.keymap.set('n', '', api.node.show_info_popup, opts('Info')) + vim.keymap.set('n', '', api.fs.rename_sub, opts('Rename: Omit Filename')) + vim.keymap.set('n', '', api.node.open.tab, opts('Open: New Tab')) + vim.keymap.set('n', '', api.node.open.vertical, opts('Open: Vertical Split')) + vim.keymap.set('n', '', api.node.open.horizontal, opts('Open: Horizontal Split')) + vim.keymap.set('n', '', api.node.navigate.parent_close, opts('Close Directory')) + vim.keymap.set('n', '', api.node.open.edit, opts('Open')) + vim.keymap.set('n', 'b', api.node.open.preview, opts('Open Preview')) + vim.keymap.set('n', '>', api.node.navigate.sibling.next, opts('Next Sibling')) + vim.keymap.set('n', '<', api.node.navigate.sibling.prev, opts('Previous Sibling')) + vim.keymap.set('n', '.', api.node.run.cmd, opts('Run Command')) + vim.keymap.set('n', '-', api.tree.change_root_to_parent, opts('Up')) + vim.keymap.set('n', 'a', api.fs.create, opts('Create File Or Directory')) + vim.keymap.set('n', 'bd', api.marks.bulk.delete, opts('Delete Bookmarked')) + vim.keymap.set('n', 'bt', api.marks.bulk.trash, opts('Trash Bookmarked')) + vim.keymap.set('n', 'bmv', api.marks.bulk.move, opts('Move Bookmarked')) + vim.keymap.set('n', 'B', api.tree.toggle_no_buffer_filter, opts('Toggle Filter: No Buffer')) + vim.keymap.set('n', 'c', api.fs.copy.node, opts('Copy')) + vim.keymap.set('n', 'C', api.tree.toggle_git_clean_filter, opts('Toggle Filter: Git Clean')) + vim.keymap.set('n', '[c', api.node.navigate.git.prev, opts('Prev Git')) + vim.keymap.set('n', ']c', api.node.navigate.git.next, opts('Next Git')) + vim.keymap.set('n', 'd', api.fs.remove, opts('Delete')) + vim.keymap.set('n', 'D', api.fs.trash, opts('Trash')) + vim.keymap.set('n', 'E', api.tree.expand_all, opts('Expand All')) + vim.keymap.set('n', 'e', api.fs.rename_basename, opts('Rename: Basename')) + vim.keymap.set('n', ']e', api.node.navigate.diagnostics.next, opts('Next Diagnostic')) + vim.keymap.set('n', '[e', api.node.navigate.diagnostics.prev, opts('Prev Diagnostic')) + vim.keymap.set('n', 'F', api.live_filter.clear, opts('Live Filter: Clear')) + vim.keymap.set('n', 'f', api.live_filter.start, opts('Live Filter: Start')) + vim.keymap.set('n', 'g?', api.tree.toggle_help, opts('Help')) + vim.keymap.set('n', 'gy', api.fs.copy.absolute_path, opts('Copy Absolute Path')) + vim.keymap.set('n', 'ge', api.fs.copy.basename, opts('Copy Basename')) + vim.keymap.set('n', 'H', api.tree.toggle_hidden_filter, opts('Toggle Filter: Dotfiles')) + vim.keymap.set('n', 'I', api.tree.toggle_gitignore_filter, opts('Toggle Filter: Git Ignore')) + vim.keymap.set('n', 'J', api.node.navigate.sibling.last, opts('Last Sibling')) + vim.keymap.set('n', 'K', api.node.navigate.sibling.first, opts('First Sibling')) + vim.keymap.set('n', 'L', api.node.open.toggle_group_empty, opts('Toggle Group Empty')) + vim.keymap.set('n', 'M', api.tree.toggle_no_bookmark_filter, opts('Toggle Filter: No Bookmark')) + vim.keymap.set('n', 'm', api.marks.toggle, opts('Toggle Bookmark')) + vim.keymap.set('n', 'o', api.node.open.edit, opts('Open')) + vim.keymap.set('n', 'O', api.node.open.no_window_picker, opts('Open: No Window Picker')) + vim.keymap.set('n', 'p', api.fs.paste, opts('Paste')) + vim.keymap.set('n', 'P', api.node.navigate.parent, opts('Parent Directory')) + vim.keymap.set('n', 'q', api.tree.close, opts('Close')) + vim.keymap.set('n', 'r', api.fs.rename, opts('Rename')) + vim.keymap.set('n', 'R', api.tree.reload, opts('Refresh')) + vim.keymap.set('n', 's', api.node.run.system, opts('Run System')) + vim.keymap.set('n', 'S', api.tree.search_node, opts('Search')) + vim.keymap.set('n', 'u', api.fs.rename_full, opts('Rename: Full Path')) + vim.keymap.set('n', 'U', api.tree.toggle_custom_filter, opts('Toggle Filter: Hidden')) + vim.keymap.set('n', 'W', api.tree.collapse_all, opts('Collapse')) + vim.keymap.set('n', 'x', api.fs.cut, opts('Cut')) + vim.keymap.set('n', 'y', api.fs.copy.filename, opts('Copy Name')) + vim.keymap.set('n', 'Y', api.fs.copy.relative_path, opts('Copy Relative Path')) + vim.keymap.set('n', '<2-LeftMouse>', api.node.open.edit, opts('Open')) + vim.keymap.set('n', '<2-RightMouse>', api.tree.change_root_to_node, opts('CD')) + -- END_DEFAULT_ON_ATTACH + end + ''; }; + view = { + side = "right"; + centralizeSelection = true; + number = true; + relativenumber = true; + width = 40; + }; + }; +} diff --git a/glasshouse-laptop/home/nixvim/config/plugins/plugins.nix b/glasshouse-laptop/home/nixvim/config/plugins/plugins.nix new file mode 100644 index 0000000..332602d --- /dev/null +++ b/glasshouse-laptop/home/nixvim/config/plugins/plugins.nix @@ -0,0 +1,22 @@ +{ + plugins = { + nvim-surround.enable = true; + indent-blankline.enable = true; + treesitter.enable = true; + lastplace.enable = true; + markdown-preview.enable = true; + gitsigns.enable = true; + web-devicons.enable = true; + endwise.enable = true; + marks.enable = true; + trouble.enable = true; + floaterm.enable = true; + fugitive.enable = true; + rustaceanvim.enable = true; + firenvim.enable = true; + dap = { + enable = true; + extensions.dap-ui.enable = true; + }; + }; +} diff --git a/glasshouse-laptop/home/nixvim/config/plugins/telescope.nix b/glasshouse-laptop/home/nixvim/config/plugins/telescope.nix new file mode 100644 index 0000000..db784f5 --- /dev/null +++ b/glasshouse-laptop/home/nixvim/config/plugins/telescope.nix @@ -0,0 +1,12 @@ +{ + plugins.telescope = { + enable = true; + settings = { + pickers = { + find_files = { + hidden = true; + }; + }; + }; + }; +} diff --git a/glasshouse-laptop/home/nixvim/flake.lock b/glasshouse-laptop/home/nixvim/flake.lock new file mode 100644 index 0000000..1d0c318 --- /dev/null +++ b/glasshouse-laptop/home/nixvim/flake.lock @@ -0,0 +1,390 @@ +{ + "nodes": { + "devshell": { + "inputs": { + "nixpkgs": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1722113426, + "narHash": "sha256-Yo/3loq572A8Su6aY5GP56knpuKYRvM2a1meP9oJZCw=", + "owner": "numtide", + "repo": "devshell", + "rev": "67cce7359e4cd3c45296fb4aaf6a19e2a9c757ae", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "devshell", + "type": "github" + } + }, + "flake-compat": { + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "revCount": 57, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" + } + }, + "flake-compat_2": { + "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-parts": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1726153070, + "narHash": "sha256-HO4zgY0ekfwO5bX0QH/3kJ/h4KvUDFZg8YpkNwIbg1U=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "bcef6817a8b2aa20a5a6dbb19b43e63c5bf8619a", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_2": { + "inputs": { + "nixpkgs-lib": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1726153070, + "narHash": "sha256-HO4zgY0ekfwO5bX0QH/3kJ/h4KvUDFZg8YpkNwIbg1U=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "bcef6817a8b2aa20a5a6dbb19b43e63c5bf8619a", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1726560853, + "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "git-hooks": { + "inputs": { + "flake-compat": [ + "nixvim", + "flake-compat" + ], + "gitignore": "gitignore", + "nixpkgs": [ + "nixvim", + "nixpkgs" + ], + "nixpkgs-stable": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1727514110, + "narHash": "sha256-0YRcOxJG12VGDFH8iS8pJ0aYQQUAgo/r3ZAL+cSh9nk=", + "owner": "cachix", + "repo": "git-hooks.nix", + "rev": "85f7a7177c678de68224af3402ab8ee1bcee25c8", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "git-hooks.nix", + "type": "github" + } + }, + "gitignore": { + "inputs": { + "nixpkgs": [ + "nixvim", + "git-hooks", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, + "gitignore_2": { + "inputs": { + "nixpkgs": [ + "pre-commit-hooks", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1727383923, + "narHash": "sha256-4/vacp3CwdGoPf8U4e/N8OsGYtO09WTcQK5FqYfJbKs=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "ffe2d07e771580a005e675108212597e5b367d2d", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "nix-darwin": { + "inputs": { + "nixpkgs": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1727507295, + "narHash": "sha256-I/FrX1peu4URoj5T5odfuKR2rm4GjYJJpCGF9c0/lDA=", + "owner": "lnl7", + "repo": "nix-darwin", + "rev": "f2e1c4aa29fc211947c3a7113cba1dd707433b70", + "type": "github" + }, + "original": { + "owner": "lnl7", + "repo": "nix-darwin", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1727348695, + "narHash": "sha256-J+PeFKSDV+pHL7ukkfpVzCOO7mBSrrpJ3svwBFABbhI=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "1925c603f17fc89f4c8f6bf6f631a802ad85d784", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-lib": { + "locked": { + "lastModified": 1725233747, + "narHash": "sha256-Ss8QWLXdr2JCBPcYChJhz4xJm+h/xjl4G0c0XlP6a74=", + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz" + } + }, + "nixpkgs-stable": { + "locked": { + "lastModified": 1720386169, + "narHash": "sha256-NGKVY4PjzwAa4upkGtAMz1npHGoRzWotlSnVlqI40mo=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "194846768975b7ad2c4988bdb82572c00222c0d7", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-24.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixvim": { + "inputs": { + "devshell": "devshell", + "flake-compat": "flake-compat", + "flake-parts": "flake-parts_2", + "git-hooks": "git-hooks", + "home-manager": "home-manager", + "nix-darwin": "nix-darwin", + "nixpkgs": [ + "nixpkgs" + ], + "nuschtosSearch": "nuschtosSearch", + "treefmt-nix": "treefmt-nix" + }, + "locked": { + "lastModified": 1727557953, + "narHash": "sha256-xe8JQaNOPTyzWsSlLu2yC6qw4SjOMHrXk4Iq+pIgLhM=", + "owner": "nix-community", + "repo": "nixvim", + "rev": "2c4e4681db658deeceb2f781136d7ba1d0009521", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixvim", + "type": "github" + } + }, + "nuschtosSearch": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1727452028, + "narHash": "sha256-ehl/A4HQFRyqj1Fk7cl+dgSf/2Fb1jLwWJtZaMU6RfU=", + "owner": "NuschtOS", + "repo": "search", + "rev": "9f7426e532ef8dfc839c4a3fcc567b13a20a70d3", + "type": "github" + }, + "original": { + "owner": "NuschtOS", + "repo": "search", + "type": "github" + } + }, + "pre-commit-hooks": { + "inputs": { + "flake-compat": "flake-compat_2", + "gitignore": "gitignore_2", + "nixpkgs": [ + "nixpkgs" + ], + "nixpkgs-stable": "nixpkgs-stable" + }, + "locked": { + "lastModified": 1727514110, + "narHash": "sha256-0YRcOxJG12VGDFH8iS8pJ0aYQQUAgo/r3ZAL+cSh9nk=", + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "rev": "85f7a7177c678de68224af3402ab8ee1bcee25c8", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-parts": "flake-parts", + "nixpkgs": "nixpkgs", + "nixvim": "nixvim", + "pre-commit-hooks": "pre-commit-hooks" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "treefmt-nix": { + "inputs": { + "nixpkgs": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1727431250, + "narHash": "sha256-uGRlRT47ecicF9iLD1G3g43jn2e+b5KaMptb59LHnvM=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "879b29ae9a0378904fbbefe0dadaed43c8905754", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/glasshouse-laptop/home/nixvim/flake.nix b/glasshouse-laptop/home/nixvim/flake.nix new file mode 100644 index 0000000..3800e71 --- /dev/null +++ b/glasshouse-laptop/home/nixvim/flake.nix @@ -0,0 +1,72 @@ +{ + description = "pagedMov's NeoVim configuration"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + flake-parts.url = "github:hercules-ci/flake-parts"; + nixvim = { + url = "github:nix-community/nixvim"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + pre-commit-hooks = { + url = "github:cachix/pre-commit-hooks.nix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; + + outputs = + { + nixvim, + flake-parts, + pre-commit-hooks, + ... + }@inputs: + flake-parts.lib.mkFlake { inherit inputs; } { + systems = [ + "aarch64-linux" + "x86_64-linux" + "aarch64-darwin" + "x86_64-darwin" + ]; + + perSystem = + { + system, + pkgs, + self', + ... + }: + let + nixvim' = nixvim.legacyPackages.${system}; + nvim = nixvim'.makeNixvimWithModule { + inherit pkgs; + module = ./config; + }; + in + { + checks = { + pre-commit-check = pre-commit-hooks.lib.${system}.run { + src = ./.; + hooks = { + statix.enable = true; + nixfmt-rfc-style.enable = true; + deadnix = { + enable = true; + settings = { + edit = true; + }; + }; + }; + }; + }; + + formatter = pkgs.nixfmt-rfc-style; + + packages.default = nvim; + + devShells = { + default = with pkgs; mkShell { inherit (self'.checks.pre-commit-check) shellHook; }; + }; + }; + }; +} diff --git a/glasshouse-laptop/home/scripts/scripts/nixcommit.sh b/glasshouse-laptop/home/scripts/scripts/nixcommit.sh index 4b51cb3..c6691c2 100755 --- a/glasshouse-laptop/home/scripts/scripts/nixcommit.sh +++ b/glasshouse-laptop/home/scripts/scripts/nixcommit.sh @@ -18,7 +18,7 @@ if [ -n "$diffcheck" ]; then exit fi git add . -git commit -m "(Laptop) Gen $gen: $1" +git commit -m "Gen $gen: $1" git push scheck && runbg aplay ~/media/sound/sys/gitpush.wav builtin cd - || exit diff --git a/glasshouse-laptop/home/toilet/flake.lock b/glasshouse-laptop/home/toilet/flake.lock new file mode 100644 index 0000000..c36c036 --- /dev/null +++ b/glasshouse-laptop/home/toilet/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1726937504, + "narHash": "sha256-bvGoiQBvponpZh8ClUcmJ6QnsNKw0EMrCQJARK3bI1c=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "9357f4f23713673f310988025d9dc261c20e70c6", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/glasshouse-laptop/home/toilet/flake.nix b/glasshouse-laptop/home/toilet/flake.nix new file mode 100644 index 0000000..5268dca --- /dev/null +++ b/glasshouse-laptop/home/toilet/flake.nix @@ -0,0 +1,47 @@ +{ + description = "Toilet Configuration with Extra Fonts"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + }; + + outputs = { self, nixpkgs, ... }@inputs: + let + system = "x86_64-linux"; + pkgs = nixpkgs.legacyPackages.${system}; + + # Fetch extra fonts from GitHub + extraFonts = pkgs.fetchFromGitHub { + owner = "xero"; + repo = "figlet-fonts"; + rev = "master"; # Or specify a particular commit/tag + sha256 = "sha256-dAs7N66D2Fpy4/UB5Za1r2qb1iSAJR6TMmau1asxgtY="; # Replace with actual hash + }; + in { + packages.${system} = { + default = pkgs.toilet.overrideAttrs (oldAttrs: rec { + buildInputs = oldAttrs.buildInputs or [] ++ [ extraFonts ]; + + installPhase = '' + make install PREFIX=$out + + # Copy the extra fonts into the correct directory + mkdir -p $out/share/figlet + cp -r ${extraFonts}/* $out/share/figlet + ''; + }); + }; + + # Define a development shell for testing + devShells.${system} = pkgs.mkShell { + buildInputs = [ + pkgs.toilet + extraFonts + ]; + + shellHook = '' + echo "Toilet dev shell with extra fonts" + ''; + }; + }; +} diff --git a/glasshouse-laptop/home/toilet/result b/glasshouse-laptop/home/toilet/result new file mode 120000 index 0000000..33ede88 --- /dev/null +++ b/glasshouse-laptop/home/toilet/result @@ -0,0 +1 @@ +/nix/store/i2ibv054n0ll5p78qabrkb5sxcjzbr2n-toilet-0.3 \ No newline at end of file diff --git a/glasshouse-laptop/sys/default.nix b/glasshouse-laptop/sys/default.nix index 5f1d633..03d565d 100644 --- a/glasshouse-laptop/sys/default.nix +++ b/glasshouse-laptop/sys/default.nix @@ -10,8 +10,7 @@ ++ [ (import ./programs.nix) ] ++ [ (import ./services.nix) ] ++ [ (import ./system.nix) ] - ++ [ (import ./users.nix) ] - ++ [ (import ./keyd.nix) ]; + ++ [ (import ./users.nix) ]; environment.systemPackages = with pkgs; [ acpi diff --git a/glasshouse-laptop/sys/hardware.nix b/glasshouse-laptop/sys/hardware.nix index 74a5621..1335aa0 100644 --- a/glasshouse-laptop/sys/hardware.nix +++ b/glasshouse-laptop/sys/hardware.nix @@ -1,39 +1,55 @@ # 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, ... }: +{ config, lib, modulesPath, username, ... }: { - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; + boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "uas" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; - fileSystems."/" = - { device = "/dev/disk/by-uuid/334f742b-460f-43f8-b819-33086adfa9fb"; - fsType = "ext4"; - }; + fileSystems."/" = + { device = "/dev/disk/by-uuid/a687e4e2-8665-43f1-9d62-3e3f21423579"; + fsType = "ext4"; + }; - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/ECD9-F43B"; - fsType = "vfat"; - options = [ "fmask=0022" "dmask=0022" ]; - }; + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/6EAD-2C48"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; - swapDevices = [ ]; + fileSystems."/home" = + { device = "/dev/nvme0n1p5"; + fsType = "ext4"; + }; - # 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..useDHCP`. - networking.useDHCP = lib.mkDefault true; - # networking.interfaces.enp0s25.useDHCP = lib.mkDefault true; - # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true; + fileSystems."/home/${username}/steamlib" = + { device = "/dev/nvme0n1p1"; + fsType = "ext4"; + }; - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + swapDevices = [ ]; + +# 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..useDHCP`. + networking.useDHCP = lib.mkDefault true; +# networking.interfaces.enp14s0.useDHCP = lib.mkDefault true; +# networking.interfaces.wlp15s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware = { + cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + keyboard.uhk.enable = true; + amdgpu.amdvlk.enable = true; + bluetooth = { + enable = true; + powerOnBoot = true; + }; + }; } diff --git a/glasshouse-laptop/sys/keyd.nix b/glasshouse-laptop/sys/keyd.nix deleted file mode 100644 index a9864ce..0000000 --- a/glasshouse-laptop/sys/keyd.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ pkgs, ... }: - -{ - services.keyd = { - enable = true; - keyboards = { - builtin = { - ids = [ "*" ]; - settings = { - main = { - capslock = "esc"; - }; - }; - }; - }; - }; -} diff --git a/glasshouse-laptop/sys/system.nix b/glasshouse-laptop/sys/system.nix index ff0d8c1..ea40b4f 100644 --- a/glasshouse-laptop/sys/system.nix +++ b/glasshouse-laptop/sys/system.nix @@ -28,7 +28,6 @@ ]; }; - services.logrotate.checkConfig = false; time.timeZone = "America/New_York"; i18n.defaultLocale = "en_US.UTF-8"; }