More nix modules

This commit is contained in:
Daniel Flanagan 2020-10-24 10:03:34 -05:00
parent 4f0185bc89
commit 4e807b5759
Signed by: lytedev
GPG Key ID: 5B2020A0F9921EF4
19 changed files with 157 additions and 250 deletions

View File

@ -1,96 +1,17 @@
{ config, pkgs, ... }:
{
{ config, pkgs, ... }: {
imports = [
../profiles/laptop.nix
../modules/systemd-boot-efi.nix
../modules/intel.nix
../modules/docker.nix
../modules/network-manager.nix
../modules/bluetooth.nix
../modules/pulseaudio.nix
../modules/de/sway.nix
../modules/users/daniel.nix
../modules/users/valerie.nix
];
networking.hostName "third.lyte.dev";
fonts.fonts = with pkgs; [ iosevka ];
virtualisation.docker.enable = true;
hardware = {
bluetooth = {
enable = true;
};
pulseaudio = {
enable = true;
support32Bit = true;
package = pkgs.pulseaudioFull;
# extraConfig = "
# load-module module-switch-on-connect
# ";
};
opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
extraPackages = with pkgs; [
vaapiIntel
vaapiVdpau
libvdpau-va-gl
];
};
};
programs = {
fish.enable = true;
mtr.enable = true;
gnupg.agent = {
enable = true;
enableSSHSupport = true;
pinentryFlavor = "curses";
};
};
services = {
openssh.enable = true;
};
networking.hostName = "third.lyte.dev";
networking.firewall.enable = false;
sound.enable = true;
users.users.daniel = {
isNormalUser = true;
extraGroups = [ "wheel" "docker" ];
shell = pkgs.fish;
home = "/home/daniel/.home";
packages = with pkgs; [
steam
pulsemixer
file
appimage-run
kitty
sway waybar mako wl-clipboard
firefox-devedition-bin
fzf
fortune
dmenu
ranger
pass
brightnessctl
vulkan-tools # TODO: vulkan?
rustup
clang
pavucontrol
pamixer
strongswan
gnumake
elixir
docker docker-compose
postgresql
htop
google-cloud-sdk
slurp grim
unzip
automake
autoconf
ncurses
];
};
}

3
env/nix/modules/bash.nix vendored Normal file
View File

@ -0,0 +1,3 @@
{ config, pkgs, ... }: {
environment.systemPackages = [ pkgs.bash ];
}

3
env/nix/modules/bluetooth.nix vendored Normal file
View File

@ -0,0 +1,3 @@
{ config, pkgs, ... }: {
hardware.bluetooth.enable = true;
}

15
env/nix/modules/de/base.nix vendored Normal file
View File

@ -0,0 +1,15 @@
{ config, pkgs, ... }: {
fonts.fonts = with pkgs; [ iosevka ];
hardware.opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
};
environment = {
systemPackages = with pkgs; [
firefox-devedition-bin
pavucontrol
brightnessctl
];
};
}

17
env/nix/modules/de/sway.nix vendored Normal file
View File

@ -0,0 +1,17 @@
{ config, pkgs, ... }: {
imports = [ ./base.nix ];
programs.sway = {
enable = true;
extraPackages = with pkgs; [
swaylock
swayidle
xwayland
waybar
mako
kanshi
wl-clipboard
slurp
grim
];
};
}

3
env/nix/modules/docker.nix vendored Normal file
View File

@ -0,0 +1,3 @@
{ config, pkgs, ... }: {
imports = [ /etc/nixos/hardware-configuration.nix ];
}

5
env/nix/modules/fish.nix vendored Normal file
View File

@ -0,0 +1,5 @@
{ config, pkgs, ... }: {
environment.systemPackages = [ pkgs.fish ];
programs.fish.enable = true;
}

View File

