Initial commit

This commit is contained in:
2024-05-29 15:24:31 -05:00
commit a0c6081818
31 changed files with 1392 additions and 0 deletions

17
features/audio.nix Normal file
View File

@@ -0,0 +1,17 @@
{ lib, pkgs, localPackages, ... }: {
environment.systemPackages = with pkgs; [
pulseaudio
pavucontrol
feishin
easyeffects
helvum
];
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
}

26
features/common.nix Normal file
View File

@@ -0,0 +1,26 @@
{ lib, pkgs, localPackages, ... }: {
imports = [];
environment.systemPackages = with pkgs; [
curl
wget
git
killall
vim
eza
ripgrep
fzf
ncdu
btop
nil
];
programs.neovim = {
enable = true;
defaultEditor = true;
};
programs.fish.enable = true;
}

11
features/gaming.nix Normal file
View File

@@ -0,0 +1,11 @@
{ lib, pkgs, localPackages, ... }: {
environment.systemPackages = with pkgs; [
protonup-qt
vesktop
];
programs.steam = {
enable = true;
gamescopeSession.enable = true;
};
}

25
features/gui.nix Normal file
View File

@@ -0,0 +1,25 @@
{ lib, pkgs, localPackages, ... }: {
environment.systemPackages = with pkgs; with localPackages.x86_64-linux; [
wl-clipboard
grim
slurp
swaybg
waybar
alacritty
kickoff
kickoff-dot-desktop
wayland-pipewire-idle-inhibit
firefox
mpv
];
programs.sway.enable = true;
programs.thunar.enable = true;
xdg.portal.wlr.enable = true;
fonts.packages = with pkgs; [
font-awesome
];
}

5
features/laptop.nix Normal file
View File

@@ -0,0 +1,5 @@
{ lib, pkgs, localPackages, ... }:
{
programs.light.enable = true;
}

8
features/networking.nix Normal file
View File

@@ -0,0 +1,8 @@
{ lib, pkgs, localPackages, ... }: {
environment.systemPackages = with pkgs; [
ldns
wireguard-tools
];
}

48
flake.lock generated Normal file
View File

@@ -0,0 +1,48 @@
{
"nodes": {
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1716930911,
"narHash": "sha256-t4HT5j3Jy7skRB5PINnxcEBCkgE89rGBpwTI7YS4Ffo=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "a9b36cbe9292a649222b89fdb9ae9907e9c74086",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1716509168,
"narHash": "sha256-4zSIhSRRIoEBwjbPm3YiGtbd8HDWzFxJjw5DYSDy1n8=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "bfb7a882678e518398ce9a31a881538679f6f092",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"home-manager": "home-manager",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

70
flake.nix Normal file
View File

@@ -0,0 +1,70 @@
{
description = "NixOS configuration";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = inputs@{ self, nixpkgs, home-manager, ... }: let
inherit (self) outputs;
in {
nixosConfigurations = {
ankaa = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {
inherit (outputs) localPackages;
openssh-port = 2222;
};
modules = [
./hosts/ankaa/configuration.nix
./hosts/ankaa/hardware-configuration.nix
./features/audio.nix
./features/common.nix
./features/gui.nix
./features/networking.nix
./features/gaming.nix
./modules/backups/home-ankaa.nix
./modules/openssh.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.eesim = import ./hosts/ankaa/home.nix;
}
];
};
alpheratz = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {
inherit (outputs) localPackages;
};
modules = [
./hosts/alpheratz/configuration.nix
./hosts/alpheratz/hardware-configuration.nix
./features/common.nix
./features/gui.nix
./features/audio.nix
./features/networking.nix
./features/laptop.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.eesim = import ./hosts/alpheratz/home.nix;
}
];
};
};
localPackages = nixpkgs.lib.genAttrs [ "x86_64-linux" ] (system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
kickoff-dot-desktop = pkgs.callPackage ./pkgs/kickoff-dot-desktop.nix { };
}
);
};
}

View File

