From a26d6a1e028007c26c992e8c39038b132cc0b18a Mon Sep 17 00:00:00 2001 From: Gabe Venberg Date: Sun, 24 Mar 2024 22:09:58 -0500 Subject: [PATCH] added kitty shell, module organization changes. --- hosts/archlaptop/configuration.nix | 1 + hosts/archlaptop/hardware-configuration.nix | 41 +++++++++++---------- hosts/archlaptop/home.nix | 4 +- hosts/gabe-archlaptop.nix | 1 + hosts/non-nixos-server.nix | 1 + justfile | 3 ++ modules/home-manager/home-manager.nix | 21 +++++++++++ modules/home-manager/kittty/kitty.nix | 15 ++++++++ modules/home-manager/terminal/nvim/nvim.nix | 4 ++ modules/home-manager/terminal/terminal.nix | 19 +--------- modules/home-manager/terminal/zsh.nix | 1 + 11 files changed, 72 insertions(+), 39 deletions(-) create mode 100644 modules/home-manager/home-manager.nix create mode 100644 modules/home-manager/kittty/kitty.nix diff --git a/hosts/archlaptop/configuration.nix b/hosts/archlaptop/configuration.nix index c8de21e..1f80ced 100644 --- a/hosts/archlaptop/configuration.nix +++ b/hosts/archlaptop/configuration.nix @@ -90,6 +90,7 @@ users.users.gabe = { isNormalUser = true; description = "Gabe Venberg"; + shell = pkgs.nushell; extraGroups = ["networkmanager" "wheel"]; packages = with pkgs; [ firefox diff --git a/hosts/archlaptop/hardware-configuration.nix b/hosts/archlaptop/hardware-configuration.nix index 74b8333..50c2ae3 100644 --- a/hosts/archlaptop/hardware-configuration.nix +++ b/hosts/archlaptop/hardware-configuration.nix @@ -1,30 +1,31 @@ # 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, - pkgs, - modulesPath, - ... -}: { - imports = [ - (modulesPath + "/profiles/qemu-guest.nix") - ]; + imports = + [ (modulesPath + "/profiles/qemu-guest.nix") + ]; - boot.initrd.availableKernelModules = ["ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk"]; - boot.initrd.kernelModules = []; - boot.kernelModules = ["kvm-amd"]; - boot.extraModulePackages = []; + boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; - fileSystems."/" = { - device = "/dev/disk/by-uuid/87ee53a2-077d-47df-9051-9abcc0fc1a89"; - fsType = "ext4"; - }; + fileSystems."/" = + { device = "/dev/disk/by-uuid/1000b969-f089-4b1e-bbef-3d0c39da8a91"; + fsType = "ext4"; + }; - swapDevices = [ - {device = "/dev/disk/by-uuid/5aa8725e-fdd1-4825-9d2c-e2c2c165b726";} - ]; + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/AB75-97AD"; + fsType = "vfat"; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/506f2ef4-c9ee-4fe6-8590-95e0821d5903"; } + ]; # 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 diff --git a/hosts/archlaptop/home.nix b/hosts/archlaptop/home.nix index f2f531a..f1eeda2 100644 --- a/hosts/archlaptop/home.nix +++ b/hosts/archlaptop/home.nix @@ -15,7 +15,9 @@ home.username = "gabe"; home.homeDirectory = "/home/gabe"; imports = [ - ../../terminal/terminal.nix + ../../modules/home-manager/terminal/terminal.nix + ../../modules/home-manager/home-manager.nix + ../../modules/home-manager/kittty/kitty.nix inputs.nixvim.homeManagerModules.nixvim ]; } diff --git a/hosts/gabe-archlaptop.nix b/hosts/gabe-archlaptop.nix index a6a8fab..fd02546 100644 --- a/hosts/gabe-archlaptop.nix +++ b/hosts/gabe-archlaptop.nix @@ -16,5 +16,6 @@ home.homeDirectory = "/home/gabe"; imports = [ ../terminal/terminal.nix + ../../modules/home-manager/home-manager.nix ]; } diff --git a/hosts/non-nixos-server.nix b/hosts/non-nixos-server.nix index ccada06..3f563b6 100644 --- a/hosts/non-nixos-server.nix +++ b/hosts/non-nixos-server.nix @@ -16,5 +16,6 @@ home.homeDirectory = "/home/gabe"; imports = [ ../terminal/terminal.nix + ../../modules/home-manager/home-manager.nix ]; } diff --git a/justfile b/justfile index a45e80b..3763e65 100644 --- a/justfile +++ b/justfile @@ -1,6 +1,9 @@ default: just --list +nixos target: + sudo nixos-rebuild --flake .#{{target}} switch + home-manager target: home-manager --flake .#{{target}} switch diff --git a/modules/home-manager/home-manager.nix b/modules/home-manager/home-manager.nix new file mode 100644 index 0000000..e2c1137 --- /dev/null +++ b/modules/home-manager/home-manager.nix @@ -0,0 +1,21 @@ +{ + config, + pkgs, + lib, + ... +}: { + home.stateVersion = "23.11"; # Please read the comment before changing. + + # Let Home Manager install and manage itself. + programs.home-manager.enable = true; + + # enable flakes + nix = + lib.mkIf config.targets.genericLinux.enable + { + package = pkgs.nix; + settings.experimental-features = ["nix-command" "flakes"]; + settings.max-jobs = "auto"; + gc.automatic = true; + }; +} diff --git a/modules/home-manager/kittty/kitty.nix b/modules/home-manager/kittty/kitty.nix new file mode 100644 index 0000000..2db0d22 --- /dev/null +++ b/modules/home-manager/kittty/kitty.nix @@ -0,0 +1,15 @@ +{ + config, + pkgs, + lib, + ... +}: { + programs.kitty = { + enable=true; + font={ + package=pkgs.fira-code-nerdfont; + name="Fira Code"; + }; + theme="Gruvbox Dark"; + }; +} diff --git a/modules/home-manager/terminal/nvim/nvim.nix b/modules/home-manager/terminal/nvim/nvim.nix index 750c7aa..55e3a88 100644 --- a/modules/home-manager/terminal/nvim/nvim.nix +++ b/modules/home-manager/terminal/nvim/nvim.nix @@ -17,6 +17,10 @@ clipboard.providers.xsel.enable = true; }; + home.sessionVariables = { + EDITOR = "nvim"; + VISUAL = "nvim"; + }; imports = [ ./keybinds.nix ./options.nix diff --git a/modules/home-manager/terminal/terminal.nix b/modules/home-manager/terminal/terminal.nix index 6cedf98..2c015db 100644 --- a/modules/home-manager/terminal/terminal.nix +++ b/modules/home-manager/terminal/terminal.nix @@ -4,8 +4,6 @@ lib, ... }: { - home.stateVersion = "23.11"; # Please read the comment before changing. - home.packages = with pkgs; [ sshfs just @@ -24,8 +22,6 @@ }; home.sessionVariables = { - EDITOR = "nvim"; - VISUAL = "nvim"; PIPENV_VENV_IN_PROJECT = 1; POETRY_VIRTUALENVS_IN_PROJECT = 1; }; @@ -47,8 +43,8 @@ ./zsh.nix ./git.nix ./starship.nix - ./nvim/nvim.nix ./voice.nix + ./nvim/nvim.nix ]; programs = { @@ -66,17 +62,4 @@ }; services.ssh-agent.enable = true; - - # Let Home Manager install and manage itself. - programs.home-manager.enable = true; - - # enable flakes - nix = - lib.mkIf config.targets.genericLinux.enable - { - package = pkgs.nix; - settings.experimental-features = ["nix-command" "flakes"]; - settings.max-jobs = "auto"; - gc.automatic = true; - }; } diff --git a/modules/home-manager/terminal/zsh.nix b/modules/home-manager/terminal/zsh.nix index e13c2d1..c77dbb4 100644 --- a/modules/home-manager/terminal/zsh.nix +++ b/modules/home-manager/terminal/zsh.nix @@ -9,6 +9,7 @@ programs.yazi.enableZshIntegration = true; programs.carapace.enableZshIntegration = true; programs.direnv.enableZshIntegration = true; + programs.kitty.shellIntegration.enableZshIntegration = true; programs.zsh = { enable = true; enableCompletion = true;