From a0c6081818769bc623a2c0e905250349accfaee5 Mon Sep 17 00:00:00 2001 From: Ethan Simmons Date: Wed, 29 May 2024 15:24:31 -0500 Subject: [PATCH] Initial commit --- features/audio.nix | 17 + features/common.nix | 26 ++ features/gaming.nix | 11 + features/gui.nix | 25 ++ features/laptop.nix | 5 + features/networking.nix | 8 + flake.lock | 48 +++ flake.nix | 70 +++++ hosts/ankaa/configuration.nix | 65 ++++ hosts/ankaa/dotfiles/alacritty/alacritty.toml | 13 + hosts/ankaa/dotfiles/fish/config.fish | 45 +++ hosts/ankaa/dotfiles/nvim/init.lua | 9 + .../dotfiles/nvim/lua/config/keymaps.lua | 17 + .../dotfiles/nvim/lua/config/plugins/init.lua | 58 ++++ .../nvim/lua/config/plugins/lspconfig.lua | 67 ++++ .../nvim/lua/config/plugins/lualine.lua | 36 +++ .../dotfiles/nvim/lua/config/settings.lua | 39 +++ .../nvim/lua/config/vimscript/init.vim | 9 + ...%eesim%.config%nvim%lua%config%keymaps.lua | Bin 0 -> 6925 bytes ...nfig%nvim%lua%config%plugins%lspconfig.lua | Bin 0 -> 17906 bytes hosts/ankaa/dotfiles/rofi/config.rasi | 77 +++++ hosts/ankaa/dotfiles/steam/steam_dev.cfg | 1 + hosts/ankaa/dotfiles/sway/config | 292 ++++++++++++++++++ hosts/ankaa/dotfiles/tmux/.tmux.conf | 20 ++ hosts/ankaa/dotfiles/waybar/config | 158 ++++++++++ hosts/ankaa/dotfiles/waybar/style.css | 102 ++++++ hosts/ankaa/hardware-configuration.nix | 52 ++++ hosts/ankaa/home.nix | 59 ++++ modules/backups/home-ankaa.nix | 23 ++ modules/openssh.nix | 16 + pkgs/kickoff-dot-desktop.nix | 24 ++ 31 files changed, 1392 insertions(+) create mode 100644 features/audio.nix create mode 100644 features/common.nix create mode 100644 features/gaming.nix create mode 100644 features/gui.nix create mode 100644 features/laptop.nix create mode 100644 features/networking.nix create mode 100644 flake.lock create mode 100644 flake.nix create mode 100644 hosts/ankaa/configuration.nix create mode 100644 hosts/ankaa/dotfiles/alacritty/alacritty.toml create mode 100644 hosts/ankaa/dotfiles/fish/config.fish create mode 100644 hosts/ankaa/dotfiles/nvim/init.lua create mode 100644 hosts/ankaa/dotfiles/nvim/lua/config/keymaps.lua create mode 100644 hosts/ankaa/dotfiles/nvim/lua/config/plugins/init.lua create mode 100644 hosts/ankaa/dotfiles/nvim/lua/config/plugins/lspconfig.lua create mode 100644 hosts/ankaa/dotfiles/nvim/lua/config/plugins/lualine.lua create mode 100644 hosts/ankaa/dotfiles/nvim/lua/config/settings.lua create mode 100644 hosts/ankaa/dotfiles/nvim/lua/config/vimscript/init.vim create mode 100644 hosts/ankaa/dotfiles/nvim/lua/config/~/.vimdid/%home%eesim%.config%nvim%lua%config%keymaps.lua create mode 100644 hosts/ankaa/dotfiles/nvim/lua/config/~/.vimdid/%home%eesim%.config%nvim%lua%config%plugins%lspconfig.lua create mode 100644 hosts/ankaa/dotfiles/rofi/config.rasi create mode 100644 hosts/ankaa/dotfiles/steam/steam_dev.cfg create mode 100644 hosts/ankaa/dotfiles/sway/config create mode 100644 hosts/ankaa/dotfiles/tmux/.tmux.conf create mode 100644 hosts/ankaa/dotfiles/waybar/config create mode 100644 hosts/ankaa/dotfiles/waybar/style.css create mode 100644 hosts/ankaa/hardware-configuration.nix create mode 100644 hosts/ankaa/home.nix create mode 100644 modules/backups/home-ankaa.nix create mode 100644 modules/openssh.nix create mode 100644 pkgs/kickoff-dot-desktop.nix diff --git a/features/audio.nix b/features/audio.nix new file mode 100644 index 0000000..a7b02ed --- /dev/null +++ b/features/audio.nix @@ -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; + }; +} diff --git a/features/common.nix b/features/common.nix new file mode 100644 index 0000000..1a06b89 --- /dev/null +++ b/features/common.nix @@ -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; + +} diff --git a/features/gaming.nix b/features/gaming.nix new file mode 100644 index 0000000..ce6899b --- /dev/null +++ b/features/gaming.nix @@ -0,0 +1,11 @@ +{ lib, pkgs, localPackages, ... }: { + environment.systemPackages = with pkgs; [ + protonup-qt + vesktop + ]; + + programs.steam = { + enable = true; + gamescopeSession.enable = true; + }; +} diff --git a/features/gui.nix b/features/gui.nix new file mode 100644 index 0000000..cf03e6b --- /dev/null +++ b/features/gui.nix @@ -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 + ]; +} diff --git a/features/laptop.nix b/features/laptop.nix new file mode 100644 index 0000000..441067d --- /dev/null +++ b/features/laptop.nix @@ -0,0 +1,5 @@ +{ lib, pkgs, localPackages, ... }: + +{ + programs.light.enable = true; +} diff --git a/features/networking.nix b/features/networking.nix new file mode 100644 index 0000000..881148d --- /dev/null +++ b/features/networking.nix @@ -0,0 +1,8 @@ +{ lib, pkgs, localPackages, ... }: { + + environment.systemPackages = with pkgs; [ + ldns + wireguard-tools + ]; + +} diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..06d72df --- /dev/null +++ b/flake.lock @@ -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 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..b56b8a1 --- /dev/null +++ b/flake.nix @@ -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 { }; + } + ); + }; +} diff --git a/hosts/ankaa/configuration.nix b/hosts/ankaa/configuration.nix new file mode 100644 index 0000000..29a0dc5 --- /dev/null +++ b/hosts/ankaa/configuration.nix @@ -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"; + +} + diff --git a/hosts/ankaa/dotfiles/alacritty/alacritty.toml b/hosts/ankaa/dotfiles/alacritty/alacritty.toml new file mode 100644 index 0000000..d8fbcdd --- /dev/null +++ b/hosts/ankaa/dotfiles/alacritty/alacritty.toml @@ -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" diff --git a/hosts/ankaa/dotfiles/fish/config.fish b/hosts/ankaa/dotfiles/fish/config.fish new file mode 100644 index 0000000..797bc55 --- /dev/null +++ b/hosts/ankaa/dotfiles/fish/config.fish @@ -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 + diff --git a/hosts/ankaa/dotfiles/nvim/init.lua b/hosts/ankaa/dotfiles/nvim/init.lua new file mode 100644 index 0000000..c6978cf --- /dev/null +++ b/hosts/ankaa/dotfiles/nvim/init.lua @@ -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') diff --git a/hosts/ankaa/dotfiles/nvim/lua/config/keymaps.lua b/hosts/ankaa/dotfiles/nvim/lua/config/keymaps.lua new file mode 100644 index 0000000..5b7437e --- /dev/null +++ b/hosts/ankaa/dotfiles/nvim/lua/config/keymaps.lua @@ -0,0 +1,17 @@ +vim.g.mapleader=',' +vim.g.maplocalleader=',' + +vim.keymap.set('n', '', 'h') +vim.keymap.set('n', '', 'j') +vim.keymap.set('n', '', 'k') +vim.keymap.set('n', '', 'l') + +vim.keymap.set('n', 'ff', ':FzfLua files') +vim.keymap.set('n', 'fb', ':FzfLua buffers') +vim.keymap.set('n', 'rg', ':FzfLua grep_project') + + + +vim.keymap.set('i', '', '') + +vim.keymap.set('n', 'K', vim.lsp.buf.hover, opts) diff --git a/hosts/ankaa/dotfiles/nvim/lua/config/plugins/init.lua b/hosts/ankaa/dotfiles/nvim/lua/config/plugins/init.lua new file mode 100644 index 0000000..36d2690 --- /dev/null +++ b/hosts/ankaa/dotfiles/nvim/lua/config/plugins/init.lua @@ -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) diff --git a/hosts/ankaa/dotfiles/nvim/lua/config/plugins/lspconfig.lua b/hosts/ankaa/dotfiles/nvim/lua/config/plugins/lspconfig.lua new file mode 100644 index 0000000..8c40e0d --- /dev/null +++ b/hosts/ankaa/dotfiles/nvim/lua/config/plugins/lspconfig.lua @@ -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({ + [''] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_next_item() + else + fallback() + end + end, { 'i', 's' }), + [''] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_prev_item() + else + fallback() + end + end, { 'i', 's' }), + }), + sources = { + { name = 'nvim_lsp' }, + { name = 'path' }, + }, +} + + diff --git a/hosts/ankaa/dotfiles/nvim/lua/config/plugins/lualine.lua b/hosts/ankaa/dotfiles/nvim/lua/config/plugins/lualine.lua new file mode 100644 index 0000000..9ae6243 --- /dev/null +++ b/hosts/ankaa/dotfiles/nvim/lua/config/plugins/lualine.lua @@ -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 = {} +} diff --git a/hosts/ankaa/dotfiles/nvim/lua/config/settings.lua b/hosts/ankaa/dotfiles/nvim/lua/config/settings.lua new file mode 100644 index 0000000..2a5871c --- /dev/null +++ b/hosts/ankaa/dotfiles/nvim/lua/config/settings.lua @@ -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' diff --git a/hosts/ankaa/dotfiles/nvim/lua/config/vimscript/init.vim b/hosts/ankaa/dotfiles/nvim/lua/config/vimscript/init.vim new file mode 100644 index 0000000..2426d07 --- /dev/null +++ b/hosts/ankaa/dotfiles/nvim/lua/config/vimscript/init.vim @@ -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 diff --git a/hosts/ankaa/dotfiles/nvim/lua/config/~/.vimdid/%home%eesim%.config%nvim%lua%config%keymaps.lua b/hosts/ankaa/dotfiles/nvim/lua/config/~/.vimdid/%home%eesim%.config%nvim%lua%config%keymaps.lua new file mode 100644 index 0000000000000000000000000000000000000000..9fc01db2562fe6378d92adc32552c927692007c0 GIT binary patch literal 6925 zcmeI0&1w`u5P*B#_!BiTB*w(3D0qk=x+u6gc@eyM6Z9$`A_TLEUcoS4S zuc^#R1A*4NXuscCm-VR81<1--ph-8IuwUv>9PUs`B9y0~<1`J1br z-T3|d_Wd(IzaG7_{P5}O;-|scp)U_^&izuH4u!fhZ}Fi9(qoiG0|uQ#NA&7wts4YSGPhWr&b`q2w`$=nfQM1D8xv0X(oN z2{u6}Rl30*$-j0So3Xe(BQreEzAVNK-fhMO^ju~HTbkQMp-d6nvqf`zG{QYSodfPE zneoB;RRmnsFuwt;>pPyn2lyyT0!|dl6ajvs2>4hGd?`=dV=@C|ioaIG!5*#X5Z+;2 zpbzoA*b;G~P^NSvKK?K9<41C{+=DVhgzuYT<}e;KF7Su>IJU%`D3mF}yjC>JC)zQO z)^?A|43eFCBciTv<(nS``+|pl9H71pUe<;^>PV^w;4Y@Lbo^pjKlqr%cCyR1r zvTd%M&uV#Jeb2qHO`p9C@ga0$|^dAz>#9Wr|=wRfK)21NLZd@U+Z0f&9K0 zJfQWQ3r~_DfhQ7u5dnX?2>ij0;G+#f(OcSz-r9Jou+)Rv9#fG92|WSoi*!SOpfmd1 z3tFpoXvN_Ls>)Xq;E|0 Qk70$-mjY}^z4?9pFD{z^HUIzs literal 0 HcmV?d00001 diff --git a/hosts/ankaa/dotfiles/nvim/lua/config/~/.vimdid/%home%eesim%.config%nvim%lua%config%plugins%lspconfig.lua b/hosts/ankaa/dotfiles/nvim/lua/config/~/.vimdid/%home%eesim%.config%nvim%lua%config%plugins%lspconfig.lua new file mode 100644 index 0000000000000000000000000000000000000000..8b13c258f11d5f85e0dc20368f0a048efd2c0c7f GIT binary patch literal 17906 zcmeI3%ZnUE9LG1=P0Z6o^L}lbF|rBfW#XFnNFw+E1rZ++A(3U=%&r5InPFxUOu~wb z7avzWis0jtKfsd^@Zd!duO2*VylXB7qQ6gd{knf$n;qC--RcLm-CbS3s@nQ|`&U&x zGjBF8etEY2T<747Y;Imz6}4N1!+Ws-7?{eO>fcjd^`FLJ<^=Lh$fTleYpzhbT`%}B@pc?1N< zxWh3ra%;QP&CsuwbVL#;#$a5zb69dmCg)vVNs3G{T(E!gL-BWoKP$b)ihKFVS~=Xg zOCDL1^G+&MK5B{}8`QXgyd)JyA*P8`YQvRjREaz?$HJir7%jZpwwIuKe(ll#Z4bZ zF4yL)U>s#?5u+lMuqF`9!l1HrFE^Xfh?uI4__x-#W%DSL2Qa+U({^f;zp#0Dc}XK- z?KIg`PGhdB6u=mgm?n}wWF^h8qsT`kL2MOb#Z-tEv)p$^SW?VBt60By%wS!q_v8q2 zFq2Z`Vi2O5U_Lwy^O_uTmYsXsf_8LF#{j)Kc#wlB3b4gmRnCDL z!$7YqK-X#&)H*|H@7Bx7mH;(*n17~0s}Y}UT_^A0BB5p!Vw#{nHVpNS5_RuVe{iVY zuD7mSZS<<#9W2vL=Hq<z@iILn zl1~KagXoT%jTB%f?U9twGYC;l&`*Zwc}Z|g65#d>L!a+PpoI&D%W8GWcO(Gjwyyui z_4c`15JW^w<@N+OrvW)))J)#~Ku)xdm0O0TdubiiLmSv;Ne6seHjjHgYT19BY-CKr zHA$C2h-xC;6IQy4SYW1!0r7g}gLT zF$ytFke>{ZgX1wtfZK96KC~0{M`)RZ^Nc8HA`Nl6iKRWGZuA^J2Ht8`w{m0PaYcPBIUC6hPOx!9xeK{j>l9 z0DYUJ1f4;MY6AWF5IP7>NCMn8yTB=-=L;tLz*4w6ffP}N`ZVrrU!=a`Gbd!^*vk>4 zUh+N;WJKFo8F7~GrFBq`#w$L1|HQXt^C;sb%m2eyE7XuLGR8GYmO+SWBH0(MWL1SH zrB%RHB!=8(d!0*Nv$4a$u`=BxDt#45EQnNKe$coe0kEex&t_2KoeK7sLhK-ULK5JL zH_sYj6nh@4>^wv9gbZPyr*m?naM#R^_= zJV~RvKvz*|M^tk+^~B#mZdfh|>!p(%ch$@0k?#e80PGtv#6eZA@+1fuiKr%mc-0Dm zhaDtONdk9u`K1b>l+u?|XO#XUP>5dU3b9^#$9ma3s`Ls$5%z@_YANQ-q!30brinsc zw+hjap$b_vY|ts@us@Zn@1@Rb9xpiU9uL&ub;S~1KWNbog7>Xqcq>bw>CVM&t1)PH z+GgpCAe5_C;(@I!QY+l^wJ)f2 z-llwYqHqBpVNgUP#V%d%a;#QaEPU~C3Xmg4)vO$rt9r;3)7ht7do10nm_(#LU7b+N zsBg>W(WVzJLbY2xM9dtOge!v(-$c0QY`{_>o|2{)2p6SwJN>~-^F0%>iZEk(3-djJ z$n?^K2eb`zhyd_z85xyoDSrOQ9tY5an%r+V#GHrk6ZWV#s8s38`wjV_WHJL9{0R_k*f`oNSW7; zHA!j0We}p8$hYp~yDW#VFOT@O9croN;;Q~_wCnG*8WOr@>aBi5w_mtAYNo?f@gskX z>7^F{z^z6R144J2O!3PMT$EE0zy%w>bmOA}SQw6!HzhT2XxCtSHV7^OZ}{4;M#7%O zOM0~;gAm_@_l)JO8y@9dT`?qMEP* z^s=dgnW!dfwzFop-t6`Fdzl@`E_8J2z|k=?-9-++DR-Z*67kD_8&W8dNn)#*mj5yc l@lEjm{}" + }, + "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": "{:%Y %B}\n{calendar}", + "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": "{}" + }, + "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": "{:%Y %B}\n{calendar}", + "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": ["", "", ""] + }, + }, +}] + diff --git a/hosts/ankaa/dotfiles/waybar/style.css b/hosts/ankaa/dotfiles/waybar/style.css new file mode 100644 index 0000000..25c10bb --- /dev/null +++ b/hosts/ankaa/dotfiles/waybar/style.css @@ -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 { +} + + diff --git a/hosts/ankaa/hardware-configuration.nix b/hosts/ankaa/hardware-configuration.nix new file mode 100644 index 0000000..1bc337d --- /dev/null +++ b/hosts/ankaa/hardware-configuration.nix @@ -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..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; +} diff --git a/hosts/ankaa/home.nix b/hosts/ankaa/home.nix new file mode 100644 index 0000000..13db0de --- /dev/null +++ b/hosts/ankaa/home.nix @@ -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"; +} diff --git a/modules/backups/home-ankaa.nix b/modules/backups/home-ankaa.nix new file mode 100644 index 0000000..160f400 --- /dev/null +++ b/modules/backups/home-ankaa.nix @@ -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"; + }; + }; +} diff --git a/modules/openssh.nix b/modules/openssh.nix new file mode 100644 index 0000000..85706c0 --- /dev/null +++ b/modules/openssh.nix @@ -0,0 +1,16 @@ +{ lib +, pkgs +, openssh-port ? 22 +, ... +}: + +{ + services.openssh = { + enable = true; + ports = [ openssh-port ]; + settings = { + PermitRootLogin = "no"; + PasswordAuthentication = false; + }; + }; +} diff --git a/pkgs/kickoff-dot-desktop.nix b/pkgs/kickoff-dot-desktop.nix new file mode 100644 index 0000000..c1073d2 --- /dev/null +++ b/pkgs/kickoff-dot-desktop.nix @@ -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 = []; + }; +} + +