mirror of
https://github.com/caperren/nixos-configs.git
synced 2025-11-09 12:11:13 +00:00
Compare commits
5 Commits
d0fe4b0a3b
...
4512c2f340
| Author | SHA1 | Date | |
|---|---|---|---|
| 4512c2f340 | |||
| f5d084dbd3 | |||
| a808f58b6e | |||
| 8777df84f3 | |||
| e5926f8e7e |
5
.gitignore
vendored
Normal file
5
.gitignore
vendored
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
/.idea/inspectionProfiles/profiles_settings.xml
|
||||||
|
/.idea/.gitignore
|
||||||
|
/.idea/modules.xml
|
||||||
|
/.idea/nixos.iml
|
||||||
|
/.idea/vcs.xml
|
||||||
12
flake.lock
generated
12
flake.lock
generated
@@ -7,11 +7,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1715077503,
|
"lastModified": 1722462338,
|
||||||
"narHash": "sha256-AfHQshzLQfUqk/efMtdebHaQHqVntCMjhymQzVFLes0=",
|
"narHash": "sha256-ss0G8t8RJVDewA3MyqgAlV951cWRK6EtVhVKEZ7J5LU=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "6e277d9566de9976f47228dd8c580b97488734d4",
|
"rev": "6e090576c4824b16e8759ebca3958c5b09659ee8",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -22,11 +22,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1715087517,
|
"lastModified": 1722421184,
|
||||||
"narHash": "sha256-CLU5Tsg24Ke4+7sH8azHWXKd0CFd4mhLWfhYgUiDBpQ=",
|
"narHash": "sha256-/DJBI6trCeVnasdjUo9pbnodCLZcFqnVZiLUfqLH4jA=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "b211b392b8486ee79df6cdfb1157ad2133427a29",
|
"rev": "9f918d616c5321ad374ae6cb5ea89c9e04bf3e58",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
@@ -10,9 +10,13 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, ... }@inputs: {
|
outputs =
|
||||||
|
{ self, nixpkgs, ... }@inputs:
|
||||||
|
{
|
||||||
nixosConfigurations.default = nixpkgs.lib.nixosSystem {
|
nixosConfigurations.default = nixpkgs.lib.nixosSystem {
|
||||||
specialArgs = {inherit inputs;};
|
specialArgs = {
|
||||||
|
inherit inputs;
|
||||||
|
};
|
||||||
modules = [
|
modules = [
|
||||||
./hosts/cap-nr200p/configuration.nix
|
./hosts/cap-nr200p/configuration.nix
|
||||||
./modules/nixos/hyprland.nix
|
./modules/nixos/hyprland.nix
|
||||||
|
|||||||
@@ -5,8 +5,8 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports = [
|
||||||
[ # Include the results of the hardware scan.
|
# Include the results of the hardware scan.
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -25,7 +25,10 @@
|
|||||||
networking.networkmanager.enable = true;
|
networking.networkmanager.enable = true;
|
||||||
|
|
||||||
# Enable flakes
|
# Enable flakes
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ]; #-#
|
nix.settings.experimental-features = [
|
||||||
|
"nix-command"
|
||||||
|
"flakes"
|
||||||
|
]; # -#
|
||||||
|
|
||||||
# Set your time zone.
|
# Set your time zone.
|
||||||
time.timeZone = "America/Los_Angeles";
|
time.timeZone = "America/Los_Angeles";
|
||||||
@@ -53,18 +56,15 @@
|
|||||||
# services.xserver.desktopManager.xfce.enable = true;
|
# services.xserver.desktopManager.xfce.enable = true;
|
||||||
|
|
||||||
# Configure keymap in X11
|
# Configure keymap in X11
|
||||||
services.xserver = {
|
services.xserver.xkb = {
|
||||||
layout = "us";
|
layout = "us";
|
||||||
xkbVariant = "";
|
variant = "";
|
||||||
};
|
};
|
||||||
# services.xserver.xkb.layout = "us";
|
|
||||||
# services.xserver.xkb.variant = "";
|
|
||||||
|
|
||||||
# Enable CUPS to print documents.
|
# Enable CUPS to print documents.
|
||||||
services.printing.enable = true;
|
services.printing.enable = true;
|
||||||
|
|
||||||
# Enable sound with pipewire.
|
# Enable sound with pipewire.
|
||||||
sound.enable = true;
|
|
||||||
hardware.pulseaudio.enable = false;
|
hardware.pulseaudio.enable = false;
|
||||||
security.rtkit.enable = true;
|
security.rtkit.enable = true;
|
||||||
services.pipewire = {
|
services.pipewire = {
|
||||||
@@ -87,14 +87,18 @@
|
|||||||
users.users.caperren = {
|
users.users.caperren = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
description = "Corwin Perren";
|
description = "Corwin Perren";
|
||||||
extraGroups = [ "networkmanager" "wheel" ];
|
extraGroups = [
|
||||||
|
"networkmanager"
|
||||||
|
"wheel"
|
||||||
|
"input"
|
||||||
|
];
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
# thunderbird
|
# thunderbird
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
# Install firefox.
|
# Install firefox.
|
||||||
programs.firefox.enable = true; #-#
|
programs.firefox.enable = true; # -#
|
||||||
|
|
||||||
# Allow unfree packages
|
# Allow unfree packages
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
@@ -106,8 +110,98 @@
|
|||||||
# wget
|
# wget
|
||||||
lf
|
lf
|
||||||
git
|
git
|
||||||
|
wofi
|
||||||
|
nvtopPackages.full
|
||||||
|
htop
|
||||||
|
iftop
|
||||||
|
iotop
|
||||||
|
pulsemixer
|
||||||
|
arandr
|
||||||
|
util-linux
|
||||||
|
usbutils
|
||||||
|
telegram-desktop
|
||||||
|
discord
|
||||||
|
# spotify
|
||||||
|
pavucontrol
|
||||||
|
networkmanagerapplet
|
||||||
|
pasystray
|
||||||
|
glava
|
||||||
|
spotify-player
|
||||||
|
hyprpicker
|
||||||
|
unetbootin
|
||||||
|
lf
|
||||||
|
dnsutils
|
||||||
|
unzip
|
||||||
|
playerctl
|
||||||
|
google-chrome
|
||||||
|
killall
|
||||||
|
jetbrains.pycharm-professional
|
||||||
|
wget
|
||||||
|
jq
|
||||||
|
rofi-bluetooth
|
||||||
|
wl-clipboard
|
||||||
|
networkmanager
|
||||||
|
alsaUtils
|
||||||
|
nixfmt-rfc-style
|
||||||
|
mako
|
||||||
|
podman
|
||||||
];
|
];
|
||||||
|
|
||||||
|
fonts.fontDir.enable = true;
|
||||||
|
fonts.fontconfig.enable = true;
|
||||||
|
fonts.fontconfig.antialias = true;
|
||||||
|
fonts.packages = with pkgs; [
|
||||||
|
noto-fonts
|
||||||
|
noto-fonts-emoji
|
||||||
|
liberation_ttf
|
||||||
|
fira-code
|
||||||
|
fira-code-symbols
|
||||||
|
jetbrains-mono
|
||||||
|
mplus-outline-fonts.githubRelease
|
||||||
|
dina-font
|
||||||
|
proggyfonts
|
||||||
|
font-awesome
|
||||||
|
nerdfonts
|
||||||
|
];
|
||||||
|
|
||||||
|
programs.thunar.enable = true;
|
||||||
|
programs.thunar.plugins = with pkgs.xfce; [
|
||||||
|
thunar-archive-plugin
|
||||||
|
thunar-volman
|
||||||
|
];
|
||||||
|
services.gvfs.enable = true; # Mount, trash, and other functionalities
|
||||||
|
services.tumbler.enable = true; # Thumbnail support for images
|
||||||
|
|
||||||
|
hardware.bluetooth.enable = true; # enables support for Bluetooth
|
||||||
|
hardware.bluetooth.powerOnBoot = true; # powers up the default Bluetooth controller on boot
|
||||||
|
services.blueman.enable = true;
|
||||||
|
|
||||||
|
security.sudo = {
|
||||||
|
enable = true;
|
||||||
|
extraRules = [
|
||||||
|
{
|
||||||
|
commands = [
|
||||||
|
{
|
||||||
|
command = "${pkgs.systemd}/bin/reboot";
|
||||||
|
options = [ "NOPASSWD" ];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
command = "${pkgs.systemd}/bin/poweroff";
|
||||||
|
options = [ "NOPASSWD" ];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
groups = [ "wheel" ];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.steam = {
|
||||||
|
enable = true;
|
||||||
|
remotePlay.openFirewall = true;
|
||||||
|
dedicatedServer.openFirewall = true;
|
||||||
|
gamescopeSession.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
# Some programs need SUID wrappers, can be configured further or are
|
# Some programs need SUID wrappers, can be configured further or are
|
||||||
# started in user sessions.
|
# started in user sessions.
|
||||||
# programs.mtr.enable = true;
|
# programs.mtr.enable = true;
|
||||||
@@ -119,7 +213,7 @@
|
|||||||
# List services that you want to enable:
|
# List services that you want to enable:
|
||||||
|
|
||||||
# Enable the OpenSSH daemon.
|
# Enable the OpenSSH daemon.
|
||||||
services.openssh.enable = true; #-#
|
services.openssh.enable = true; # -#
|
||||||
|
|
||||||
# Open ports in the firewall.
|
# Open ports in the firewall.
|
||||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||||
|
|||||||
@@ -1,27 +1,41 @@
|
|||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
# and may be overwritten by future invocations. Please make changes
|
# and may be overwritten by future invocations. Please make changes
|
||||||
# to /etc/nixos/configuration.nix instead.
|
# to /etc/nixos/configuration.nix instead.
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
|
||||||
];
|
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
boot.initrd.availableKernelModules = [
|
||||||
|
"nvme"
|
||||||
|
"xhci_pci"
|
||||||
|
"ahci"
|
||||||
|
"usbhid"
|
||||||
|
"usb_storage"
|
||||||
|
"sd_mod"
|
||||||
|
];
|
||||||
boot.initrd.kernelModules = [ ];
|
boot.initrd.kernelModules = [ ];
|
||||||
boot.kernelModules = [ "kvm-amd" ];
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" = {
|
||||||
{ device = "/dev/disk/by-uuid/0ffc75db-278d-4d96-99ee-4d17e6b1a9c2";
|
device = "/dev/disk/by-uuid/0ffc75db-278d-4d96-99ee-4d17e6b1a9c2";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" = {
|
||||||
{ device = "/dev/disk/by-uuid/5BDD-941D";
|
device = "/dev/disk/by-uuid/5BDD-941D";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
options = [ "fmask=0022" "dmask=0022" ];
|
options = [
|
||||||
|
"fmask=0022"
|
||||||
|
"dmask=0022"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [ ];
|
swapDevices = [ ];
|
||||||
|
|||||||
58
initial_setup.sh
Executable file
58
initial_setup.sh
Executable file
@@ -0,0 +1,58 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# To set up a fresh system, run the following:
|
||||||
|
# curl -sSL https://raw.githubusercontent.com/caperren/nixos-configs/main/initial_setup.sh | bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
SCRIPT_DIR=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")
|
||||||
|
|
||||||
|
GIT_REPO_NAME="nixos-configs"
|
||||||
|
GIT_RELEASE_BRANCH="playground"
|
||||||
|
GIT_REPO_URL="git@github.com:caperren/$GIT_REPO_NAME.git"
|
||||||
|
|
||||||
|
NIXOS_REPO_CONFIG_PARENT_PATH="/opt"
|
||||||
|
NIXOS_REPO_CONFIG_PATH="$NIXOS_REPO_CONFIG_PARENT_PATH/$GIT_REPO_NAME"
|
||||||
|
HOST_CONFIG_PATH="$NIXOS_REPO_CONFIG_PATH/hosts/$(hostname)"
|
||||||
|
|
||||||
|
# If the config repo doesn't exist, clone it
|
||||||
|
if [ ! -d "$NIXOS_REPO_CONFIG_PATH" ]; then
|
||||||
|
TEMP_CLONE_DIR="/home/$USER/$GIT_REPO_NAME"
|
||||||
|
|
||||||
|
if [[ ! -d "$NIXOS_REPO_CONFIG_PARENT_PATH" ]]; then
|
||||||
|
sudo mkdir -p "$NIXOS_REPO_CONFIG_PARENT_PATH"
|
||||||
|
fi
|
||||||
|
|
||||||
|
git clone "$GIT_REPO_URL" "$TEMP_CLONE_DIR" || true
|
||||||
|
|
||||||
|
sudo mv "$TEMP_CLONE_DIR" "$NIXOS_REPO_CONFIG_PARENT_PATH/."
|
||||||
|
cd "$NIXOS_REPO_CONFIG_PATH"
|
||||||
|
|
||||||
|
git checkout "$GIT_RELEASE_BRANCH"
|
||||||
|
|
||||||
|
sudo chown -R $USER:users "$NIXOS_REPO_CONFIG_PATH"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# If we're not running from the repo directory, this script launch is a setup bootstrap
|
||||||
|
# Exec the same script in the config repo, which should be the right one for the release branch
|
||||||
|
# we want
|
||||||
|
if [[ "$SCRIPT_DIR" != "$NIXOS_REPO_CONFIG_PATH" ]]; then
|
||||||
|
exec "$NIXOS_REPO_CONFIG_PATH/initial_setup.sh"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
# If this is a new host, create the config path
|
||||||
|
if [ ! -d "$HOST_CONFIG_PATH" ]; then
|
||||||
|
mkdir -p "$HOST_CONFIG_PATH"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Copy initial config files from nixos setup, and symlink to our repo, if not set up yet
|
||||||
|
if [ ! -L "/etc/nixos" ]; then
|
||||||
|
# Copy the existing config files
|
||||||
|
cp /etc/nixos/configuration.nix "$HOST_CONFIG_PATH/."
|
||||||
|
cp /etc/nixos/hardware-configuration.nix "$HOST_CONFIG_PATH/."
|
||||||
|
|
||||||
|
# Backup the existing nixos config folder
|
||||||
|
sudo mv /etc/nixos /etc/nixos_bkp
|
||||||
|
|
||||||
|
# Create symlink
|
||||||
|
sudo ln -s "$NIXOS_REPO_CONFIG_PATH" /etc/nixos
|
||||||
|
fi
|
||||||
@@ -1,12 +1,23 @@
|
|||||||
{ pkgs, config, ... }: {
|
{ pkgs, config, ... }:
|
||||||
|
{
|
||||||
programs.hyprland = {
|
programs.hyprland = {
|
||||||
enable = true;
|
enable = true;
|
||||||
xwayland.enable = true;
|
xwayland.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
security.rtkit.enable = true;
|
||||||
|
services.pipewire = {
|
||||||
|
enable = true;
|
||||||
|
alsa.enable = true;
|
||||||
|
alsa.support32Bit = true;
|
||||||
|
pulse.enable = true;
|
||||||
|
# If you want to use JACK applications, uncomment this
|
||||||
|
#jack.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
environment.sessionVariables = {
|
environment.sessionVariables = {
|
||||||
# If your cursor becomes invisible
|
# If your cursor becomes invisible
|
||||||
# WLR_NO_HARDWARE_CURSORS = "1";
|
WLR_NO_HARDWARE_CURSORS = "1";
|
||||||
# Hint electron apps to use wayland
|
# Hint electron apps to use wayland
|
||||||
NIXOS_OZONE_WL = "1";
|
NIXOS_OZONE_WL = "1";
|
||||||
};
|
};
|
||||||
@@ -20,10 +31,14 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
hardware.opengl = {
|
services.displayManager.autoLogin = {
|
||||||
enable = true;
|
enable = true;
|
||||||
driSupport = true;
|
user = "caperren";
|
||||||
driSupport32Bit = true;
|
};
|
||||||
|
|
||||||
|
hardware.graphics = {
|
||||||
|
enable = true;
|
||||||
|
enable32Bit = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
hardware.nvidia = {
|
hardware.nvidia = {
|
||||||
@@ -43,11 +58,15 @@
|
|||||||
pkgs.dunst
|
pkgs.dunst
|
||||||
pkgs.libnotify
|
pkgs.libnotify
|
||||||
pkgs.rofi-wayland
|
pkgs.rofi-wayland
|
||||||
|
pkgs.nwg-look
|
||||||
|
pkgs.desktop-file-utils
|
||||||
|
pkgs.grim
|
||||||
|
pkgs.slurp
|
||||||
|
pkgs.nwg-displays
|
||||||
|
|
||||||
#(pkgs.waybar.overrideAttrs (oldAttrs: {
|
(pkgs.waybar.overrideAttrs (oldAttrs: {
|
||||||
# mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ];
|
mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ];
|
||||||
# })
|
}))
|
||||||
#)
|
|
||||||
];
|
];
|
||||||
|
|
||||||
xdg.portal.enable = true;
|
xdg.portal.enable = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user