initial commit

This commit is contained in:
Cameron Reed 2023-08-27 17:14:35 -06:00
commit 5d377f70c0
12 changed files with 245 additions and 0 deletions

17
bootloader.nix Normal file
View File

@ -0,0 +1,17 @@
{ ... }:
{
boot.loader = {
efi.canTouchEfiVariables = true;
systemd-boot = {
enable = true;
editor = false;
configurationLimit = 5;
extraInstallCommands = ''
sed -i 's/^version Generation \([0-9]\+\).*$/version Generation \1/' /boot/loader/entries/nixos-generation-*
sed -i 's/^default .*$/default 00-arch.conf/' /boot/loader/loader.conf
'';
};
};
}

37
configuration.nix Normal file
View File

@ -0,0 +1,37 @@
# 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 = [
# Include the results of the hardware scan.
./hardware-configuration.nix
./bootloader.nix
./filesystems.nix
./time.nix
./networking.nix
./locale.nix
./xserver.nix
./printing.nix
./sound.nix
./packages.nix
# User configuration
./users/configuration.nix
];
# 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. Its 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?
# system.autoUpgrade.enable = true;
# system.autoUpgrade.allowReboot = false;
}

9
filesystems.nix Normal file
View File

@ -0,0 +1,9 @@
{ ... }:
{
fileSystems."/home" = {
# Disable checking /home partition with fsck
# Arch has a newer version than Nix, so it errors
noCheck = true;
};
}

19
locale.nix Normal file
View File

@ -0,0 +1,19 @@
{ ... }:
{
i18n = {
defaultLocale = "en_US.UTF-8";
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";
};
};
}

22
networking.nix Normal file
View File

@ -0,0 +1,22 @@
{ ... }:
{
networking = {
hostName = "nixos";
networkmanager = {
enable = true;
};
firewall = {
allowedTCPPortRanges = [
# GSConnect
{ from = 1714; to = 1764; }
];
allowedUDPPortRanges = [
# GSConnect
{ from = 1714; to = 1764; }
];
};
};
}

43
packages.nix Normal file
View File

@ -0,0 +1,43 @@
{ pkgs, ... }:
{
programs = {
zsh.enable = true;
vim.defaultEditor = true;
sway = {
enable = true;
extraPackages = with pkgs; [
swaylock
swayidle
dmenu
wmenu
i3status
brightnessctl
wob
];
};
};
environment.systemPackages = with pkgs; [
vim
wget
kitty
ranger
firefox
gnome.gnome-tweaks
];
environment.gnome.excludePackages = with pkgs; [
gnome-tour
gnome-console
epiphany
gnome.geary
];
environment.shells = with pkgs; [ bash zsh ];
xdg.portal.wlr.enable = true;
nixpkgs.config.allowUnfree = true;
}

7
printing.nix Normal file
View File

@ -0,0 +1,7 @@
{ ... }:
{
services.printing = {
enable = true;
};
}

23
sound.nix Normal file
View File

@ -0,0 +1,23 @@
{ ... }:
{
sound.enable = true;
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa = {
enable = true;
support32Bit = true;
};
pulse.enable = true;
# jack.enable = true
wireplumber.enable = true;
};
}

5
time.nix Normal file
View File

@ -0,0 +1,5 @@
{ ... }:
{
time.timeZone = "America/Denver";
}

30
users/cameron.nix Normal file
View File

@ -0,0 +1,30 @@
{ pkgs, ... }:
{
users = {
groups.cameron.gid = 1000;
users.cameron = {
description = "Cameron";
isNormalUser = true;
uid = 1000;
group = "cameron";
extraGroups = [ "networkmanager" "wheel" ];
home = "/home/cameron-nix";
createHome = true;
shell = pkgs.zsh;
packages = (with pkgs; [
direnv
nix-direnv
bibata-cursors
bibata-cursors-translucent
]) ++ (with pkgs.gnomeExtensions; [
gsconnect
dock-from-dash
]);
};
};
}

11
users/configuration.nix Normal file
View File

@ -0,0 +1,11 @@
{ pkgs, ... }:
{
users = {
defaultUserShell = pkgs.bash;
};
imports = [
./cameron.nix
];
}

22
xserver.nix Normal file
View File

@ -0,0 +1,22 @@
{ pkgs, ... }:
{
services.xserver = {
# Enable X11. GDM won't launch without it
enable = true;
layout = "us";
libinput = {
touchpad = {
tapping = true;
};
};
# Enable GNOME and its display manager, GDM
desktopManager.gnome.enable = true;
displayManager.gdm.enable = true;
# I don't need xterm
excludePackages = [ pkgs.xterm ];
};
}