feat: reconfigure
This commit is contained in:
parent
00f3a285dd
commit
c71407281c
13 changed files with 252 additions and 120 deletions
49
profiles/core/nix.nix
Normal file
49
profiles/core/nix.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
}
|
1
profiles/develop/common.nix
Normal file
1
profiles/develop/common.nix
Normal file
|
@ -0,0 +1 @@
|
|||
{ imports = [ ./zsh ]; }
|
8
profiles/develop/neovim.nix
Normal file
8
profiles/develop/neovim.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{ ... }: {
|
||||
programs.neovim = {
|
||||
defaultEditor = true;
|
||||
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
};
|
||||
}
|
45
profiles/develop/zsh.nix
Normal file
45
profiles/develop/zsh.nix
Normal 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;
|
||||
};
|
||||
}
|
6
profiles/graphical/nvidia.nix
Normal file
6
profiles/graphical/nvidia.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{ ... }: {
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
|
||||
hardware.nvidia.modesetting.enable = true;
|
||||
hardware.opengl.driSupport32Bit = true;
|
||||
}
|
7
profiles/graphical/qtile.nix
Normal file
7
profiles/graphical/qtile.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ pkgs, ... }: {
|
||||
imports = [ ./xserver ];
|
||||
|
||||
services.xserver.windowManager.qtile.enable = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [ xsecurelock ];
|
||||
}
|
15
profiles/graphical/xserver.nix
Normal file
15
profiles/graphical/xserver.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{ pkgs, ... }: {
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
layout = "us";
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
xclip
|
||||
xdotool
|
||||
xorg.xwininfo
|
||||
xorg.xauth
|
||||
|
||||
blugon
|
||||
];
|
||||
}
|
4
profiles/hardware/sound.nix
Normal file
4
profiles/hardware/sound.nix
Normal file
|
@ -0,0 +1,4 @@
|
|||
{ ... }: {
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio.enable = true;
|
||||
}
|
3
profiles/peripherals/mobile.nix
Normal file
3
profiles/peripherals/mobile.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{ ... }: {
|
||||
services.gvfs.enable = true; # MTP support
|
||||
}
|
15
profiles/peripherals/printing.nix
Normal file
15
profiles/peripherals/printing.nix
Normal 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
|
||||
];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue