feat: reconfigure

This commit is contained in:
Infinidoge 2021-09-08 09:33:25 -04:00
parent 00f3a285dd
commit c71407281c
13 changed files with 252 additions and 120 deletions

49
profiles/core/nix.nix Normal file
View file

@ -0,0 +1,49 @@
{ pkgs, ... }: {
nix = {
systemFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ];
autoOptimiseStore = true;
gc.automatic = true;
optimise.automatic = true;
useSandbox = true;
allowedUsers = [ "@wheel" ];
trustedUsers = [ "root" "@wheel" ];
extraOptions = ''
min-free = 536870912
keep-outputs = true
keep-derivations = true
fallback = true
'';
};
environment = {
systemPackages = with pkgs; [ nix-index nixfmt nixpkgs-fmt ];
shellAliases = {
# nix
n = "nix";
np = "n profile";
ni = "np install";
nr = "np remove";
ns = "n search --no-update-lock-file";
nf = "n flake";
nepl = "n repl '<nixpkgs>'";
srch = "ns nixos";
orch = "ns override";
nrb = ifSudo "sudo nixos-rebuild";
mn = ''
manix "" | grep '^# ' | sed 's/^# \(.*\) (.*/\1/;s/ (.*//;s/^# //' | sk --preview="manix '{}'" | xargs manix
'';
# fix nixos-option
nixos-option = "nixos-option -I nixpkgs=${self}/lib/compat";
};
};
}

View file

@ -0,0 +1 @@
{ imports = [ ./zsh ]; }

View file

@ -0,0 +1,8 @@
{ ... }: {
programs.neovim = {
defaultEditor = true;
viAlias = true;
vimAlias = true;
};
}

45
profiles/develop/zsh.nix Normal file
View file

@ -0,0 +1,45 @@
{ ... }: {
programs.zsh = {
enable = true;
autosuggestions.enable = true;
ohMyZsh = {
enable = true;
plugins = [
# Display
"colorize"
"colored-man-pages"
# zsh modifications
"zsh-interactive-cd"
"zsh_reload"
"command-not-found"
# Aliases
"alias-finder"
# Applications
## Docker
"docker"
## Python
"pip"
"python"
## Systemd
"systemd"
## Git
"git"
"github"
"gitignore"
## Emacs
"emacs"
## Vim
"fancy-ctrl-z"
];
};
syntaxHighlighting = {
enable = true;
highlighters = [ "main" "brackets" "pattern" "cursor" ];
patterns = { "rm -rf *" = "fg=white,bold,bg=red"; };
};
zsh-autoenv.enable = true;
};
}

View file

@ -0,0 +1,6 @@
{ ... }: {
services.xserver.videoDrivers = [ "nvidia" ];
hardware.nvidia.modesetting.enable = true;
hardware.opengl.driSupport32Bit = true;
}

View file

@ -0,0 +1,7 @@
{ pkgs, ... }: {
imports = [ ./xserver ];
services.xserver.windowManager.qtile.enable = true;
environment.systemPackages = with pkgs; [ xsecurelock ];
}

View file

@ -0,0 +1,15 @@
{ pkgs, ... }: {
services.xserver = {
enable = true;
layout = "us";
};
environment.systemPackages = with pkgs; [
xclip
xdotool
xorg.xwininfo
xorg.xauth
blugon
];
}

View file

@ -0,0 +1,4 @@
{ ... }: {
sound.enable = true;
hardware.pulseaudio.enable = true;
}

View file

@ -0,0 +1,3 @@
{ ... }: {
services.gvfs.enable = true; # MTP support
}

View file

@ -0,0 +1,15 @@
{ pkgs, ... }: {
services.printing = {
enable = true;
drivers = with pkgs; [
cnijfilter2
gutenprintBin
cupsBjnp
cups-bjnp
canon-cups-ufr2
carps-cups
cnijfilter_2_80
cnijfilter_4_00
];
};
}