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 = [ imports = [
../profiles/laptop.nix ../profiles/laptop.nix
../modules/systemd-boot-efi.nix ../modules/systemd-boot-efi.nix
../modules/intel.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"; 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.firewall.enable = false; 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 = { nixpkgs.config = {
allowUnfree = true; allowUnfree = true;
packageOverrides = pkgs: { packageOverrides = pkgs: {
vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; }; 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, ... }: { config, pkgs, ... }: {
networking.networkmanager.enable = true;
{ environment.systemPackages = [ pkgs.networkmanager ];
networkmanager.enable = true;
} }

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 = { boot = {
loader = { loader = {
systemd-boot.enable = true; 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; programs.home-manager.enable = true;
home.stateVersion = "20.03"; 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"; i18n.defaultLocale = "en_US.UTF-8";
console.keyMap = "us"; console.keyMap = "us";
time.timeZone = "America/Chicago"; time.timeZone = "America/Chicago";
environment = { environment = {
systemPackages = with pkgs; [ systemPackages = with pkgs; [
fish bash less
tmux
neovim
networkmanager
wget curl wget curl
rsync rsync
w3m w3m
git git
pciutils usbutils binutils pciutils usbutils binutils
ripgrep sd fd ripgrep sd fd
unzip
]; ];
variables = { variables = {
EDITOR = "nvim"; EDITOR = "nvim";
PAGER = "nvim"; PAGER = "less";
VISUAL = "nvim"; 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, ... }: { config, pkgs, ... }: {
imports = [ ./base.nix ];
{
imports = [
./base.nix
];
} }