@ -1,10 +1,15 @@
{ config, pkgs, ... }:
{
{ config, pkgs, ... }: {
nixpkgs.config = {
allowUnfree = true;
packageOverrides = pkgs: {
vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
};
};
hardware.opengl = {
extraPackages = with pkgs; [
vaapiIntel
vaapiVdpau
libvdpau-va-gl
];
};
}

3
env/nix/modules/neovim.nix vendored Normal file
View File

@ -0,0 +1,3 @@
{ config, pkgs, ... }: {
environment.systemPackages = [ pkgs.neovim ];
}

View File

@ -1,5 +1,4 @@
{ config, pkgs, ... }:
{
networkmanager.enable = true;
{ config, pkgs, ... }: {
networking.networkmanager.enable = true;
environment.systemPackages = [ pkgs.networkmanager ];
}

8
env/nix/modules/pulseaudio.nix vendored Normal file
View File

@ -0,0 +1,8 @@
{ config, pkgs, ... }: {
hardware.pulseaudio = {
enable = true;
support32Bit = true;
package = pkgs.pulseaudioFull;
};
sound.enable = true;
}

View File

@ -1,6 +1,4 @@
{ config, pkgs, ... }:
{
{ config, pkgs, ... }: {
boot = {
loader = {
systemd-boot.enable = true;

4
env/nix/modules/tmux.nix vendored Normal file
View File

@ -0,0 +1,4 @@
{ config, pkgs, ... }: {
environment.systemPackages = [ pkgs.tmux ];
}

38
env/nix/modules/users/daniel.nix vendored Normal file
View File

@ -0,0 +1,38 @@
{ config, pkgs, ... }: {
users.users.daniel = {
isNormalUser = true;
extraGroups = [ "wheel" "docker" ];
shell = pkgs.fish;
home = "/home/daniel/.home";
packages = with pkgs; [
fortune
steam
pulsemixer
file
appimage-run
kitty
fzf
fortune
dmenu
ranger
pass
brightnessctl
vulkan-tools # TODO: vulkan?
rustup
clang
pavucontrol
pamixer
strongswan
gnumake
elixir
docker docker-compose
postgresql
htop
google-cloud-sdk
unzip
automake
autoconf
ncurses
];
};
}

7
env/nix/modules/users/valerie.nix vendored Normal file
View File

@ -0,0 +1,7 @@
{ config, pkgs, ... }: {
users.users.valerie = {
isNormalUser = true;
shell = pkgs.fish;
home = "/home/valerie";
};
}

View File

@ -1,133 +0,0 @@
{ config, pkgs, ... }:
{
imports = [ /etc/nixos/hardware-configuration.nix ];
boot = {
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
};
nixpkgs.config = {
allowUnfree = true;
packageOverrides = pkgs: {
vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
};
};
networking = {
networkmanager.enable = true;
hostName = "third.lyte.dev";
};
i18n.defaultLocale = "en_US.UTF-8";
console.keyMap = "us";
time.timeZone = "America/Chicago";
environment = {
systemPackages = with pkgs; [
fish bash tmux
vim neovim
networkmanager
wget curl w3m
git
pciutils usbutils binutils
ripgrep sd
nodejs python3
rsync
];
variables = {
EDITOR = "nvim";
};
};
fonts.fonts = with pkgs; [ iosevka ];
virtualisation.docker.enable = true;
hardware = {
bluetooth = {
enable = true;
};
pulseaudio = {
enable = true;
support32Bit = true;
package = pkgs.pulseaudioFull;
# extraConfig = "
# load-module module-switch-on-connect
# ";
};
opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
extraPackages = with pkgs; [
vaapiIntel
vaapiVdpau
libvdpau-va-gl
];
};
};
programs = {
fish.enable = true;
mtr.enable = true;
gnupg.agent = {
enable = true;
enableSSHSupport = true;
pinentryFlavor = "curses";
};
};
services = {
openssh.enable = true;
};
networking.firewall.enable = false;
sound.enable = true;
users.users.daniel = {
isNormalUser = true;
extraGroups = [ "wheel" "docker" ];
shell = pkgs.fish;
home = "/home/daniel/.home";
packages = with pkgs; [
steam
pulsemixer
file
appimage-run
kitty
sway waybar mako wl-clipboard
firefox-devedition-bin
fzf
fortune
dmenu
ranger
pass
brightnessctl
vulkan-tools # TODO: vulkan?
rustup
clang
pavucontrol
pamixer
strongswan
gnumake
elixir
docker docker-compose
postgresql
htop
google-cloud-sdk
slurp grim
unzip
automake
autoconf
ncurses
];
};
system.stateVersion = "20.03";
}

View File

@ -1,7 +1,4 @@
{ config, pkgs, ... }:
{
{ config, pkgs, ... }: {
programs.home-manager.enable = true;
home.stateVersion = "20.03";
}

View File

@ -1,27 +1,45 @@
{ config, pkgs, ... }:
{
{ config, pkgs, ... }: {
imports = [
../modules/fish.nix
../modules/bash.nix
../modules/tmux.nix
../modules/neovim.nix
];
i18n.defaultLocale = "en_US.UTF-8";
console.keyMap = "us";
time.timeZone = "America/Chicago";
environment = {
systemPackages = with pkgs; [
fish bash
tmux
neovim
networkmanager
less
wget curl
rsync
w3m
git
pciutils usbutils binutils
ripgrep sd fd
unzip
];
variables = {
EDITOR = "nvim";
PAGER = "nvim";
VISUAL = "nvim";
PAGER = "less";
VISUAL = "less";
};
shellAliases = {
vim = "neovim";
vi = "neovim";
};
};
programs = {
gnupg.agent = {
enable = true;
enableSSHSupport = true;
pinentryFlavor = "curses";
};
};
services = {
openssh.enable = true;
};
}

View File

@ -1,7 +1,3 @@
{ config, pkgs, ... }:
{
imports = [
./base.nix
];
{ config, pkgs, ... }: {
imports = [ ./base.nix ];
}