diff options
| author | Mike Vink <mike@pionative.com> | 2024-06-19 00:03:54 +0200 |
|---|---|---|
| committer | Mike Vink <mike@pionative.com> | 2024-06-19 00:04:23 +0200 |
| commit | 8f7474d4f0c274e1a2c0d748b7dd9e22b4fb39d7 (patch) | |
| tree | da61edea623d4bc40910d9a9d878d7b0e01087d6 | |
| parent | 30321da3d82f71850f14296aaa5dd50b5816aa07 (diff) | |
should probably split xserver stuff
| -rw-r--r-- | flake.lock | 6 | ||||
| -rw-r--r-- | flake.nix | 4 | ||||
| -rw-r--r-- | ivi/ivi.nix | 6 | ||||
| -rw-r--r-- | machines/vm-aarch64.nix | 74 | ||||
| -rw-r--r-- | machines/work.nix | 1 | ||||
| -rw-r--r-- | mut/neovim/fnl/conf/init.fnl | 12 | ||||
| -rw-r--r-- | overlays/vimPlugins.nix | 5 | ||||
| -rw-r--r-- | profiles/core/configuration.nix | 2 | ||||
| -rw-r--r-- | profiles/core/home.nix | 1 | ||||
| -rw-r--r-- | profiles/core/neovim.nix | 2 | ||||
| -rw-r--r-- | profiles/station/codeium.nix | 58 | ||||
| -rw-r--r-- | profiles/station/k8s.nix | 7 | ||||
| -rw-r--r-- | profiles/station/nonfree.nix | 2 |
13 files changed, 109 insertions, 71 deletions
@@ -335,11 +335,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1713297878, - "narHash": "sha256-hOkzkhLT59wR8VaMbh1ESjtZLbGi+XNaBN6h49SPqEc=", + "lastModified": 1717196966, + "narHash": "sha256-yZKhxVIKd2lsbOqYd5iDoUIwsRZFqE87smE2Vzf6Ck0=", "owner": "nixos", "repo": "nixpkgs", - "rev": "66adc1e47f8784803f2deb6cacd5e07264ec2d5c", + "rev": "57610d2f8f0937f39dbd72251e9614b1561942d8", "type": "github" }, "original": { @@ -16,7 +16,7 @@ simple-nixos-mailserver.url = "gitlab:simple-nixos-mailserver/nixos-mailserver"; neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay"; nix-darwin = { - url = "path:/home/ivi/nix-darwin"; + url = "path:/Users/ivi/nix-darwin"; inputs.nixpkgs.follows = "nixpkgs"; }; }; @@ -94,6 +94,8 @@ nixpkgs.overlays = with lib; [ (composeManyExtensions [ (import ./overlays/vimPlugins.nix {inherit pkgs;}) + (import ./overlays/openpomodoro-cli.nix {inherit pkgs lib;}) + (import ./overlays/fzf.nix {inherit pkgs lib;}) inputs.neovim-nightly-overlay.overlay ]) ]; diff --git a/ivi/ivi.nix b/ivi/ivi.nix index 7622da7..473838b 100644 --- a/ivi/ivi.nix +++ b/ivi/ivi.nix @@ -119,6 +119,12 @@ self: lib: with lib; let "core" ]; }; + vm-aarch64 = { + isStation = true; + profiles = [ + "core" + ]; + }; persephone = { isFake = true; tailnet = { diff --git a/machines/vm-aarch64.nix b/machines/vm-aarch64.nix new file mode 100644 index 0000000..ced1b86 --- /dev/null +++ b/machines/vm-aarch64.nix @@ -0,0 +1,74 @@ +# https://github.com/mitchellh/nixos-config/blob/main/machines/vm-aarch64-prl.nix +{ config, pkgs, lib, ... }: { + system.stateVersion = "24.05"; + services.openssh.enable = true; + services.openssh.settings.PasswordAuthentication = true; + services.openssh.settings.PermitRootLogin = "yes"; + + # Setup qemu so we can run x86_64 binaries + boot.binfmt.emulatedSystems = ["x86_64-linux"]; + + # Disable the default module and import our override. We have + # customizations to make this work on aarch64. + disabledModules = [ "virtualisation/vmware-guest.nix" ]; + + # Interface is this on M1 + networking.interfaces.ens160.useDHCP = true; + + # Lots of stuff that uses aarch64 that claims doesn't work, but actually works. + nixpkgs.config.allowUnfree = true; + nixpkgs.config.allowUnsupportedSystem = true; + + # This works through our custom module imported above + # virtualisation.vmware.guest.enable = true; + + # Share our host filesystem + # fileSystems."/host" = { + # fsType = "fuse./run/current-system/sw/bin/vmhgfs-fuse"; + # device = ".host:/"; + # options = [ + # "umask=22" + # "uid=1000" + # "gid=1000" + # "allow_other" + # "auto_unmount" + # "defaults" + # ]; + # }; + + # Use the systemd-boot EFI boot loader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + # VMware, Parallels both only support this being 0 otherwise you see + # "error switching console mode" on boot. + boot.loader.systemd-boot.consoleMode = "0"; + + # Hardware + boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "sr_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-label/nixos"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-label/boot"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; + + 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.<interface>.useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.ens160.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux"; +} diff --git a/machines/work.nix b/machines/work.nix index 4ee0814..e7aa250 100644 --- a/machines/work.nix +++ b/machines/work.nix @@ -46,6 +46,7 @@ pkgs.act pkgs.yubikey-manager pkgs.gomplate + pkgs.just ]; hm = { home = { diff --git a/mut/neovim/fnl/conf/init.fnl b/mut/neovim/fnl/conf/init.fnl index df5412e..f0dbcde 100644 --- a/mut/neovim/fnl/conf/init.fnl +++ b/mut/neovim/fnl/conf/init.fnl @@ -42,6 +42,18 @@ (vim.keymap.del "n" "L") (vim.keymap.del "n" "H"))))) +(local commenter (require :nvim_comment)) +(commenter.setup) +(local cinnamon (require :cinnamon)) +(cinnamon.setup { + :extra_keymaps true + :override_keymaps true + :max_length 200 + :horizontal_scroll false + :default_delay 7 + :scroll_limit -1}) + + (fn i-grep [word file] (vim.api.nvim_feedkeys (vim.api.nvim_replace_termcodes diff --git a/overlays/vimPlugins.nix b/overlays/vimPlugins.nix index 0454047..9011556 100644 --- a/overlays/vimPlugins.nix +++ b/overlays/vimPlugins.nix @@ -18,6 +18,11 @@ in prev.vimPlugins // { + nvim-cinnamon = getVimPlugin { + name = "vim-easygrep"; + git = "declancm/cinnamon.nvim"; + rev = "e48538cba26f079822329a6d12b8cf2b916e925a"; + }; nvim-nio = getVimPlugin { name = "nvim-nio"; git = "nvim-neotest/nvim-nio"; diff --git a/profiles/core/configuration.nix b/profiles/core/configuration.nix index b74c1c8..671b18d 100644 --- a/profiles/core/configuration.nix +++ b/profiles/core/configuration.nix @@ -73,7 +73,7 @@ ] ++ (optionals (!machine.isDarwin) [ man-pages man-pages-posix - pkgsi686Linux.glibc + # pkgsi686Linux.glibc gdb pciutils dnsutils diff --git a/profiles/core/home.nix b/profiles/core/home.nix index 8f137cc..c7484e9 100644 --- a/profiles/core/home.nix +++ b/profiles/core/home.nix @@ -158,6 +158,7 @@ fzf --ansi --tail 100000 --tac --no-sort --exact \ --bind 'ctrl-o:execute:kubectl logs {1} | nvim -' \ --bind 'enter:execute:kubectl exec -it {1} -- bash' \ + --preview 'echo {}' --preview-window down:20%:wrap \ --header '╱ Enter (kubectl exec) ╱ CTRL-O (open log in vim) ╱' } diff --git a/profiles/core/neovim.nix b/profiles/core/neovim.nix index 5f6df01..b73986c 100644 --- a/profiles/core/neovim.nix +++ b/profiles/core/neovim.nix @@ -82,6 +82,8 @@ conform-nvim trouble-nvim vim-easy-align + nvim-comment + nvim-cinnamon # cmp nvim-cmp diff --git a/profiles/station/codeium.nix b/profiles/station/codeium.nix deleted file mode 100644 index f63a9b3..0000000 --- a/profiles/station/codeium.nix +++ /dev/null @@ -1,58 +0,0 @@ -{ - inputs, - config, - pkgs, - ... -}: let - codeium = with pkgs; stdenv.mkDerivation rec { - pname = "codeium"; - version = "1.1.39"; - - ls-sha = "c8fda9657259bb7f3d432c1b558db921db4257aa"; - - src = fetchurl { - url = "https://github.com/Exafunction/codeium/releases/download/language-server-v${version}/language_server_linux_x64.gz"; - sha256 = "sha256-LA1VVW4X30a8UD9aDUCTmBKVXM7G0WE7dSsZ73TaaVo="; - }; - - nativeBuildInputs = [ - autoPatchelfHook - ]; - - sourceRoot = "."; - - unpackPhase = '' - cp $src language_server_linux_x64.gz - gzip -d language_server_linux_x64.gz - ''; - - installPhase = '' - install -m755 -D language_server_linux_x64 $out - ''; - - preFixup = '' - patchelf \ - --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ - $out - ''; - - meta = with lib; { - homepage = "https://www.codeium.com/"; - description = "Codeium language server"; - platforms = platforms.linux; - }; - }; -in { - # home.activation = { - # # links codeium into place - # codium-symlink = inputs.home-manager.lib.hm.dag.entryAfter ["writeBoundary"] '' - # CODEIUM_TARGET="${config.home.homeDirectory}/.codeium/bin/c8fda9657259bb7f3d432c1b558db921db4257aa" - # if [ -L $CODEIUM_TARGET ] && [ -e $CODEIUM_TARGET ]; then - # $DRY_RUN_CMD echo "codeium linked" - # else - # mkdir -p $CODEIUM_TARGET - # $DRY_RUN_CMD ln -sf ${codeium} "$CODEIUM_TARGET/language_server_linux_x64" - # fi - # ''; - # }; -} diff --git a/profiles/station/k8s.nix b/profiles/station/k8s.nix deleted file mode 100644 index bc2b8c3..0000000 --- a/profiles/station/k8s.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ pkgs, ... }: { - environment.systemPackages = with pkgs; [ - kubernetes-helm - kubectl - kind - ]; -} diff --git a/profiles/station/nonfree.nix b/profiles/station/nonfree.nix index b323074..f9d6506 100644 --- a/profiles/station/nonfree.nix +++ b/profiles/station/nonfree.nix @@ -23,5 +23,5 @@ dedicatedServer.openFirewall = true; }; }; - hardware.opengl.driSupport32Bit = true; + # hardware.opengl.driSupport32Bit = true; } |