@@ -0,0 +1,65 @@
# 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`).
{
lib,
config,
pkgs,
localPackages,
...
}: {
nixpkgs = {
overlays = [];
config = {
allowUnfree = true;
};
};
nix = {
settings = {
experimental-features = "nix-command flakes";
};
};
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
fileSystems = {
"/".options = [ "compress=zstd" ];
"/home".options = [ "compress=zstd" ];
"/nix".options = [ "compress=zstd" "noatime" ];
};
networking.hostName = "ankaa";
networking.networkmanager.enable = true;
networking.nameservers = [ "192.168.0.100" ];
# Set your time zone.
time.timeZone = "America/Chicago";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
programs.ssh.startAgent = true;
# Define a user account.
users.users.eesim = {
isNormalUser = true;
extraGroups = [ "wheel" "video" "audo" "networkmanager" ];
packages = with pkgs; [];
shell = pkgs.fish;
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINfY1b8+mp6Y6k5taexTdBPTeZUcxT6RyP0jvc/74GyY eesim@Ethans-NAS"
];
};
# Enable CUPS to print documents.
# services.printing.enable = true;
system.stateVersion = "23.11";
}

View File

@@ -0,0 +1,13 @@
[font]
size = 12
[font.italic]
family = "Codelia Nerd Font"
style = "Italic"
[font.normal]
family = "Codelia Nerd Font"
style = "Regular"
#[shell]
#program = "/usr/bin/fish"

View File

@@ -0,0 +1,45 @@
if status is-interactive
fish_add_path "/home/eesim/.cargo/bin/"
set fish_greeting
set fish_cursor_default block
set fish_cursor_insert line
set fish_cursor_replace_one underscore
set fish_cursor_replace underscore
set fish_cursor_external line
set fish_cursor_visual block
function fish_mode_prompt
end
### Local environment variables
set -x DENO_INSTALL "/home/eesim/.deno"
direnv hook fish | source
end
if status is-login
# SSH settings
eval (ssh-agent -c)
ssh-add /home/eesim/.ssh/id_ed25519
# Set environment variables in /etc/profile.d/
# exec bash -c "test -e /etc/profile && source /etc/profile"
# Disable GTK portal
set -x GTK_USE_PORTAL "0"
# Java fix
set -x _JAVA_AWT_WM_NONREPARENTING "1"
end
if test (tty) = "/dev/tty1"
sway
end

View File

@@ -0,0 +1,9 @@
require('config/keymaps')
require('config/settings')
require('config/plugins')
require('config/plugins/lualine')
require('config/plugins/lspconfig')
local vimscriptpath = vim.fn.stdpath("config") .. "/lua/config/vimscript/"
vim.cmd('source' .. vimscriptpath .. 'init.vim')

View File

@@ -0,0 +1,17 @@
vim.g.mapleader=','
vim.g.maplocalleader=','
vim.keymap.set('n', '<C-h>', '<C-w>h')
vim.keymap.set('n', '<C-j>', '<C-w>j')
vim.keymap.set('n', '<C-k>', '<C-w>k')
vim.keymap.set('n', '<C-l>', '<C-w>l')
vim.keymap.set('n', '<leader>ff', ':FzfLua files<CR>')
vim.keymap.set('n', '<leader>fb', ':FzfLua buffers<CR>')
vim.keymap.set('n', '<leader>rg', ':FzfLua grep_project<CR>')
vim.keymap.set('i', '<S-Tab>', '<C-d>')
vim.keymap.set('n', 'K', vim.lsp.buf.hover, opts)

View File

