Compare commits
No commits in common. "0b4b950ad14e3e1c361e1978d511a1f9223d871c" and "ed505c448eaacdde21e93fd5e5a08b51a60a414a" have entirely different histories.
0b4b950ad1
...
ed505c448e
26
flake.nix
26
flake.nix
@ -22,39 +22,39 @@
|
||||
inherit (self) outputs;
|
||||
system = "x86_64-linux";
|
||||
userName = "nate";
|
||||
fullName = "Nate Anderson";
|
||||
email = "n8r@tuta.io";
|
||||
hostName = "winmax";
|
||||
desktop = "sway";
|
||||
gaming = true;
|
||||
timeZone = "America/Denver";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
stablePkgs = nixpkgs-stable.legacyPackages.${system};
|
||||
stablePkgs = import nixpkgs-stable {
|
||||
legacyPackages = system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
in
|
||||
{
|
||||
|
||||
nixosConfigurations = {
|
||||
nixServer = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
./nixos/server_configuration.nix
|
||||
./nixos/configuration.nix
|
||||
inputs.home-manager.nixosModules.default
|
||||
];
|
||||
};
|
||||
nixDesktop = nixpkgs.lib.nixosSystem {
|
||||
# Pass args to desktop configuration
|
||||
|
||||
nixSway = nixpkgs.lib.nixosSystem {
|
||||
# Pass args to sway_configuration
|
||||
specialArgs = {
|
||||
inherit inputs outputs userName hostName desktop timeZone gaming;
|
||||
inherit inputs;
|
||||
inherit userName;
|
||||
inherit hostName;
|
||||
};
|
||||
modules = [
|
||||
./nixos/desktop_configuration.nix
|
||||
./nixos/sway_configuration.nix
|
||||
# Setup home manager
|
||||
home-manager.nixosModules.home-manager {
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.${userName} = import ./modules/home-manager/home.nix;
|
||||
home-manager.extraSpecialArgs = {
|
||||
inherit inputs outputs userName fullName email hostName desktop gaming;
|
||||
inherit inputs outputs userName hostName;
|
||||
};
|
||||
}
|
||||
];
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ inputs, outputs, lib, config, pkgs, userName, fullName, email, hostName, desktop, gaming, ... }:
|
||||
{ inputs, outputs, lib, config, pkgs, userName, hostName, ... }:
|
||||
{
|
||||
# Home Manager needs a bit of information about you and the paths it should
|
||||
# manage.
|
||||
@ -37,7 +37,7 @@
|
||||
wofi
|
||||
xfce.thunar
|
||||
# Install fonts
|
||||
(nerdfonts.override { fonts = [ "Hermit" "Overpass" ]; })
|
||||
(nerdfonts.override { fonts = [ "Hermit" ]; })
|
||||
overpass
|
||||
|
||||
# # You can also create simple shell scripts directly inside your
|
||||
@ -87,27 +87,27 @@
|
||||
|
||||
wayland.windowManager.sway = {
|
||||
enable = true;
|
||||
# config = rec {
|
||||
# modifier = "Mod4";
|
||||
# terminal = "foot";
|
||||
# # startup = [
|
||||
# # {command = "firefox";}
|
||||
# # ];
|
||||
# };
|
||||
config = rec {
|
||||
modifier = "Mod4";
|
||||
terminal = "foot";
|
||||
# startup = [
|
||||
# {command = "firefox";}
|
||||
# ];
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
# kdeconnect setup
|
||||
# services.kdeconnect = {
|
||||
# enable = true;
|
||||
# indicator = true;
|
||||
# };
|
||||
services.kdeconnect = {
|
||||
enable = true;
|
||||
indicator = true;
|
||||
};
|
||||
|
||||
# Git setup
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userEmail = email;
|
||||
userName = fullName;
|
||||
userEmail = "n8r@tuta.io";
|
||||
userName = "Nate Anderson";
|
||||
};
|
||||
|
||||
# Zsh setup
|
||||
|
@ -1,117 +0,0 @@
|
||||
{ lib, config, pkgs, ... }:
|
||||
{
|
||||
options.swaywm = {
|
||||
enable = lib.mkEnableOption "Enable sway window manager.";
|
||||
useNonFree = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
description = "Whether to enable non-free software in the sway config";
|
||||
};
|
||||
installGaming = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
description = "Whether to install gaming software on the system.";
|
||||
};
|
||||
systemPackages = lib.mkOption {
|
||||
default = [];
|
||||
description = "Add any additional packages desired. Merged with sway defaults.";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
config = lib.mkIf config.swaywm.enable {
|
||||
|
||||
nixpkgs.config.allowUnfree = config.swaywm.useNonFree;
|
||||
|
||||
###
|
||||
## XDG portal setup
|
||||
###
|
||||
xdg.portal = {
|
||||
config = {
|
||||
common = {
|
||||
default = [
|
||||
"wlr"
|
||||
];
|
||||
};
|
||||
};
|
||||
extraPortals = with pkgs; [
|
||||
# xdg-desktop-portal-kde
|
||||
xdg-desktop-portal-gtk
|
||||
];
|
||||
wlr.enable = true;
|
||||
enable = true;
|
||||
};
|
||||
xdg.sounds.enable = true;
|
||||
|
||||
###
|
||||
## System Packages
|
||||
###
|
||||
environment.systemPackages = with pkgs; lib.lists.flatten [
|
||||
[
|
||||
git
|
||||
glib # gsettings
|
||||
grim
|
||||
pavucontrol
|
||||
slurp
|
||||
swaylock
|
||||
swayidle
|
||||
wl-clipboard
|
||||
xdg-utils
|
||||
zsh
|
||||
# Add to gaming only installs
|
||||
lutris
|
||||
wine-wayland
|
||||
# Video utils
|
||||
davinci-resolve-studio
|
||||
imv
|
||||
mpv
|
||||
gimp
|
||||
]
|
||||
config.swaywm.systemPackages
|
||||
# (lib.mkIf config.swaywm.installGaming [
|
||||
# pkgs.lutris
|
||||
# ])
|
||||
];
|
||||
|
||||
programs.zsh.enable = true;
|
||||
programs.steam.enable = config.swaywm.installGaming;
|
||||
|
||||
###
|
||||
## Services
|
||||
###
|
||||
services.openssh.enable = true;
|
||||
services.dbus.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
|
||||
# kdeconnect setup
|
||||
programs.kdeconnect.enable = true;
|
||||
|
||||
# Firewall
|
||||
# networking.firewall = {
|
||||
# enable = true;
|
||||
# allowedTCPPortRanges = [
|
||||
# {from = 1714; to = 1764;} # KDE Connnect
|
||||
# ];
|
||||
# allowedUDPPortRanges = [
|
||||
# {from = 1714; to = 1764;} # KDE Connnect
|
||||
# ];
|
||||
# };
|
||||
|
||||
###
|
||||
## Misc
|
||||
###
|
||||
sound.enable = true;
|
||||
# Necessary for home-manager sway setup
|
||||
security.polkit.enable = true;
|
||||
|
||||
hardware.opengl = {
|
||||
enable = true;
|
||||
driSupport = true;
|
||||
};
|
||||
|
||||
};
|
||||
}
|
@ -1,24 +0,0 @@
|
||||
|
||||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page, on
|
||||
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
|
||||
|
||||
{ config, lib, pkgs, userName, hostName, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
./sway_configuration.nix
|
||||
# ../modules/user/main_user.nix
|
||||
# ../modules/sway/sway_conf.nix
|
||||
];
|
||||
|
||||
# Enable flakes feature
|
||||
nix.settings.experimental-features = [
|
||||
"nix-command" "flakes"
|
||||
];
|
||||
|
||||
system.stateVersion = "23.11"; # Did you read the comment?
|
||||
}
|
||||
|
@ -1,54 +0,0 @@
|
||||
{ config, lib, inputs, outputs, pkgs, userName, hostName, desktop, timeZone, gaming, ... }:
|
||||
|
||||
let
|
||||
supportedDesktops = [ "sway" ];
|
||||
supportedDesktopsStr = lib.strings.concatStringsSep ", " supportedDesktops;
|
||||
in
|
||||
{
|
||||
assertions = [
|
||||
{
|
||||
assertion = builtins.elem desktop supportedDesktops;
|
||||
message = "Unsupported desktop environment: ${desktop}\nSupported DE's: ${supportedDesktopsStr}";
|
||||
}
|
||||
];
|
||||
|
||||
imports = [ # Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
../modules/user/main_user.nix
|
||||
../modules/sway/sway_conf.nix
|
||||
];
|
||||
|
||||
# Enable flakes feature
|
||||
nix.settings.experimental-features = [
|
||||
"nix-command" "flakes"
|
||||
];
|
||||
|
||||
# nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
networking.hostName = hostName; # Define your hostname.
|
||||
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
||||
|
||||
time.timeZone = timeZone;
|
||||
|
||||
main_user = {
|
||||
enable = true;
|
||||
userName = userName;
|
||||
isDesktopUser = true;
|
||||
};
|
||||
|
||||
swaywm = {
|
||||
enable = desktop == "sway";
|
||||
useNonFree = true;
|
||||
installGaming = gaming;
|
||||
systemPackages = [
|
||||
pkgs.libreoffice
|
||||
];
|
||||
};
|
||||
|
||||
system.stateVersion = "23.11"; # Did you read the comment?
|
||||
}
|
||||
|
160
nixos/sway_configuration.nix
Normal file
160
nixos/sway_configuration.nix
Normal file
@ -0,0 +1,160 @@
|
||||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page, on
|
||||
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
|
||||
|
||||
{ config, lib, pkgs, userName, hostName, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
../modules/user/main_user.nix
|
||||
];
|
||||
|
||||
# Enable flakes feature
|
||||
nix.settings.experimental-features = [
|
||||
"nix-command" "flakes"
|
||||
];
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
networking.hostName = hostName; # Define your hostname.
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "America/Denver";
|
||||
|
||||
# Configure network proxy if necessary
|
||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||
|
||||
# Select internationalisation properties.
|
||||
# i18n.defaultLocale = "en_US.UTF-8";
|
||||
# console = {
|
||||
# font = "Lat2-Terminus16";
|
||||
# keyMap = "us";
|
||||
# useXkbConfig = true; # use xkb.options in tty.
|
||||
# };
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
# services.xserver.enable = true;
|
||||
|
||||
|
||||
|
||||
|
||||
# Configure keymap in X11
|
||||
# services.xserver.xkb.layout = "us";
|
||||
# services.xserver.xkb.options = "eurosign:e,caps:escape";
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
# services.printing.enable = true;
|
||||
|
||||
sound.enable = true;
|
||||
# hardware.pulseaudio.enable = true;
|
||||
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
# services.xserver.libinput.enable = true;
|
||||
|
||||
# enable polkit for sway in home-manager
|
||||
security.polkit.enable = true;
|
||||
|
||||
hardware.opengl = {
|
||||
enable = true;
|
||||
driSupport = true;
|
||||
};
|
||||
|
||||
# Setup xdg portal for screen share
|
||||
xdg.portal = {
|
||||
config = {
|
||||
common = {
|
||||
default = [
|
||||
"wlr"
|
||||
];
|
||||
};
|
||||
};
|
||||
extraPortals = with pkgs; [
|
||||
# xdg-desktop-portal-kde
|
||||
xdg-desktop-portal-gtk
|
||||
];
|
||||
wlr.enable = true;
|
||||
enable = true;
|
||||
};
|
||||
xdg.sounds.enable = true;
|
||||
|
||||
main_user = {
|
||||
enable = true;
|
||||
userName = userName;
|
||||
isDesktopUser = true;
|
||||
};
|
||||
|
||||
programs.zsh.enable = true;
|
||||
programs.steam.enable = true;
|
||||
|
||||
# Corectrl from stable branch
|
||||
# inputs.nixpkgs-stable.lib.nixosSystem.programs.corectrl.enable = true;
|
||||
# programs.corectrl.enable = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
git
|
||||
glib # gsettings
|
||||
grim
|
||||
pavucontrol
|
||||
slurp
|
||||
swaylock
|
||||
swayidle
|
||||
wget
|
||||
wl-clipboard
|
||||
xdg-utils
|
||||
zsh
|
||||
];
|
||||
|
||||
# Services
|
||||
services.flatpak.enable = true;
|
||||
services.openssh.enable = true;
|
||||
services.dbus.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
|
||||
# Firewall
|
||||
networking.firewall = {
|
||||
enable = true;
|
||||
allowedTCPPortRanges = [
|
||||
{from = 1714; to = 1764;} # KDE Connnect
|
||||
];
|
||||
allowedUDPPortRanges = [
|
||||
{from = 1714; to = 1764;} # KDE Connnect
|
||||
];
|
||||
};
|
||||
|
||||
# Copy the NixOS configuration file and link it from the resulting system
|
||||
# (/run/current-system/configuration.nix). This is useful in case you
|
||||
# accidentally delete configuration.nix.
|
||||
# system.copySystemConfiguration = true;
|
||||
|
||||
# This option defines the first version of NixOS you have installed on this particular machine,
|
||||
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
|
||||
#
|
||||
# Most users should NEVER change this value after the initial install, for any reason,
|
||||
# even if you've upgraded your system to a new NixOS release.
|
||||
#
|
||||
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
|
||||
# so changing it will NOT upgrade your system.
|
||||
#
|
||||
# This value being lower than the current NixOS release does NOT mean your system is
|
||||
# out of date, out of support, or vulnerable.
|
||||
#
|
||||
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
|
||||
# and migrated your data accordingly.
|
||||
#
|
||||
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
|
||||
system.stateVersion = "23.11"; # Did you read the comment?
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user