Major cleanup for files

Reduce complexity and in flake.nix and be more efficient in re-using
things

Removed some reduandant files in home/ and tidied up the structure
somewhat

Moved things from desktop, gui, etc... to top level

Changed env to shell, indiv shell expressions import relevant others
This commit is contained in:
Evie Litherland-Smith 2023-07-16 17:35:36 +01:00
parent dc9374c769
commit b102f9e209
147 changed files with 468 additions and 3798 deletions

123
flake.nix
View file

@ -18,16 +18,30 @@
};
};
outputs = inputs: let
outputs = {
self,
nixpkgs,
home-manager,
...
} @ inputs: {
nixosConfigurations = let
topLevel = ./.;
userConfig = {
isNormalUser = true;
description = "Evie Litherland-Smith";
extraGroups = ["networkmanager" "wheel"];
shell = pkgs.fish;
openssh.authorizedKeys.keys = import ./auth/authorized_keys.nix;
};
specialArgs = {inherit inputs topLevel userConfig;};
waybar-experimental-overlay = final: prev: {
waybar = prev.waybar.overrideAttrs (oldAttrs: {
mesonFlags = oldAttrs.mesonFlags ++ ["-Dexperimental=true"];
});
};
system = "x86_64-linux";
specialArgs = {inputs = inputs;};
pkgs = import inputs.nixpkgs {
system = system;
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
overlays = [
waybar-experimental-overlay
@ -35,68 +49,57 @@
];
};
in {
nixosConfigurations = {
Legion = inputs.nixpkgs.lib.nixosSystem {
specialArgs = specialArgs;
pkgs = pkgs;
modules = [./hosts/Legion];
Legion = let
hostname = "Legion";
in
nixpkgs.lib.nixosSystem {
inherit pkgs specialArgs;
modules = [./hosts/${hostname}/configuration.nix];
};
Vanguard = inputs.nixpkgs.lib.nixosSystem {
specialArgs = specialArgs;
pkgs = pkgs;
modules = [./hosts/Vanguard];
Vanguard = let
hostname = "Vanguard";
in
nixpkgs.lib.nixosSystem {
inherit pkgs specialArgs;
modules = [./hosts/${hostname}/configuration.nix];
};
Ronin = inputs.nixpkgs.lib.nixosSystem {
specialArgs = specialArgs;
pkgs = pkgs;
modules = [./hosts/Ronin];
Ronin = let
hostname = "Ronin";
in
nixpkgs.lib.nixosSystem {
inherit pkgs specialArgs;
modules = [./hosts/${hostname}/configuration.nix];
};
};
homeConfigurations = {
"tux@Monarch" = inputs.home-manager.lib.homeManagerConfiguration {
pkgs = inputs.nixpkgs.legacyPackages."aarch64-darwin";
modules = [
({pkgs, ...}: {
imports = [./home/personal.nix ./home/gui/wezterm];
home = {
username = "tux";
homeDirectory = "/Users/tux";
stateVersion = "23.05";
packages = [pkgs.gcc];
homeConfigurations = let
extraSpecialArgs = {inherit inputs;};
in {
# NixOS home configurations
"xenia@Vanguard" = let
hostname = "Vanguard";
pkgs = self.nixosConfigurations.${hostname}.pkgs;
in
home-manager.lib.homeManagerConfiguration {
inherit pkgs extraSpecialArgs;
modules = [./hosts/${hostname}/home.nix];
};
programs = {
home-manager.enable = true;
zsh = {
sessionVariables.CC = "${pkgs.gcc}/bin/gcc";
envExtra = ''
eval "$(/opt/homebrew/bin/brew shellenv)"
'';
"elitherl@Ronin" = let
hostname = "Ronin";
pkgs = self.nixosConfigurations.${hostname}.pkgs;
in
home-manager.lib.homeManagerConfiguration {
inherit pkgs extraSpecialArgs;
modules = [./hosts/${hostname}/home.nix];
};
};
services.syncthing.enable = true;
})
];
};
"xenia@Northstar" = inputs.home-manager.lib.homeManagerConfiguration {
pkgs = inputs.nixpkgs.legacyPackages."aarch64-linux";
modules = [
{
imports = [./home/personal.nix];
home = {
username = "xenia";
homeDirectory = "/home/xenia";
stateVersion = "22.11";
};
programs = {
home-manager.enable = true;
bash.bashrcExtra = ''
source $HOME/.nix-profile/etc/profile.d/nix.sh
'';
};
services.syncthing.enable = true;
fonts.fontconfig.enable = true;
}
];
# Legacy home configurations
"tux@Monarch" = let
hostname = "Monarch";
system = "aarch64-darwin";
pkgs = inputs.nixpkgs.legacyPackages.${system};
in
home-manager.lib.homeManagerConfiguration {
inherit pkgs extraSpecialArgs;
modules = [./hosts/${hostname}/home.nix];
};
};
};

View file

@ -1 +0,0 @@
{...}: {imports = [./env ./tui];}

View file

@ -1,7 +0,0 @@
{pkgs, ...}: {
xdg.configFile."awesome/rc.lua".source = ./rc.lua;
xsession.windowManager.awesome = {
enable = true;
luaModules = [pkgs.luaPackages.vicious];
};
}

View file

@ -1,584 +0,0 @@
-- If LuaRocks is installed, make sure that packages installed through it are
-- found (e.g. lgi). If LuaRocks is not installed, do nothing.
pcall(require, "luarocks.loader")
-- Standard awesome library
local awesome = require "awesome"
local root = require "root"
local gears = require "gears"
local awful = require "awful"
require "awful.autofocus"
-- Widget and layout library
local wibox = require "wibox"
-- Theme handling library
local beautiful = require "beautiful"
-- Notification library
local naughty = require "naughty"
local menubar = require "menubar"
local hotkeys_popup = require "awful.hotkeys_popup"
-- Enable hotkeys help widget for VIM and other apps
-- when client with a matching name is opened:
require "awful.hotkeys_popup.keys"
-- {{{ Error handling
-- Check if awesome encountered an error during startup and fell back to
-- another config (This code will only ever execute for the fallback config)
if awesome.startup_errors then
naughty.notify {
preset = naughty.config.presets.critical,
title = "Oops, there were errors during startup!",
text = awesome.startup_errors,
}
end
-- Handle runtime errors after startup
do
local in_error = false
awesome.connect_signal("debug::error", function(err)
-- Make sure we don't go into an endless error loop
if in_error then return end
in_error = true
naughty.notify {
preset = naughty.config.presets.critical,
title = "Oops, an error happened!",
text = tostring(err),
}
in_error = false
end)
end
-- }}}
-- {{{ Variable definitions
-- Themes define colours, icons, font and wallpapers.
beautiful.init(gears.filesystem.get_themes_dir() .. "gtk/theme.lua")
-- This is used later as the default terminal and editor to run.
local terminal = "wezterm"
local editor = "nvim"
local editor_cmd = terminal .. " -e " .. editor
-- Default modkey.
-- Usually, Mod4 is the key with a logo between Control and Alt.
-- If you do not like this or do not have such a key,
-- I suggest you to remap Mod4 to another key using xmodmap or other tools.
-- However, you can use another modifier like Mod1, but it may interact with others.
local modkey = "Mod4"
-- Table of layouts to cover with awful.layout.inc, order matters.
awful.layout.layouts = {
awful.layout.suit.tile,
awful.layout.suit.fair,
awful.layout.suit.max,
awful.layout.suit.magnifier,
awful.layout.suit.floating,
}
-- }}}
-- {{{ Menu
-- Create a launcher widget and a main menu
local menuitems = {
{ "hotkeys", function() hotkeys_popup.show_help(nil, awful.screen.focused()) end },
{ "manual", terminal .. " -e man awesome" },
{ "edit config", editor_cmd .. " " .. awesome.conffile },
{ "restart", awesome.restart },
{ "quit", function() awesome.quit() end },
}
local mainmenu = awful.menu {
items = {
{ "awesome", menuitems, beautiful.awesome_icon },
{ "open terminal", terminal },
{ "open" .. editor, editor_cmd },
},
}
local launcher = awful.widget.launcher { image = beautiful.awesome_icon, menu = mainmenu }
-- Menubar configuration
menubar.utils.terminal = terminal -- Set the terminal for applications that require it
-- }}}
-- Keyboard map indicator and switcher
local keyboard_layout = awful.widget.keyboardlayout()
-- {{{ Wibar
-- Create a textclock widget
local mytextclock = wibox.widget.textclock()
-- Create a wibox for each screen and add it
local taglist_buttons = gears.table.join(
awful.button({}, 1, function(t) t:view_only() end),
awful.button({ modkey }, 1, function(t)
if client.focus then client.focus:move_to_tag(t) end
end),
awful.button({}, 3, awful.tag.viewtoggle),
awful.button({ modkey }, 3, function(t)
if client.focus then client.focus:toggle_tag(t) end
end),
awful.button({}, 4, function(t) awful.tag.viewnext(t.screen) end),
awful.button({}, 5, function(t) awful.tag.viewprev(t.screen) end)
)
local tasklist_buttons = gears.table.join(
awful.button({}, 1, function(c)
if c == client.focus then
c.minimized = true
else
c:emit_signal("request::activate", "tasklist", { raise = true })
end
end),
awful.button({}, 3, function() awful.menu.client_list { theme = { width = 250 } } end),
awful.button({}, 4, function() awful.client.focus.byidx(1) end),
awful.button({}, 5, function() awful.client.focus.byidx(-1) end)
)
local function set_wallpaper(s)
-- Wallpaper
if beautiful.wallpaper then
local wallpaper = beautiful.wallpaper
-- If wallpaper is a function, call it with the screen
if type(wallpaper) == "function" then wallpaper = wallpaper(s) end
gears.wallpaper.maximized(wallpaper, s, true)
end
end
-- Re-set wallpaper when a screen's geometry changes (e.g. different resolution)
screen.connect_signal("property::geometry", set_wallpaper)
awful.screen.connect_for_each_screen(function(s)
-- Wallpaper
set_wallpaper(s)
-- Each screen has its own tag table.
awful.tag({ "main", "dev", "browser", "files", "chat", "remote" }, s, {
awful.layout.suit.tile,
awful.layout.suit.tile,
awful.layout.suit.tile,
awful.layout.suit.tile,
awful.layout.suit.tile,
awful.layout.suit.max,
})
-- Create a promptbox for each screen
s.mypromptbox = awful.widget.prompt()
-- Create an imagebox widget which will contain an icon indicating which layout we're using.
-- We need one layoutbox per screen.
s.mylayoutbox = awful.widget.layoutbox(s)
s.mylayoutbox:buttons(
gears.table.join(
awful.button({}, 1, function() awful.layout.inc(1) end),
awful.button({}, 3, function() awful.layout.inc(-1) end),
awful.button({}, 4, function() awful.layout.inc(1) end),
awful.button({}, 5, function() awful.layout.inc(-1) end)
)
)
-- Create a taglist widget
s.mytaglist = awful.widget.taglist {
screen = s,
filter = awful.widget.taglist.filter.all,
buttons = taglist_buttons,
}
-- Create a tasklist widget
s.mytasklist = awful.widget.tasklist {
screen = s,
filter = awful.widget.tasklist.filter.currenttags,
buttons = tasklist_buttons,
}
-- Create the wibox
s.mywibox = awful.wibar { position = "top", screen = s }
-- Add widgets to the wibox
s.mywibox:setup {
layout = wibox.layout.align.horizontal,
{ -- Left widgets
layout = wibox.layout.fixed.horizontal,
launcher,
s.mytaglist,
s.mypromptbox,
},
s.mytasklist, -- Middle widget
{ -- Right widgets
layout = wibox.layout.fixed.horizontal,
keyboard_layout,
wibox.widget.systray(),
mytextclock,
s.mylayoutbox,
},
}
end)
-- }}}
-- {{{ Mouse bindings
root.buttons(
gears.table.join(
awful.button({}, 3, function() mainmenu:toggle() end),
awful.button({}, 4, awful.tag.viewnext),
awful.button({}, 5, awful.tag.viewprev)
)
)
-- }}}
-- {{{ Key bindings
local globalkeys = gears.table.join(
awful.key({ modkey }, "s", hotkeys_popup.show_help, { description = "show help", group = "awesome" }),
awful.key({ modkey }, "w", function() mainmenu:show() end, { description = "show main menu", group = "awesome" }),
awful.key({ modkey }, ",", awful.tag.viewprev, { description = "view previous", group = "tag" }),
awful.key({ modkey }, ".", awful.tag.viewnext, { description = "view next", group = "tag" }),
awful.key({ modkey }, "`", awful.tag.history.restore, { description = "go back", group = "tag" }),
awful.key(
{ modkey },
"[",
function() awful.screen.focus_relative(-1) end,
{ description = "focus the previous screen", group = "screen" }
),
awful.key(
{ modkey },
"]",
function() awful.screen.focus_relative(1) end,
{ description = "focus the next screen", group = "screen" }
),
awful.key(
{ modkey },
"j",
function() awful.client.focus.byidx(1) end,
{ description = "focus next by index", group = "client" }
),
awful.key(
{ modkey },
"k",
function() awful.client.focus.byidx(-1) end,
{ description = "focus previous by index", group = "client" }
),
awful.key(
{ modkey, "Shift" },
"j",
function() awful.client.swap.byidx(1) end,
{ description = "swap with next client by index", group = "client" }
),
awful.key(
{ modkey, "Shift" },
"k",
function() awful.client.swap.byidx(-1) end,
{ description = "swap with previous client by index", group = "client" }
),
-- Layout manipulation
awful.key({ modkey }, "u", awful.client.urgent.jumpto, { description = "jump to urgent client", group = "client" }),
awful.key({ modkey }, "Tab", function()
awful.client.focus.history.previous()
if client.focus then client.focus:raise() end
end, { description = "go back", group = "client" }),
-- Standard program
awful.key(
{ modkey },
"Return",
function() awful.spawn(terminal) end,
{ description = "open a terminal", group = "launcher" }
),
awful.key({ modkey, "Control" }, "r", awesome.restart, { description = "reload awesome", group = "awesome" }),
awful.key({ modkey, "Shift" }, "q", awesome.quit, { description = "quit awesome", group = "awesome" }),
awful.key(
{ modkey },
"l",
function() awful.tag.incmwfact(0.05) end,
{ description = "increase master width factor", group = "layout" }
),
awful.key(
{ modkey },
"h",
function() awful.tag.incmwfact(-0.05) end,
{ description = "decrease master width factor", group = "layout" }
),
awful.key(
{ modkey, "Shift" },
"h",
function() awful.tag.incnmaster(1, nil, true) end,
{ description = "increase the number of master clients", group = "layout" }
),
awful.key(
{ modkey, "Shift" },
"l",
function() awful.tag.incnmaster(-1, nil, true) end,
{ description = "decrease the number of master clients", group = "layout" }
),
awful.key(
{ modkey, "Control" },
"h",
function() awful.tag.incncol(1, nil, true) end,
{ description = "increase the number of columns", group = "layout" }
),
awful.key(
{ modkey, "Control" },
"l",
function() awful.tag.incncol(-1, nil, true) end,
{ description = "decrease the number of columns", group = "layout" }
),
awful.key(
{ modkey },
"space",
function() awful.layout.inc(1) end,
{ description = "select next", group = "layout" }
),
awful.key(
{ modkey, "Shift" },
"space",
function() awful.layout.inc(-1) end,
{ description = "select previous", group = "layout" }
),
awful.key({ modkey, "Control" }, "n", function()
local c = awful.client.restore()
-- Focus restored client
if c then c:emit_signal("request::activate", "key.unminimize", { raise = true }) end
end, { description = "restore minimized", group = "client" }),
-- Prompt
awful.key(
{ modkey },
"r",
function() awful.screen.focused().mypromptbox:run() end,
{ description = "run prompt", group = "launcher" }
),
awful.key(
{ modkey },
"x",
function()
awful.prompt.run {
prompt = "Run Lua code: ",
textbox = awful.screen.focused().mypromptbox.widget,
exe_callback = awful.util.eval,
history_path = awful.util.get_cache_dir() .. "/history_eval",
}
end,
{ description = "lua execute prompt", group = "awesome" }
),
-- Menubar
awful.key({ modkey }, "p", function() menubar.show() end, { description = "show the menubar", group = "launcher" })
)
local clientkeys = gears.table.join(
awful.key({ modkey }, "f", function(c)
c.fullscreen = not c.fullscreen
c:raise()
end, { description = "toggle fullscreen", group = "client" }),
awful.key({ modkey, "Shift" }, "c", function(c) c:kill() end, { description = "close", group = "client" }),
awful.key(
{ modkey, "Control" },
"space",
awful.client.floating.toggle,
{ description = "toggle floating", group = "client" }
),
awful.key(
{ modkey, "Control" },
"Return",
function(c) c:swap(awful.client.getmaster()) end,
{ description = "move to master", group = "client" }
),
awful.key({ modkey }, "o", function(c) c:move_to_screen() end, { description = "move to screen", group = "client" }),
awful.key(
{ modkey },
"t",
function(c) c.ontop = not c.ontop end,
{ description = "toggle keep on top", group = "client" }
),
awful.key({ modkey }, "n", function(c)
-- The client currently has the input focus, so it cannot be
-- minimized, since minimized clients can't have the focus.
c.minimized = true
end, { description = "minimize", group = "client" }),
awful.key({ modkey }, "m", function(c)
c.maximized = not c.maximized
c:raise()
end, { description = "(un)maximize", group = "client" }),
awful.key({ modkey, "Control" }, "m", function(c)
c.maximized_vertical = not c.maximized_vertical
c:raise()
end, { description = "(un)maximize vertically", group = "client" }),
awful.key({ modkey, "Shift" }, "m", function(c)
c.maximized_horizontal = not c.maximized_horizontal
c:raise()
end, { description = "(un)maximize horizontally", group = "client" })
)
-- Bind all key numbers to tags.
-- Be careful: we use keycodes to make it work on any keyboard layout.
-- This should map on the top row of your keyboard, usually 1 to 9.
for i = 1, 9 do
globalkeys = gears.table.join(
globalkeys,
-- View tag only.
awful.key({ modkey }, "#" .. i + 9, function()
local screen = awful.screen.focused()
local tag = screen.tags[i]
if tag then tag:view_only() end
end, { description = "view tag #" .. i, group = "tag" }),
-- Toggle tag display.
awful.key({ modkey, "Control" }, "#" .. i + 9, function()
local screen = awful.screen.focused()
local tag = screen.tags[i]
if tag then awful.tag.viewtoggle(tag) end
end, { description = "toggle tag #" .. i, group = "tag" }),
-- Move client to tag.
awful.key({ modkey, "Shift" }, "#" .. i + 9, function()
if client.focus then
local tag = client.focus.screen.tags[i]
if tag then client.focus:move_to_tag(tag) end
end
end, { description = "move focused client to tag #" .. i, group = "tag" }),
-- Toggle tag on focused client.
awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9, function()
if client.focus then
local tag = client.focus.screen.tags[i]
if tag then client.focus:toggle_tag(tag) end
end
end, { description = "toggle focused client on tag #" .. i, group = "tag" })
)
end
local clientbuttons = gears.table.join(
awful.button({}, 1, function(c) c:emit_signal("request::activate", "mouse_click", { raise = true }) end),
awful.button({ modkey }, 1, function(c)
c:emit_signal("request::activate", "mouse_click", { raise = true })
awful.mouse.client.move(c)
end),
awful.button({ modkey }, 3, function(c)
c:emit_signal("request::activate", "mouse_click", { raise = true })
awful.mouse.client.resize(c)
end)
)
-- Set keys
root.keys(globalkeys)
-- }}}
-- {{{ Rules
-- Rules to apply to new clients (through the "manage" signal).
awful.rules.rules = {
-- All clients will match this rule.
{
rule = {},
properties = {
border_width = beautiful.border_width,
border_color = beautiful.border_normal,
focus = awful.client.focus.filter,
raise = true,
keys = clientkeys,
buttons = clientbuttons,
screen = awful.screen.preferred,
placement = awful.placement.no_overlap + awful.placement.no_offscreen,
},
},
-- Floating clients.
{
rule_any = {
instance = {
"DTA", -- Firefox addon DownThemAll.
"copyq", -- Includes session name in class.
"pinentry",
},
class = {
"Arandr",
"Blueman-manager",
"Gpick",
"Kruler",
"MessageWin", -- kalarm.
"Sxiv",
"Tor Browser", -- Needs a fixed window size to avoid fingerprinting by screen size.
"Wpa_gui",
"veromix",
"xtightvncviewer",
},
-- Note that the name property shown in xprop might be set slightly after creation of the client
-- and the name shown there might not match defined rules here.
name = {
"Event Tester", -- xev.
},
role = {
"AlarmWindow", -- Thunderbird's calendar.
"ConfigManager", -- Thunderbird's about:config.
"pop-up", -- e.g. Google Chrome's (detached) Developer Tools.
},
},
properties = { floating = true },
},
-- Add titlebars to normal clients and dialogs
{ rule_any = { type = { "normal", "dialog" } }, properties = { titlebars_enabled = true } },
-- Set Firefox to always map on the tag named "2" on screen 1.
-- { rule = { class = "Firefox" },
-- properties = { screen = 1, tag = "2" } },
}
-- }}}
-- {{{ Signals
-- Signal function to execute when a new client appears.
client.connect_signal("manage", function(c)
-- Set the windows at the slave,
-- i.e. put it at the end of others instead of setting it master.
-- if not awesome.startup then awful.client.setslave(c) end
if awesome.startup and not c.size_hints.user_position and not c.size_hints.program_position then
-- Prevent clients from being unreachable after screen count changes.
awful.placement.no_offscreen(c)
end
end)
-- Add a titlebar if titlebars_enabled is set to true in the rules.
client.connect_signal("request::titlebars", function(c)
-- buttons for the titlebar
local buttons = gears.table.join(
awful.button({}, 1, function()
c:emit_signal("request::activate", "titlebar", { raise = true })
awful.mouse.client.move(c)
end),
awful.button({}, 3, function()
c:emit_signal("request::activate", "titlebar", { raise = true })
awful.mouse.client.resize(c)
end)
)
awful.titlebar(c):setup {
{ -- Left
awful.titlebar.widget.iconwidget(c),
buttons = buttons,
layout = wibox.layout.fixed.horizontal,
},
{ -- Middle
{ -- Title
align = "center",
widget = awful.titlebar.widget.titlewidget(c),
},
buttons = buttons,
layout = wibox.layout.flex.horizontal,
},
{ -- Right
awful.titlebar.widget.floatingbutton(c),
awful.titlebar.widget.maximizedbutton(c),
awful.titlebar.widget.stickybutton(c),
awful.titlebar.widget.ontopbutton(c),
awful.titlebar.widget.closebutton(c),
layout = wibox.layout.fixed.horizontal(),
},
layout = wibox.layout.align.horizontal,
}
end)
-- Enable sloppy focus, so that focus follows mouse.
client.connect_signal(
"mouse::enter",
function(c) c:emit_signal("request::activate", "mouse_enter", { raise = false }) end
)
client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end)
client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)
-- }}}

View file

@ -1,83 +0,0 @@
{...}: {
imports = [./xfce.nix];
xsession.windowManager.bspwm = {
enable = true;
settings = {
window_gap = 12;
border_width = 2;
split_ratio = 0.5;
borderless_monocle = false;
gapless_monocle = false;
pointer_modifier = "mod4";
pointer_action1 = "move";
pointer_action2 = "resize_side";
pointer_action3 = "resize_corner";
focus_follows_pointer = true;
};
monitors."primary" = ["main" "dev" "browser" "files" "chat" "remote" "steam" "misc"];
rules = {
"Xfce4-terminal".state = "floating";
"Nm-connection-editor".state = "floating";
"Qemu-system-x86_64".state = "floating";
"Pavucontrol".state = "floating";
"Otpclient".state = "floating";
".blueman-manager-wrapped".state = "floating";
"neovide".desktop = "dev";
"firefox".desktop = "browser";
"Thunar".desktop = "files";
"Element".desktop = "chat";
"Signal".desktop = "chat";
"teams-for-linux".desktop = "chat";
"Nxplayer.bin".desktop = "remote";
};
extraConfig = ''
xsetroot -cursor_name left_ptr
polybar-msg cmd quit
echo "---" | tee -a /tmp/polybar.log
polybar 2>&1 | tee -a /tmp/polybar.log & disown
echo "Bars launched..."
'';
};
services.sxhkd = {
enable = true;
keybindings = {
# Terminal emulators
"super + Return" = "wezterm";
"super + shift + Return" = "xfce4-terminal --drop-down";
# Launcher
"super + @space" = "rofi -show drun";
# Shortcuts
"super + shift + q" = "xfce4-session-logout";
"super + F1" = "xfce4-screensaver-command --lock";
"super + r" = "bspc desktop -f files && wezterm -e ranger";
"super + n" = "bspc desktop -f dev && neovide --multigrid --maximized";
# bspwm hotkeys
"super + Escape" = "pkill -USR1 -x sxhkd";
"super + alt + {q,r}" = "bspc {quit,wm -r}";
"super + {_,shift + }q" = "bspc node -{c,k}";
"super + m" = "bspc desktop -l next";
# State/Flags
"super + {t,shift + t,v,shift + m}" = "bspc node -t {tiled,pseudo_tiled,floating,fullscreen}";
# Focus/Scap
"super + {_,shift + }{h,j,k,l}" = "bspc node -{f,s} {west,south,north,east}";
"super + {_,shift + }{Left,Down,Up,Right}" = "bspc node -{f,s} {west,south,north,east}";
"super + {_,shift + }{comma,period}" = "bspc {desktop -f,node -d} {prev,next}.local.occupied --follow";
"super + {_,shift + }c" = "bspc node -f {next,prev}.local.!hidden.window";
"super + {_,shift + }bracket{left,right}" = "bspc {monitor -f,node -m} {prev,next} --follow";
"super + {grave,Tab}" = "bspc {node,desktop} -f last";
"super + {_,shift + }{a,s,d,f,u,i,o,p}" = "bspc {desktop -f,node -d} '{main,dev,browser,files,chat,remote,steam,misc}' --follow";
# Preselect
"super + ctrl + {h,j,k,l}" = "bspc node -p {west,south,north,east}";
"super + ctrl + space" = "bspc node -p cancel";
"super + ctrl + shift + space" = "bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel";
# Screenshot
"Print" = "flameshot gui";
# Volume control keys
"XF86AudioMute" = "pamixer -t";
"XF86AudioRaiseVolume" = "pamixer -i 2";
"XF86AudioLowerVolume" = "pamixer -d 2";
"XF86MonBrightnessUp" = "xbacklight +10";
"XF86MonBrightnessDown" = "xbacklight -10";
};
};
}

View file

@ -1 +0,0 @@
// vim:ft=scss

View file

@ -1,24 +0,0 @@
(deflisten workspaces :initial "[]" "bash ~/.config/eww/scripts/get-workspaces")
(deflisten current_workspace :initial "1" "bash ~/.config/eww/scripts/get-active-workspace")
(defwidget workspaces []
(eventbox :onscroll "bash ~/.config/eww/scripts/change-active-workspace {} ${current_workspace}" :class "workspaces-widget"
(box :space-evenly true
(label :text "${workspaces}${current_workspace}" :visible false)
(for workspace in workspaces
(eventbox :onclick "hyprctl dispatch workspace ${workspace.id}"
(box :class "workspace-entry ${workspace.id == current_workspace ? "current" : ""} ${workspace.windows > 0 ? "occupied" : "empty"}"
(label :text "${workspace.id}")
)
)
)
)
)
)
(deflisten window :initial "..." "sh ~/.config/eww/scripts/get-window-title")
(defwidget window_w []
(box
(label :text "${window}"
)
)
)
;; vim:ft=yuck

View file

@ -1,21 +0,0 @@
#! /bin/bash
function clamp {
min=$1
max=$2
val=$3
python -c "print(max($min, min($val, $max)))"
}
direction=$1
current=$2
if test "$direction" = "down"
then
target=$(clamp 1 10 $(($current+1)))
echo "jumping to $target"
hyprctl dispatch workspace "$target"
elif test "$direction" = "up"
then
target=$(clamp 1 10 $(($current-1)))
echo "jumping to $target"
hyprctl dispatch workspace "$target"
fi

View file

@ -1,6 +0,0 @@
#!/usr/bin/env bash
hyprctl monitors -j | jq '.[] | select(.focused) | .activeWorkspace.id'
socat -u UNIX-CONNECT:/tmp/hypr/"$HYPRLAND_INSTANCE_SIGNATURE"/.socket2.sock - |\
stdbuf -o0 awk -F '>>|,' -e '/^workspace>>/ {print $2}' -e '/^focusedmon>>/ {print $3}'

View file

@ -1,3 +0,0 @@
#!/bin/sh
hyprctl activewindow -j | jq --raw-output .title
socat -u UNIX-CONNECT:/tmp/hypr/"$HYPRLAND_INSTANCE_SIGNATURE"/.socket2.sock - | stdbuf -o0 awk -F '>>|,' '/^activewindow>>/{print $3}'

View file

@ -1,11 +0,0 @@
#!/bin/bash
spaces (){
WORKSPACE_WINDOWS=$(hyprctl workspaces -j | jq 'map({key: .id | tostring, value: .windows}) | from_entries')
seq 1 10 | jq --argjson windows "$WORKSPACE_WINDOWS" --slurp -Mc 'map(tostring) | map({id: ., windows: ($windows[.]//0)})'
}
spaces
socat -u UNIX-CONNECT:/tmp/hypr/"$HYPRLAND_INSTANCE_SIGNATURE"/.socket2.sock - | while read -r line; do
spaces
done

View file

@ -1,11 +0,0 @@
{pkgs, ...}: {
home.packages = with pkgs; [
jq
socat
];
programs.eww = {
enable = true;
package = pkgs.eww-wayland;
configDir = ./config;
};
}

View file

@ -1,16 +0,0 @@
{...}: {
services.picom = {
enable = true;
backend = "glx";
activeOpacity = 1.0;
inactiveOpacity = 1.0;
menuOpacity = 1.0;
settings = {
blur = {
method = "dual_kawase";
strength = 5;
};
corner-radius = 10;
};
};
}

View file

@ -1,8 +0,0 @@
{pkgs, ...}: {
home.packages = with pkgs; [bluez];
services.polybar = {
enable = true;
config = ./polybar.ini;
script = "${pkgs.polybar}/bin/polybar &";
};
}

View file

@ -1,229 +0,0 @@
;==========================================================
;
;
; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗
; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗
; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝
; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗
; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║
; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝
;
;
; To learn more about how to configure Polybar
; go to https://github.com/polybar/polybar
;
; The README contains a lot of information
;
;==========================================================
[colors]
base = #24273a
mantle = #1e2030
crust = #181926
text = #cad3f5
subtext0 = #a5adcb
subtext1 = #b8c0e0
surface0 = #363a4f
surface1 = #494d64
surface2 = #5b6078
overlay0 = #6e738d
overlay1 = #8087a2
overlay2 = #939ab7
blue = #8aadf4
lavender = #b7bdf8
sapphire = #7dc4e4
sky = #91d7e3
teal = #8bd5ca
green = #a6da95
yellow = #eed49f
peach = #f5a97f
maroon = #ee99a0
red = #ed8796
mauve = #c6a0f6
pink = #f5bde6
flamingo = #f0c6c6
rosewater = #f4dbd6
transparent = #00000000
background = ${colors.base}
background-alt = ${colors.crust}
foreground = ${colors.text}
primary = ${colors.lavender}
secondary = ${colors.mauve}
alert = ${colors.red}
disabled = ${colors.surface0}
[common]
height = 24pt
radius = 6
dpi = 0
font-0 = FiraCode Nerd Font;size=12
font-1 = Noto Sans;size=12
line-size = 3pt
background = ${colors.background}
foreground = ${colors.foreground}
padding = 1
module-margin = 1
border-size = 4pt
border-color = ${colors.background}
wm-restack = generic
override-redirect = false
separator = |
separator-foreground = ${colors.disabled}
enable-ipc = true
[settings]
screenchange-reload = true
pseudo-transparency = false
[bar/main]
inherit = common
width = 100%
modules-left = launcher time date cpu memory
modules-center = xworkspaces
modules-right = pulseaudio wlan eth backlight battery power-menu
[module/launcher]
type = custom/text
content = " "
click-left = "rofi -show drun &"
[module/power-menu]
type = custom/text
content = " "
click-left = "powermenu"
[module/xworkspaces]
type = internal/xworkspaces
icon-0 = "main;[a] 󰟀 "
icon-1 = "dev;[s] 󰅴 "
icon-2 = "browser;[d] 󰈹 "
icon-3 = "files;[f] 󰝰 "
icon-4 = "chat;[u] 󰭹 "
icon-5 = "remote;[i]  "
icon-6 = "steam;[o] 󰓓 "
icon-7 = "misc;[p] 󰣙 "
icon-default = "󰣘 "
label-active = %icon%
label-active-background = ${colors.background-alt}
label-active-underline= ${colors.primary}
label-active-padding = 1
label-occupied = %icon%
label-occupied-padding = 1
label-urgent = %icon%
label-urgent-background = ${colors.alert}
label-urgent-padding = 1
label-empty = %icon%
label-empty-foreground = ${colors.disabled}
label-empty-padding = 1
[module/memory]
type = internal/memory
interval = 2
format-prefix = "󰍛 "
format-prefix-foreground = ${colors.primary}
label = %percentage_used:2%%
[module/cpu]
type = internal/cpu
interval = 2
format-prefix = "󰻠 "
format-prefix-foreground = ${colors.primary}
label = %percentage:2%%
[network-base]
type = internal/network
interval = 5
format-connected = <label-connected>
format-disconnected = <label-disconnected>
[module/wlan]
inherit = network-base
interface-type = wireless
label-connected = "󰖩 %essid%"
label-disconnected = "󰖪 "
[module/eth]
inherit = network-base
interface-type = wired
label-connected = "󰈁 "
label-disconnected = "󰈂 "
[module/date]
type = internal/date
interval = 3600
date = %A %Y-%m-%d
label = %date%
label-foreground = ${colors.primary}
[module/time]
type = internal/date
interval = 30
time = %R
label = %time%
label-foreground = ${colors.primary}
[module/backlight]
type = internal/backlight
card = intel_backlight
format = <ramp> <label>
ramp-0 =
ramp-1 =
ramp-2 =
ramp-3 =
ramp-4 =
ramp-5 =
ramp-6 =
ramp-7 =
ramp-8 =
[module/battery]
type = internal/battery
battery = BAT0
adapter = AC
format-charging = <animation-charging> <label-charging>
format-discharging = <ramp-capacity> <label-discharging>
format-full = <label-full>
format-low = <animation-low> <label-low>
label-charging = %percentage%% %time% %consumption%W
label-discharging = %percentage%% %time% %consumption%W
label-full = 󱟢
label-low = %percentage%% %time%
ramp-capacity-0 = 󰁺
ramp-capacity-1 = 󰁻
ramp-capacity-2 = 󰁼
ramp-capacity-3 = 󰁽
ramp-capacity-4 = 󰁾
ramp-capacity-5 = 󰁿
ramp-capacity-6 = 󰂀
ramp-capacity-7 = 󰂁
ramp-capacity-8 = 󰂂
ramp-capacity-9 = 󰁹
animation-low-0 = 󰂎
animation-low-1 = 󰂃
animation-low-framerate = 200
animation-charging-0 = 󰢜
animation-charging-1 = 󰂆
animation-charging-2 = 󰂇
animation-charging-3 = 󰂈
animation-charging-4 = 󰢝
animation-charging-5 = 󰂉
animation-charging-6 = 󰢞
animation-charging-7 = 󰂊
animation-charging-8 = 󰂋
animation-charging-9 = 󰂅
animation-charging-framerate = 750
; vim:ft=dosini

View file

@ -1,149 +0,0 @@
{
pkgs,
lib,
config,
...
}: let
modifier = config.wayland.windowManager.sway.config.modifier;
term = config.wayland.windowManager.sway.config.terminal;
# currently, there is some friction between sway and gtk:
# https://github.com/swaywm/sway/wiki/GTK-3-settings-on-Wayland
# the suggested way to set gtk settings is with gsettings
# for gsettings to work, we need to tell it where the schemas are
# using the XDG_DATA_DIR environment variable
# run at the end of sway config
configure-gtk = pkgs.writeTextFile {
name = "configure-gtk";
destination = "/bin/configure-gtk";
executable = true;
text = let
schema = pkgs.gsettings-desktop-schemas;
datadir = "${schema}/share/gsettings-schemas/${schema.name}";
gtk-theme = config.gtk.theme.name;
icon-theme = config.gtk.iconTheme.name;
cursor-theme = config.gtk.cursorTheme.name;
in ''
export XDG_DATA_DIRS=${datadir}:$XDG_DATA_DIRS
gnome_schema=org.gnome.desktop.interface
gsettings set $gnome_schema gtk-theme '${gtk-theme}'
gsettings set $gnome_schema icon-theme '${icon-theme}'
gsettings set $gnome_schema cursor-theme '${cursor-theme}'
'';
};
in {
imports = [
./swaylock.nix
./waybar.nix
./gtk.nix
./dunst.nix
./rofi.nix
];
home.packages = with pkgs; [
configure-gtk
pipewire
wireplumber
wl-clipboard
swayimg
brightnessctl
];
programs.rofi.package = pkgs.rofi-wayland;
wayland.windowManager.sway = {
enable = true;
wrapperFeatures.gtk = true;
xwayland = true;
extraSessionCommands = ''
export GDK_BACKEND=wayland,x11
export QT_QPA_PLATFORM=wayland
export QT_WAYLAND_DISABLE_WINDOWDECORATION="1"'';
config = {
input."*".xkb_layout = "gb";
fonts = {
names = ["FiraCode Nerd Font" "FiraCode Nerd Font Mono"];
size = 12.0;
};
gaps = {
inner = lib.mkDefault 5;
outer = lib.mkDefault 20;
};
bars = [{command = "${pkgs.waybar}/bin/waybar";}];
assigns = {
"2" = [{app_id = "firefox";}];
"3" = [
{class = "Signal";}
{app_id = "fractal";}
{app_id = "discord";}
{class = "teams-for-linux";}
];
"4" = [{class = "Nxplayer.bin";}];
};
floating.criteria = [
{app_id = "pavucontrol";}
{app_id = ".blueman-manager-wrapped";}
{app_id = "otpclient";}
{app_id = "thunar";}
{app_id = "^swayimg.*$";}
];
startup = [
{
command = "dbus-sway-environment";
always = true;
}
{
command = "configure-gtk";
always = true;
}
{command = "dunst";}
];
modifier = lib.mkDefault "Mod1";
terminal = lib.mkDefault "${pkgs.wezterm}/bin/wezterm";
window.titlebar = false;
workspaceAutoBackAndForth = true;
keybindings = lib.mkOptionDefault {
"${modifier}+Return" = "exec ${term}";
"${modifier}+space" = "exec ${pkgs.rofi}/bin/rofi -show drun";
"${modifier}+F1" = "exec ${pkgs.swaylock}/bin/swaylock";
"${modifier}+w" = "exec ${pkgs.firefox}/bin/firefox";
"${modifier}+f" = "exec ${pkgs.xfce.thunar}/bin/thunar";
"${modifier}+p" = "exec powermenu";
};
colors = {
focused = {
border = "#4c7899";
background = "#285577";
text = "#ffffff";
indicator = "#2e9ef4";
childBorder = "#285577";
};
focusedInactive = {
border = "#333333";
background = "#5f676a";
text = "#ffffff";
indicator = "#484e50";
childBorder = "#5f676a";
};
unfocused = {
border = "#333333";
background = "#222222";
text = "#888888";
indicator = "#292d2e";
childBorder = "#222222";
};
urgent = {
border = "#2f343a";
background = "#900000";
text = "#ffffff";
indicator = "#900000";
childBorder = "#900000";
};
placeholder = {
border = "#000000";
background = "#0c0c0c";
text = "#ffffff";
indicator = "#000000";
childBorder = "#0c0c0c";
};
background = "#ffffff";
};
};
};
}

View file

@ -1,16 +0,0 @@
{pkgs, ...}: {
imports = [./sway.nix];
wayland.windowManager.sway = {
package = pkgs.swayfx;
extraConfig = ''
corner_radius 10
blur enable
blur_xray disable
blur_passes 3
blur_radius 5
shadows enable
shadow_blur_radius 4
scratchpad_minimize disable
'';
};
}

View file

@ -1,27 +0,0 @@
{pkgs, ...}: {
imports = [
./gtk.nix
./picom.nix
./rofi.nix
./polybar.nix
];
xfconf.settings.xsettings."Gtk/MonospaceFontName" = "FiraCode Nerd Font 12";
xdg.configFile."xfce4/terminal/colorschemes/tokyonight_night".source =
pkgs.fetchFromGitHub {
owner = "folke";
repo = "tokyonight.nvim";
rev = "cd5156f4b4a6c4c337a46deb0c0bd37319920833";
sha256 = "/ht+ixR1eyYR0la00Xq5q1gCsgb5Ly90JghERwbaDPQ=";
}
+ "/extras/xfceterm/tokyonight_night.theme";
xdg.configFile."xfce4/terminal/terminalrc".text = ''
[Configuration]
BackgroundMode=TERMINAL_BACKGROUND_TRANSPARENT
BackgroundDarkness=0.8
ColorForeground=#c0caf5
ColorBackground=#1a1b26
ColorSelection=#c0caf5
ColorSelectionBackground=#283457
ColorPalette=#15161e;#f7768e;#9ece6a;#e0af68;#7aa2f7;#bb9af7;#7dcfff;#a9b1d6;#414868;#f7768e;#9ece6a;#e0af68;#7aa2f7;#bb9af7;#7dcfff;#c0caf5
'';
}

View file

@ -1,25 +0,0 @@
{pkgs, ...}: {
xresources.extraConfig =
builtins.readFile
(
pkgs.fetchFromGitHub
{
owner = "catppuccin";
repo = "xresources";
rev = "d82c02323e05158ad35f302771e3695affafab78";
sha256 = "irRQPjvcTH6AUC07Sm2l77CkrZQNHNJXxBDBSIhl1Fg=";
}
+ "/macchiato.Xresources"
)
+ "\n"
+ builtins.readFile (
pkgs.fetchFromGitHub
{
owner = "catppuccin";
repo = "urxvt";
rev = "ccd8eb763edd0a382b5e9bbfbd9697c4d4129edf";
sha256 = "YFlSGJzWWB57eSXiUY4l/mSBbOY0an+qej6//YLSiuE=";
}
+ "/macchiato.Xresources"
);
}

26
home/env/bat.nix vendored
View file

@ -1,26 +0,0 @@
{pkgs, ...}: {
programs.bat = {
enable = true;
config = {
theme = "tokyonight";
};
themes = {
tokyonight = builtins.readFile (pkgs.fetchFromGitHub
{
owner = "folke";
repo = "tokyonight.nvim";
rev = "cd5156f4b4a6c4c337a46deb0c0bd37319920833";
sha256 = "/ht+ixR1eyYR0la00Xq5q1gCsgb5Ly90JghERwbaDPQ=";
}
+ "/extras/sublime/tokyonight_night.tmTheme");
Catppuccin-macchiato = builtins.readFile (pkgs.fetchFromGitHub
{
owner = "catppuccin";
repo = "bat";
rev = "ba4d16880d63e656acced2b7d4e034e4a93f74b1";
sha256 = "6WVKQErGdaqb++oaXnY3i6/GuH2FhTgK0v4TN4Y0Wbw=";
}
+ "/Catppuccin-macchiato.tmTheme");
};
};
}

22
home/env/default.nix vendored
View file

@ -1,22 +0,0 @@
{pkgs, ...}: {
imports = [
./bash.nix
./bat.nix
./direnv.nix
./fish.nix
./keychain.nix
./nushell.nix
./starship.nix
./zsh.nix
];
home.packages = with pkgs; [
dig
file
gnumake
zip
unzip
neofetch
silver-searcher
distrobox
];
}

6
home/env/direnv.nix vendored
View file

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

19
home/env/fzf.nix vendored
View file

@ -1,19 +0,0 @@
{...}: {
programs.fzf = {
enable = true;
colors = {
fg = "-1";
bg = "-1";
hl = "#c678dd";
"fg+" = "#ffffff";
"bg+" = "#4b5263";
"hl+" = "#d858fe";
info = "#98c379";
prompt = "#61afef";
pointer = "#be5046";
marker = "#e5c07b";
spinner = "#61afef";
header = "#61afef";
};
};
}

View file

@ -1,8 +0,0 @@
{...}: {
programs.keychain = {
enable = true;
extraFlags = ["--quiet" "--noask" "--ignore-missing"];
keys = ["id_rsa" "id_ed25519"];
enableXsessionIntegration = true;
};
}

View file

@ -1,6 +0,0 @@
{...}: {
programs.nushell.enable = true;
programs.keychain.enableNushellIntegration = true;
programs.starship.enableNushellIntegration = true;
programs.direnv.enableNushellIntegration = true;
}

View file

@ -1,5 +0,0 @@
{pkgs, ...}: {
home.packages = with pkgs; [(nerdfonts.override {fonts = ["FiraCode"];})];
xdg.configFile."starship.toml".source = ./config/starship.toml;
programs.starship.enable = true;
}

View file

@ -1,5 +1,5 @@
{...}: {
imports = [./default.nix ./git/personal.nix ./ssh/personal.nix];
imports = [./default.nix];
programs.firefox.profiles.default = {
settings."browser.startup.homepage" = "https://cloud.xenia.me.uk";
bookmarks = [

View file

@ -1,19 +1,5 @@
{pkgs, ...}: {
imports = [./default.nix ./git/work.nix ./ssh/work.nix];
home.packages = with pkgs; [
zotero
openfortivpn
nomachine-client
teams-for-linux
zoom-us
];
programs.fish.functions.fsync = ''
rsync -avz --copy-links --filter=':- .gitignore' --exclude='.git*'\
--delete-during --delete-excluded\
$HOME/.config/nvim/ freia:.config/nvim
rsync -avz --copy-links --delete-during --delete-excluded\
$HOME/.config/starship.toml freia:.config/starship.toml
'';
{...}: {
imports = [./default.nix];
programs.firefox.profiles.default = {
settings."browser.startup.homepage" = "https://nucleus.ukaea.uk";
bookmarks = [

View file

@ -1,5 +1,4 @@
{pkgs, ...}: {
imports = [../env/bat.nix];
xdg.configFile."git/tokyonight_night.gitconfig".source =
pkgs.fetchFromGitHub
{

View file

@ -1,21 +0,0 @@
{pkgs, ...}: {
programs.alacritty = {
enable = true;
settings = {
font = {
normal.family = "FiraCode Nerd Font";
size = 14;
};
window.opacity = 0.8;
import = [
(pkgs.fetchFromGitHub {
owner = "folke";
repo = "tokyonight.nvim";
rev = "cd5156f4b4a6c4c337a46deb0c0bd37319920833";
sha256 = "/ht+ixR1eyYR0la00Xq5q1gCsgb5Ly90JghERwbaDPQ=";
}
+ "/extras/alacritty/tokyonight_night.yml")
];
};
};
}

View file

@ -1,6 +0,0 @@
{...}: {
programs.chromium = {
enable = true;
commandLineArgs = ["--ozone-platform-hint=auto"];
};
}

View file

@ -1,15 +0,0 @@
{pkgs, ...}: {
imports = [
./firefox.nix
./chromium.nix
./wezterm
];
home.packages = with pkgs; [
neovide
bitwarden
otpclient
signal-desktop
fractal
libreoffice
];
}

View file

@ -1,34 +0,0 @@
{pkgs, ...}: {
home.packages = with pkgs; [(nerdfonts.override {fonts = ["FiraCode"];})];
programs.foot = {
enable = true;
settings = {
main = {
term = "xterm-256color";
font = "FiraCode Nerd Font:size=12";
dpi-aware = "yes";
};
colors = {
# Catppuccin Macchiato
foreground = "cad3f5"; # Text
background = "24273a"; # Base
regular0 = "494d64"; # Surface 1
regular1 = "ed8796"; # red
regular2 = "a6da95"; # green
regular3 = "eed49f"; # yellow
regular4 = "8aadf4"; # blue
regular5 = "f5bde6"; # pink
regular6 = "8bd5ca"; # teal
regular7 = "b8c0e0"; # Subtext 1
bright0 = "5b6078"; # Surface 2
bright1 = "ed8796"; # red
bright2 = "a6da95"; # green
bright3 = "eed49f"; # yellow
bright4 = "8aadf4"; # blue
bright5 = "f5bde6"; # pink
bright6 = "8bd5ca"; # teal
bright7 = "a5adcb"; # Subtext 0
};
};
};
}

View file

@ -1,6 +0,0 @@
{...}: {
services.kdeconnect = {
enable = true;
indicator = true;
};
}

View file

@ -1,26 +0,0 @@
{pkgs, ...}: {
programs.kitty = {
enable = true;
font = {
package = with pkgs; (nerdfonts.override {fonts = ["FiraCode"];});
name = "Fira Code Nerd Font";
size = 14;
};
settings = {
background_opacity = "0.80";
disable_ligatures = "cursor";
show_hyperlink_targets = true;
copy_on_select = true;
paste_actions = "confirm";
enable_audio_bell = false;
window_border_width = 5;
window_margin_width = 5;
tab_bar_edge = "top";
tab_bar_style = "powerline";
tab_powerline_style = "round";
tab_bar_min_tabs = 2;
update_check_interval = 0;
};
theme = "Tokyo Night";
};
}

View file

@ -1,6 +0,0 @@
{...}: {
services.nextcloud-client = {
enable = true;
startInBackground = true;
};
}

View file

@ -1,7 +0,0 @@
{pkgs, ...}: {
home.packages = with pkgs; [(nerdfonts.override {fonts = ["FiraCode"];})];
programs.urxvt = {
enable = true;
fonts = ["xft:FiraCode Nerd Font Mono:pixelsize=16"];
};
}

View file

@ -1,29 +0,0 @@
{pkgs, ...}: {
programs.vscode = {
enable = true;
package = pkgs.vscodium;
enableExtensionUpdateCheck = false;
enableUpdateCheck = false;
mutableExtensionsDir = false;
extensions = with pkgs.vscode-extensions; [
asvetliakov.vscode-neovim
catppuccin.catppuccin-vsc
ms-vscode-remote.remote-ssh
ms-vsliveshare.vsliveshare
eamodio.gitlens
bbenoist.nix
sumneko.lua
ms-python.python
ms-python.vscode-pylance
ms-pyright.pyright
];
userSettings = {
"[nix]"."editor.tabSize" = 2;
"workbench.colorTheme" = "Catppuccin Macchiato";
"editor.fontSize" = 16;
"editor.fontFamily" = "FiraCode Nerd Font";
"editor.fontLigatures" = true;
"git.confirmSync" = false;
};
};
}

View file

@ -25,12 +25,12 @@
};
in {
imports = [
# ../eww
../waybar
../rofi
../swaylock.nix
../gtk.nix
../dunst.nix
inputs.hyprland.homeManagerModules.default
./waybar
./rofi
./swaylock.nix
./gtk.nix
./dunst.nix
];
home.packages = with pkgs; [
hyprpaper
@ -43,7 +43,6 @@ in {
];
programs = {
firefox.package = pkgs.firefox-wayland;
chromium.commandLineArgs = ["--enable-features=UseOzonePlatform" "--ozone-platform=wayland"];
rofi.package = pkgs.rofi-wayland;
};
wayland.windowManager.hyprland = {

View file

@ -113,12 +113,12 @@ typeset -A menu
# Menu with keys/commands
menu=(
[ Shutdown]="systemctl poweroff"
[ Reboot]="systemctl reboot"
[ Suspend]="systemctl suspend"
[ Hibernate]="systemctl hibernate"
[ Lock]="xfce4-screensaver-command --lock"
[ Logout]="xfce4-session-logout"
[ Shutdown]="shutdown now"
[ Reboot]="reboot"
[ Suspend]="" # TODO
[ Hibernate]="" # TODO
[ Lock]="swaylock"
[ Logout]="hyprctl dispatch exit"
[ Cancel]=""
)

View file

@ -1,4 +1,5 @@
{...}: {
imports = [./default.nix];
programs = {
bash.enable = true;
readline = {
@ -8,9 +9,9 @@
set completion-ignore-case On
'';
};
keychain.enableBashIntegration = true;
starship.enableBashIntegration = true;
direnv.enableBashIntegration = true;
fzf.enableBashIntegration = true;
keychain.enableBashIntegration = true;
starship.enableBashIntegration = true;
};
}

34
home/shell/default.nix Normal file
View file

@ -0,0 +1,34 @@
{pkgs, ...}: {
home.packages = with pkgs; [(nerdfonts.override {fonts = ["FiraCode"];})];
programs = {
direnv = {
enable = true;
nix-direnv.enable = true;
};
fzf = {
enable = true;
colors = {
fg = "-1";
bg = "-1";
hl = "#c678dd";
"fg+" = "#ffffff";
"bg+" = "#4b5263";
"hl+" = "#d858fe";
info = "#98c379";
prompt = "#61afef";
pointer = "#be5046";
marker = "#e5c07b";
spinner = "#61afef";
header = "#61afef";
};
};
keychain = {
enable = true;
extraFlags = ["--quiet" "--noask" "--ignore-missing"];
keys = ["id_rsa" "id_ed25519"];
enableXsessionIntegration = true;
};
starship.enable = true;
};
xdg.configFile."starship.toml".source = ./starship.toml;
}

View file

@ -1,4 +1,5 @@
{pkgs, ...}: {
imports = [./default.nix];
programs = {
fish = {
enable = true;
@ -17,8 +18,9 @@
}
];
};
direnv.enableFishIntegration = true;
fzf.enableFishIntegration = true;
keychain.enableFishIntegration = true;
starship.enableFishIntegration = true;
fzf.enableFishIntegration = true;
};
}

9
home/shell/nushell.nix Normal file
View file

@ -0,0 +1,9 @@
{...}: {
imports = [./default.nix];
programs = {
nushell.enable = true;
direnv.enableNushellIntegration = true;
keychain.enableNushellIntegration = true;
starship.enableNushellIntegration = true;
};
}

View file

@ -1,4 +1,5 @@
{config, ...}: {
imports = [./default.nix];
programs = {
zsh = {
enable = true;
@ -11,9 +12,9 @@
historySubstringSearch.enable = true;
history.path = "${config.xdg.dataHome}/zsh/history";
};
keychain.enableZshIntegration = true;
starship.enableZshIntegration = true;
direnv.enableZshIntegration = true;
fzf.enableZshIntegration = true;
keychain.enableZshIntegration = true;
starship.enableZshIntegration = true;
};
}

View file

@ -1 +1,95 @@
{...}: {imports = [./neovim.nix ./lazygit.nix];}
{pkgs, ...}: {
home.packages = with pkgs; [
git
curl
gnutar
gnumake
gnused
gcc
fzf
ripgrep
tree-sitter
];
programs = {
neovim = {
enable = true;
package = pkgs.neovim-nightly;
defaultEditor = true;
viAlias = true;
vimAlias = true;
vimdiffAlias = true;
withNodeJs = true;
withRuby = true;
withPython3 = true;
extraPackages = with pkgs; [
# Language servers
nil
lua-language-server
fortls
nodePackages.pyright
nodePackages.yaml-language-server
nodePackages.vim-language-server
nodePackages.bash-language-server
# Null LSP formatters
alejandra
beautysh
black
nodePackages.fixjson
fprettify
isort
python3Packages.mdformat
shellharden
stylua
];
};
lazygit = {
enable = true;
settings = {
gui = {
showFileTree = true;
showCommandLog = false;
showIcons = true;
theme = {
lightTheme = false;
activeBorderColor = ["#a6da95" "bold"];
inactiveBorderColor = ["#cad3f5"];
optionsTextColor = ["#8aadf4"];
selectedLineBgColor = ["#363a4f"];
selectedRangeBgColor = ["#363a4f"];
cherryPickedCommitBgColor = ["#8bd5ca"];
cherryPickedCommitFgColor = ["#8aadf4"];
unstagedChangesColor = ["red"];
};
};
update.method = "never";
promptToReturnFromSubprocess = false;
notARepository = "quit";
};
};
bat = {
enable = true;
config = {
theme = "tokyonight";
};
themes = {
tokyonight = builtins.readFile (pkgs.fetchFromGitHub
{
owner = "folke";
repo = "tokyonight.nvim";
rev = "cd5156f4b4a6c4c337a46deb0c0bd37319920833";
sha256 = "/ht+ixR1eyYR0la00Xq5q1gCsgb5Ly90JghERwbaDPQ=";
}
+ "/extras/sublime/tokyonight_night.tmTheme");
Catppuccin-macchiato = builtins.readFile (pkgs.fetchFromGitHub
{
owner = "catppuccin";
repo = "bat";
rev = "ba4d16880d63e656acced2b7d4e034e4a93f74b1";
sha256 = "6WVKQErGdaqb++oaXnY3i6/GuH2FhTgK0v4TN4Y0Wbw=";
}
+ "/Catppuccin-macchiato.tmTheme");
};
};
};
}

View file

@ -1,26 +0,0 @@
{...}: {
programs.lazygit = {
enable = true;
settings = {
gui = {
showFileTree = true;
showCommandLog = false;
showIcons = true;
theme = {
lightTheme = false;
activeBorderColor = ["#a6da95" "bold"];
inactiveBorderColor = ["#cad3f5"];
optionsTextColor = ["#8aadf4"];
selectedLineBgColor = ["#363a4f"];
selectedRangeBgColor = ["#363a4f"];
cherryPickedCommitBgColor = ["#8bd5ca"];
cherryPickedCommitFgColor = ["#8aadf4"];
unstagedChangesColor = ["red"];
};
};
update.method = "never";
promptToReturnFromSubprocess = false;
notARepository = "quit";
};
};
}

View file

@ -1,44 +0,0 @@
{pkgs, ...}: {
home.packages = with pkgs; [
git
curl
gnutar
gnumake
gnused
gcc
fzf
ripgrep
tree-sitter
];
programs.neovim = {
enable = true;
defaultEditor = true;
viAlias = true;
vimAlias = true;
vimdiffAlias = true;
withNodeJs = true;
withRuby = true;
withPython3 = true;
extraPackages = with pkgs; [
# Language servers
nil
lua-language-server
fortls
nodePackages.pyright
nodePackages.yaml-language-server
nodePackages.vim-language-server
nodePackages.bash-language-server
# Null LSP formatters
alejandra
beautysh
black
nodePackages.fixjson
fprettify
isort
python3Packages.mdformat
shellharden
stylua
];
};
}

View file

@ -1,16 +0,0 @@
{pkgs, ...}: {
programs.tmux = {
enable = true;
clock24 = true;
extraConfig = builtins.readFile (
pkgs.fetchFromGitHub
{
owner = "catppuccin";
repo = "tmux";
rev = "4e48b09a76829edc7b55fbb15467cf0411f07931";
sha256 = "bXEsxt4ozl3cAzV3ZyvbPsnmy0RAdpLxHwN82gvjLdU=";
}
+ "/catppuccin-macchiato.tmuxtheme"
);
};
}

View file

@ -1,20 +1,22 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running `nixos-help`).
{pkgs, ...}: {
{userConfig, ...}: let
user = "xenia";
hostName = "Legion";
in {
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
../common.nix
../../services/Legion.nix
../../services/${hostName}.nix
];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking = {
hostName = "Legion"; # Define your hostname.
hostName = hostName; # Define your hostname.
nameservers = ["192.168.1.230" "127.0.0.1" "9.9.9.9"];
};
system.autoUpgrade = {
@ -25,15 +27,7 @@
upper = "05:00";
};
};
users.users.xenia = {
isNormalUser = true;
description = "Evie Litherland-Smith";
extraGroups = ["networkmanager" "wheel"];
shell = pkgs.fish;
openssh.authorizedKeys.keys = import ../../auth/authorized_keys.nix;
};
home-manager.users.xenia = import ./home.nix;
users.users.${user} = userConfig;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions

View file

@ -1 +0,0 @@
{...}: {imports = [./configuration.nix];}

View file

@ -1,8 +1,15 @@
{...}: {
imports = [../../home/personal.nix];
home = {
{pkgs, ...}: let
username = "xenia";
homeDirectory = "/home/xenia";
homeDirectory = "/home/${username}";
in {
imports = [
../../home/shell/fish.nix
../../home/git/personal.nix
../../home/ssh/personal.nix
];
home = {
inherit username homeDirectory;
stateVersion = "22.11";
};
programs.neovim.package = pkgs.neovim-nightly;
}

26
hosts/Monarch/home.nix Normal file
View file

@ -0,0 +1,26 @@
{pkgs, ...}: let
username = "tux";
homeDirectory = "/Users/${username}";
in {
imports = [
../../home/shell/zsh.nix
../../home/git/personal.nix
../../home/ssh/personal.nix
../../home/wezterm.nix
];
home = {
inherit username homeDirectory;
stateVersion = "23.05";
packages = [pkgs.gcc];
};
programs = {
home-manager.enable = true;
zsh = {
sessionVariables.CC = "${pkgs.gcc}/bin/gcc";
envExtra = ''
eval "$(/opt/homebrew/bin/brew shellenv)"
'';
};
};
services.syncthing.enable = true;
}

View file

@ -1,18 +1,15 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{pkgs, ...}: let
greetd_session = {
{userConfig, ...}: let
user = "elitherl";
command = "Hyprland";
};
hostName = "Ronin";
in {
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
../common.nix
../desktop.nix
../../services/syncthing/Ronin.nix
../../services/${hostName}.nix
];
# Bootloader.
boot.loader.systemd-boot.enable = true;
@ -27,27 +24,15 @@ in {
boot.initrd.luks.devices."luks-761eeb11-3091-4142-9232-4fb33165eccd".device = "/dev/disk/by-uuid/761eeb11-3091-4142-9232-4fb33165eccd";
boot.initrd.luks.devices."luks-761eeb11-3091-4142-9232-4fb33165eccd".keyFile = "/crypto_keyfile.bin";
networking.hostName = "Ronin"; # Define your hostname.
networking.hostName = hostName; # Define your hostname.
hardware.bluetooth.enable = true;
environment.etc."ppp/options".text = ''
ipcp-accept-remote
'';
system.autoUpgrade.allowReboot = false;
users.users.elitherl = {
isNormalUser = true;
description = "Evie Litherland-Smith";
extraGroups = ["networkmanager" "wheel"];
shell = pkgs.fish;
};
home-manager.users.elitherl = import ./home.nix;
programs.hyprland.enable = true;
services.greetd = {
enable = true;
settings = {
initial_session = greetd_session;
default_session = greetd_session;
};
users.users.${user} = userConfig;
services.greetd.settings = {
initial_session.user = user;
default_session.user = user;
};
# This value determines the NixOS release from which the default

View file

@ -1 +0,0 @@
{...}: {imports = [./configuration.nix];}

View file

@ -2,25 +2,31 @@
pkgs,
inputs,
...
}: {
}: let
username = "elitherl";
homeDirectory = "/home/${username}";
in {
imports = [
inputs.hyprland.homeManagerModules.default
# ../../pkgs/eww-hyprland
../../home/shell/fish.nix
../../home/git/work.nix
../../home/ssh/work.nix
../../home/desktop/hyprland
../../home/desktop/waybar
../../home/gui
../../home/work.nix
../../home/firefox/work.nix
../../home/wezterm
];
home = {
username = "elitherl";
homeDirectory = "/home/elitherl";
inherit username homeDirectory;
stateVersion = "22.11";
packages = with pkgs; [
openfortivpn
nomachine-client
teams-for-linux
zoom-us
];
};
programs.neovim.package = pkgs.neovim-nightly;
# programs.eww-hyprland = {
# enable = true;
# package = pkgs.eww-wayland;
# };
xdg.configFile."hypr/display.conf".text = ''
monitor=desc:Iiyama North America PLB2403WS 0574281251316,1920x1200@60,0x185,1
monitor=desc:Dell Inc. DELL U2417H 5K9YD872FY1L,1920x1080@60,1920x0,1,transform,1

Some files were not shown because too many files have changed in this diff Show more