@@ -0,0 +1,58 @@
local plugins = {
'rebelot/kanagawa.nvim',
'nvim-lualine/lualine.nvim',
'kyazdani42/nvim-web-devicons',
'kylechui/nvim-surround',
{
'ibhagwan/fzf-lua',
config = function()
require('fzf-lua').setup({'skim'})
end
},
'neovim/nvim-lspconfig',
'hrsh7th/nvim-cmp',
'hrsh7th/cmp-nvim-lsp',
'hrsh7th/cmp-path',
'L3MON4D3/LuaSnip',
{
'windwp/nvim-autopairs',
event = 'InsertEnter',
opts = {},
},
{
'kaarmu/typst.vim',
ft = 'typst',
lazy = false,
},
'jalvesaq/Nvim-R',
{
'RaafatTurki/hex.nvim',
config = function()
require('hex').setup()
end
},
}
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
require("lazy").setup(plugins, opts)

View File

@@ -0,0 +1,67 @@
local capabilities = require('cmp_nvim_lsp').default_capabilities()
capabilities.textDocument.completion.completionItem.snippetSupport = false;
local lspconfig = require('lspconfig')
lspconfig.rust_analyzer.setup {
capabilities = capabilities,
settings = {
["rust-analyzer"] = {
cargo = {
allFeatures = true,
},
imports = {
group = {
enable = false,
},
},
completion = {
postfix = {
enable = false,
},
},
},
},
}
lspconfig.omnisharp.setup {
cmd = { "dotnet", "/usr/lib/omnisharp-roslyn/OmniSharp.dll"}
}
local default_servers = {'pylsp', 'ccls', 'typst_lsp', 'r_language_server', 'lua_ls', 'nil_ls'}
for _, lsp in ipairs(default_servers) do
lspconfig[lsp].setup {
capabilities = capabilities
}
end
local luasnip = require 'luasnip'
local cmp = require 'cmp'
cmp.setup {
preselect = cmp.PreselectMode.None,
mapping = cmp.mapping.preset.insert({
['<Tab>'] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
else
fallback()
end
end, { 'i', 's' }),
['<S-Tab>'] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
else
fallback()
end
end, { 'i', 's' }),
}),
sources = {
{ name = 'nvim_lsp' },
{ name = 'path' },
},
}

View File

@@ -0,0 +1,36 @@
require('lualine').setup {
options = {
icons_enabled = true,
theme = 'wombat',
component_separators = { left = '', right = ''},
section_separators = { left = '', right = ''},
disabled_filetypes = {},
always_divide_middle = true,
globalstatus = true,
},
sections = {
lualine_a = {'mode'},
lualine_b = {'branch', 'diff', 'diagnostics'},
lualine_c = {'filename'},
lualine_x = {'encoding', 'fileformat', 'filetype'},
lualine_y = {'progress'},
lualine_z = {'location'}
},
inactive_sections = {
lualine_a = {},
lualine_b = {},
lualine_c = {'filename'},
lualine_x = {'location'},
lualine_y = {},
lualine_z = {}
},
tabline = {
lualine_a = {'buffers'},
lualine_b = {'branch'},
lualine_c = {'filename'},
lualine_x = {},
lualine_y = {},
lualine_z = {'tabs'}
},
extensions = {}
}

View File

@@ -0,0 +1,39 @@
vim.opt.cursorline=true
vim.opt.relativenumber=true
vim.opt.number=true
vim.opt.scrolloff=10
vim.opt.autoindent=true
vim.opt.expandtab=true
vim.opt.softtabstop=4
vim.opt.shiftwidth=4
vim.opt.shiftround=true
vim.opt.backspace={'indent','eol','start'}
vim.opt.hidden=true
vim.opt.laststatus=2
vim.opt.display='lastline'
vim.opt.showmode=true
vim.opt.showcmd=true
vim.opt.incsearch=true
vim.opt.ignorecase=true
vim.opt.smartcase=true
vim.opt.ttyfast=true
vim.opt.updatetime=300
vim.opt.splitright=true
vim.opt.wrapscan=true
vim.opt.report=0
vim.opt.list=true
vim.opt.completeopt=menuone,noselect
vim.opt.undofile=true
vim.g['loaded_perl_provider']=0
vim.g['python3_host_prog']='/usr/bin/python3'

View File

@@ -0,0 +1,9 @@
filetype plugin indent on
syntax on
colorscheme kanagawa
if has('multi_byte') && &encoding ==# 'utf-8'
let &listchars = 'tab:▸ ,extends:,precedes:,nbsp:±'
else
let &listchars = 'tab:> ,extends:>,precedes:<,nbsp:.'
endif

View File

@@ -0,0 +1,77 @@
configuration {
display-drun: "Applications:";
display-window: "Windows:";
drun-display-format: "{name}";
font: "JetBrainsMono Nerd Font Medium 10";
modi: "run,drun";
}
@theme "/dev/null"
* {
bg: #2f343f;
bg-alt: #444b6a;
fg: #f3f4f5;
fg-alt: #787c99;
background-color: @bg;
border: 0;
margin: 0;
padding: 0;
spacing: 0;
}
window {
width: 30%;
}
element {
padding: 8 0;
text-color: @fg-alt;
}
element selected {
text-color: @fg;
}
element-text {
background-color: inherit;
text-color: inherit;
vertical-align: 0.5;
}
element-icon {
size: 30;
}
entry {
background-color: @bg-alt;
padding: 12;
text-color: @fg;
}
inputbar {
children: [prompt, entry];
}
listview {
padding: 8 12;
background-color: @bg;
columns: 1;
lines: 8;
}
mainbox {
background-color: @bg;
children: [inputbar, listview];
}
prompt {
background-color: @bg-alt;
enabled: true;
padding: 12 0 0 12;
text-color: @fg;
}

View File

@@ -0,0 +1 @@
@nClientDownloadEnableHTTP2PlatformLinux 0

View File

@@ -0,0 +1,292 @@
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
set $mod Mod4
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
default_border pixel 5
default_floating_border pixel 5
# Use pactl to adjust volume in PulseAudio.
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5%
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5%
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle
# bindsym XF86AudioPlay exec python3 /home/eesim/Scripts/MuteMusic.py
bindsym XF86AudioPause exec playerctl play-pause
bindsym XF86AudioNext exec playerctl next
bindsym XF86AudioPrev exec playerctl previous
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# start a terminal
bindsym $mod+Return exec alacritty
bindsym $mod+Control+f exec MOZ_ENABLE_WAYLAND=1 firefox
bindsym $mod+Control+s exec steam
bindsym $mod+Control+t exec thunar
bindsym $mod+Control+d exec vesktop --enable-features=WebRTCPipeWireCapturer
bindsym $mod+Control+x exec strawberry
bindsym $mod+Control+q exec qbittorrent
bindsym $mod+Control+h exec helvum
bindsym $mod+Control+p exec pavucontrol
bindsym $mod+space exec kickoff-dot-desktop | kickoff --from-stdin --stdout | xargs -d '\n' swaymsg exec
# kill focused window
bindsym $mod+Shift+q kill
# take screenshot
bindsym $mod+Shift+s exec flameshot gui
# change focus
bindsym $mod+h focus left
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+l focus right
# alternatively, you can use the cursor keys:
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# move focused window
bindsym $mod+Shift+h move left
bindsym $mod+Shift+j move down
bindsym $mod+Shift+k move up
bindsym $mod+Shift+l move right
# alternatively, you can use the cursor 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
# split in horizontal orientation
bindsym $mod+b split h
# split in vertical orientation
bindsym $mod+v split v
# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle
# change container layout (stacked, tabbed, toggle split)
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
# toggle tiling / floating
bindsym $mod+Shift+space floating toggle
# change focus between tiling / floating windows
#bindsym $mod+space focus mode_toggle
# focus the parent container
bindsym $mod+a focus parent
# focus the child container
#bindsym $mod+d focus child
# Define names for default workspaces for which we configure key bindings later on.
# We use variables to avoid repeating the names in multiple places.
set $ws1 "1"
set $ws2 "2"
set $ws3 "3"
set $ws4 "4"
set $ws5 "5"
set $ws6 "6"
set $ws7 "7"
set $ws8 "8"
set $ws9 "9"
set $ws10 "10"
set $MonitorA "DP-2"
set $MonitorB "HDMI-A-1"
# switch to workspace
bindsym $mod+1 workspace $ws1
bindsym $mod+2 workspace $ws2
bindsym $mod+3 workspace $ws3
bindsym $mod+4 workspace $ws4
bindsym $mod+5 workspace $ws5
bindsym $mod+6 workspace $ws6
bindsym $mod+7 workspace $ws7
bindsym $mod+8 workspace $ws8
bindsym $mod+9 workspace $ws9
bindsym $mod+0 workspace $ws10
# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace $ws1
bindsym $mod+Shift+2 move container to workspace $ws2
bindsym $mod+Shift+3 move container to workspace $ws3
bindsym $mod+Shift+4 move container to workspace $ws4
bindsym $mod+Shift+5 move container to workspace $ws5
bindsym $mod+Shift+6 move container to workspace $ws6
bindsym $mod+Shift+7 move container to workspace $ws7
bindsym $mod+Shift+8 move container to workspace $ws8
bindsym $mod+Shift+9 move container to workspace $ws9
bindsym $mod+Shift+0 move container to workspace $ws10
workspace $ws1 output $MonitorA
workspace $ws2 output $MonitorA
workspace $ws3 output $MonitorA
workspace $ws4 output $MonitorB
workspace $ws5 output $MonitorB
workspace $ws6 output $MonitorB
workspace $ws7 output $MonitorB
workspace $ws8 output $MonitorB
workspace $ws9 output $MonitorB
workspace $ws10 output $MonitorB
set $opacity 0.9
for_window [app_id="de.shorsh.discord-screenaudio"] opacity $opacity
for_window [class="discord"] opacity $opacity
for_window [class="vesktop"] opacity &opacity
for_window [app_id="Alacritty"] opacity $opacity
for_window [class="gamescope"] fullscreen
for_window [app_id="gamescope"] fullscreen
for_window [app_id="mpv"] fullscreen
for_window [app_id="relm4.test.simple"] floating enable
# Workspace 1
# Workspace 2
assign [app_id="mpv"] $ws2
# Workspace 3
assign [class="steam"] $ws3
assign [class="gamescope"] $ws3
assign [app_id="gamescope"] $ws3
# Workspace 4
assign [app_id="firefox"] $ws4
# Workspace 5
assign [app_id="de.shorsh.discord-screenaudio"] $ws5
assign [class="discord"] $ws5
# Workspace 6
assign [app_id="com.obsproject.Studio"] $ws6
# Workspace 7
assign [app_id="org.strawberrymusicplayer.strawberry"] $ws7
# Workspace 8
assign [app_id="com.github.wwmm.easyeffects"] $ws8
assign [app_id="org.pipewire.Helvum"] $ws8
assign [app_id="pavucontrol"] $ws8
# Workspace 9
# Workspace 10
assign [app_id="python3"] $ws10
assign [class="steam_proton"] $ws10
# reload the configuration file
bindsym $mod+Shift+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+r restart
# exit i3 (logs you out of your X 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'
# resize window (you can also use the mouse for that)
mode "resize" {
# These bindings trigger as soon as you enter the resize mode
# Pressing left will shrink the windows width.
# Pressing right will grow the windows width.
# Pressing up will shrink the windows height.
# Pressing down will grow the windows height.
bindsym h resize shrink width 20 px
bindsym j resize grow height 20 px
bindsym k resize shrink height 20 px
bindsym l resize grow width 20 px
# same bindings, but for the arrow keys
bindsym Left resize shrink width 20 px
bindsym Down resize grow height 20 px
bindsym Up resize shrink height 20 px
bindsym Right resize grow width 20 px
# back to normal: Enter or Escape or $mod+r
bindsym Return mode "default"
bindsym Escape mode "default"
bindsym $mod+r mode "default"
}
bindsym $mod+r mode "resize"
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
set $bg-color #58536d
set $inactive-bg-color #2f343f
set $text-color #f3f4f5
set $inactive-text-color #676E7D
set $urgent-bg-color #E53935
# window colors
# border background text indicator
client.focused $bg-color $bg-color $text-color #4B5177
client.unfocused $inactive-bg-color $inactive-bg-color $inactive-text-color #4B5177
client.focused_inactive $inactive-bg-color $inactive-bg-color $inactive-text-color #4B5177
client.urgent $urgent-bg-color $urgent-bg-color $text-color #4B5177
default_border pixel 6
gaps inner 10
gaps outer -5
smart_gaps on
smart_gaps inverse_outer
bar {
swaybar_command waybar
}
input type:keyboard {
xkb_layout us,de
xkb_options caps:escape,grp:shifts_toggle
}
# Set Monitors
output DP-2 mode 3440x1440@144Hz pos 1920 0 scale 1
output HDMI-A-1 mode 1920x1080@75Hz pos 0 0
exec swaybg -o DP-2 -i /home/eesim/Pictures/wallpapers/wallpaper_scaled_distorted_lanczos_sharp.png
exec swaybg -o HDMI-A-1 -i /home/eesim/Pictures/wallpapers/169Wallpaper.png
exec systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
exec dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway
exec --no-startup-id openrgb --startminimized
exec --no-startup-id ydotoold
exec --no-startup-id easyeffects --gapplication-service
exec --no-startup-id wayland-pipewire-idle-inhibit
exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec --no-startup-id protonmail-bridge
exec --no-startup-id swayidle -w \
timeout 600 'swaymsg "output * dpms off"' \
resume 'swaymsg "output * dpms on"'
exec vorta
exec MOZ_ENABLE_WAYLAND=1 firefox
exec dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK
exec sleep 20 && vesktop --enable-features=WebRTCPipeWireCapturer

View File

@@ -0,0 +1,20 @@
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
unbind-key '"'
unbind-key %
bind-key | split-window -h -c "#{pane_current_path}"
bind-key - split-window -v -c "#{pane_current_path}"
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
bind-key -r H resize-pane -L 5
bind-key -r J resize-pane -D 5
bind-key -r K resize-pane -U 5
bind-key -r L resize-pane -R 5

View File

@@ -0,0 +1,158 @@
[{
"layer": "top", // Waybar at top layer
"output": "DP-2",
"position": "top", // Waybar position (top|bottom|left|right)
"height": 30, // Waybar height (to be removed for auto height)
"spacing": 4, // Gaps between modules (4px)
// Choose the order of the modules
"modules-left": ["sway/workspaces", "sway/mode", "sway/scratchpad"],
"modules-center": ["sway/window"],
"modules-right": ["idle_inhibitor", "pulseaudio", "cpu", "memory", "clock"],
// Modules configuration
"sway/workspaces": {
"disable-scroll": true,
"all-outputs": false,
"format": "{name}: {icon}",
"format-icons": {
"1": "",
"2": "",
"3": "",
"urgent": "",
"focused": "",
"default": ""
}
},
"sway/mode": {
"format": "<span style=\"italic\">{}</span>"
},
"sway/scratchpad": {
"format": "{icon} {count}",
"show-empty": false,
"format-icons": ["", ""],
"tooltip": true,
"tooltip-format": "{app}: {title}"
},
"idle_inhibitor": {
"format": "{icon}",
"format-icons": {
"activated": "",
"deactivated": ""
}
},
"tray": {
// "icon-size": 21,
"spacing": 10
},
"clock": {
// "timezone": "America/New_York",
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
"format": "{:%I:%M %p}",
"format-alt": "{:%Y-%m-%d}"
},
"cpu": {
"format": "{usage}% ",
"tooltip": false
},
"memory": {
"format": "{}% "
},
"pulseaudio": {
// "scroll-step": 1, // %, can be a float
"format": "{volume}% {icon}",
"format-bluetooth": "{volume}% {icon} {format_source}",
"format-bluetooth-muted": " {icon} {format_source}",
"format-muted": " {format_source}",
"format-source": "{volume}% ",
"format-source-muted": "",
"format-icons": {
"headphone": "",
"hands-free": "",
"headset": "",
"phone": "",
"portable": "",
"car": "",
"default": ["", "", ""]
},
},
}, {
"layer": "bottom", // Waybar at top layer
"output": "HDMI-A-1",
"position": "top", // Waybar position (top|bottom|left|right)
"height": 30, // Waybar height (to be removed for auto height)
"spacing": 4, // Gaps between modules (4px)
// Choose the order of the modules
"modules-left": ["sway/workspaces", "sway/mode", "sway/scratchpad"],
"modules-center": ["sway/window"],
"modules-right": ["idle_inhibitor", "pulseaudio", "cpu", "memory", "clock", "tray"],
// Modules configuration
"sway/workspaces": {
"disable-scroll": true,
"all-outputs": false,
"format": "{name}: {icon}",
"format-icons": {
"4": "",
"5": "",
"6": "",
"7": "",
"8": "",
"9": "",
"10": "",
"urgent": "",
"focused": "",
"default": ""
}
},
"sway/mode": {
"format": "<span style=\"italic\">{}</span>"
},
"sway/scratchpad": {
"format": "{icon} {count}",
"show-empty": false,
"format-icons": ["", ""],
"tooltip": true,
"tooltip-format": "{app}: {title}"
},
"idle_inhibitor": {
"format": "{icon}",
"format-icons": {
"activated": "",
"deactivated": ""
}
},
"tray": {
// "icon-size": 21,
"spacing": 10
},
"clock": {
// "timezone": "America/New_York",
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
"format": "{:%I:%M %p}",
"format-alt": "{:%Y-%m-%d}"
},
"cpu": {
"format": "{usage}% ",
"tooltip": false
},
"memory": {
"format": "{}% "
},
"pulseaudio": {
// "scroll-step": 1, // %, can be a float
"format": "{volume}% {icon}",
"format-bluetooth": "{volume}% {icon} {format_source}",
"format-bluetooth-muted": " {icon} {format_source}",
"format-muted": " {format_source}",
"format-source": "{volume}% ",
"format-source-muted": "",
"format-icons": {
"headphone": "",
"hands-free": "",
"headset": "",
"phone": "",
"portable": "",
"car": "",
"default": ["", "", ""]
},
},
}]

