-
-
Save jaythomas/af8ae1843c5fb5f84448b97114a510cd to your computer and use it in GitHub Desktop.
NixOS
This file contains 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, ... }: | |
{ | |
imports = [ | |
./hardware-configuration.nix | |
(import "${builtins.fetchTarball https://github.com/nix-community/home-manager/archive/refs/heads/release-23.05.zip}/nixos") | |
]; | |
boot.loader.grub.enable = true; | |
boot.loader.grub.device = "/dev/sda"; | |
boot.loader.grub.useOSProber = true; | |
networking.hostName = "sol"; | |
#networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. | |
# Configure network proxy if necessary | |
# networking.proxy.default = "http://user:password@proxy:port/"; | |
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; | |
# Enable networking | |
networking.networkmanager.enable = true; | |
# Set your time zone. | |
time.timeZone = "America/New_York"; | |
# Select internationalisation properties. | |
console.useXkbConfig = true; | |
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.flatpak.enable = true; | |
# X11 | |
services.xserver = { | |
enable = true; | |
layout = "us"; | |
xkbVariant = "colemak"; | |
# Enable touchpad support (enabled default in most desktopManager). | |
#libinput.enable = true; | |
# XFCE Desktop Environment. | |
desktopManager.xfce = { | |
enable = true; | |
noDesktop = false; | |
enableXfwm = true; | |
}; | |
displayManager = { | |
lightdm.enable = false; | |
autoLogin = { | |
enable = true; | |
user = "lite"; | |
}; | |
startx.enable = true; | |
}; | |
}; | |
# CUPS | |
services.printing.enable = true; | |
# Audio via Pipewire | |
sound.enable = true; | |
hardware.pulseaudio.enable = false; | |
security.rtkit.enable = true; | |
services.pipewire = { | |
enable = true; | |
alsa.enable = true; | |
alsa.support32Bit = true; | |
pulse.enable = true; | |
}; | |
# Define a user account. Don't forget to set a password with ‘passwd’. | |
users = { | |
defaultUserShell = pkgs.fish; | |
users.lite = { | |
isNormalUser = true; | |
description = "lite"; | |
extraGroups = [ "networkmanager" "wheel" ]; | |
packages = with pkgs; [ | |
abiword | |
aria | |
bat | |
chromium | |
cura | |
curl | |
delta | |
firefox | |
fishPlugins.pisces | |
fnm | |
gimp | |
git | |
gparted | |
janet | |
jpm | |
helix | |
htop | |
killall | |
libresprite | |
microsoft-edge | |
neovim | |
pass | |
pinta | |
pysolfc | |
ranger | |
redshift | |
rofi | |
ripgrep | |
rustup | |
slock | |
steam | |
tealdeer | |
tmux | |
typespeed | |
vlc | |
warsow | |
wget | |
xclip | |
xfce.thunar-archive-plugin | |
xfce.thunar-volman | |
xorg.xinit | |
]; | |
}; | |
}; | |
# Allow unfree packages | |
nixpkgs.config.allowUnfree = true; | |
environment = { | |
shells = with pkgs; [ fish ]; | |
# List packages installed in system profile. To search, run: | |
# $ nix search wget | |
systemPackages = with pkgs; [ | |
]; | |
}; | |
programs.fish = { | |
enable = true; | |
interactiveShellInit = "set fish_greeting"; | |
#plugins = [ | |
# { name = "pisces"; src = pkgs.fishPlugins.pisces.src; } | |
#]; | |
}; | |
programs.firefox = { | |
languagePacks = "en-US"; | |
}; | |
# Some programs need SUID wrappers, can be configured further or are | |
# started in user sessions. | |
# programs.mtr.enable = true; | |
programs.gnupg.agent = { | |
enable = true; | |
enableSSHSupport = true; | |
}; | |
programs.neovim = { | |
defaultEditor = true; | |
enable = true; | |
viAlias = true; | |
}; | |
programs.thunar.plugins = with pkgs.xfce; [ | |
thunar-archive-plugin | |
thunar-volman | |
]; | |
programs.traceroute.enable = true; | |
# Enable the OpenSSH daemon. | |
services.openssh = { | |
allowSFTP = true; | |
enable = true; | |
ports = [ 22 ]; | |
}; | |
# Open ports in the firewall. | |
# networking.firewall.allowedTCPPorts = [ ... ]; | |
# networking.firewall.allowedUDPPorts = [ ... ]; | |
# Or disable the firewall altogether. | |
# networking.firewall.enable = false; | |
# This value determines the NixOS release from which the default | |
# settings for stateful data, like file locations and database versions | |
# on your system were taken. It‘s perfectly fine and recommended to leave | |
# this value at the release version of the first install of this system. | |
# Before changing this value read the documentation for this option | |
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). | |
system.stateVersion = "23.05"; # Did you read the comment? | |
xdg.portal = { | |
enable = true; | |
extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; | |
}; | |
home-manager = { | |
users = let | |
user_config = { | |
xfconf.enable = true; | |
xfconf.settings."xfce4-keyboard-shortcuts" = { | |
"<Super>space" = "rofi -show drun"; | |
"<Super>space" = "rofi -show drun"; | |
}; | |
home.stateVersion = "23.05"; | |
home.file.".config/nvim" = { | |
source = pkgs.fetchFromGitHub { | |
owner = "jaythomas"; | |
repo = "nvim-config"; | |
rev = "0024f35ca96cea0bade5fd1692fcf323eb4c37f8"; | |
sha256 = "sha256-qd6XbNuqVHbqKvgnb3/es4qCpu2iHuDTfvbb1y0bafA="; | |
}; | |
}; | |
home.file.".tmux.conf" = { | |
source = ''${(pkgs.fetchFromGitHub { | |
owner = "jaythomas"; | |
repo = "dotfiles"; | |
rev = "9e8c44026ceef79414da07bf464506ddae5f7886"; | |
sha256 = "sha256-qkEbAE5f8VfPddDEwlveOUvhlfa+Jym8ghIqxYJdAek="; | |
})}/.tmux.conf''; | |
}; | |
home.file.".config/ripgrep.conf" = { | |
source = ''${(pkgs.fetchFromGitHub { | |
owner = "jaythomas"; | |
repo = "dotfiles"; | |
rev = "9e8c44026ceef79414da07bf464506ddae5f7886"; | |
sha256 = "sha256-qkEbAE5f8VfPddDEwlveOUvhlfa+Jym8ghIqxYJdAek="; | |
})}/.config/ripgrep.conf''; | |
}; | |
home.file.".config/rofi" = { | |
source = ''${(pkgs.fetchFromGitHub { | |
owner = "jaythomas"; | |
repo = "dotfiles"; | |
rev = "9e8c44026ceef79414da07bf464506ddae5f7886"; | |
sha256 = "sha256-qkEbAE5f8VfPddDEwlveOUvhlfa+Jym8ghIqxYJdAek="; | |
})}/.config/rofi''; | |
}; | |
home.file.".config/terminator" = { | |
source = ''${(pkgs.fetchFromGitHub { | |
owner = "jaythomas"; | |
repo = "dotfiles"; | |
rev = "9e8c44026ceef79414da07bf464506ddae5f7886"; | |
sha256 = "sha256-qkEbAE5f8VfPddDEwlveOUvhlfa+Jym8ghIqxYJdAek="; | |
})}/.config/terminator''; | |
}; | |
}; | |
in { | |
lite = user_config; | |
root = user_config; | |
}; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment