Initial configuration

This commit is contained in:
2024-05-28 18:01:06 -05:00
commit fa663e4098
18 changed files with 1040 additions and 0 deletions

162
configuration.nix Normal file
View File

@@ -0,0 +1,162 @@
# 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`).
{
inputs,
outputs,
lib,
config,
pkgs,
...
}: {
imports = [
./hardware-configuration.nix
];
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.systemd-boot.xbootldrMountPoint = "/boot";
boot.loader.efi.efiSysMountPoint = "/efi";
boot.loader.efi.canTouchEfiVariables = true;
powerManagement.powertop.enable = true;
fileSystems = {
"/".options = [ "compress=zstd" ];
"/home".options = [ "compress=zstd" ];
"/nix".options = [ "compress=zstd" "noatime" ];
};
networking.hostName = "alpheratz";
networking.networkmanager.enable = true;
networking.nameservers = [ "192.168.0.100" ];
networking.firewall = {
allowedUDPPorts = [ 51820 ];
};
networking.wg-quick.interfaces = {
wg0 = {
address = [ "10.6.0.5" ];
listenPort = 51820;
privateKeyFile = "/root/wireguard-keys/wg0/private";
dns = [ "10.2.0.100" ];
peers = [
{
publicKey = "pEWHugUnnhWXkJzCIhXryRRZMoCAuvAITDeP4ItenQk=";
presharedKeyFile = "/root/wireguard-keys/wg0/preshared";
allowedIPs = [ "10.2.0.0/24" "192.168.0.0/24" ];
endpoint = "jellyfin.simmer505.com:51820";
persistentKeepalive = 25;
}
];
};
};
# Set your time zone.
time.timeZone = "America/Chicago";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
services.xserver.xkb.layout = "us";
services.xserver.xkb.options = "caps:escape";
fonts.packages = with pkgs; [
font-awesome
];
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
# List packages installed in system profile. To search, run:
environment.systemPackages = with pkgs; with outputs.packages.x86_64-linux; [
wget
curl
ldns
git
killall
vim
wl-clipboard
grim
slurp
waybar
alacritty
kickoff
firefox
bottom
eza
ripgrep
fzf
mpv
wireguard-tools
pulseaudio
eza
pavucontrol
kickoff-dot-desktop
];
programs.sway.enable = true;
programs.fish.enable = true;
programs.thunar.enable = true;
programs.light.enable = true;
programs.neovim = {
enable = true;
defaultEditor = true;
};
xdg.portal.wlr.enable = true;
# Define a user account.
users.users.eesim = {
isNormalUser = true;
extraGroups = [ "wheel" "video" "audo" "networkmanager" ];
packages = with pkgs; [];
shell = pkgs.fish;
};
# List services that you want to enable:
# Enable the OpenSSH daemon.
# services.openssh.enable = true;
# Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true;
# Enable CUPS to print documents.
# services.printing.enable = true;
# Enable sound.
# sound.enable = true;
# hardware.pulseaudio.enable = true;
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# 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?
}

47
dotfiles/fish/config.fish Normal file
View File

@@ -0,0 +1,47 @@
if status is-interactive
### Local environment variables
set -g fish_greeting
set -g fish_cursor_default block
set -g fish_cursor_insert line
set -g fish_cursor_replace_one underscore
set -g fish_cursor_replace underscore
set -g fish_cursor_external line
set -g fish_cursor_visual block
end
if test (tty) = "/dev/tty1"
sway
end
if status is-login
### Environment Variables
# Set nvim to default editor
set -x SUDO_EDITOR = "/usr/bin/nvim"
# Set R library location
set -x R_LIBS_USER = "/home/eesim/.local/lib/R"
# Disable GTK portal
set -x GTK_USE_PORTAL=0
# Wayland environment variables
set -x XDG_CURRENT_DESKTOP = "sway"
set -x XDG_CURRENT_SESSION = "sway"
set -x XDG_SESSION_TYPE = "wayland"
set -x ELECTRON_OZONE_PLATFORM_HINT = "auto"
set -x QT_QPA_PLATFORM = "wayland;xcb"
set -x SDL_VIDEODRIVER = "wayland,x11"
# Java fix
set -x _JAVA_AWT_WM_NONREPARENTING = "1"
### Themes
set -x QT_QPA_PLATFORMTHEME = "qt5ct"
### Start fish
exec fish
end

9
dotfiles/nvim/init.lua Normal file
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,15 @@
{
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"fzf-lua": { "branch": "main", "commit": "b442569ab827f72e344236c598b02cb9dc754e9f" },
"kanagawa.nvim": { "branch": "master", "commit": "860e4f80df71221d18bf2cd9ef1deb4d364274d2" },
"lazy.nvim": { "branch": "main", "commit": "8f19915175395680808de529e4220da8dafc0759" },
"lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" },
"nvim-autopairs": { "branch": "master", "commit": "c15de7e7981f1111642e7e53799e1211d4606cb9" },
"nvim-cmp": { "branch": "main", "commit": "5260e5e8ecadaf13e6b82cf867a909f54e15fd07" },
"nvim-lspconfig": { "branch": "master", "commit": "b972e7154bc94ab4ecdbb38c8edbccac36f83996" },
"nvim-surround": { "branch": "main", "commit": "79aaa42da1f698ed31bcbe7f83081f69dca7ba17" },
"nvim-web-devicons": { "branch": "master", "commit": "e37bb1feee9e7320c76050a55443fa843b4b6f83" },
"rust.vim": { "branch": "master", "commit": "889b9a7515db477f4cb6808bef1769e53493c578" },
"typst.vim": { "branch": "main", "commit": "d9a7650e76c85f8ba437e056d08dd43b01b8bfd6" }
}

View File

@@ -0,0 +1,15 @@
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<CR>')
vim.keymap.set('i', '<S-Tab>', '<C-d>')
vim.keymap.set('n', 'K', vim.lsp.buf.hover, opts)

View File

@@ -0,0 +1,50 @@
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',
'rust-lang/rust.vim',
{
'windwp/nvim-autopairs',
event = 'InsertEnter',
opts={},
},
{
'kaarmu/typst.vim',
ft = 'typst',
lazy = false,
},
}
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,59 @@
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,
},
},
},
},
}
local servers = {'ccls', 'typst_lsp'}
for _, lsp in ipairs(servers) do
lspconfig[lsp].setup {
capabilities = capabilities
}
end
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,40 @@
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/python'

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

210
dotfiles/sway/config Normal file
View File

