chore: move main config to hosts

This commit is contained in:
notohh 2023-01-31 12:18:27 -05:00
parent 8fd58003b4
commit 0888bef631
Signed by: notohh
GPG key ID: BD47506D475EE86D
4 changed files with 272 additions and 271 deletions

View file

@ -22,7 +22,7 @@
nixos = lib.nixosSystem { nixos = lib.nixosSystem {
inherit system; inherit system;
modules = [ modules = [
./nixos/configuration.nix ./hosts/tsuki/default.nix
hyprland.nixosModules.default hyprland.nixosModules.default
{programs.hyprland.enable = true;} {programs.hyprland.enable = true;}
home-manager.nixosModules.home-manager { home-manager.nixosModules.home-manager {

271
hosts/tsuki/default.nix Normal file → Executable file
View file

@ -0,0 +1,271 @@
{ config, pkgs, inputs, ... }:
{
imports =
[
./hardware-configuration.nix
../../modules/hyprland/default.nix
];
# bootloader
boot.loader = {
systemd-boot = {
enable = true;
configurationLimit = 5;
};
efi = {
canTouchEfiVariables = true;
efiSysMountPoint = "/boot/efi";
};
};
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.extraModulePackages = with config.boot.kernelPackages;
[ v4l2loopback.out ];
boot.kernelModules = [ "v4l2loopback" "kvm-intel" ];
virtualisation.libvirtd.enable = true;
networking.hostName = "tsuki";
networking.networkmanager.enable = true;
networking.nameservers = [ "192.168.1.45" ];
# pihole
environment.etc = {
"resolv.conf".text = "nameserver 192.168.1.45\n";
};
time.timeZone = "America/New_York";
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
services = {
fstrim = {
enable = true;
};
xserver = {
enable = true;
videoDrivers = [ "nvidia" ];
displayManager = {
gdm.enable = true;
gdm.wayland = true;
};
};
};
services.xserver = {
layout = "us";
xkbVariant = "";
};
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
pinentryFlavor = "gtk2";
};
services.pcscd.enable = true;
sound.enable = true;
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
wireplumber.enable = true;
};
programs.steam = {
enable = true;
};
security.polkit.enable = true;
security.pam.services.swaylock = {
text = ''
auth include login
'';
};
hardware = {
nvidia = {
powerManagement.enable = true;
modesetting.enable = true;
package = config.boot.kernelPackages.nvidiaPackages.stable;
};
opengl = {
enable = true;
extraPackages = with pkgs; [
nvidia-vaapi-driver
];
};
};
users = {
defaultUserShell = pkgs.nushell;
users.notoh = {
isNormalUser = true;
description = "notoh";
extraGroups = [ "networkmanager" "wheel" "disk" "video" ];
packages = with pkgs; [
# essential
firefox
neofetch
bitwarden
spotify-player
discord-ptb
mpv
# coding
jetbrains.pycharm-community
lazygit
# utility
waybar
xplr
btop
nvtop
obs-studio
pavucontrol
unzip
p7zip
etcher
virt-manager
imv
playerctl
ani-cli
trackma
appimage-run
qbittorrent
gdu
cryptomator
# gaming
wine
lutris
gamemode
gamescope
mangohud
bottles
osu-lazer-bin
runelite
prismlauncher
# fun stuff
cbonsai
pipes-rs
cmatrix
cava
];
};
};
environment.systemPackages = with pkgs; [
wget
stow
rustup
cargo
jre
jdk
jq
nodejs
polkit_gnome
wireplumber
gcc
cmake
libvirt
qemu_kvm
python3Full
python3.pkgs.pip
gtk-engine-murrine
gnupg
pinentry-gtk2
# LSPS
nil
rust-analyzer
gopls
sumneko-lua-language-server
marksman
nodePackages_latest.vscode-html-languageserver-bin
nodePackages_latest.vscode-css-languageserver-bin
nodePackages_latest.yaml-language-server
];
fonts = {
enableDefaultFonts = true;
fontDir.enable = true;
fonts = with pkgs; [
inter
jetbrains-mono
nerdfonts
noto-fonts-cjk-sans
twemoji-color-font
font-awesome
fira-code-symbols
kochi-substitute
ipafont
];
fontconfig = {
enable = true;
allowBitmaps = true;
defaultFonts = {
monospace = ["JetBrainsMono Nerd Font Regular"];
sansSerif = ["Google Sans Text"];
};
hinting.style = "hintfull";
};
};
nix = {
package = pkgs.nixFlakes;
extraOptions = ''
experimental-features = nix-command flakes
warn-dirty = false
'';
settings.auto-optimise-store = true;
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 7d";
};
settings = {
substituters = [
"https://hyprland.cachix.org"
"https://cache.nixos.org?priority=10"
];
trusted-public-keys = [
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
];
};
};
system.autoUpgrade = {
enable = false;
channel = "https://nixos.org/channel/nixos-unstable";
};
nixpkgs.config.permittedInsecurePackages = [
"qtwebkit-5.212.0-alpha4"
"electron-12.2.3"
];
nixpkgs.config.allowUnfree = true;
system.stateVersion = "23.05";
}

View file

@ -1,270 +0,0 @@
{ config, pkgs, inputs, ... }:
{
imports =
[
./hardware-configuration.nix
../modules/hyprland/default.nix
];
# bootloader
boot.loader = {
systemd-boot = {
enable = true;
configurationLimit = 5;
};
efi = {
canTouchEfiVariables = true;
efiSysMountPoint = "/boot/efi";
};
};
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.extraModulePackages = with config.boot.kernelPackages;
[ v4l2loopback.out ];
boot.kernelModules = [ "v4l2loopback" "kvm-intel" ];
virtualisation.libvirtd.enable = true;
networking.hostName = "nixos";
networking.networkmanager.enable = true;
networking.nameservers = [ "192.168.1.45" ];
# pihole
environment.etc = {
"resolv.conf".text = "nameserver 192.168.1.45\n";
};
time.timeZone = "America/New_York";
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
services = {
fstrim = {
enable = true;
};
xserver = {
enable = true;
videoDrivers = [ "nvidia" ];
displayManager = {
gdm.enable = true;
gdm.wayland = true;
};
};
};
services.xserver = {
layout = "us";
xkbVariant = "";
};
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
pinentryFlavor = "gtk2";
};
services.pcscd.enable = true;
sound.enable = true;
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
wireplumber.enable = true;
};
programs.steam = {
enable = true;
};
security.polkit.enable = true;
security.pam.services.swaylock = {
text = ''
auth include login
'';
};
hardware = {
nvidia = {
powerManagement.enable = true;
modesetting.enable = true;
package = config.boot.kernelPackages.nvidiaPackages.stable;
};
opengl = {
enable = true;
extraPackages = with pkgs; [
nvidia-vaapi-driver
];
};
};
users = {
defaultUserShell = pkgs.nushell;
users.notoh = {
isNormalUser = true;
description = "notoh";
extraGroups = [ "networkmanager" "wheel" "disk" "video" ];
packages = with pkgs; [
# essential
firefox
neofetch
bitwarden
discord-ptb
mpv
# coding
jetbrains.pycharm-community
lazygit
# utility
waybar
xplr
btop
nvtop
obs-studio
pavucontrol
unzip
p7zip
etcher
virt-manager
imv
playerctl
ani-cli
trackma
appimage-run
qbittorrent
gdu
cryptomator
# gaming
wine
lutris
gamemode
gamescope
mangohud
bottles
osu-lazer-bin
runelite
prismlauncher
# fun stuff
cbonsai
pipes-rs
cmatrix
cava
];
};
};
environment.systemPackages = with pkgs; [
wget
stow
rustup
cargo
jre
jdk
jq
nodejs
polkit_gnome
wireplumber
gcc
cmake
libvirt
qemu_kvm
python3Full
python3.pkgs.pip
gtk-engine-murrine
gnupg
pinentry-gtk2
# LSPS
nil
rust-analyzer
gopls
sumneko-lua-language-server
marksman
nodePackages_latest.vscode-html-languageserver-bin
nodePackages_latest.vscode-css-languageserver-bin
nodePackages_latest.yaml-language-server
];
fonts = {
enableDefaultFonts = true;
fontDir.enable = true;
fonts = with pkgs; [
inter
jetbrains-mono
nerdfonts
noto-fonts-cjk-sans
twemoji-color-font
font-awesome
fira-code-symbols
kochi-substitute
ipafont
];
fontconfig = {
enable = true;
allowBitmaps = true;
defaultFonts = {
monospace = ["JetBrainsMono Nerd Font Regular"];
sansSerif = ["Google Sans Text"];
};
hinting.style = "hintfull";
};
};
nix = {
package = pkgs.nixFlakes;
extraOptions = ''
experimental-features = nix-command flakes
warn-dirty = false
'';
settings.auto-optimise-store = true;
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 7d";
};
settings = {
substituters = [
"https://hyprland.cachix.org"
"https://cache.nixos.org?priority=10"
];
trusted-public-keys = [
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
];
};
};
system.autoUpgrade = {
enable = false;
channel = "https://nixos.org/channel/nixos-unstable";
};
nixpkgs.config.permittedInsecurePackages = [
"qtwebkit-5.212.0-alpha4"
"electron-12.2.3"
];
nixpkgs.config.allowUnfree = true;
system.stateVersion = "23.05";
}