Merge pull request 'Adhere to NixOS systems' (#1) from suite-switch into master

Reviewed-on: #1
This commit is contained in:
Wyatt J. Miller 2024-09-08 15:52:46 -05:00
commit 5f45489bc2
24 changed files with 859 additions and 161 deletions

234
defaults/sway/config Normal file
View File

@ -0,0 +1,234 @@
### Variables
# Logo key
set $mod Mod4
# Direction keys
set $left h
set $down j
set $up k
set $right l
# Alacritty
set $term alacritty
# Menu (rofi)
set $rofi_cmd rofi -terminal '$term'
set $menu $rofi_cmd -show combi -combi-modes drun#run -modes combi
### Output configuration
output DP-3 pos 3840 0 res 1920x1080@59Hz
output HDMI-A-1 pos 0 0 res 1920x1080@59Hz
output DP-2 pos 1920 0 res 1920x1080@60Hz
### Wallpaper
output HDMI-A-1 bg ~/.wallpaper/.wallpaper.png fill
output DP-2 bg ~/.wallpaper/.wallpaper.png fill
output DP-3 bg ~/.wallpaper/.wallpaper.png fill
### Workspace binding
## DP-3 bindings
workspace 1 output DP-2
workspace 2 output DP-2
## HDMI-A-1 bindings
workspace 3 output HDMI-A-1
## DP-2 bindings
workspace 6 output DP-3
workspace 7 output DP-3
### Colour options
set $bg #24283b
set $bg-inactive #323232
set $bg-urgent #000000
set $text #eeeeec
set $text-inactive #babdb6
set $bar #323232
set $statusline #e0e0e0
client.focused $bg $bg $text $bg $bg
client.unfocused $bg-inactive $bg-inactive $text-inactive $bar $bar
client.focused_inactive $bg-inactive $bg-inactive $text-inactive $bar $bar
client.urgent $bg-urgent $bg-urgent $text $bar $bar
### Idle configuration
# exec swayidle -w \
# timeout 600 'swaylock -f -i /home/wyatt/.wallpaper_lock.jpeg' \
# timeout 1200 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
# before-sleep 'swaylock -f -c 000000'
# Workspaces
set $workspace_www 1
set $workspace_editor 2
set $workspace_terminals 3
set $workspace_documents 4
set $workspace_multimedia 5
# Gaps
floating_modifier $mod normal
### Key bindings
# Start a terminal
bindsym $mod+Return exec $term
# Kill focused window
bindsym $mod+Shift+q kill
# Start your launcher
bindsym $mod+d exec $menu
# Drag floating windows by holding down $mod and left mouse button.
# Resize them with right mouse button + $mod.
# Despite the name, also works for non-floating windows.
# Change normal to inverse to use left mouse button for resizing and right
# mouse button for dragging.
floating_modifier $mod normal
# Reload the configuration file
bindsym $mod+Shift+c reload
# Exit sway (logs you out of your Wayland session)
bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'
### Navigation
# Move your focus around
bindsym $mod+$left focus left
bindsym $mod+$down focus down
bindsym $mod+$up focus up
bindsym $mod+$right focus right
# Or use $mod+[up|down|left|right]
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# Move the focused window with the same, but add Shift
bindsym $mod+Shift+$left move left
bindsym $mod+Shift+$down move down
bindsym $mod+Shift+$up move up
bindsym $mod+Shift+$right move right
# Ditto, with arrow keys
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
### Workspaces
# Switch to workspace
bindsym $mod+1 workspace $workspace_www
bindsym $mod+2 workspace $workspace_editor
bindsym $mod+3 workspace $workspace_terminals
bindsym $mod+4 workspace $workspace_documents
bindsym $mod+5 workspace $workspace_multimedia
bindsym $mod+6 workspace number 6
bindsym $mod+7 workspace number 7
bindsym $mod+8 workspace number 8
bindsym $mod+9 workspace number 9
bindsym $mod+0 workspace number 10
# Move focused container to workspace
bindsym $mod+Shift+1 move container to workspace $workspace_www
bindsym $mod+Shift+2 move container to workspace $workspace_editor
bindsym $mod+Shift+3 move container to workspace $workspace_terminals
bindsym $mod+Shift+4 move container to workspace $workspace_documents
bindsym $mod+Shift+5 move container to workspace $workspace_multimedia
bindsym $mod+Shift+6 move container to workspace number 6
bindsym $mod+Shift+7 move container to workspace number 7
bindsym $mod+Shift+8 move container to workspace number 8
bindsym $mod+Shift+9 move container to workspace number 9
bindsym $mod+Shift+0 move container to workspace number 10
# Note: workspaces can have any name you want, not just numbers.
# We just use 1-10 as the default.
### Layout
bindsym $mod+b splith
bindsym $mod+v splitv
# Switch the current container between different layout styles
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
# Make the current focus fullscreen
bindsym $mod+f fullscreen
# Toggle the current focus between tiling and floating mode
bindsym $mod+Shift+space floating toggle
# Swap focus between the tiling area and the floating area
bindsym $mod+space focus mode_toggle
# Move focus to the parent container
bindsym $mod+a focus parent
### Taking screenshots
# Take a screenshot of all monitors
bindsym Print exec grim -t jpeg ~/Pictures/Screenshots/$(date +%Y-%m-%d_%H-%m-%s).jpg
# Take a screenshot of a given selection
bindsym $mod+Print exec grim -t jpeg -g "$(slurp)" ~/Pictures/Screenshots/$(date +%Y-%m-%d_%H-%m-%s).jpeg
### Resizing containers
mode "resize" {
bindsym $left resize shrink width 10px
bindsym $down resize grow height 10px
bindsym $up resize shrink height 10px
bindsym $right resize grow width 10px
bindsym Left resize shrink width 10px
bindsym Down resize grow height 10px
bindsym Up resize shrink height 10px
bindsym Right resize grow width 10px
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+r mode "resize"
### Audio and brightness keybinds
bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5%
bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%
bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
bindsym XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle
bindsym XF86AudioPlay exec playerctl play-pause
bindsym XF86AudioNext exec playerctl next
bindsym XF86AudioPrev exec playerctl previous
bindsym XF86MonBrightnessUp exec light -A 5
bindsym XF86MonBrightnessDown exec light -U 5
### Lock the screen so my brother
### won't dick with my computer
bindsym $mod+Ctrl+l 'swaylock -f -i /home/wyatt/.wallpaper_lock.jpeg'
### Status Bar:
bar {
swaybar_command waybar
}
### Font settings:
font pango:FiraCode: 14px
### Window formatting
default_border none
default_border pixel 2
gaps inner 10px
# Applications
exec_always /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway
exec mako
#exec swww init
#exec bash /home/wyatt/.wallpaper/wallpaper.sh /home/wyatt/.wallpaper
set $opacity 1.00
for_window [class=".*"] opacity $opacity
for_window [app_id=".*"] opacity $opacity
# Disable locking when conditions are met
for_window [class="streaming_client"] inhibit_idle fullscreen
for_window [app_id="firefox"] inhibit_idle fullscreen
for_window [app_id="neovide"] inhibit_idle fullscreen
for_window [title="Beyond All Reason"] inhibit_idle fullscreen
include /etc/sway/config.d/*

64
defaults/waybar/config Normal file
View File

@ -0,0 +1,64 @@
{
"layer": "top",
"modules-left": ["sway/workspaces"],
"modules-center": ["clock"],
"modules-right": ["custom/playerctl", "custom/weather", "pulseaudio", "network", "tray"],
"sway/workspaces": {
"disable-scroll": true,
"all-outputs": true,
"format": "{name}: {icon}",
"format-icons": {
"1":"",
"2":"",
"3":"",
"4":"",
"5":"",
"6":"",
"urgent": "",
"focused": "",
"default": ""
}
},
"sway/window": {
"max-length": 50,
"tooltip": false
},
"clock": {
"format-alt": "{:%m-%d-%Y}",
"tooltip": false
},
"custom/weather": {
"format": "{} °",
"tooltip": true,
"interval": 3600,
"exec": "wttrbar --fahrenheit --main-indicator 'temp_F' --location 'Grand Rapids'",
"return-type": "json"
},
"network": {
"format-wifi": " {essid} ({signalStrength}%)",
"format-ethernet": " {ipaddr}",
"format-disconnected": "⚠ Disconnected",
"interval": 5,
"tooltip": false
},
"pulseaudio": {
"format": "{icon} {volume}%",
"format-bluetooth": "{icon} {volume}%",
"format-muted": "",
"format-icons": {
"headphones": "",
"phone": "",
"portable": "",
"car": "",
"default": ["", ""]
},
"tooltip": false
},
"custom/playerctl": {
"format": "♬ {}",
"max-length": 40,
"interval": 5,
"exec": "playerctl metadata --format '{{ artist }} - {{ title }}'",
"tooltip": false
},
}

74
defaults/waybar/style.css Normal file
View File

@ -0,0 +1,74 @@
* {
border: none;
border-radius: 0;
font-family: "Monaspace Krypton";
font-size: 13px;
min-height: 0;
}
window#waybar {
background: #1f2335;
border-bottom: 1px solid #24283b;
color: #c0caf5;
opacity: 0.808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808;
}
#workspaces button {
padding: 5px;
padding-left: 12px;
padding-right: 12px;
background: transparent;
color: #c0caf5;
border-bottom: 1px solid transparent;
}
#workspaces button.focused {
background: #c0caf5;
color: #1d2021;
border-bottom: 1px solid #c0caf5;
}
#cpu,
#memory,
#pulseaudio,
#network,
#battery,
#clock,
#custom-playerctl {
padding: 0 10px;
margin: 0 5px;
}
#battery.charging {
color: #9ece6a;
}
#battery.warning:not(.charging) {
color: #ff9e64;
}
@keyframes blink {
to {
background-color: #1d2021;
color: #ebdbb2;
}
}
#battery.critical:not(.charging) {
background: #f7768e;
color: #ebdbb2;
border-bottom: 1px solid #ebdbb2;
animation-name: blink;
animation-duration: 0.5s;
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
}
#network.disconnected {
color: #cc241d;
}
#pulseaudio.muted {
color: #cc241d;
}

View File

@ -23,7 +23,7 @@
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs-darwin"
"nixpkgs"
]
},
"locked": {
@ -41,27 +41,45 @@
"type": "github"
}
},
"nixpkgs": {
"nix-flatpak": {
"locked": {
"lastModified": 1722141560,
"narHash": "sha256-Ul3rIdesWaiW56PS/Ak3UlJdkwBrD4UcagCmXZR9Z7Y=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "038fb464fcfa79b4f08131b07f2d8c9a6bcc4160",
"lastModified": 1711997201,
"narHash": "sha256-J71xzQlVYsjagA4AsVwRazhBh2rZrPpKvxTgs6UzL7c=",
"owner": "gmodena",
"repo": "nix-flatpak",
"rev": "b76fa31346db7fc958a9898f3c594696ca71c4fd",
"type": "github"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
"owner": "gmodena",
"ref": "v0.4.1",
"repo": "nix-flatpak",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1725407940,
"narHash": "sha256-tiN5Rlg/jiY0tyky+soJZoRzLKbPyIdlQ77xVgREDNM=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "6f6c45b5134a8ee2e465164811e451dcb5ad86e3",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-24.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-darwin": {
"locked": {
"lastModified": 1722153173,
"narHash": "sha256-S46RmS9WkBOTLORpnWsNth4Ae6TlfJS9TKXqB55YQy4=",
"lastModified": 1725498621,
"narHash": "sha256-m12se55InZz03onhRji85deKJp4i0jrw980aDdxT0IM=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "7bba2df68503b68634e0070483ddaf6d59dc6530",
"rev": "0409a1b650bb50c225485f2ca21c325eb33f45c7",
"type": "github"
},
"original": {
@ -75,6 +93,7 @@
"inputs": {
"darwin": "darwin",
"home-manager": "home-manager",
"nix-flatpak": "nix-flatpak",
"nixpkgs": "nixpkgs",
"nixpkgs-darwin": "nixpkgs-darwin"
}

View File

@ -1,11 +1,12 @@
{
description = "Wyatt's nix configuration";
description = "Wyatt's nix configuration suite";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=v0.4.1";
nixpkgs-darwin.url = "github:nixos/nixpkgs/nixpkgs-24.05-darwin";
home-manager = {
url = "github:nix-community/home-manager/release-24.05";
inputs.nixpkgs.follows = "nixpkgs-darwin";
inputs.nixpkgs.follows = "nixpkgs";
};
darwin = {
url = "github:lnl7/nix-darwin";
@ -13,49 +14,67 @@
};
};
# The `outputs` function will return all the build results of the flake.
# A flake can have many use cases and different types of outputs,
# parameters in `outputs` are defined in `inputs` and can be referenced by their names.
# However, `self` is an exception, this special parameter points to the `outputs` itself (self-reference)
# The `@` syntax here is used to alias the attribute set of the inputs's parameter, making it convenient to use inside the function.
outputs = inputs @ {
self,
nixpkgs,
nix-flatpak,
darwin,
home-manager,
...
}: let
username = "wyatt";
useremail = "wyatt@wyattjmiller.com";
system = "aarch64-darwin"; # aarch64-darwin or x86_64-darwin
hostname = "sephiroth";
specialArgs =
inputs
// {
inherit username useremail hostname;
};
userName = "wyatt";
userEmail = "wyatt@wyattjmiller.com";
extraSpecialArgs = {
inherit userName userEmail;
};
in {
darwinConfigurations."${hostname}" = darwin.lib.darwinSystem {
inherit system specialArgs;
# Primary laptop - MacBook Pro (2023, M3)
darwinConfigurations."sephiroth" = darwin.lib.darwinSystem {
system = "aarch64-darwin";
specialArgs = {
inherit userName userEmail;
hostname = "sephiroth";
};
modules = [
./modules/nix-core.nix
./modules/system.nix
./modules/apps.nix
./modules/darwin/configuration.nix
./modules/darwin/apps.nix
./modules/host-users.nix
# home manager
home-manager.darwinModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = specialArgs;
home-manager.users.${username} = import ./home;
home-manager.extraSpecialArgs = extraSpecialArgs;
home-manager.users.${userName} = import ./home;
}
];
};
# nix code formatter
formatter.${system} = nixpkgs.legacyPackages.${system}.alejandra;
# Primary desktop computer
nixosConfiguration."cloud" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {
inherit userName userEmail;
hostname = "cloud";
};
modules = [
/etc/nixos/configuration.nix
./modules/nix-core.nix
./modules/nixos/configuration.nix
./modules/host-users.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = extraSpecialArgs;
home-manager.users.${userName}.imports = [
nix-flatpak.homeManagerModules.nix-flatpak
./home
];
}
];
};
};
}

View File

@ -1,9 +1,6 @@
{ ... }:
{
{...}: {
programs.atuin = {
enable = true;
enableFishIntegration = true;
};
}

5
home/browser.nix Normal file
View File

@ -0,0 +1,5 @@
{pkgs, ...}: {
programs.firefox = {
enable = pkgs.stdenv.isLinux;
};
}

View File

@ -9,15 +9,17 @@
p7zip
# utils
bat # a batter cat
lazygit # a git tui that's easy to use
bottom # a better top
ripgrep # recursively searches directories for a regex pattern
jq # A lightweight and flexible command-line JSON processor
yq-go # yaml processer https://github.com/mikefarah/yq
fzf # A command-line fuzzy finder
fh # flake hub command line interface
aria2 # A lightweight multi-protocol & multi-source command-line download utility
zellij
tmux
bat
lazygit
bottom
ripgrep
jq
yq-go
fzf
fh
aria2
yt-dlp
# misc
@ -27,7 +29,6 @@
tree
gnutar
gnupg
tmux
nerdfonts
zoxide
babelfish
@ -41,12 +42,15 @@
nixd
deadnix
alejandra
statix
# productivity
iterm2
discord
obsidian
vscode
weechat
# iamb
ollama
# games?

View File

@ -1,7 +1,9 @@
{ username, ... }:
{
# import sub modules
pkgs,
userName,
...
}: {
# Import sub modules
imports = [
./atuin.nix
./shell.nix
@ -11,22 +13,21 @@
./eza.nix
./neovim.nix
./direnv.nix
./sway.nix
./terminal.nix
];
# Home Manager needs a bit of information about you and the
# paths it should manage.
home = {
username = username;
homeDirectory = "/Users/${username}";
# This value determines the Home Manager release that your
# configuration is compatible with. This helps avoid breakage
# when a new Home Manager release introduces backwards
# incompatible changes.
#
# You can update Home Manager without changing this value. See
# the Home Manager release notes for a list of state version
# changes in each release.
username = userName;
homeDirectory =
if pkgs.stdenv.isDarwin
then "/Users/${userName}"
else "/home/${userName}";
sessionVariables = {
XDG_CURRENT_DESKTOP = "sway";
};
stateVersion = "24.05";
};

View File

@ -1,6 +1,4 @@
{ lib, config, ... }:
{
{...}: {
programs.direnv = {
enable = true;
nix-direnv.enable = true;

View File

@ -1,6 +1,4 @@
{ lib, config, ... }:
{
{...}: {
programs.eza = {
enable = true;
enableFishIntegration = true;

22
home/flatpak.nix Normal file
View File

@ -0,0 +1,22 @@
{...}: {
services.flatpak = {
remotes = [
{
name = "flathub";
location = "https://dl.flathub.org/repo/flathub..flatpakrepo";
}
];
packages = [
"com.github.tchx84.Flatseal"
"com.slack.Slack"
"dev.goats.xivlauncher"
"info.beyondallreason.bar"
"io.dbeaver.DBeaverCommunity"
"io.openrct.OpenRCT2"
"md.obsidian.Obsidian"
"org.prismlauncher.PrismLauncher"
"sh.cider.Cider"
];
};
}

View File

@ -1,6 +1,6 @@
{
lib,
useremail,
userEmail,
...
}: {
# `programs.git` will generate the config file: ~/.config/git/config
@ -14,7 +14,7 @@
programs.git = {
enable = true;
userName = "Wyatt J. Miller";
userEmail = useremail;
userEmail = userEmail;
extraConfig = {
init.defaultBranch = "master";

10
home/hyprland.nix Normal file
View File

@ -0,0 +1,10 @@
{pkgs, ...}: {
wayland.windowManager.hyprland = {
enable = false; # TODO: to enable later
plugins = with pkgs; [
hyprtrails
hy3
];
xwayland = false; # TODO: to enable later
};
}

View File

@ -1,6 +1,4 @@
{ ... }:
{
{...}: {
programs.lazygit = {
enable = true;

View File

@ -1,6 +1,4 @@
{ lib, config, ... }:
{
{...}: {
programs.neovim = {
enable = true;
defaultEditor = true;

View File

@ -1,4 +1,4 @@
{ pkgs, ... }: {
{pkgs, ...}: {
programs.fish = {
enable = true;
# initExtra = ''
@ -7,18 +7,18 @@
shellAliases = {
# ls aliases
ls = "eza --color $argv";
la = "eza -l -all --color $argv";
ll = "eza -l --color $argv";
lt = "eza -l --color --git $argv";
ls = "eza --color";
la = "eza -l -all --color";
ll = "eza -l --color";
lt = "eza -l --color --git";
# lazygit alias
lg = "lazygit";
# cat, less, more alias
cat = "bat $argv";
less = "bat $argv";
more = "bat $argv";
cat = "bat";
less = "bat";
more = "bat";
# top alias
top = "btm";
@ -28,28 +28,28 @@
functions = {
fish_greeting = {
body = ''
set memes \
"Crazy? I was crazy once. They locked me in a room. A rubber room. A rubber room with rats. And rats make me crazy." \
"Daddy, chill!" \
"What the hell is even that?!" \
"Road work ahead? Yeah, I sure hope it does!" \
"Look at all those chickens!" \
"I smell like beef" \
"Say, Coloardo - I'M A GIRAFFE" \
"I didn't get no sleep cause of y'all, y'all not gone get any sleep cause of me!" \
"This is the dollar store, how good can it be?" \
"That was legitness" \
"Deez nuts" \
"I wanna be a cowboy baby" \
"Can I get a waffle? Can I please get a waffle?" \
"I'm lesbian. I thought you were American." \
"You gotta give 'em that 'hawk tuah' and spit on that thang!" \
"We don't do that here..."
set memes \
"Crazy? I was crazy once. They locked me in a room. A rubber room. A rubber room with rats. And rats make me crazy." \
"Daddy, chill!" \
"What the hell is even that?!" \
"Road work ahead? Yeah, I sure hope it does!" \
"Look at all those chickens!" \
"I smell like beef" \
"Say, Coloardo - I'M A GIRAFFE" \
"I didn't get no sleep cause of y'all, y'all not gone get any sleep cause of me!" \
"This is the dollar store, how good can it be?" \
"That was legitness" \
"Deez nuts" \
"I wanna be a cowboy baby" \
"Can I get a waffle? Can I please get a waffle?" \
"I'm lesbian. I thought you were American." \
"You gotta give 'em that 'hawk tuah' and spit on that thang!" \
"We don't do that here..."
set choose_meme (random)"%"(count $memes)
set choose_meme $memes[(math $choose_meme"+1")]
set choose_meme (random)"%"(count $memes)
set choose_meme $memes[(math $choose_meme"+1")]
printf (set_color F90)"%s\n" $choose_meme
printf (set_color F90)"%s\n" $choose_meme
'';
onEvent = "fish_greeting";
};

View File

@ -1,9 +1,7 @@
{ lib, config, ... }:
{
{...}: {
programs.starship = {
enable = true;
enableFishIntegration = true;
settings = { };
settings = {};
};
}

100
home/sway.nix Normal file
View File

@ -0,0 +1,100 @@
{pkgs, ...}: let
dirs = {
defaults = ./defaults;
};
in {
wayland.windowManager.sway = {
enable = pkgs.stdenv.isLinux;
extraOptions = []; # Extra arguments to pass into sway. If sway goes haywire, we might need something in here
xwayland = true;
systemd.enable = true;
wrapperFeatures = {
gtk = true;
};
};
programs.wofi.enable = pkgs.stdenv.isLinux;
programs.mako.enable = pkgs.stdenv.isLinux;
# programs.cliphist.enable = pkgs.stdenv.isLinux;
programs.waybar = {
enable = pkgs.stdenv.isLinux;
systemd.enable = true;
style = ''
* {
border: none;
border-radius: 0;
font-family: "Monaspace Krypton";
font-size: 13px;
min-height: 0;
}
window#waybar {
background: #1f2335;
border-bottom: 1px solid #24283b;
color: #c0caf5;
opacity: 0.808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808;
}
#workspaces button {
padding: 5px;
padding-left: 12px;
padding-right: 12px;
background: transparent;
color: #c0caf5;
border-bottom: 1px solid transparent;
}
#workspaces button.focused {
background: #c0caf5;
color: #1d2021;
border-bottom: 1px solid #c0caf5;
}
#cpu,
#memory,
#pulseaudio,
#network,
#battery,
#clock,
#custom-playerctl {
padding: 0 10px;
margin: 0 5px;
}
#battery.charging {
color: #9ece6a;
}
#battery.warning:not(.charging) {
color: #ff9e64;
}
@keyframes blink {
to {
background-color: #1d2021;
color: #ebdbb2;
}
}
#battery.critical:not(.charging) {
background: #f7768e;
color: #ebdbb2;
border-bottom: 1px solid #ebdbb2;
animation-name: blink;
animation-duration: 0.5s;
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
}
#network.disconnected {
color: #cc241d;
}
#pulseaudio.muted {
color: #cc241d;
}
'';
};
}

10
home/terminal.nix Normal file
View File

@ -0,0 +1,10 @@
{pkgs, ...}: {
programs.alacritty = {
enable = pkgs.stdenv.isLinux;
settings = {}; # TODO: this will be filled in the future
};
programs.kitty = {
enable = false; # TODO: to enable later
};
}

View File

@ -1,7 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
system = {
# activationScripts are executed every time you boot the system or run `nixos-rebuild` / `darwin-rebuild`.
activationScripts.postUserActivation.text = ''
@ -11,29 +8,29 @@
'';
defaults = {
menuExtraClock.Show24Hour = true; # show 24 hour clock
menuExtraClock.Show24Hour = true; # show 24 hour clock
# customize dock
# dock = {
# autohide = true;
# show-recents = false; # disable recent apps
dock = {
autohide = true;
# show-recents = false; # disable recent apps
# # customize Hot Corners
# wvous-tl-corner = 2; # top-left - Mission Control
# wvous-tr-corner = 13; # top-right - Lock Screen
# wvous-bl-corner = 3; # bottom-left - Application Windows
# wvous-br-corner = 4; # bottom-right - Desktop
# };
# # customize Hot Corners
# wvous-tl-corner = 2; # top-left - Mission Control
# wvous-tr-corner = 13; # top-right - Lock Screen
# wvous-bl-corner = 3; # bottom-left - Application Windows
# wvous-br-corner = 4; # bottom-right - Desktop
};
# # customize finder
# finder = {
# _FXShowPosixPathInTitle = true; # show full path in finder title
# AppleShowAllExtensions = true; # show all file extensions
# FXEnableExtensionChangeWarning = false; # disable warning when changing file extension
# QuitMenuItem = true; # enable quit menu item
# ShowPathbar = true; # show path bar
# ShowStatusBar = true; # show status bar
# };
finder = {
_FXShowPosixPathInTitle = true; # show full path in finder title
AppleShowAllExtensions = true; # show all file extensions
FXEnableExtensionChangeWarning = false; # disable warning when changing file extension
QuitMenuItem = true; # enable quit menu item
ShowPathbar = true; # show path bar
ShowStatusBar = true; # show status bar
};
# # customize trackpad
# trackpad = {
@ -56,9 +53,9 @@
# # If you press and hold certain keyboard keys when in a text area, the keys character begins to repeat.
# # This is very useful for vim users, they use `hjkl` to move cursor.
# # sets how long it takes before it starts repeating.
# InitialKeyRepeat = 15; # normal minimum is 15 (225 ms), maximum is 120 (1800 ms)
# InitialKeyRepeat = 15; # normal minimum is 15 (225 ms), maximum is 120 (1800 ms)
# # sets how fast it repeats once it starts.
# KeyRepeat = 3; # normal minimum is 2 (30 ms), maximum is 120 (1800 ms)
# KeyRepeat = 3; # normal minimum is 2 (30 ms), maximum is 120 (1800 ms)
# NSAutomaticCapitalizationEnabled = false; # disable auto capitalization
# NSAutomaticDashSubstitutionEnabled = false; # disable auto dash substitution
@ -138,7 +135,7 @@
# # NOTE: do NOT support remap capslock to both control and escape at the same time
# remapCapsLockToControl = false; # remap caps lock to control, useful for emac users
# remapCapsLockToEscape = true; # remap caps lock to escape, useful for vim users
# remapCapsLockToEscape = true; # remap caps lock to escape, useful for vim users
# # swap left command and left alt
# # so it matches common keyboard layout: `ctrl | command | alt`

View File

@ -1,23 +1,27 @@
{
username,
pkgs,
userName,
hostname,
...
} @ args:
#############################################################
#
# Host & Users configuration
#
#############################################################
{
} @ args: {
# Set up networking configuration
networking.hostName = hostname;
networking.computerName = hostname;
# networking.firewall.enable = true; # VERY important, do not touch
# networking.firewall.allowedTCPPorts = [];
# networking.firewall.allowedUDPPorts = [];
# networking.networkmanager.enable = pkgs.stdenv.isLinux; # Linux tool for managing network connections
system.defaults.smb.NetBIOSName = hostname;
# Define a user account. Don't forget to set a password with passwd.
users.users."${username}" = {
home = "/Users/${username}";
description = username;
# Set up user accounts
# Don't forget to set a password with passwd!
users.users."${userName}" = {
home =
if pkgs.stdenv.isDarwin
then "/Users/${userName}"
else "/home/${userName}";
description = userName;
};
nix.settings.trusted-users = [username];
nix.settings.trusted-users = [userName];
}

View File

@ -0,0 +1,148 @@
{
inputs,
config,
lib,
pkgs,
userName,
...
}: {
# Bring in the hardware configuration
imports = [
/etc/nixos/hardware-configuration.nix
];
# Enable flakes for NixOS
nix.settings.experimental-features = ["nix-command" "flakes"];
# Utilize systemd-boot
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
# Install and enable common graphics drivers
hardware.opengl = {
driSupport = true;
extraPackages = with pkgs; [
mesa_drivers
libvdpau-va-gl
libva
libva-utils
intel-vaapi-driver # for Intel
intel-media-driver # for Intel
rocm-opencl-icd # for AMD
];
};
# For systems with AMD graphics, this enables Vulkan on 32-bit applications
# For 64-bit application, however, Vulkan is enabled by default
hardware.graphics.driSupport32Bit = true;
# For systems with AMD graphics, enable AMDVLK
hardware.hardware = {
extraPackages = with pkgs; [
amdvlk
];
extraPackages32 = with pkgs; [
driversi686Linux
];
};
# Enable Bluetooth if present
hardware.bluetooth.enable = true;
# Set your timezone
time.timeZone = "America/Detroit";
# Enable Pipewire (sound)
services.pipewire = {
enable = true;
pulse.enable = true;
};
# Enable touchpad
services.libinput.enable = true;
# Install packages to be installed system-wide
environment.systemPackages = with pkgs; [
vim
neovim
git
wireguard-tools
podman
toolbox
grim
slurp
playerctl
light
brightnessctl
wttrbar
cliphist
];
# Install system-wide fonts
fonts.packages = with pkgs; [
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
liberation_ttf
monaspace
nerdfonts
];
# Set the EDITOR global environment variable to neovim
environment.variables.EDITOR = "nvim";
# Enable OpenSSH
services.openssh.enable = true;
# Enable keyring
services.gnome.gnome-keyring.enable = true;
# Enable GnuPG
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
# Enable SUID wrappers (some programs need them)
programs.mtr.enable = true;
# Enable Polkit
security.polkit.enable = true;
# Enable power management
powerManagement = {
enable = true;
powertop.enable = false; # TODO: to be enabled on laptops
cpuFreqGovernor = "performace";
};
# Enable Steam and open various firewall ports when applicable
programs.steam = {
enable = true;
remotePlay.openFirewall = true;
localNetworkGameTransfers = true;
};
# Add username to groups "wheel" and "video" - more may be added here later
users.users.${userName}.extraGroups = ["wheel" "video"];
# XDG stuff
xdg = {
portal = {
enable = true;
extraPortals = with pkgs; [
xdg-desktop-portal-wlr
xdg-desktop-portal-gtk
];
};
};
# Firewall stuff not allowed in common user and network creation
networking.firewall.enable = true; # VERY important, do not touch
# networking.firewall.allowedTCPPorts = [];
# networking.firewall.allowedUDPPorts = [];
networking.networkmanager.enable = true; # Linux tool for managing network connections
# Enable Flatpak (app containerization)
services.flatpak.enable = true;
}