diff --git a/configuration.nix b/configuration.nix index 5d08880..b56c4b6 100644 --- a/configuration.nix +++ b/configuration.nix @@ -21,7 +21,7 @@ networking.hostId = "68438432"; # Pick only one of the below networking options. networking.wireless.iwd.enable = true; - # I would advise against pushing your secrets + # I would advise against pushing your secrets #system.activationScripts.getIWD.text = '' # cp -r /etc/nixos/iwd /var/lib/ #''; diff --git a/users/common/default.nix b/users/common/default.nix index e965bca..2b13549 100644 --- a/users/common/default.nix +++ b/users/common/default.nix @@ -1,71 +1,92 @@ -{ config, pkgs, ...} : { + config, + pkgs, + ... +}: { + programs.fzf.enable = true; - programs.fzf.enable = true; + home.packages = with pkgs; [ + sqlite + bat + ripgrep + ]; - home.packages = with pkgs; [ - sqlite - bat - ripgrep - ]; + programs.gpg = { + enable = true; + scdaemonSettings.disable-ccid = true; + publicKeys = [ + { + source = ../../data/pubkey.gpg; + trust = 5; + } + { + source = ../../data/newpubkey.gpg; + trust = 5; + } + ]; + }; + programs.neovim = { + enable = true; + viAlias = true; + vimAlias = true; + vimdiffAlias = true; + defaultEditor = true; + withNodeJs = true; + }; - programs.gpg = { - enable = true; - scdaemonSettings.disable-ccid = true; - publicKeys = [ - { source = ../../data/pubkey.gpg; - trust = 5; - } - { source = ../../data/newpubkey.gpg; - trust = 5; - } - ]; - }; - services.gpg-agent = { - enable = true; - enableSshSupport = true; - }; + xdg.configFile.nvim = { + recursive = true; + source = ../../data/nvim; + }; + programs.git.enable = true; + services.gpg-agent = { + enable = true; + enableSshSupport = true; + }; - programs.git.signing = { - key = null; - signByDefault = true; - }; + programs.git.signing = { + key = null; + signByDefault = true; + }; - programs.zsh = { - enable = true; - initExtra = builtins.readFile ../../data/zshrc; - plugins = [ - { name = "powerlevel10k"; - file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme"; - src = pkgs.zsh-powerlevel10k; - } - { name = "fzf-tab"; - file = "share/fzf-tab/fzf-tab.plugin.zsh"; - src = pkgs.zsh-fzf-tab; - } - { name = "fast-syntax-highlighting"; - file = "share/zsh/site-functions/fast-syntax-highlighting.plugin.zsh"; - src = pkgs.zsh-fast-syntax-highlighting; - } - { name = "zsh-histdb"; - file = "sqlite-history.zsh"; - src = pkgs.fetchFromGitHub { - owner = "larkery"; - repo = "zsh-histdb"; - rev = "30797f0"; - sha256 = "PQIFF8kz+baqmZWiSr+wc4EleZ/KD8Y+lxW2NT35/bg="; - }; - } - #{ name = "zsh-histdb-skim"; - # file = "zsh-histdb-skim.zsh"; - # src = pkgs.fetchFromGitHub { - # owner = "m42e"; - # repo = "zsh-histdb-skim"; - # rev = "v0.8.1"; - # sha256 = "pcXSGjOKhN2nrRErggb8JAjw/3/bvTy1rvFhClta1Vs="; - # }; - #} - ]; - - }; + programs.zsh = { + enable = true; + initExtra = builtins.readFile ../../data/zshrc; + plugins = [ + { + name = "powerlevel10k"; + file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme"; + src = pkgs.zsh-powerlevel10k; + } + { + name = "fzf-tab"; + file = "share/fzf-tab/fzf-tab.plugin.zsh"; + src = pkgs.zsh-fzf-tab; + } + { + name = "fast-syntax-highlighting"; + file = "share/zsh/site-functions/fast-syntax-highlighting.plugin.zsh"; + src = pkgs.zsh-fast-syntax-highlighting; + } + { + name = "zsh-histdb"; + file = "sqlite-history.zsh"; + src = pkgs.fetchFromGitHub { + owner = "larkery"; + repo = "zsh-histdb"; + rev = "30797f0"; + sha256 = "PQIFF8kz+baqmZWiSr+wc4EleZ/KD8Y+lxW2NT35/bg="; + }; + } + #{ name = "zsh-histdb-skim"; + # file = "zsh-histdb-skim.zsh"; + # src = pkgs.fetchFromGitHub { + # owner = "m42e"; + # repo = "zsh-histdb-skim"; + # rev = "v0.8.1"; + # sha256 = "pcXSGjOKhN2nrRErggb8JAjw/3/bvTy1rvFhClta1Vs="; + # }; + #} + ]; + }; } diff --git a/users/common/desktop.nix b/users/common/desktop.nix index 14bae76..39a2a47 100644 --- a/users/common/desktop.nix +++ b/users/common/desktop.nix @@ -1,11 +1,12 @@ { - config, - pkgs, - ...}: - { - home.packages = with pkgs; [ - zathura - pinentry - arandr - ]; - } + config, + pkgs, + ... +}: { + home.packages = with pkgs; [ + zathura + pinentry + arandr + feh + ]; +} diff --git a/users/default.nix b/users/default.nix index 37caf9e..22f4dd0 100644 --- a/users/default.nix +++ b/users/default.nix @@ -10,13 +10,7 @@ in { ]; home-manager.users.patrick.imports = [./patrick.nix]; home-manager.users.root = { - imports = [ ./common ]; - programs.neovim.enable = true; - programs.git.enable = true; - xdg.configFile.nvim = { - recursive = true; - source = ../data/nvim; - }; + imports = [./common]; home.stateVersion = "23.05"; }; } diff --git a/users/patrick.nix b/users/patrick.nix index b45fdea..04d693e 100644 --- a/users/patrick.nix +++ b/users/patrick.nix @@ -12,25 +12,12 @@ ]; }; imports = [ - common/kitty.nix - common/herbstluftwm.nix - common/desktop.nix - ./common ]; + common/kitty.nix + common/herbstluftwm.nix + common/desktop.nix + ./common + ]; + nixpkgs.config.allowUnfree = true; xsession.enable = true; - programs.neovim = { - enable = true; - viAlias = true; - vimAlias = true; - vimdiffAlias = true; - #withNodes = true; - }; - programs.git.enable = true; - - programs.zsh.enable = true; - - xdg.configFile.nvim = { - recursive = true; - source = ../data/nvim; - }; }