@@ -0,0 +1,210 @@
### Variables
set $mod Mod4
set $left h
set $down j
set $up k
set $right l
set $term alacritty
set $menu kickoff-dot-desktop | kickoff --from-stdin --stdout | xargs swaymsg exec
### Output configuration
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 $mod+Alt+a exec ydotool key 42:1 54:1 54:0 42:0 40:1 40:0 42:1 54:1 54:0 42:0
bindsym $mod+Alt+o exec ydotool key 42:1 54:1 54:0 42:0 39:1 39:0 42:1 54:1 54:0 42:0
bindsym $mod+Alt+u exec ydotool key 42:1 54:1 54:0 42:0 26:1 26:0 42:1 54:1 54:0 42:0
bindsym $mod+Alt+s exec ydotool key 42:1 54:1 54:0 42:0 12:1 12:0 42:1 54:1 54:0 42:0
### Idle configuration
exec swayidle -w \
timeout 300 'swaylock -f -c 000000' \
timeout 420 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
timeout 600 'systemctl suspend' \
before-sleep 'swaylock -f -c 000000'
### Input configuration
input type:touchpad {
tap enabled
natural_scroll enabled
scroll_factor 0.5
accel_profile adaptive
pointer_accel 0.1
}
input type:keyboard {
xkb_layout us,de
xkb_options caps:escape,grp:shifts_toggle
}
### Key bindings
bindsym XF86MonBrightnessDown exec light -U 5
bindsym XF86MonBrightnessUp exec light -A 5
bindsym $mod+Shift+s exec grim -g "$(slurp)"
floating_modifier $mod normal
# Start a terminal
bindsym $mod+Return exec $term
# Kill focused window
bindsym $mod+Shift+q kill
# Start your launcher
bindsym $mod+Space exec $menu
# 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'
# 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
# Switch to workspace
bindsym $mod+1 workspace number 1
bindsym $mod+2 workspace number 2
bindsym $mod+3 workspace number 3
bindsym $mod+4 workspace number 4
bindsym $mod+5 workspace number 5
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 number 1
bindsym $mod+Shift+2 move container to workspace number 2
bindsym $mod+Shift+3 move container to workspace number 3
bindsym $mod+Shift+4 move container to workspace number 4
bindsym $mod+Shift+5 move container to workspace number 5
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
for_window [app_id="simmer505.waywrite"] floating enable
for_window [app_id="org.speedcrunch.speedcrunch"] floating enable
# Horizontal and vertical splits
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+p floating toggle
# Swap focus between the tiling area and the floating area
bindsym $mod+p focus mode_toggle
# Move focus to the parent container
bindsym $mod+a focus parent
### Scratchpad:
# Move the currently focused window to the scratchpad
bindsym $mod+Shift+minus move scratchpad
# Show the next scratchpad window or hide the focused scratchpad window.
# If there are multiple scratchpad windows, this command cycles through them.
bindsym $mod+minus scratchpad show
### Resizing containers:
mode "resize" {
bindsym $left resize shrink width 20px
bindsym $down resize grow height 20px
bindsym $up resize shrink height 20px
bindsym $right resize grow width 20px
bindsym Left resize shrink width 20px
bindsym Down resize grow height 20px
bindsym Up resize shrink height 20px
bindsym Right resize grow width 20px
# Return to default mode
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+r mode "resize"
### Style
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 4
font pango:SourceCodePro Medium 1
### Status Bar:
bar {
swaybar_command waybar
}
include /etc/sway/config.d/*

80
dotfiles/waybar/config Normal file
View File

@@ -0,0 +1,80 @@
{
"layer": "top", // Waybar at top layer
"output": "eDP-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", "battery", "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}"
},
"battery": {
"format": "{capacity}% "
},
"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": ["", "", ""]
},
},
}

102
dotfiles/waybar/style.css Normal file
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 {
}

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
}

40
flake.nix Normal file
View File

@@ -0,0 +1,40 @@
{
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 = {
alpheratz = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {inherit inputs outputs;};
modules = [
./configuration.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.eesim = import ./home.nix;
}
];
};
};
packages = nixpkgs.lib.genAttrs [ "x86_64-linux" ] (system:
let
pkgs = import nixpkgs { inherit system; config.allowUnfree = true; };
in
{
pkgs = pkgs // removeAttrs self.packages.${system} [ "pkgs" ];
kickoff-dot-desktop = pkgs.callPackage ./pkgs/kickoff-dot-desktop.nix { };
}
);
};
}

View File

@@ -0,0 +1,45 @@
# 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 = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/ad45b094-608d-4850-b5ba-0f3917947629";
fsType = "btrfs";
options = [ "subvol=root" ];
};
fileSystems."/home" =
{ device = "/dev/disk/by-uuid/ad45b094-608d-4850-b5ba-0f3917947629";
fsType = "btrfs";
options = [ "subvol=home" ];
};
fileSystems."/nix" =
{ device = "/dev/disk/by-uuid/ad45b094-608d-4850-b5ba-0f3917947629";
fsType = "btrfs";
options = [ "subvol=nix" ];
};
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.wlp0s20f3.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

49
home.nix Normal file
View File

@@ -0,0 +1,49 @@
{
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;
programs.git = {
enable = true;
userName = "Ethan Simmons";
userEmail = "eesimmons9105@gmail.com";
};
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,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 = [];
};
}