View File

@@ -0,0 +1,102 @@
* {
border: none;
border-radius: 0;
font-family: "Ubuntu Nerd Font";
font-size: 16px;
min-height: 0;
}
window#waybar {
background: rgba(0, 0, 0, 0.2);
color: white;
}
#window {
font-weight: bold;
font-family: "Ubuntu";
}
/*
#workspaces {
padding: 0 5px;
}
*/
#workspaces button {
padding: 0 5px;
background: transparent;
color: white;
border-top: 2px solid transparent;
}
#workspaces button.focused {
color: #c9545d;
border-top: 2px solid #c9545d;
}
#mode {
background: #64727D;
border-bottom: 3px solid white;
}
#clock, #battery, #cpu, #memory, #network, #pulseaudio, #custom-spotify, #tray, #mode, #idle_inhibitor {
padding: 0 8px;
margin: 0 3px;
}
#clock {
font-weight: bold;
}
#battery {
}
#battery icon {
color: red;
}
#battery.charging {
}
@keyframes blink {
to {
background-color: #ffffff;
color: black;
}
}
#battery.warning:not(.charging) {
color: white;
animation-name: blink;
animation-duration: 0.5s;
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
}
#cpu {
}
#memory {
}
#network {
}
#network.disconnected {
background: #f53c3c;
}
#pulseaudio {
}
#pulseaudio.muted {
}
#custom-spotify {
color: rgb(102, 220, 105);
}
#tray {
}

View File

@@ -0,0 +1,52 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" "wl" ];
boot.extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/c9d87455-b02f-465d-8d63-1858dc2164fe";
fsType = "btrfs";
options = [ "subvol=root" ];
};
fileSystems."/nix" =
{ device = "/dev/disk/by-uuid/c9d87455-b02f-465d-8d63-1858dc2164fe";
fsType = "btrfs";
options = [ "subvol=nix" ];
};
fileSystems."/home" =
{ device = "/dev/disk/by-uuid/c9d87455-b02f-465d-8d63-1858dc2164fe";
fsType = "btrfs";
options = [ "subvol=home" ];
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/4129-EEE9";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp34s0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp38s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

59
hosts/ankaa/home.nix Normal file
View File

@@ -0,0 +1,59 @@
{
config,
pkgs,
...
}:
{
imports = [];
home = {
username = "eesim";
homeDirectory = "/home/eesim";
};
home.file.".config/sway/config".source = ./dotfiles/sway/config;
home.file.".config/nvim".source = ./dotfiles/nvim;
home.file.".config/waybar".source = ./dotfiles/waybar;
home.file.".config/fish/config.fish".source = ./dotfiles/fish/config.fish;
home.file.".config/alacritty/alacritty.toml".source = ./dotfiles/alacritty/alacritty.toml;
# Fix for slow steam download speeds https://old.reddit.com/r/linux_gaming/comments/16e1l4h/slow_steam_downloads_try_this/
home.file.".steam/steam/steam_dev.cfg".source = ./dotfiles/steam/steam_dev.cfg;
programs.git = {
enable = true;
userName = "Ethan Simmons";
userEmail = "eesimmons9105@gmail.com";
};
programs.direnv = {
enable = true;
enableBashIntegration = true;
nix-direnv.enable = true;
};
programs.home-manager.enable = true;
gtk = {
enable = true;
cursorTheme = {
name = "phinger-cursors-dark";
package = pkgs.phinger-cursors;
};
theme = {
name = "adw-gtk3-dark";
package = pkgs.adw-gtk3;
};
};
qt = {
style = {
name = "adwaita-dark";
package = pkgs.adwaita-qt;
};
};
home.stateVersion = "23.11";
}

View File

@@ -0,0 +1,23 @@
{ pkgs, lib, ... }: {
services.borgbackup.jobs = {
home-ankaa =
let
user = "eesim";
home = "/home/${user}";
excludes = [ ".local/share/Steam/steamapps/common" ".cache" ];
in
{
inherit user;
paths = [ home ];
exclude = builtins.map (e: "${home}/${e}") excludes;
repo = "rf030789@rf030789.repo.borgbase.com:repo";
encryption = {
mode = "repokey-blake2";
passCommand = "cat ${home}/.ssh/borgbase_passphrase";
};
environment.BORG_RSH = "ssh -i ${home}/.ssh/id_ed25519_borgbase";
compression = "auto,lzma";
startAt = "daily";
};
};
}

16
modules/openssh.nix Normal file
View File

@@ -0,0 +1,16 @@
{ lib
, pkgs
, openssh-port ? 22
, ...
}:
{
services.openssh = {
enable = true;
ports = [ openssh-port ];
settings = {
PermitRootLogin = "no";
PasswordAuthentication = false;
};
};
}

View File

@@ -0,0 +1,24 @@
{ lib, rustPlatform, fetchFromGitHub }:
rustPlatform.buildRustPackage {
pname = "kickoff-dot-desktop";
version = "0.1.0";
src = fetchFromGitHub {
owner = "j0ru";
repo = "kickoff-dot-desktop";
rev = "ba3e8788c7120c95c4ee963abf3904eb0736cb24";
hash = "sha256-exMmqOkDKuyAEdda8gG/uF3+tnQzhJnOJK+sEtZbsZc=";
};
cargoHash = "sha256-z3apcltBKNovwo+yOHxvzn53PPefr2lEzkGst25fGsM=";
meta = with lib; {
description = "Smol program to read in relevant desktop files and print them in a kickoff compatible format";
homepage = "https://github.com/j0ru/kickoff-dot-desktop";
license = licenses.unlicense;
maintainers = [];
};
}