Created
July 26, 2023 05:47
-
-
Save sacsbrainz/89a4c68821e014e3923293da60770d9d to your computer and use it in GitHub Desktop.
my configuration.nix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Edit this configuration file to define what should be installed on | |
# your system. Help is available in the configuration.nix(5) man page | |
# and in the NixOS manual (accessible by running ‘nixos-help’). | |
{ | |
config, | |
pkgs, | |
lib, | |
... | |
}: { | |
imports = [ | |
# Include the results of the hardware scan. | |
./hardware-configuration.nix | |
<home-manager/nixos> | |
]; | |
# Bootloader. | |
boot = { | |
loader = { | |
systemd-boot.enable = true; | |
efi.canTouchEfiVariables = true; | |
}; | |
#Enable ntfs storage to enable it mount | |
supportedFilesystems = [''ntfs'' ''exfat'' ''avfs'' ''ntfs3'']; | |
}; | |
# Allow unfree packages | |
nixpkgs.config.allowUnfree = true; | |
services = { | |
# Enable X11 | |
xserver = { | |
enable = true; | |
# Configure keymap in X11.... | |
layout = "ng"; | |
xkbVariant = ""; | |
#.... | |
displayManager.gdm.enable = true; | |
videoDrivers = ["nvidia"]; | |
# desktopManager.gnome.enable = true; | |
}; | |
#Enable dbus | |
dbus.enable = true; | |
#Enable GVFS for thunar | |
gvfs.enable = true; | |
# For sound | |
pipewire = { | |
enable = true; | |
alsa.enable = true; | |
alsa.support32Bit = true; | |
pulse.enable = true; | |
}; | |
}; | |
#name that will show when to connect to a network | |
networking.hostName = "nixos"; | |
# Enable networking | |
networking.networkmanager.enable = true; | |
#Enable sound | |
hardware.pulseaudio.enable = false; | |
security.rtkit.enable = true; | |
# Set your time zone. | |
time.timeZone = "Africa/Lagos"; | |
# Select internationalisation properties. | |
i18n = { | |
defaultLocale = "en_NG"; | |
extraLocaleSettings = { | |
LC_ADDRESS = "en_NG"; | |
LC_IDENTIFICATION = "en_NG"; | |
LC_MEASUREMENT = "en_NG"; | |
LC_MONETARY = "en_NG"; | |
LC_NAME = "en_NG"; | |
LC_NUMERIC = "en_NG"; | |
LC_PAPER = "en_NG"; | |
LC_TELEPHONE = "en_NG"; | |
LC_TIME = "en_NG"; | |
}; | |
}; | |
users.users = { | |
gamer = { | |
isNormalUser = true; | |
description = "gamer"; | |
extraGroups = ["networkmanager" "video" "wheel"]; | |
}; | |
sacs = { | |
isNormalUser = true; | |
extraGroups = ["networkmanager" "wheel"]; | |
}; | |
}; | |
home-manager.useGlobalPkgs = true; | |
home-manager.users.gamer = {pkgs, ...}: { | |
home.username = "gamer"; | |
home.homeDirectory = "/home/gamer"; | |
home.packages = with pkgs; [ | |
steam | |
dune-release | |
nvtop-nvidia | |
gamescope | |
gnome.dconf-editor | |
gnome.gnome-tweaks | |
gnomeExtensions.appindicator | |
gnomeExtensions.arcmenu | |
gnomeExtensions.caffeine | |
gnomeExtensions.clipboard-indicator | |
gnomeExtensions.color-picker | |
gnomeExtensions.dash-to-panel | |
gnomeExtensions.emoji-selector | |
gnomeExtensions.gsconnect | |
gnomeExtensions.quick-settings-tweaker | |
gnome-extension-manager | |
]; | |
home.stateVersion = "23.05"; | |
}; | |
home-manager.users.sacs = {pkgs, ...}: { | |
home.username = "sacs"; | |
home.homeDirectory = "/home/sacs"; | |
home.packages = with pkgs; [ | |
firefox | |
vscode | |
kitty | |
swww | |
waybar | |
neofetch | |
grim | |
wl-clipboard | |
dunst | |
rofi-wayland | |
viewnior | |
jetbrains-mono | |
brightnessctl | |
pavucontrol | |
iw | |
pulseaudioFull | |
ntfs3g | |
keepassxc | |
google-chrome | |
postman | |
xfce.thunar | |
xfce.thunar-volman | |
(import (fetchTarball https://install.devenv.sh/latest)).default | |
]; | |
wayland.windowManager.hyprland = { | |
enable = true; | |
xwayland = { | |
enable = true; | |
hidpi = true; | |
}; | |
enableNvidiaPatches = true; | |
}; | |
home.stateVersion = "23.05"; | |
}; | |
# Enable automatic login for the user. | |
# services.getty.autologinUser = "sacs"; | |
#enable flake | |
# nix.settings.experimental-features = [ "nix-command" "flakes"]; | |
hardware.steam-hardware.enable = true; | |
hardware = { | |
opengl = { | |
enable = true; | |
driSupport32Bit = true; | |
driSupport = true; | |
}; | |
}; | |
hardware.uinput.enable = true; | |
hardware.nvidia.modesetting.enable = true; | |
hardware.nvidia.prime = { | |
offload.enable = true; | |
amdgpuBusId = "PCI:8:0:0"; | |
nvidiaBusId = "PCI:1:0:0"; | |
}; | |
#fix permission issues thunar | |
security.polkit.extraConfig = '' | |
polkit.addRule(function(action, subject) { | |
if ((action.id == "org.freedesktop.udisks2.filesystem-mount-system" || | |
action.id == "org.freedesktop.udisks2.filesystem-mount") && | |
subject.isInGroup("wheel")) { | |
return polkit.Result.YES; | |
} | |
}); | |
''; | |
# enable dconf module | |
programs.dconf.enable = true; | |
# List packages installed in system profile. To search, run: | |
# $ nix search wget | |
environment.systemPackages = with pkgs; [ | |
vim | |
git | |
curl | |
wget | |
zip | |
unzip | |
]; | |
system.stateVersion = "23.05"; # Did you read the comment? | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment