feat: Add nixos configuration flake
This commit is contained in:
parent
2c0e4f885e
commit
d00c3204f7
4 changed files with 362 additions and 0 deletions
200
nix/configuration.nix
Normal file
200
nix/configuration.nix
Normal file
|
|
@ -0,0 +1,200 @@
|
|||
{ hostname, config, lib, pkgs, ... }:
|
||||
{
|
||||
imports =
|
||||
[
|
||||
./hardware-${hostname}.nix
|
||||
# <home-manager/nixos>
|
||||
];
|
||||
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
|
||||
################################
|
||||
# Hardware configuration #
|
||||
################################
|
||||
hardware = {
|
||||
graphics = { enable = true; enable32Bit = true; };
|
||||
bluetooth = { enable = true; powerOnBoot = true; };
|
||||
};
|
||||
|
||||
####################
|
||||
# Networking #
|
||||
####################
|
||||
networking = {
|
||||
hostName = "${hostname}";
|
||||
networkmanager.enable = true;
|
||||
# proxy.default = "naiveproxy+https://fries:8.S%3ECi42%40h%2CF%7D%3EP@ruffling.org/#french_connection:443";
|
||||
};
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Moscow";
|
||||
|
||||
# Internationalisation
|
||||
i18n = {
|
||||
defaultLocale = "en_US.UTF-8";
|
||||
inputMethod = {
|
||||
enable = true;
|
||||
type = "fcitx5";
|
||||
};
|
||||
};
|
||||
console = {
|
||||
font = "Lat2-Terminus16";
|
||||
useXkbConfig = true;
|
||||
};
|
||||
|
||||
# Enable rtkit so pipewire can aquire real-time priority
|
||||
security.rtkit.enable = true;
|
||||
|
||||
# Add nur for more packages!
|
||||
# nixpkgs.config.packageOverrides = pkgs: {
|
||||
# nur =
|
||||
# import ( builtins.fetchTarball "https://github.com/nix-community/NUR/archive/main.tar.gz" )
|
||||
# {
|
||||
# inherit pkgs;
|
||||
# };
|
||||
# };
|
||||
|
||||
# Exception for packages that are not free but we would still like to install.
|
||||
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg)
|
||||
[
|
||||
"steam"
|
||||
"steam-unwrapped"
|
||||
"vintagestory"
|
||||
];
|
||||
|
||||
nixpkgs.config.permittedInsecurePackages = [
|
||||
"dotnet-runtime-7.0.20" # Required for vintagestory
|
||||
];
|
||||
|
||||
|
||||
################################
|
||||
# Packages for ALL users #
|
||||
################################
|
||||
environment.systemPackages = with pkgs; [
|
||||
alacritty
|
||||
asciidoctor-with-extensions
|
||||
bat
|
||||
bluez
|
||||
bluez-tools
|
||||
brightnessctl
|
||||
dunst
|
||||
eww
|
||||
feh
|
||||
file
|
||||
fzf
|
||||
git
|
||||
git-lfs
|
||||
helix
|
||||
htop
|
||||
linux-manual
|
||||
maim
|
||||
man-pages
|
||||
man-pages-posix
|
||||
mpv
|
||||
mumble
|
||||
nix-your-shell
|
||||
openvpn
|
||||
pass
|
||||
pavucontrol
|
||||
playerctl
|
||||
python3
|
||||
ripgrep
|
||||
rofi
|
||||
uutils-coreutils # TODO: Once satisfied switch to `uutils-coreutils-noprefix`
|
||||
vim
|
||||
webcord
|
||||
wget
|
||||
wine
|
||||
winetricks
|
||||
xarchiver
|
||||
xclip
|
||||
xdo
|
||||
zathura
|
||||
]
|
||||
++ [
|
||||
nur.repos.sn0wm1x.naiveproxy-bin
|
||||
];
|
||||
|
||||
###############
|
||||
# Fonts #
|
||||
###############
|
||||
fonts.packages = with pkgs; with nerd-fonts; [
|
||||
agave
|
||||
anonymice
|
||||
daddy-time-mono
|
||||
envy-code-r
|
||||
fantasque-sans-mono
|
||||
hurmit
|
||||
iosevka
|
||||
iosevka-term-slab
|
||||
jetbrains-mono
|
||||
source-han-mono
|
||||
tamsyn
|
||||
tamzen
|
||||
];
|
||||
|
||||
##################
|
||||
# Programs #
|
||||
##################
|
||||
programs = {
|
||||
firefox = {
|
||||
enable = true;
|
||||
languagePacks = [ "de" "en-GB" ];
|
||||
};
|
||||
gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
pinentryPackage = pkgs.pinentry-curses;
|
||||
};
|
||||
mtr.enable = true;
|
||||
};
|
||||
|
||||
##################
|
||||
# Services #
|
||||
##################
|
||||
services = {
|
||||
blueman.enable = true;
|
||||
locate.enable = true;
|
||||
pcscd.enable = true;
|
||||
picom = {
|
||||
enable = true;
|
||||
backend = "glx";
|
||||
};
|
||||
pipewire = { enable = true; pulse.enable = true; };
|
||||
printing.enable = true;
|
||||
xserver = {
|
||||
enable = true;
|
||||
displayManager.startx.enable = true;
|
||||
windowManager.leftwm.enable = true;
|
||||
xkb.layout = "us";
|
||||
xkb.variant = "dvp";
|
||||
xkb.options = "caps:escape,compose:94";
|
||||
};
|
||||
};
|
||||
|
||||
##########################
|
||||
# User definitions #
|
||||
##########################
|
||||
users.users.zentux = {
|
||||
shell = pkgs.nushell;
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" "networkmanager" "video" "kvm" ];
|
||||
packages = with pkgs; [
|
||||
nixd
|
||||
steam
|
||||
vintagestory
|
||||
|
||||
element-desktop
|
||||
signal-desktop
|
||||
telegram-desktop
|
||||
];
|
||||
|
||||
# home.stateVersion = "24.11";
|
||||
};
|
||||
|
||||
# Respect your shit. Don't touch this.
|
||||
system.stateVersion = "24.11";
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue