build please?

This commit is contained in:
2024-10-18 07:40:46 -05:00
parent 57732d6d8c
commit 20b5622296
65 changed files with 2388 additions and 1416 deletions

View File

@@ -36,8 +36,7 @@
inherit system;
specialArgs = {
core_inputs = (core_inputs // { inherit host username; });
inherit devices;
inherit core_inputs;
};
modules = [
@@ -45,7 +44,20 @@
core_inputs.home-manager.nixosModules.home-manager
({ lib, ... }: {
#sysconfig.${host}.enable = true;
sysconfig = {
${host}.enable = true;
opts = {
firstBoot = false;
inherit host username devices;
openssh.enable = true;
pipewire.enable = true;
hyprland.enable = true;
git.enable = true;
ags.enable = true;
nh.enable = true;
steam.enable = true;
};
};
#disko.enable = lib.mkForce false;
})
];
@@ -56,12 +68,7 @@
#inherit iso_system;
specialArgs = {
core_inputs = (core_inputs // { inherit host username; });
devices = (devices // {
bonus = {
disk1 = "/dev/nvme1n1";
};
});
inherit core_inputs;
};
modules = [
@@ -72,10 +79,30 @@
];
nixpkgs.hostPlatform = iso_system;
sysconfig = {
${host}.enable = true;
opts = {
firstBoot = true;
inherit username;
host = "live";
devices = (devices // {
main = "/dev/sda";
bonus = null;
});
openssh.enable = true;
pipewire.enable = true;
hyprland.enable = true;
git.enable = true;
ags.enable = true;
nh.enable = true;
steam.enable = false;
};
};
})
#inputs.system.nixosModule
#inputs.home-manager.nixosModules.home-manager
inputs.system.nixosModule
inputs.home-manager.nixosModules.home-manager
];
};

15
home/dotfiles/ags/README.md Executable file
View File

@@ -0,0 +1,15 @@
# Starter Config
if suggestions don't work, first make sure
you have TypeScript LSP working in your editor
if you do not want typechecking only suggestions
```json
// tsconfig.json
"checkJs": false
```
types are symlinked to:
/home/nathan/.nix-profile/share/com.github.Aylur.ags/types

34
home/dotfiles/ags/bluetooth.js Executable file
View File

@@ -0,0 +1,34 @@
const bluetooth = await Service.import("bluetooth")
export function ConnectedList() {
return Widget.Box({
class_name: "btdevices",
setup: self => self.hook(bluetooth, self => {
self.children = bluetooth.connected_devices
.map(({ address, icon_name, name }) => Widget.EventBox({
child: Widget.Icon(icon_name + '-symbolic'),
tooltip_text: name,
on_primary_click: () => {
bluetooth.getDevice(address).setConnection(false)
},
}));
self.visible = bluetooth.connected_devices.length > 0;
}, 'notify::connected-devices'),
})
}
export default function Bluetooth() {
return Widget.EventBox({
tooltip_text: bluetooth.bind('enabled').as(on => on ? 'Enabled' : 'Disabled'),
child: Widget.Icon({
icon: bluetooth.bind('enabled').as(on =>
`bluetooth-${on ? 'active' : 'disabled'}-symbolic`),
})
})
}

View File

14
home/dotfiles/ags/clock.js Executable file
View File

@@ -0,0 +1,14 @@
const date = Variable("", {
poll: [1000, 'date "+%H:%M %b %e."'],
})
function Clock() {
return Widget.Label({
class_name: "clock",
label: date.bind(),
})
}
export default Clock

132
home/dotfiles/ags/config.js Executable file
View File

@@ -0,0 +1,132 @@
const hyprland = await Service.import("hyprland")
//const systemtray = await Service.import("systemtray")
import Clock from './clock.js'
import Launcher from './launcher.js'
import Media from './media.js'
import Notification from './notif.js'
import Power from './power.js'
import Workspaces from './workspaces.js'
import Settings, {SettingsWindow} from './settings.js'
import { ConnectedList } from './bluetooth.js'
import { NotificationPopups } from './notification.js'
// widgets can be only assigned as a child in one container
// so to make a reuseable widget, make it a function
// then you can simply instantiate one by calling it
//////////////////////////////////////////////////////////////
// layout of the bar
function Left() {
return Widget.Box({
spacing: 8,
margin_bottom: 5,
children: [
Launcher(),
Workspaces(),
],
})
}
function Center() {
return Widget.Box({
spacing: 8,
margin_bottom: 5,
children: [
Media(),
Clock(),
Notification(),
],
})
}
function Right() {
return Widget.Box({
hpack: "end",
spacing: 8,
margin_bottom: 5,
children: [
ConnectedList(),
Settings(),
Power(),
],
})
}
///////////////////////////////////////////////////////////
//windows
function Bar(monitor = 0) {
return Widget.Window({
name: `bar-${monitor}`, // name has to be unique
class_name: "bar",
monitor,
anchor: ["top", "left", "right"],
height_request: 32,
vexpand: false,
exclusivity: "exclusive",
child: Widget.CenterBox({
start_widget: Left(),
center_widget: Center(),
end_widget: Right(),
}),
})
}
function pickMonitor() {
let n = 0
for(let i = 0; i < hyprland.monitors.length; i++) {
print(hyprland.getMonitor(i).name)
if(hyprland.getMonitor(i).name == 'eDP-1')
n = i
break
}
return n;
}
////////////////////////////////////////////////////////////
//App config
let m = 0
App.config({
style: "/home/nathan/.cache/wal/colors-ags.css",
windows: [
Bar(m),
SettingsWindow(m),
NotificationPopups(m)
// you can call it, for each monitor
// Bar(0),
// Bar(1)
],
})
App.toggleWindow(App.windows[1].name)
// Utils.timeout(100, () => Utils.notify({
// summary: "Notification Popup Example",
// iconName: "info-symbolic",
// body: "Lorem ipsum dolor sit amet, qui minim labore adipisicing "
// + "minim sint cillum sint consectetur cupidatat.",
// actions: {
// "Cool": () => print("pressed Cool"),
// },
// }))
Utils.monitorFile(`/home/nathan/.cache/wal`, () => {
const css = `/home/nathan/.cache/wal/colors-ags.css`
App.resetCss()
App.applyCss(css)
})
export { }

141
home/dotfiles/ags/media.js Executable file
View File

@@ -0,0 +1,141 @@
const mpris = await Service.import("mpris")
export default function Media() {
const track = Utils.watch("", mpris, "player-changed", () => {
if (mpris.players[0]) {
const { track_artists, track_title } = mpris.players[0]
return `${track_artists.join(", ")} -${track_title}`
} else {
return "Nothing is playing"
}
})
return Widget.EventBox({
class_name: "media",
on_primary_click: () => mpris.getPlayer("")?.playPause(),
on_scroll_up: () => mpris.getPlayer("")?.next(),
on_scroll_down: () => mpris.getPlayer("")?.previous(),
child: Widget.Icon({icon: 'emblem-music-symbolic'}),
})
}
function PlayerImg(player) {
return Widget.Box({
hpack: "start",
width_request: 80,
height_request: 80,
css: player.bind("track_cover_url").transform(p => `
background-image: url('${p || player.cover_path || '/home/nathan/Pictures/symbols/audio.png'}');
background-size: contain;
background-repeat: no-repeat;
background-position: center;
`),
})
}
function PlayerGUI(player) {
return Widget.Box({
class_name: "playerbox",
height_request: 200,
vexpand: false,
vertical: true,
children: [
Widget.Box({
vertical: false,
margin: 15,
hpack: "start",
spacing: 20,
children: [
PlayerImg(player),
Widget.Box({
vertical: true,
children: [
Widget.Label({
hpack: "start",
max_width_chars: 30,
truncate: "end",
label: player.bind('track-title').as(t => t)
}),
Widget.Label({
hpack: "start",
max_width_chars: 30,
truncate: "end",
label: player.bind("track_artists").transform(a => a.join(", ")),
wrap: true,
}),
Widget.Label({
hpack: "start",
max_width_chars: 30,
truncate: "end",
label: player.bind('track-album').as(t => t)
}),
]
})
],
}),
Widget.Slider({
class_name: "position",
draw_value: false,
on_change: ({ value }) => player.position = value * player.length,
visible: player.bind("length").as(l => l > 0),
setup: self => {
function update() {
const value = player.position / player.length
self.value = value > 0 ? value : 0
}
self.hook(player, update)
self.hook(player, update, "position")
self.poll(1000, update)
},
}),
Widget.Box({
vertical: false,
hpack: "center",
spacing: 20,
children: [
Widget.Button({
child: Widget.Icon({ icon: 'media-skip-backward-symbolic'}),
on_primary_click: () => player.previous()
}),
Widget.Button({
child: Widget.Icon({ icon: player.bind("play_back_status").transform(s => {
switch (s) {
case "Playing": return 'media-playback-pause-symbolic'
case "Paused":
case "Stopped": return 'media-playback-start-symbolic'
}
}),
}),
on_primary_click: () => player.playPause(),
}),
Widget.Button({
child: Widget.Icon({ icon: 'media-skip-forward-symbolic'}),
on_primary_click: () => player.next()
})
]
})
],
setup: self => {
},
})
}
export function Players() {
const plrs = mpris.bind('players')
.as(p => p.map((v) => PlayerGUI(v)))
return Widget.Box({
vertical: true,
children: plrs,
})
}

22
home/dotfiles/ags/notif.js Executable file
View File

@@ -0,0 +1,22 @@
const notifications = await Service.import("notifications")
// we don't need dunst or any other notification daemon
// because the Notifications module is a notification daemon itself
export default function Notification() {
const popups = notifications.bind("popups")
return Widget.EventBox({
class_name: "notificationbutton",
visible: true,
on_primary_click: () => {},
child: Widget.Icon({
icon: "preferences-system-notifications-symbolic",
}),
})
}
// Widget.Label({
// label: popups.as(p => p[0]?.summary || ""),
// }),

131
home/dotfiles/ags/notification.js Executable file
View File

@@ -0,0 +1,131 @@
const notifications = await Service.import("notifications")
/** @param {import('resource:///com/github/Aylur/ags/service/notifications.js').Notification} n */
function NotificationIcon({ app_entry, app_icon, image }) {
if (image) {
return Widget.Box({
css: `background-image: url("${image}");`
+ "background-size: contain;"
+ "background-repeat: no-repeat;"
+ "background-position: center;",
})
}
let icon = "dialog-information-symbolic"
if (Utils.lookUpIcon(app_icon))
icon = app_icon
if (app_entry && Utils.lookUpIcon(app_entry))
icon = app_entry
return Widget.Box({
child: Widget.Icon(icon),
})
}
/** @param {import('resource:///com/github/Aylur/ags/service/notifications.js').Notification} n */
function Notification(n) {
const icon = Widget.Box({
vpack: "start",
class_name: "icon",
child: NotificationIcon(n),
})
const title = Widget.Label({
class_name: "title",
xalign: 0,
justification: "left",
hexpand: true,
max_width_chars: 24,
truncate: "end",
wrap: true,
label: n.summary,
use_markup: true,
})
const body = Widget.Label({
class_name: "body",
hexpand: true,
use_markup: true,
xalign: 0,
justification: "left",
label: n.body,
wrap: true,
})
const actions = Widget.Box({
class_name: "actions",
children: n.actions.map(({ id, label }) => Widget.Button({
class_name: "action-button",
on_clicked: () => {
n.invoke(id)
n.dismiss()
},
hexpand: true,
child: Widget.Label(label),
})),
})
return Widget.EventBox(
{
attribute: { id: n.id },
on_primary_click: n.dismiss,
},
Widget.Box(
{
class_name: `notification ${n.urgency}`,
vertical: true,
},
Widget.Box([
icon,
Widget.Box(
{ vertical: true },
title,
body,
),
]),
actions,
),
)
}
export function NotificationPopups(monitor = 0) {
const list = Widget.Box({
vertical: true,
children: notifications.popups.map(Notification),
})
function onNotified(_, /** @type {number} */ id) {
const n = notifications.getNotification(id)
if (n)
list.children = [Notification(n), ...list.children]
}
function onDismissed(_, /** @type {number} */ id) {
list.children.find(n => n.attribute.id === id)?.destroy()
}
list.hook(notifications, onNotified, "notified")
.hook(notifications, onDismissed, "dismissed")
return Widget.Window({
monitor,
name: `notifications${monitor}`,
class_name: "notification-popups",
anchor: ["top", "right"],
layer: "overlay",
child: Widget.Box({
css: "min-width: 2px; min-height: 2px;",
class_name: "notifications",
vertical: true,
child: list,
/** this is a simple one liner that could be used instead of
hooking into the 'notified' and 'dismissed' signals.
but its not very optimized becuase it will recreate
the whole list everytime a notification is added or dismissed */
// children: notifications.bind('popups')
// .as(popups => popups.map(Notification))
}),
})
}

44
home/dotfiles/ags/power.js Executable file
View File

@@ -0,0 +1,44 @@
function Power() {
return Widget.Box({
vertical: false,
spacing: 8,
children: [
Widget.EventBox({
child: Widget.Icon({icon: 'system-reboot-symbolic'}),
margin_right: 10,
class_name: 'restart',
tooltip_text: 'restart',
on_primary_click: () => {App.Quit(); Utils.execAsync('reboot')},
}),
Widget.EventBox({
child: Widget.Icon({icon: 'system-log-out-symbolic'}),
margin_right: 10,
class_name: 'logout',
tooltip_text: 'log out',
on_primary_click: () => {App.Quit(); Utils.execAsync('loginctl kill-session self')},
}),
Widget.EventBox({
child: Widget.Icon({icon: 'system-lock-screen-symbolic'}),
margin_right: 10,
class_name: 'lockscreen',
tooltip_text: 'lock screen',
on_primary_click: () => {Utils.exec('swaylock')},
}),
Widget.EventBox({
child: Widget.Icon({icon: 'system-shutdown-symbolic'}),
margin_right: 10,
class_name: 'poweroff',
tooltip_text: 'shutdown',
on_primary_click: () => {App.Quit(); Utils.execAsync('shutdown now')},
})
],
})
}
export default Power

125
home/dotfiles/ags/settings.js Executable file
View File

@@ -0,0 +1,125 @@
const audio = await Service.import("audio")
const battery = await Service.import("battery")
const mpris = await Service.import("mpris")
import Bluetooth from "./bluetooth.js"
import WifiIndicator from "./wifi.js"
import { Players } from "./media.js"
export function Volume() {
const icons = {
101: "high",
67: "high",
34: "medium",
1: "low",
0: "muted",
}
function getIcon() {
const icon = audio.speaker.is_muted ? 0 : [101, 67, 34, 1, 0].find(
threshold => threshold <= audio.speaker.volume * 100)
return `audio-volume-${icons[icon]}-symbolic`
}
return Widget.EventBox({
tooltip_text: '',
setup: (self) => self.hook(audio.speaker, () => {
self.tooltip_text = `Volume: ${(100 * audio.speaker.volume).toFixed(0)}%`
}),
child: Widget.Icon({
class_name: "volume",
icon: Utils.watch(getIcon(), audio.speaker, getIcon),
})
})
}
// const slider = Widget.Slider({
// hexpand: true,
// draw_value: false,
// inverted: true,
// on_change: ({ value }) => audio.speaker.volume = value,
// setup: (self) => self.hook(audio.speaker, () => {
// self.value = audio.speaker.volume || 0
// }),
// })
export function BatteryLabel() {
const value = battery.bind("percent").as(p => p > 0 ? p / 100 : 0)
const icon = battery.bind("percent").as(p =>
`battery-${p > 90 ? "full" : p > 70 ? "good" : p > 50 ? "medium" : p > 30 ? "low" : p > 10 ? "caution" : "empty"}-symbolic`)
return Widget.Box({
class_name: "battery",
visible: battery.bind("available"),
child: Widget.EventBox({
child: Widget.Icon({ icon }),
tooltip_text: value.as(p => `Battery: ${(p * 100).toFixed(0)}%`)
}),
})
}
function Panel() {
return Widget.Box({
height_request: 200,
css: 'background: black;',
})
}
export function SettingsWindow(monitor = 0) {
return Widget.Window({
monitor,
name: `Settings-${monitor}`,
anchor: ["top", "bottom", "right"],
margins: [50, 0, 10, 0],
width_request: 400,
exclusivity: "ignore",
layer: "top",
class_name: "SettingsWindow",
child: Widget.Box({
class_name: "settings_window",
child: Widget.Scrollable({
vscroll: "always",
hscroll: "never",
hexpand: true,
vexpand: true,
margin: 20,
child: Widget.Box({
vertical: true,
children: [
Panel(),
Players()
]
}),
}),
}),
})
}
export default function Settings() {
return Widget.Button({
tooltip_text: 'Settings',
attribute: false,
margin_right: 8,
child: Widget.Box({
spacing: 8,
children: [
Bluetooth(),
WifiIndicator(),
BatteryLabel(),
Volume(),
],
}),
on_clicked: (self) => {
self.attribute = !self.attribute
App.toggleWindow(App.windows[1].name)
},
})
}

174
home/dotfiles/ags/style.css Executable file
View File

@@ -0,0 +1,174 @@
window.bar {
background-color: rgb(36, 40, 59);
color: rgb(200, 200, 200);
}
window.win {
background-color: transparent;
color: rgb(200, 200, 200);
}
.booox {
color: white;
background-color: white;
}
.playerbox {
background-color: rgb(73, 81, 121);
color:rgb(73, 81, 121);
border: 3px solid black;
border-radius: 15px;
}
.launcher {
color: aqua;
background: none;
border: none;
}
box {
color: aqua;
}
Window.SettingsWindow {
background-color: black;
color: black;
}
.settings_window {
background-color: rgb(36, 40, 59);
color: teal;
border-radius: 15px;
}
.focused {
color: aqua;
}
.other {
color: teal;
}
.media {
color: aqua;
}
.media:active {
background-color: aqua;
}
button {
min-width: 0;
padding-top: 0;
padding-bottom: 0;
background: none;
border: none;
padding: 0px;
padding-left: 5px;
padding-right: 5px;
color: aqua;
}
button:active {
background-color: aqua;
}
button:hover {
border-bottom: 3px solid teal;
}
label {
font-weight: bold;
}
.workspaces button.focused {
border-bottom: 3px solid aqua;
}
.client-title {
color: rgb(200, 200, 200);
}
.clock {
color: rgb(200, 200, 200);
}
.notification {
color: yellow;
}
levelbar block,
highlight {
min-height: 4px;
}
/************************************/
window.notification-popups box.notifications {
padding: .5em;
}
.icon {
min-width: 68px;
min-height: 68px;
margin-right: 1em;
}
.icon image {
font-size: 58px;
/* to center the icon */
margin: 5px;
color: yellow;
}
.icon box {
min-width: 68px;
min-height: 68px;
border-radius: 7px;
}
.notificationbutton {
color: teal;
}
.notification {
min-width: 350px;
border-radius: 11px;
padding: 1em;
margin: .5em;
border: 1px solid blue;
background-color: rgb(36, 40, 59);
}
.notification.critical {
border: 1px solid lightcoral;
}
.title {
color: black;
font-size: 1.4em;
}
.body {
color: red;
}
.actions .action-button {
margin: 0 .4em;
margin-top: .8em;
}
.actions .action-button:first-child {
margin-left: 0;
}
.actions .action-button:last-child {
margin-right: 0;
}

View File

30
home/dotfiles/ags/wifi.js Executable file
View File

@@ -0,0 +1,30 @@
const network = await Service.import('network')
export default function WifiIndicator() {
return Widget.Box({
child: Widget.EventBox({
child: Widget.Icon({
icon: 'network-wireless-disconnected-symbolic',
}),
setup: self => self.hook(network.wifi, () => {
self.child.icon = network.wifi.icon_name == 'network-wireless-disabled-symbolic' ? 'network-wireless-disconnected-symbolic' : network.wifi.icon_name
self.tooltip_text = network.wifi.ssid ? network.wifi.ssid : network.wifi.internet
}),
tooltip_text: 'disconnected',
}),
})
}
// const WiredIndicator = () => Widget.Icon({
// icon: network.wired.bind('icon_name'),
// })
// const NetworkIndicator = () => Widget.Stack({
// children: {
// wifi: WifiIndicator(),
// wired: WiredIndicator(),
// },
// shown: network.bind('primary').as(p => p || 'wifi'),
// })

37
home/dotfiles/ags/workspaces.js Executable file
View File

@@ -0,0 +1,37 @@
const hyprland = await Service.import("hyprland")
function ClientTitle() {
return Widget.Label({
class_name: "client-title",
max_width_chars: 30,
truncate: "end",
label: hyprland.active.client.bind("title"),
})
}
function Workspaces() {
const activeId = hyprland.active.workspace.bind("id")
const workspaces = hyprland.bind("workspaces")
.as(ws => ws.map(({ id }) => id > 0 ? Widget.Button({
on_clicked: () => hyprland.messageAsync(`dispatch workspace ${id}`),
child: Widget.Label(`${id}`),
class_name: activeId.as(i => `${i === id ? "focused" : "other"}`),
margin_left: 10,
}) : null
).sort((a, b) => { return a && b ? Number(a.child.label) - Number(b.child.label) : a ? -1 : 1 }))
return Widget.CenterBox({
spacing: 8,
start_widget: Widget.Box({
class_name: "workspaces",
spacing: 0,
children: workspaces
}),
end_widget: ClientTitle(),
})
}
export default Workspaces

56
home/dotfiles/default.nix Normal file
View File

@@ -0,0 +1,56 @@
{ config, lib, ... }: {
config = lib.mkMerge [
(lib.mkIf config.homeconfig.ags.enable {
home.file = let
files = [
"ags/bluetooth.js"
"ags/brightness.js"
"ags/clock.js"
"ags/config.js"
"ags/media.js"
"ags/notif.js"
"ags/notification.js"
"ags/power.js"
"ags/settings.js"
"ags/systemtray.js"
"ags/wifi.js"
"ags/workspaces.js"
];
in builtins.map (name: { ".config/${name}" = "./${name}"; }) files;
})
(lib.mkIf config.homeconfig.hyprland.enable {
home.file = let
files = [
"hypr/otf.conf"
"hypr/pyprland.toml"
"hypr/hyprland.conf"
];
in builtins.map (name: { ".config/${name}" = "./${name}"; }) files;
})
(lib.mkIf config.homeconfig.swaylock.enable {
home.file = let
files = [
"swaylock/config"
];
in builtins.map (name: { ".config/${name}" = "./${name}"; }) files;
})
(lib.mkIf config.homeconfig.wal.enable {
home.file = let
files = [
"wal/templates/cava_config"
"wal/templates/colors-ags.css"
"wal/templates/colors-discord.css"
"wal/templates/colors-hypr.conf"
];
in builtins.map (name: { ".config/${name}" = "./${name}"; }) files;
})
];
}

View File

@@ -0,0 +1,284 @@
#------------------------------------------------#
# _ _ _ _ #
#| | | | | | | | #
#| |___| |_ _ ____ _ _| | __ _.-.___ ___| | #
#| ___ | | | | _ \| |/ | |/ _` | _ \/ _ | #
#| | | | |_| | |_) | /| | (_| | | | | (_| | #
#|_| |_|\__, | __/|__| |_|\__,_|_| |_|\___/_| #
# |___/|_| #
# #
#------------------------------------------------#
monitor=eDP-1,1920x1080@60,0x0,1
exec-once=onSystemStart
# Some default env vars.
env = XCURSOR_SIZE,16
source = ./otf.conf
source = ~/.cache/wal/colors-hypr.conf
# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
input {
kb_layout = us
kb_variant =
kb_model =
kb_options =
kb_rules =
follow_mouse = 1
touchpad {
natural_scroll = yes
}
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
}
cursor {
no_hardware_cursors = true
}
general {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
gaps_in = 5
gaps_out = 4
border_size = 2
col.active_border = $color1 $color5 100deg
col.inactive_border = $color0
layout = dwindle
}
decoration { # See https://wiki.hyprland.org/Configuring/Variables/ for more
rounding = 2
blur {
enabled = false
}
drop_shadow = yes
shadow_range = 4
shadow_render_power = 3
col.shadow = rgba(1a1a1aee)
}
animations {
enabled = yes
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
animation = windows, 1, 7, myBezier
animation = windowsOut, 1, 7, default, popin 80%
animation = border, 1, 10, default
animation = borderangle, 1, 8, default
animation = fade, 1, 7, default
animation = workspaces, 1, 6, default
}
dwindle {
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
preserve_split = yes # you probably want this
}
master {
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
new_status = "master"
}
gestures {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
workspace_swipe = off
}
misc {
disable_hyprland_logo = false
disable_splash_rendering = true
force_default_wallpaper = 2
}
# Binds
$mainMod = ALT
bind = $mainMod, E, exec, colorPrefix kitty
bind = $mainMod, B, exec, firefox
bind = $mainMod SHIFT, B, exec, firefox --private-window
bind = $mainMod, Q, killactive,
bind = $mainMod, R, exec, colorPrefix kitty -e _systemRebuild
bind = $mainMod SHIFT, R, exec, colorPrefix kitty -e _homeRebuild
bind = $mainMod, C, exec, colorPrefix kitty -e bash -c "cd ~/Projects/System; nvim ~/Projects/System/flake.nix"
bind = $mainMod, F, exec, thunar
bind = $mainMod SHIFT, F, fullscreen
bind = $mainMod, semicolon, exec, colorPrefix kitty -e nvim ~
bind = $mainMod, Insert, exec, libreoffice &
bind = $mainMod, H, exec, bluetoothctl connect 88:D0:39:F9:83:CE
bind = $mainMod, V, togglefloating,
bind = $mainMod SHIFT, V, exec, vlc &
bind = , Menu, exec, rofi -show drun
bind = $mainMod, Menu, exec, killall .ags-wrapped; ags &
bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, Z, togglesplit, # dwindle
bind = $mainMod, M, exec, spotify
bind = $mainMod SHIFT, M, exec, firefox --new-window soundcloud.com/you/library
bind = $mainMod CTRL, M, exec, colorPrefix kitty -e ncmpcpp -s browser
bind = $mainMod, XF86AudioPlay, exec, mpc load casual
bind = , XF86AudioPlay, exec, playerctl play-pause
bind = , XF86AudioPause, exec, playerctl pause
bind = $mainMod, F9, exec, playerctl pause
bind = , XF86AudioNext, exec, playerctl next
bind = , XF86AudioPrev, exec, playerctl previous
bind = , XF86Launch2, exec, steam &
bind = $mainMod, XF86Launch2, exec, prismlauncher
bind = CTRL SHIFT, XF86Launch2, exec, if [[ $(hyprctl monitors | grep 0x0 | sed -n -e "s/\t*1920x1080@//" -e "s/.[1234567890]* at 0x0//p") == 300 ]]; then hyprctl keyword monitor eDP-1,1920x1080@60,0x0,1; else hyprctl keyword monitor eDP-1,1920x1080@300,0x0,1; fi
bind = , XF86Calculator, exec, geogebra
bind = $mainMod SHIFT, Print, exec, firefox --new-window localhost:631
bind = , Print, exec, grim -g "$(slurp)"
bind = $mainMod, Return, exec, vesktop --enable-features=UseOzonePlatform --ozone-platform=wayland &
bind = $mainMod CTRL, Return, exec, firefox --new-window https://discord.com/app
# Move focus with mainMod + arrow keys
bind = $mainMod, A, movefocus, l
bind = $mainMod, D, movefocus, r
bind = $mainMod, W, movefocus, u
bind = $mainMod, S, movefocus, d
# Switch workspaces with mainMod + [0-9]
bind = $mainMod, 1, workspace, 1
bind = $mainMod, 2, workspace, 2
bind = $mainMod, 3, workspace, 3
bind = $mainMod, 4, workspace, 4
bind = $mainMod, 5, workspace, 5
bind = $mainMod, 6, workspace, 6
bind = $mainMod, 7, workspace, 7
bind = $mainMod, 8, workspace, 8
bind = $mainMod, 9, workspace, 9
bind = $mainMod, 0, workspace, 10
bind = $mainMod, Home, workspace, 11
# Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = $mainMod SHIFT, 1, movetoworkspace, 1
bind = $mainMod SHIFT, 2, movetoworkspace, 2
bind = $mainMod SHIFT, 3, movetoworkspace, 3
bind = $mainMod SHIFT, 4, movetoworkspace, 4
bind = $mainMod SHIFT, 5, movetoworkspace, 5
bind = $mainMod SHIFT, 6, movetoworkspace, 6
bind = $mainMod SHIFT, 7, movetoworkspace, 7
bind = $mainMod SHIFT, 8, movetoworkspace, 8
bind = $mainMod SHIFT, 9, movetoworkspace, 9
bind = $mainMod SHIFT, 0, movetoworkspace, 10
bind = $mainMod SHIFT, Home, movetoworkspace, 11
# Scroll through existing workspaces with mainMod + scroll
bind = $mainMod, right, workspace, e+1
bind = $mainMod, left, workspace, e-1
#switch network connections
bind = CTRL SHIFT, Escape, exec, nmcli device down wlo1
bind = CTRL SHIFT, 0, exec, nmcli device down wlo1; nmcli connection up Hotspot
bind = CTRL SHIFT, 1, exec, nmcli device wifi connect EagleNet password ~?C##@ZiH
bind = CTRL SHIFT, 2, exec, nmcli device down wlo1; nmcli device wifi connect CXNK00813829 password a8d859c8cfb420ab
bind = CTRL SHIFT, 3, exec, nmcli device down wlo1; nmcli device wifi connect ATT9MhT2ql password 325qxr89u?3t
#brightness keys
bind = , XF86MonBrightnessUp, exec, brightnessctl set +10%
bind = , XF86MonBrightnessDown, exec, brightnessctl set 10%-
#volume keys
binde = , XF86AudioRaiseVolume, exec, amixer -D default sset Master 10%+
binde = , XF86AudioLowerVolume, exec, amixer -D default sset Master 10%-
bind = , XF86AudioMute, exec, amixer -D default sset Master toggle
#screen lock key
bind = $mainMod, F12, exec, swaylock
#logout shortcut
bind = CTRL ALT, Delete, exec, loginctl kill-session self
# Move/resize windows with mainMod + LMB/RMB and dragging
bind = $mainMod SHIFT, W, movewindow, u
bind = $mainMod SHIFT, S, movewindow, d
bind = $mainMod SHIFT, A, movewindow, l
bind = $mainMod SHIFT, D, movewindow, r
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod SHIFT, mouse:272, resizewindow
$scratchpadsize = size 60% 80%
$scratchpad = class:^(scratchpad)$
windowrulev2 = float, $scratchpad
windowrulev2 = $scratchpadsize, $scratchpad
windowrulev2 = workspace special silent, $scratchpad
$kitty = class:^(scratchpad-kitty)$
windowrulev2 = float, $kitty
windowrulev2 = $scratchpadsize, $kitty
windowrulev2 = workspace special silent, $kitty
$nvim = class:^(scratchpad-nvim)$
windowrulev2 = float, $nvim
windowrulev2 = $scratchpadsize, $nvim
windowrulev2 = workspace special silent, $nvim
bind = $mainMod SHIFT, N, exec, colorPrefix pypr toggle nvim
bind = $mainMod SHIFT, E, exec, colorPrefix pypr toggle free
bind = CTRL SHIFT, Home, exec, ssh -i ~/.ssh/key nathan@69.150.99.129 -fL 5900:localhost:5900 sleep 10; vncviewer localhost:5900 -fullscreen
bind = CTRL SHIFT, End, exec, ssh -i ~/.ssh/key nathan@173.242.244.184 -fL 5900:localhost:5900 sleep 10; vncviewer localhost:5900 -fullscreen
bind = CTRL SHIFT, Home, submap, clean
bind = CTRL SHIFT, End, submap, clean
bind = $mainMod CTRL, Home, submap, clean
submap = clean
bind = $mainMod CTRL, Home, submap, reset
submap = reset

View File

@@ -0,0 +1 @@

View File

@@ -0,0 +1,22 @@
[pyprland]
plugins = [
"scratchpads"
]
[scratchpads.nvim]
animation = "fromTop"
command = "kitty --class scratchpad-nvim -e nvim ~"
lazy = false
class = "scratchpad-nvim"
margin = 100
multi = true
excludes = "*"
[scratchpads.free]
animation = "fromBottom"
command = "kitty --class scratchpad"
class = "scratchpad"
lazy = false
margin = 100
multi = true
excludes = "*"

16
home/dotfiles/swaylock/config Executable file
View File

@@ -0,0 +1,16 @@
indicator
ignore-empty-password
indicator-thickness=10
indicator-radius=100
image=~/.cache/bg
clock
ring-color=33ddff55
key-hl-color=dd4444
line-color=00000000
inside-color=00000088
text-color=00a6f0
text-clear-color=daa520
ring-clear-color=002251
separator-color=00000000
grace=2
fade-in=0.5

View File

@@ -0,0 +1,279 @@
## Configuration file for CAVA.
# Remove the ; to change parameters.
[general]
# Smoothing mode. Can be 'normal', 'scientific' or 'waves'. DEPRECATED as of 0.6.0
; mode = normal
# Accepts only non-negative values.
; framerate = 60
# 'autosens' will attempt to decrease sensitivity if the bars peak. 1 = on, 0 = off
# new as of 0.6.0 autosens of low values (dynamic range)
# 'overshoot' allows bars to overshoot (in % of terminal height) without initiating autosens. DEPRECATED as of 0.6.0
; autosens = 1
; overshoot = 20
# Manual sensitivity in %. If autosens is enabled, this will only be the initial value.
# 200 means double height. Accepts only non-negative values.
; sensitivity = 100
# The number of bars (0-512). 0 sets it to auto (fill up console).
# Bars' width and space between bars in number of characters.
; bars = 0
; bar_width = 2
; bar_spacing = 1
# bar_height is only used for output in "noritake" format
; bar_height = 32
# For SDL width and space between bars is in pixels, defaults are:
; bar_width = 20
; bar_spacing = 5
# sdl_glsl have these default values, they are only used to calulate max number of bars.
; bar_width = 1
; bar_spacing = 0
# Lower and higher cutoff frequencies for lowest and highest bars
# the bandwidth of the visualizer.
# Note: there is a minimum total bandwidth of 43Mhz x number of bars.
# Cava will automatically increase the higher cutoff if a too low band is specified.
; lower_cutoff_freq = 50
; higher_cutoff_freq = 10000
# Seconds with no input before cava goes to sleep mode. Cava will not perform FFT or drawing and
# only check for input once per second. Cava will wake up once input is detected. 0 = disable.
; sleep_timer = 0
[input]
# Audio capturing method. Possible methods are: 'fifo', 'portaudio', 'pipewire', 'alsa', 'pulse', 'sndio', 'oss', 'jack' or 'shmem'
# Defaults to 'oss', 'pipewire', 'sndio', 'jack', 'pulse', 'alsa', 'portaudio' or 'fifo', in that order, dependent on what support cava was built with.
# On Mac it defaults to 'portaudio' or 'fifo'
# On windows this is automatic and no input settings are needed.
#
# All input methods uses the same config variable 'source'
# to define where it should get the audio.
#
# For pulseaudio and pipewire 'source' will be the source. Default: 'auto', which uses the monitor source of the default sink
# (all pulseaudio sinks(outputs) have 'monitor' sources(inputs) associated with them).
#
# For pipewire 'source' will be the object name or object.serial of the device to capture from.
# Both input and output devices are supported.
#
# For alsa 'source' will be the capture device.
# For fifo 'source' will be the path to fifo-file.
# For shmem 'source' will be /squeezelite-AA:BB:CC:DD:EE:FF where 'AA:BB:CC:DD:EE:FF' will be squeezelite's MAC address
#
# For sndio 'source' will be a raw recording audio descriptor or a monitoring sub-device, e.g. 'rsnd/2' or 'snd/1'. Default: 'default'.
# README.md contains further information on how to setup CAVA for sndio.
#
# For oss 'source' will be the path to a audio device, e.g. '/dev/dsp2'. Default: '/dev/dsp', i.e. the default audio device.
# README.md contains further information on how to setup CAVA for OSS on FreeBSD.
#
# For jack 'source' will be the name of the JACK server to connect to, e.g. 'foobar'. Default: 'default'.
# README.md contains further information on how to setup CAVA for JACK.
#
; method = pulse
; source = auto
; method = pipewire
; source = auto
; method = alsa
; source = hw:Loopback,1
; method = fifo
; source = /tmp/mpd.fifo
; method = shmem
; source = /squeezelite-AA:BB:CC:DD:EE:FF
; method = portaudio
; source = auto
; method = sndio
; source = default
; method = oss
; source = /dev/dsp
; method = jack
; source = default
# The options 'sample_rate', 'sample_bits', 'channels' and 'autoconnect' can be configured for some input methods:
# sample_rate: fifo, pipewire, sndio, oss
# sample_bits: fifo, pipewire, sndio, oss
# channels: sndio, oss, jack
# autoconnect: jack
# Other methods ignore these settings.
#
# For 'sndio' and 'oss' they are only preferred values, i.e. if the values are not supported
# by the chosen audio device, the device will use other supported values instead.
# Example: 48000, 32 and 2, but the device only supports 44100, 16 and 1, then it
# will use 44100, 16 and 1.
#
; sample_rate = 44100
; sample_bits = 16
; channels = 2
; autoconnect = 2
[output]
# Output method. Can be 'ncurses', 'noncurses', 'raw', 'noritake', 'sdl'
# or 'sdl_glsl'.
# 'noncurses' (default) uses a buffer and cursor movements to only print
# changes from frame to frame in the terminal. Uses less resources and is less
# prone to tearing (vsync issues) than 'ncurses'.
#
# 'raw' is an 8 or 16 bit (configurable via the 'bit_format' option) data
# stream of the bar heights that can be used to send to other applications.
# 'raw' defaults to 200 bars, which can be adjusted in the 'bars' option above.
#
# 'noritake' outputs a bitmap in the format expected by a Noritake VFD display
# in graphic mode. It only support the 3000 series graphical VFDs for now.
#
# 'sdl' uses the Simple DirectMedia Layer to render in a graphical context.
# 'sdl_glsl' uses SDL to create an OpenGL context. Write your own shaders or
# use one of the predefined ones.
; method = noncurses
# Orientation of the visualization. Can be 'bottom', 'top', 'left' or 'right'.
# Default is 'bottom'. Other orientations are only supported on sdl and ncruses
# output. Note: many fonts have weird glyphs for 'top' and 'right' characters,
# which can make ncurses not look right.
; orientation = bottom
# Visual channels. Can be 'stereo' or 'mono'.
# 'stereo' mirrors both channels with low frequencies in center.
# 'mono' outputs left to right lowest to highest frequencies.
# 'mono_option' set mono to either take input from 'left', 'right' or 'average'.
# set 'reverse' to 1 to display frequencies the other way around.
; channels = stereo
; mono_option = average
; reverse = 0
# Raw output target. A fifo will be created if target does not exist.
; raw_target = /dev/stdout
# Raw data format. Can be 'binary' or 'ascii'.
; data_format = binary
# Binary bit format, can be '8bit' (0-255) or '16bit' (0-65530).
; bit_format = 16bit
# Ascii max value. In 'ascii' mode range will run from 0 to value specified here
; ascii_max_range = 1000
# Ascii delimiters. In ascii format each bar and frame is separated by a delimiters.
# Use decimal value in ascii table (i.e. 59 = ';' and 10 = '\n' (line feed)).
; bar_delimiter = 59
; frame_delimiter = 10
# sdl window size and position. -1,-1 is centered.
; sdl_width = 1000
; sdl_height = 500
; sdl_x = -1
; sdl_y= -1
; sdl_full_screen = 0
# set label on bars on the x-axis. Can be 'frequency' or 'none'. Default: 'none'
# 'frequency' displays the lower cut off frequency of the bar above.
# Only supported on ncurses and noncurses output.
; xaxis = none
# enable alacritty synchronized updates. 1 = on, 0 = off
# removes flickering in alacritty terminal emulator.
# defaults to off since the behaviour in other terminal emulators is unknown
; alacritty_sync = 0
# Shaders for sdl_glsl, located in $HOME/.config/cava/shaders
; vertex_shader = pass_through.vert
; fragment_shader = bar_spectrum.frag
; for glsl output mode, keep rendering even if no audio
; continuous_rendering = 0
# disable console blank (screen saver) in tty
# (Not supported on FreeBSD)
; disable_blanking = 0
# show a flat bar at the bottom of the screen when idle, 1 = on, 0 = off
; show_idle_bar_heads = 1
# show waveform instead of frequency spectrum, 1 = on, 0 = off
; waveform = 0
[color]
# Colors can be one of seven predefined: black, blue, cyan, green, magenta, red, white, yellow.
# Or defined by hex code '#xxxxxx' (hex code must be within ''). User defined colors requires
# a terminal that can change color definitions such as Gnome-terminal or rxvt.
# default is to keep current terminal color
; background = default
; foreground = default
# SDL and sdl_glsl only support hex code colors, these are the default:
; background = '#111111'
; foreground = '#33ffff'
# Gradient mode, only hex defined colors are supported,
# background must also be defined in hex or remain commented out. 1 = on, 0 = off.
# You can define as many as 8 different colors. They range from bottom to top of screen
gradient = 1
gradient_count = 8
gradient_color_1 = '{color1}'
gradient_color_2 = '{color2}'
gradient_color_3 = '{color3}'
gradient_color_4 = '{color4}'
gradient_color_5 = '{color5}'
gradient_color_6 = '{color6}'
gradient_color_7 = '{color7}'
gradient_color_8 = '{color8}'
[smoothing]
# Percentage value for integral smoothing. Takes values from 0 - 100.
# Higher values means smoother, but less precise. 0 to disable.
# DEPRECATED as of 0.8.0, use noise_reduction instead
; integral = 77
# Disables or enables the so-called "Monstercat smoothing" with or without "waves". Set to 0 to disable.
; monstercat = 0
; waves = 0
# Set gravity percentage for "drop off". Higher values means bars will drop faster.
# Accepts only non-negative values. 50 means half gravity, 200 means double. Set to 0 to disable "drop off".
# DEPRECATED as of 0.8.0, use noise_reduction instead
; gravity = 100
# In bar height, bars that would have been lower that this will not be drawn.
# DEPRECATED as of 0.8.0
; ignore = 0
# Noise reduction, int 0 - 100. default 77
# the raw visualization is very noisy, this factor adjusts the integral and gravity filters to keep the signal smooth
# 100 will be very slow and smooth, 0 will be fast but noisy.
; noise_reduction = 77
[eq]
# This one is tricky. You can have as much keys as you want.
# Remember to uncomment more than one key! More keys = more precision.
# Look at readme.md on github for further explanations and examples.
; 1 = 1 # bass
; 2 = 1
; 3 = 1 # midtone
; 4 = 1
; 5 = 1 # treble

View File

@@ -0,0 +1,161 @@
window.bar {{
background-color: {color1.rgba};
color: {color1.rgba};
opacity: 1;
}}
.playerbox {{
background-color: {color2};
color:rgb(73, 81, 121);
border: 3px solid black;
border-radius: 15px;
}}
.launcher {{
background: none;
border: none;
}}
box {{
color: {color11};
}}
Window.SettingsWindow {{
background-color: black;
color: black;
}}
.settings_window {{
background-color: {color1.rgba};
border-radius: 15px;
}}
.focused {{
color: {color11};
}}
.other {{
color: {color3};
}}
.media {{
color: {color11};
}}
.media:active {{
background-color: {color11};
}}
button {{
min-width: 0;
padding-top: 0;
padding-bottom: 0;
background: none;
border: none;
padding: 0px;
padding-left: 5px;
padding-right: 5px;
color: {color11};
}}
button:active {{
background-color: {color11};
}}
button:hover {{
border-bottom: 3px solid {color3};
}}
label {{
font-weight: bold;
}}
.workspaces button.focused {{
border-bottom: 3px solid {color11};
}}
.client-title {{
color: {color11};
}}
.clock {{
color: {color11};
}}
.notification {{
color: yellow;
}}
levelbar block,
highlight {{
min-height: 4px;
}}
/************************************/
window.notification-popups box.notifications {{
padding: .5em;
}}
.icon {{
min-width: 68px;
min-height: 68px;
margin-right: 1em;
}}
.icon image {{
font-size: 58px;
/* to center the icon */
margin: 5px;
color: yellow;
}}
.icon box {{
min-width: 68px;
min-height: 68px;
border-radius: 7px;
}}
.notificationbutton {{
color: {color3};
}}
.notification {{
min-width: 350px;
border-radius: 11px;
padding: 1em;
margin: .5em;
border: 1px solid blue;
background-color: {color2};
}}
.notification.critical {{
border: 1px solid lightcoral;
}}
.title {{
color: aqua;
font-size: 1.4em;
}}
.body {{
color: teal;
}}
.actions .action-button {{
margin: 0 .4em;
margin-top: .8em;
}}
.actions .action-button:first-child {{
margin-left: 0;
}}
.actions .action-button:last-child {{
margin-right: 0;
}}

View File

@@ -0,0 +1,23 @@
--accent-color: {color7};
--border-color: {color3};
--background-1: rgba({color0.rgb}, calc({alpha} / 175));
--background-2: transparent;
--background-mentioned: {color3} !important;
--background-mentioned-hover: {color3} !important;
--background-modifier-hover: {color6} !important;
--background-modifier-active: {color3} !important;
--text-normal: {color1} !important;
--text-positive: {color2} !important;
--text-muted: {color3} !important;
--text-link: {color4} !important;
--button-background: {color5} !important;
--button-background-hover: {color0} !important;
--button-background-active: {color0} !important;
--button-accent-hover: {color0} !important;
--button-accent-active: {color5} !important;
--button-destructive: {color5} !important;
--button-destructive-hover: {color4} !important;
--button-destructive-active: {color4} !important;
--settings-icon-color: {color0} !important;
--tab-selected: {color2} !important;
--switch: {color1} !important;

View File

@@ -0,0 +1,18 @@
$foregroundCol = 0xff{foreground.strip}
$backgroundCol = 0xff{background.strip}
$color0 = 0xff{color0.strip}
$color1 = 0xff{color1.strip}
$color2 = 0xff{color2.strip}
$color3 = 0xff{color3.strip}
$color4 = 0xff{color4.strip}
$color5 = 0xff{color5.strip}
$color6 = 0xff{color6.strip}
$color7 = 0xff{color7.strip}
$color8 = 0xff{color8.strip}
$color9 = 0xff{color9.strip}
$color10 = 0xff{color10.strip}
$color11 = 0xff{color11.strip}
$color12 = 0xff{color12.strip}
$color13 = 0xff{color13.strip}
$color14 = 0xff{color14.strip}
$color15 = 0xff{color15.strip}

View File

@@ -1,55 +1,78 @@
{
description = "Nathan user settings";
description = "Nathan user settings";
inputs = {
inputs = {
prgms.url = "./programs";
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
srvcs.url = "./services";
home-manager = {
url = "github:nix-community/home-manager/release-24.05";
inputs.nixpkgs.follows = "nixpkgs";
};
packages.url = "./packages";
};
outputs = { self, ... }@inputs: {
homeManagerModule = { config, lib, pkgs, ... }: {
imports = [
inputs.prgms.hmModule
inputs.srvcs.hmModule
inputs.packages.hmModule
];
home.stateVersion = "23.11";
home.username = "nathan";
home.homeDirectory = "/home/nathan";
home.pointerCursor = {
gtk.enable = true;
package = pkgs.bibata-cursors;
name = "Bibata-Modern-Classic";
size = 16;
};
gtk = {
enable = true;
theme.name = "Tokyonight-Dark-B";
theme.package = pkgs.tokyonight-gtk-theme;
iconTheme.name = "Tokyonight-Dark";
};
externalPackages.enable = true;
services.mpris-proxy.enable = true;
programs.ssh.enable = true;
programs.home-manager.enable = true;
prgms.url = "./programs";
packages.url = "./packages";
};
outputs = { self, ... }@inputs: {
homeManagerModule = { config, lib, pkgs, ... }: {
imports = [
inputs.prgms.hmModule
./services
inputs.packages.hmModule
./dotfiles
];
home.stateVersion = "23.11";
home.username = "nathan";
home.homeDirectory = "/home/nathan";
homeconfig = {
calcurse.enable = true;
rofi.enable = true;
mpd.enable = true;
ags.enable = true;
hyprland.enable = true;
};
home.pointerCursor = {
gtk.enable = true;
package = pkgs.bibata-cursors;
name = "Bibata-Modern-Classic";
size = 16;
};
gtk = {
enable = true;
theme.name = "Tokyonight-Dark-B";
theme.package = pkgs.tokyonight-gtk-theme;
iconTheme.name = "Tokyonight-Dark";
};
externalPackages.enable = true;
services.mpris-proxy.enable = true;
programs.ssh.enable = true;
programs.home-manager.enable = true;
};
homeConfigurations."nathan" = inputs.home-manager.lib.homeManagerConfiguration {
pkgs = import inputs.nixpkgs {
system = "x86_64-linux";
config.allowUnfree = true;
};
imports = [ self.homeManagerModule ];
};
};
}

View File

@@ -16,7 +16,7 @@
".ssh"
".config"
".local"
".cache/wal"
];
files = [
".cache/bg"

View File

@@ -1,46 +1,52 @@
{
description = "ags config";
description = "ags config";
inputs = {
inputs = {
ags.url = "github:Aylur/ags";
};
outputs = { self, ... }@inputs: {
hmModule = { config, lib, pkgs, ... }: {
imports = [ inputs.ags.homeManagerModules.default ];
programs.ags = {
enable = true;
extraPackages = with pkgs; [
gtksourceview
webkitgtk
accountsservice
];
};
home.file.".config/ags/launcher.js".text = ''
function Launcher() {
return Widget.EventBox({
class_name: "launcher",
hpack: "center",
child: Widget.Icon({
icon: '${pkgs.nixos-icons}/share/icons/hicolor/48x48/apps/nix-snowflake.png',
css: 'font-size: 24px;'
}),
on_primary_click: () => {Utils.execAsync('rofi -show drun')},
margin_left: 10,
})
}
export default Launcher
'';
ags.url = "github:Aylur/ags";
};
};
outputs = { self, ... }@inputs: {
hmModule = { config, lib, pkgs, ... }: {
imports = [ inputs.ags.homeManagerModules.default ];
options.homeconfig.ags.enable = lib.options.mkOption {
type = lib.types.bool;
default = false;
};
config = lib.mkIf config.homeconfig.ags.enable {
programs.ags = {
enable = true;
extraPackages = with pkgs; [
gtksourceview
webkitgtk
accountsservice
];
};
home.file.".config/ags/launcher.js".text = /*javascript*/ ''
function Launcher() {
return Widget.EventBox({
class_name: "launcher",
hpack: "center",
child: Widget.Icon({
icon: '${pkgs.nixos-icons}/share/icons/hicolor/48x48/apps/nix-snowflake.png',
css: 'font-size: 24px;'
}),
on_primary_click: () => {Utils.execAsync('rofi -show drun')},
margin_left: 10,
})
}
export default Launcher
'';
};
};
};
}

View File

@@ -1,7 +1,14 @@
{ config, lib, pkgs, ... }: {
home.packages = with pkgs; [
calcurse
libnotify
];
options.homeconfig.calcurse.enable = lib.options.mkOption {
type = lib.types.bool;
default = false;
};
config = lib.mkIf config.homeconfig.calcurse.enable {
home.packages = with pkgs; [
calcurse
libnotify
];
};
}

View File

@@ -17,324 +17,12 @@
pyprland
];
home.file.".config/hypr/pyprland.toml".text = ''
[pyprland]
plugins = [
"scratchpads"
]
[scratchpads.nvim]
animation = "fromTop"
command = "kitty --class scratchpad-nvim -e nvim ~"
lazy = false
class = "scratchpad-nvim"
margin = 100
multi = true
excludes = "*"
[scratchpads.free]
animation = "fromBottom"
command = "kitty --class scratchpad"
class = "scratchpad"
lazy = false
margin = 100
multi = true
excludes = "*"
'';
wayland.windowManager.hyprland = {
enable = true;
systemd.variables = [ "--all" ];
extraConfig = ''
#------------------------------------------------#
# _ _ _ _ #
#| | | | | | | | #
#| |___| |_ _ ____ _ _| | __ _.-.___ ___| | #
#| ___ | | | | _ \| |/ | |/ _` | _ \/ _ | #
#| | | | |_| | |_) | /| | (_| | | | | (_| | #
#|_| |_|\__, | __/|__| |_|\__,_|_| |_|\___/_| #
# |___/|_| #
# #
#------------------------------------------------#
monitor=eDP-1,1920x1080@60,0x0,1
exec-once=onSystemStart
# Some default env vars.
env = XCURSOR_SIZE,16
source = ./otf.conf
source = ~/.cache/wal/colors-hypr.conf
# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
input {
kb_layout = us
kb_variant =
kb_model =
kb_options =
kb_rules =
follow_mouse = 1
touchpad {
natural_scroll = yes
}
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
}
cursor {
no_hardware_cursors = true
}
general {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
gaps_in = 5
gaps_out = 4
border_size = 2
col.active_border = $color1 $color5 100deg
col.inactive_border = $color0
layout = dwindle
}
decoration { # See https://wiki.hyprland.org/Configuring/Variables/ for more
rounding = 2
blur {
enabled = false
}
drop_shadow = yes
shadow_range = 4
shadow_render_power = 3
col.shadow = rgba(1a1a1aee)
}
animations {
enabled = yes
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
animation = windows, 1, 7, myBezier
animation = windowsOut, 1, 7, default, popin 80%
animation = border, 1, 10, default
animation = borderangle, 1, 8, default
animation = fade, 1, 7, default
animation = workspaces, 1, 6, default
}
dwindle {
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
preserve_split = yes # you probably want this
}
master {
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
new_status = "master"
}
gestures {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
workspace_swipe = off
}
misc {
disable_hyprland_logo = false
disable_splash_rendering = true
force_default_wallpaper = 2
}
# Binds
$mainMod = ALT
bind = $mainMod, E, exec, colorPrefix kitty
bind = $mainMod, B, exec, firefox
bind = $mainMod SHIFT, B, exec, firefox --private-window
bind = $mainMod, Q, killactive,
bind = $mainMod, R, exec, colorPrefix kitty -e _systemRebuild
bind = $mainMod SHIFT, R, exec, colorPrefix kitty -e _homeRebuild
bind = $mainMod, C, exec, colorPrefix kitty -e bash -c "cd ~/Projects/System; nvim ~/Projects/System/flake.nix"
bind = $mainMod, F, exec, thunar
bind = $mainMod SHIFT, F, fullscreen
bind = $mainMod, semicolon, exec, colorPrefix kitty -e nvim ~
bind = $mainMod, Insert, exec, libreoffice &
bind = $mainMod, H, exec, bluetoothctl connect 88:D0:39:F9:83:CE
bind = $mainMod, V, togglefloating,
bind = $mainMod SHIFT, V, exec, vlc &
bind = , Menu, exec, rofi -show drun
bind = $mainMod, Menu, exec, killall .ags-wrapped; ags &
bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, Z, togglesplit, # dwindle
bind = $mainMod, M, exec, spotify
bind = $mainMod SHIFT, M, exec, firefox --new-window soundcloud.com/you/library
bind = $mainMod CTRL, M, exec, colorPrefix kitty -e ncmpcpp -s browser
bind = $mainMod, XF86AudioPlay, exec, mpc load casual
bind = , XF86AudioPlay, exec, ${pkgs.playerctl}/bin/playerctl play-pause
bind = , XF86AudioPause, exec, ${pkgs.playerctl}/bin/playerctl pause
bind = $mainMod, F9, exec, ${pkgs.playerctl}/bin/playerctl pause
bind = , XF86AudioNext, exec, ${pkgs.playerctl}/bin/playerctl next
bind = , XF86AudioPrev, exec, ${pkgs.playerctl}/bin/playerctl previous
bind = , XF86Launch2, exec, steam &
bind = $mainMod, XF86Launch2, exec, prismlauncher
bind = CTRL SHIFT, XF86Launch2, exec, if [[ $(hyprctl monitors | grep 0x0 | sed -n -e "s/\t*1920x1080@//" -e "s/.[1234567890]* at 0x0//p") == 300 ]]; then hyprctl keyword monitor eDP-1,1920x1080@60,0x0,1; else hyprctl keyword monitor eDP-1,1920x1080@300,0x0,1; fi
bind = , XF86Calculator, exec, geogebra
bind = $mainMod SHIFT, Print, exec, firefox --new-window localhost:631
bind = , Print, exec, grim -g "$(slurp)"
bind = $mainMod, Return, exec, ${pkgs.vesktop}/bin/vesktop --enable-features=UseOzonePlatform --ozone-platform=wayland &
bind = $mainMod CTRL, Return, exec, firefox --new-window https://discord.com/app
# Move focus with mainMod + arrow keys
bind = $mainMod, A, movefocus, l
bind = $mainMod, D, movefocus, r
bind = $mainMod, W, movefocus, u
bind = $mainMod, S, movefocus, d
# Switch workspaces with mainMod + [0-9]
bind = $mainMod, 1, workspace, 1
bind = $mainMod, 2, workspace, 2
bind = $mainMod, 3, workspace, 3
bind = $mainMod, 4, workspace, 4
bind = $mainMod, 5, workspace, 5
bind = $mainMod, 6, workspace, 6
bind = $mainMod, 7, workspace, 7
bind = $mainMod, 8, workspace, 8
bind = $mainMod, 9, workspace, 9
bind = $mainMod, 0, workspace, 10
bind = $mainMod, Home, workspace, 11
# Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = $mainMod SHIFT, 1, movetoworkspace, 1
bind = $mainMod SHIFT, 2, movetoworkspace, 2
bind = $mainMod SHIFT, 3, movetoworkspace, 3
bind = $mainMod SHIFT, 4, movetoworkspace, 4
bind = $mainMod SHIFT, 5, movetoworkspace, 5
bind = $mainMod SHIFT, 6, movetoworkspace, 6
bind = $mainMod SHIFT, 7, movetoworkspace, 7
bind = $mainMod SHIFT, 8, movetoworkspace, 8
bind = $mainMod SHIFT, 9, movetoworkspace, 9
bind = $mainMod SHIFT, 0, movetoworkspace, 10
bind = $mainMod SHIFT, Home, movetoworkspace, 11
# Scroll through existing workspaces with mainMod + scroll
bind = $mainMod, right, workspace, e+1
bind = $mainMod, left, workspace, e-1
#switch network connections
bind = CTRL SHIFT, Escape, exec, nmcli device down wlo1
bind = CTRL SHIFT, 0, exec, nmcli device down wlo1; nmcli connection up Hotspot
bind = CTRL SHIFT, 1, exec, nmcli device wifi connect EagleNet password ~?C##@ZiH
bind = CTRL SHIFT, 2, exec, nmcli device down wlo1; nmcli device wifi connect CXNK00813829 password a8d859c8cfb420ab
bind = CTRL SHIFT, 3, exec, nmcli device down wlo1; nmcli device wifi connect ATT9MhT2ql password 325qxr89u?3t
#brightness keys
bind = , XF86MonBrightnessUp, exec, brightnessctl set +10%
bind = , XF86MonBrightnessDown, exec, brightnessctl set 10%-
#volume keys
binde = , XF86AudioRaiseVolume, exec, amixer -D default sset Master 10%+
binde = , XF86AudioLowerVolume, exec, amixer -D default sset Master 10%-
bind = , XF86AudioMute, exec, amixer -D default sset Master toggle
#screen lock key
bind = $mainMod, F12, exec, swaylock
#logout shortcut
bind = CTRL ALT, Delete, exec, loginctl kill-session self
# Move/resize windows with mainMod + LMB/RMB and dragging
bind = $mainMod SHIFT, W, movewindow, u
bind = $mainMod SHIFT, S, movewindow, d
bind = $mainMod SHIFT, A, movewindow, l
bind = $mainMod SHIFT, D, movewindow, r
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod SHIFT, mouse:272, resizewindow
$scratchpadsize = size 60% 80%
$scratchpad = class:^(scratchpad)$
windowrulev2 = float, $scratchpad
windowrulev2 = $scratchpadsize, $scratchpad
windowrulev2 = workspace special silent, $scratchpad
$kitty = class:^(scratchpad-kitty)$
windowrulev2 = float, $kitty
windowrulev2 = $scratchpadsize, $kitty
windowrulev2 = workspace special silent, $kitty
$nvim = class:^(scratchpad-nvim)$
windowrulev2 = float, $nvim
windowrulev2 = $scratchpadsize, $nvim
windowrulev2 = workspace special silent, $nvim
bind = $mainMod SHIFT, N, exec, colorPrefix pypr toggle nvim
bind = $mainMod SHIFT, E, exec, colorPrefix pypr toggle free
bind = CTRL SHIFT, Home, exec, ssh -i ~/.ssh/key nathan@69.150.99.129 -fL 5900:localhost:5900 sleep 10; vncviewer localhost:5900 -fullscreen
bind = CTRL SHIFT, End, exec, ssh -i ~/.ssh/key nathan@173.242.244.284 -fL 5900:localhost:5900 sleep 10; vncviewer localhost:5900 -fullscreen
bind = CTRL SHIFT, Home, submap, clean
bind = CTRL SHIFT, End, submap, clean
bind = $mainMod CTRL, Home, submap, clean
submap = clean
bind = $mainMod CTRL, Home, submap, reset
submap = reset
'';
};
};

View File

@@ -1,271 +0,0 @@
{
description = "neovim config";
inputs = {
};
outputs = { self, ... }@inputs: {
module = {}: {};
hmModule = { config, lib, pkgs, ... }: {
imports = [];
home.packages = with pkgs; [
neovim-remote
];
home.sessionVariables.SUDO_EDITOR = "kitten edit-in-kitty";
programs.neovim = with pkgs; {
enable = true;
#package = neovim;
defaultEditor = true;
extraLuaConfig = ''
vim.g.mapleader = ' '
vim.g.maplocalleader = ' '
vim.opt.nu = true
vim.opt.rnu = true
vim.opt.scrolloff = 12
vim.opt.tabstop = 4
vim.opt.softtabstop = 4
vim.opt.shiftwidth = 4
vim.opt.expandtab = true
vim.opt.smartindent = true
vim.opt.wrap = false
vim.opt.hlsearch = false
vim.opt.incsearch = true
vim.filetype.add({
pattern = { [".*/hypr/.*%.conf"] = "hyprlang" },
})
-- vim.opt.termguicolors = true
require("nvim-tree").setup()
local lsp_zero = require('lsp-zero')
-- lsp_attach is where you enable features that only work
-- if there is a language server active in the file
local lsp_attach = function(client, bufnr)
local opts = {buffer = bufnr}
vim.keymap.set('n', 'K', '<cmd>lua vim.lsp.buf.hover()<cr>', opts)
vim.keymap.set('n', 'gd', '<cmd>lua vim.lsp.buf.definition()<cr>', opts)
vim.keymap.set('n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<cr>', opts)
vim.keymap.set('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<cr>', opts)
vim.keymap.set('n', 'go', '<cmd>lua vim.lsp.buf.type_definition()<cr>', opts)
vim.keymap.set('n', 'gr', '<cmd>lua vim.lsp.buf.references()<cr>', opts)
vim.keymap.set('n', 'gs', '<cmd>lua vim.lsp.buf.signature_help()<cr>', opts)
vim.keymap.set('n', '<F2>', '<cmd>lua vim.lsp.buf.rename()<cr>', opts)
vim.keymap.set({'n', 'x'}, '<F3>', '<cmd>lua vim.lsp.buf.format({async = true})<cr>', opts)
vim.keymap.set('n', '<F4>', '<cmd>lua vim.lsp.buf.code_action()<cr>', opts)
end
lsp_zero.extend_lspconfig({
sign_text = true,
lsp_attach = lsp_attach,
capabilities = require('cmp_nvim_lsp').default_capabilities(),
})
local lspconfig = require("lspconfig")
lspconfig.ccls.setup{}
lspconfig.nil_ls.setup{}
lspconfig.statix.setup{}
lspconfig.pyright.setup{}
lspconfig.gopls.setup{}
-- local llm = require('llm')
-- llm.setup({
-- api_token = nil, -- cf Install paragraph
-- model = "codellama:7b", -- the model ID, behavior depends on backend
-- backend = "ollama", -- backend ID, "huggingface" | "ollama" | "openai" | "tgi"
-- url = "http://localhost:11434", -- the http url of the backend
-- tokens_to_clear = { "<|endoftext|>" }, -- tokens to remove from the model's output
-- parameters that are added to the request body, values are arbitrary, you can set any field:value pair here it will be passed as is to the backend
-- request_body = {
-- parameters = {
-- temperature = 0.2,
-- top_p = 0.95,
-- },
-- },
-- set this if the model supports fill in the middle
-- fim = {
-- enabled = true,
-- prefix = "<fim_prefix>",
-- middle = "<fim_middle>",
-- suffix = "<fim_suffix>",
-- },
-- debounce_ms = 150,
-- accept_keymap = "<Tab>",
-- dismiss_keymap = "<S-Tab>",
-- tls_skip_verify_insecure = false,
-- llm-ls configuration, cf llm-ls section
-- lsp = {
-- bin_path = vim.api.nvim_call_function("stdpath", { "data" }) .. "${pkgs.llm-ls}/bin/llm-ls",
-- host = nil,
-- port = nil,
-- cmd_env = nil, -- or { LLM_LOG_LEVEL = "DEBUG" } to set the log level of llm-ls
-- version = "0.5.3",
-- },
-- tokenizer = nil, -- cf Tokenizer paragraph
-- context_window = 1024, -- max number of tokens for the context window
-- enable_suggestions_on_startup = true,
-- enable_suggestions_on_files = "*", -- pattern matching syntax to enable suggestions on specific files, either a string or a list of strings
-- disable_url_path_completion = false, -- cf Backend
-- })
local luasnip = require("luasnip")
-- nvim-cmp setup
local cmp = require("cmp")
cmp.setup({
snippet = {
expand = function(args)
luasnip.lsp_expand(args.body)
end,
},
mapping = cmp.mapping.preset.insert({
['<C-u>'] = cmp.mapping.scroll_docs(-4), -- Up
['<C-d>'] = cmp.mapping.scroll_docs(4), -- Down
-- C-b (back) C-f (forward) for snippet placeholder navigation.
['<C-Space>'] = cmp.mapping.complete(),
['<CR>'] = cmp.mapping.confirm {
behavior = cmp.ConfirmBehavior.Replace,
select = true,
},
['<Tab>'] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
elseif luasnip.expand_or_jumpable() then
luasnip.expand_or_jump()
else
fallback()
end
end, { 'i', 's' }),
['<S-Tab>'] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
elseif luasnip.jumpable(-1) then
luasnip.jump(-1)
else
fallback()
end
end, { 'i', 's' }),
}),
sources = {
{ name = 'nvim_lsp' },
{ name = 'luasnip' },
},
})
require("noice").setup()
require("barbar").setup()
require("pywal").setup()
require("lualine").setup({
options = {
theme = 'pywal-nvim',
},
})
vim.cmd[[colorscheme pywal]]
vim.notify = require("notify")
vim.keymap.set("n", "<leader>ff", "<cmd>Telescope find_files<CR>", {desc = "find files"})
vim.keymap.set("n", "<leader>fa", "<cmd>Telescope find_files no_ignore=true hidden=true<CR>", {desc = "find files"})
vim.keymap.set("n", "<leader>fc", "<cmd>Telescope treesitter<CR>", {desc = "find code"})
vim.keymap.set("n", "<leader>t", "<cmd>NvimTreeToggle<CR>", {desc = "toggle tree"})
vim.keymap.set("n", "<C-.>", "<cmd>BufferNext<CR>", {desc = "move to next tab"})
vim.keymap.set("n", "<C-,>", "<cmd>BufferPrevious<CR>", {desc = "move to previous tab"})
vim.keymap.set("n", "<C-h>", "<cmd>wincmd h<CR>", {desc = "move to left window"})
vim.keymap.set("n", "<C-j>", "<cmd>wincmd j<CR>", {desc = "move to below window"})
vim.keymap.set("n", "<C-k>", "<cmd>wincmd k<CR>", {desc = "move to above window"})
vim.keymap.set("n", "<C-l>", "<cmd>wincmd l<CR>", {desc = "move to right window"})
vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv", {desc = "move selected down"})
vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv", {desc = "move selected up"})
vim.keymap.set("n", "J", "mzJ`z", {desc = "cursor still when appending next line"})
vim.keymap.set("n", "<C-d>", "<C-d>zz", {desc = "cursor mid when page down"})
vim.keymap.set("n", "<C-u>", "<C-u>zz", {desc = "cursor mid when page up"})
vim.keymap.set("n", "n", "nzzzv", {desc = "search term mid"})
vim.keymap.set("n", "N", "Nzzzv", {desc = "search term mid"})
vim.keymap.set("x", "<leader>p", "\"_dP", {desc = "no overwrite paste buffer"})
vim.keymap.set("n", "<leader>y", "\"+y", {desc = "yank to system clipboard"})
vim.keymap.set("v", "<leader>y", "\"+y", {desc = "^"})
vim.keymap.set("n", "<leader>Y", "\"+Y", {desc = "^"})
vim.keymap.set("n", "Q", "<nop>", {desc = "unmap Q"})
vim.keymap.set("n", "<leader>s", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]], {desc = "replace current word entire file"})
vim.keymap.set("n", "<leader>F", function() vim.lsp.buf.format() end, {desc = "format buffer?"})
'';
plugins = with vimPlugins; [
telescope-nvim
nvim-tree-lua
nvim-web-devicons
mini-nvim
noice-nvim
nvim-notify
barbar-nvim
pywal-nvim
lualine-nvim
tokyonight-nvim
llm-nvim
cmp-buffer
cmp-nvim-lsp
cmp_luasnip
luasnip
cmp-path
cmp-cmdline
nvim-cmp
nvim-lspconfig
lsp-zero-nvim
nvim-treesitter
nvim-treesitter-parsers.cpp
nvim-treesitter-parsers.nix
nvim-treesitter-parsers.bash
nvim-treesitter-parsers.python
nvim-treesitter-parsers.lua
nvim-treesitter-parsers.vim
nvim-treesitter-parsers.javascript
nvim-treesitter-parsers.css
nvim-treesitter-parsers.hyprlang
];
extraPackages = with pkgs; [
nil
statix # Lints and suggestions for the nix programming language
pyright
gopls
ccls
];
viAlias = true;
vimAlias = true;
vimdiffAlias = true;
};
};
};
}

View File

@@ -1,17 +0,0 @@
# Nixvim template
This template gives you a good starting point for configuring nixvim standalone.
## Configuring
To start configuring, just add or modify the nix files in `./config`.
If you add a new configuration file, remember to add it to the
[`config/default.nix`](./config/default.nix) file
## Testing your new configuration
To test your configuration simply run the following command
```
nix run .
```

View File

@@ -1,6 +0,0 @@
{
plugins = {
bufferline.enable = true;
web-devicons.enable = true;
};
}

View File

@@ -1,177 +0,0 @@
{ pkgs, ... }: {
# Import all your configuration modules here
imports = [ ./bufferline.nix ];
plugins = {
lualine.enable = true;
luasnip.enable = true;
barbar.enable = true;
nvim-tree.enable = true;
noice.enable = true;
mini.enable = true;
notify.enable = true;
telescope.enable = true;
treesitter.enable = true;
render-markdown.enable = true;
web-devicons.enable = true;
lsp = {
enable = true;
servers = {
#js/typescript
ts-ls.enable = true;
#c/c++
ccls.enable = true;
#nix
nil-ls.enable = true;
#python
pyright.enable = true;
#bash
bashls.enable = true;
#css
cssls.enable = true;
};
};
cmp = {
enable = true;
autoEnableSources = true;
settings = {
sources = [
{ name = "nvim_lsp"; }
{ name = "path"; }
{ name = "buffer"; }
{ name = "luasnip"; }
{ name = "cmdline"; }
];
};
};
};
globals = {
mapleader = " ";
maplocalleader = " ";
};
opts = {
nu = true;
rnu = true;
scrolloff = 12;
tabstop = 4;
softtabstop = 4;
shiftwidth = 4;
expandtab = true;
smartindent = true;
wrap = false;
hlsearch = false;
incsearch = true;
};
keymaps = [
{
mode = "n";
key = "<leader>ff";
action = "<cmd>Telescope find_files hidden=true<CR>";
}
{
mode = "n";
key = "<leader>fc";
action = "<cmd>Telescope treesitter<CR>";
}
{
mode = "n";
key = "<leader>t";
action = "<cmd>NvimTreeToggle<CR>";
}
{
mode = "n";
key = "<C-.>";
action = "<cmd>BufferNext<CR>";
}
{
mode = "n";
key = "<C-,>";
action = "<cmd>BufferPrevious<CR>";
}
{
mode = "n";
key = "<C-h>";
action = "<cmd>wincmd h<CR>";
}
{
mode = "n";
key = "<C-j>";
action = "<cmd>wincmd j<CR>";
}
{
mode = "n";
key = "<C-k>";
action = "<cmd>wincmd k<CR>";
}
{
mode = "n";
key = "<C-l>";
action = "<cmd>wincmd l<CR>";
}
{
mode = "n";
key = "Q";
action = "<nop>";
}
{
mode = "v";
key = "J";
action = ":m '>+1<CR>gv=gv";
}
{
mode = "v";
key = "K";
action = ":m '<-2<CR>gv=gv";
}
];
extraConfigLua = ''
vim.filetype.add({
pattern = { [".*/hypr/.*%.conf"] = "hyprlang" },
})
'';
extraPlugins = with pkgs.vimPlugins; [
pywal-nvim
tokyonight-nvim
llm-nvim
nvim-lspconfig
];
colorscheme = "pywal";
}

View File

@@ -1,327 +0,0 @@
{
"nodes": {
"devshell": {
"inputs": {
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1722113426,
"narHash": "sha256-Yo/3loq572A8Su6aY5GP56knpuKYRvM2a1meP9oJZCw=",
"owner": "numtide",
"repo": "devshell",
"rev": "67cce7359e4cd3c45296fb4aaf6a19e2a9c757ae",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "devshell",
"type": "github"
}
},
"flake-compat": {
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"revCount": 57,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1727826117,
"narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_2": {
"inputs": {
"nixpkgs-lib": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1727826117,
"narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1726560853,
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"git-hooks": {
"inputs": {
"flake-compat": [
"nixvim",
"flake-compat"
],
"gitignore": "gitignore",
"nixpkgs": [
"nixvim",
"nixpkgs"
],
"nixpkgs-stable": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1727805723,
"narHash": "sha256-b8flytpuc4Ey/g3mcvpS/ICORcD4h56QDZeP5LogevY=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "2f5ae3fc91db865eff2c5a418da85a0fbe6238a3",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "git-hooks.nix",
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
"nixvim",
"git-hooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709087332,
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1727383923,
"narHash": "sha256-4/vacp3CwdGoPf8U4e/N8OsGYtO09WTcQK5FqYfJbKs=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "ffe2d07e771580a005e675108212597e5b367d2d",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"nix-darwin": {
"inputs": {
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1727707210,
"narHash": "sha256-8XZp5XO2FC6INZEZ2WlwErtvFVpl45ACn8CJ2hfTA0Y=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "f61d5f2051a387a15817007220e9fb3bbead57b3",
"type": "github"
},
"original": {
"owner": "lnl7",
"repo": "nix-darwin",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1727802920,
"narHash": "sha256-HP89HZOT0ReIbI7IJZJQoJgxvB2Tn28V6XS3MNKnfLs=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "27e30d177e57d912d614c88c622dcfdb2e6e6515",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-lib": {
"locked": {
"lastModified": 1727825735,
"narHash": "sha256-0xHYkMkeLVQAMa7gvkddbPqpxph+hDzdu1XdGPJR+Os=",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/fb192fec7cc7a4c26d51779e9bab07ce6fa5597a.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/fb192fec7cc7a4c26d51779e9bab07ce6fa5597a.tar.gz"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1727634051,
"narHash": "sha256-S5kVU7U82LfpEukbn/ihcyNt2+EvG7Z5unsKW9H/yFA=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "06cf0e1da4208d3766d898b7fdab6513366d45b9",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixvim": {
"inputs": {
"devshell": "devshell",
"flake-compat": "flake-compat",
"flake-parts": "flake-parts_2",
"git-hooks": "git-hooks",
"home-manager": "home-manager",
"nix-darwin": "nix-darwin",
"nixpkgs": "nixpkgs_2",
"nuschtosSearch": "nuschtosSearch",
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1727871072,
"narHash": "sha256-t+YLQwBB1soQnVjT6d7nQq4Tidaw7tpB8i6Zvpc+Zbs=",
"owner": "nix-community",
"repo": "nixvim",
"rev": "0ca98d02104f7f0a703787a7a080a570b7f1bedd",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixvim",
"type": "github"
}
},
"nuschtosSearch": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1727599661,
"narHash": "sha256-0R+1ih0Rfqrz/lcduvpNSnUw3uthUHiaGh0aWPyIqeQ=",
"owner": "NuschtOS",
"repo": "search",
"rev": "c3c3928b8de7d300c34e9d90fdc19febd1a32062",
"type": "github"
},
"original": {
"owner": "NuschtOS",
"repo": "search",
"type": "github"
}
},
"root": {
"inputs": {
"flake-parts": "flake-parts",
"nixpkgs": "nixpkgs",
"nixvim": "nixvim"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"treefmt-nix": {
"inputs": {
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1727431250,
"narHash": "sha256-uGRlRT47ecicF9iLD1G3g43jn2e+b5KaMptb59LHnvM=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "879b29ae9a0378904fbbefe0dadaed43c8905754",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

View File

@@ -1,47 +0,0 @@
{
description = "A nixvim configuration";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixvim.url = "github:nix-community/nixvim";
flake-parts.url = "github:hercules-ci/flake-parts";
};
outputs =
{ nixvim, flake-parts, ... }@inputs:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
perSystem =
{ pkgs, system, ... }:
let
nixvimLib = nixvim.lib.${system};
nixvim' = nixvim.legacyPackages.${system};
nixvimModule = {
inherit pkgs;
module = import ./config; # import the module directly
# You can use `extraSpecialArgs` to pass additional arguments to your module files
extraSpecialArgs = {
inherit pkgs;
};
};
nvim = nixvim'.makeNixvimWithModule nixvimModule;
in
{
checks = {
# Run `nix flake check .` to verify that your config is not broken
default = nixvimLib.check.mkTestDerivationFromNixvimModule nixvimModule;
};
packages = {
# Lets you run `nix run .` to start nixvim
default = nvim;
};
};
};
}

View File

@@ -0,0 +1,20 @@
{ config, lib, pkgs, ... }: {
options.homeconfig.rofi.enable = lib.options.mkOption {
type = lib.types.bool;
default = false;
};
config = lib.mkIf config.homeconfig.rofi.enable {
programs.rofi = {
enable = true;
package = pkgs.rofi-wayland;
cycle = true;
theme = "/home/nathan/.cache/wal/colors-rofi-dark.rasi";
};
};
}

View File

@@ -1,23 +1,10 @@
{
description = "Rofi Config";
description = "Rofi Config";
inputs = {
outputs = { self, ... }: {
};
hmModule = import ./.;
outputs = { self, ... }: {
hmModule = { config, lib, pkgs, ... }: {
programs.rofi = {
enable = true;
package = pkgs.rofi-wayland;
cycle = true;
theme = "/home/nathan/.cache/wal/colors-rofi-dark.rasi";
};
};
};
}

View File

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

View File

@@ -1,21 +0,0 @@
{
description = "Nathan user service config";
inputs = {
mpdris.url = "./mpdris";
};
outputs = { self, ... }@inputs: {
hmModule = { config, lib, pkgs, ... }: {
imports = [
inputs.mpdris.hmModule
];
};
};
}

View File

@@ -0,0 +1,41 @@
{ config, lib, pkgs, ... }: {
options = {
homeconfig.mpd.enable = lib.options.mkOption {
type = lib.types.bool;
default = false;
};
};
config = lib.mkIf config.homeconfig.mpd.enable {
services.mpd = {
enable = true;
network.startWhenNeeded = true;
network.port = 6600;
network.listenAddress = "127.0.0.1";
musicDirectory = "/home/nathan/Music";
extraConfig = ''
audio_output {
type "pipewire"
name "Audio1"
}
audio_output {
type "fifo"
name "visualizer"
path "/tmp/mpd.fifo"
format "44100:16:1"
}
'';
};
services.mpdris2 = {
enable = true;
mpd.host = "127.0.0.1";
mpd.port = 6600;
package = pkgs.mpdris2;
mpd.musicDirectory = "/home/nathan/Music";
notifications = true;
};
};
}

View File

@@ -1,26 +0,0 @@
{
description = "mpdris config";
inputs = {
};
outputs = { self, ... }@inputs: {
hmModule = { config, lib, pkgs, ... }: {
imports = [];
services.mpdris2 = {
enable = true;
mpd.host = "127.0.0.1";
mpd.port = 6600;
package = pkgs.mpdris2;
mpd.musicDirectory = "/home/nathan/Music";
notifications = true;
};
};
};
}

View File

@@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }: {
{ lib, pkgs, core_inputs, ... }: {
imports = [
./generic
@@ -9,4 +9,28 @@
sysconfig.laptop.enable = lib.mkDefault false;
sysconfig.homebox.enable = lib.mkDefault false;
sysconfig.generic.enable = lib.mkDefault true;
networking = {
hostName = core_inputs.host;
nameservers = [ "1.1.1.1#one.one.one.one" "1.0.0.1#one.one.one.one" ];
networkmanager.enable = true;
};
xdg.portal = {
enable = true;
config.common.default = "*";
extraPortals = with pkgs; [ xdg-desktop-portal-gtk ];
};
environment.systemPackages = with pkgs; [
gst_all_1.gstreamer
gst_all_1.gst-plugins-base
gst_all_1.gst-plugins-good
gst_all_1.gst-plugins-bad
gst_all_1.gst-plugins-ugly
home-manager
];
fonts.packages = with pkgs; [ nerdfonts ];
}

View File

@@ -1 +1,71 @@
{}
# 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).
{ config, lib, pkgs, core_inputs, ... }:
{
options = {
sysconfig.homebox.enable = lib.mkEnableOption "uses homebox config";
};
config = lib.mkIf config.sysconfig.homebox.enable {
assertions = [
{
assertion = !config.sysconfig.laptop.enable;
message = "sysconfig homebox conflicts with laptop";
}
];
sysconfig.generic.enable = lib.mkForce false;
imports = [];
boot = {
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
kernelParams = [ "initcall_blacklist=simpledrm_platform_driver_init" ];
};
hardware = {
opengl = {
enable = true;
driSupport = true;
extraPackages = with pkgs; [
nvidia-vaapi-driver
];
};
nvidia = {
modesetting.enable = true;
open = true;
nvidiaSettings = true;
package = config.boot.kernelPackages.nvidiaPackages.beta;
};
bluetooth.enable = true;
pulseaudio.enable = false;
};
services = {
xserver = {
enable = true;
videoDrivers = [ "nvidia" ];
};
displayManager.enable = true;
};
environment = {
sessionVariables = {
WLR_BACKENDS = "headless";
WLR_LIBINPUT_NO_DEVICES="1";
};
};
};
}

View File

@@ -19,6 +19,8 @@
}
];
sysconfig.generic.enable = lib.mkForce false;
imports = [];
boot = {
@@ -59,12 +61,6 @@
pulseaudio.enable = false;
};
networking = {
hostName = "laptop";
nameservers = [ "1.1.1.1#one.one.one.one" "1.0.0.1#one.one.one.one" ];
networkmanager.enable = true;
};
services = {
xserver = {
enable = true;

View File

@@ -1,4 +1,4 @@
{ config, lib, devices, ... }: {
{ config, lib, ... }: {
options = {
disko = {
@@ -17,13 +17,13 @@
{
imports = [
./disko.nix { device = devices.main; }
./disko.nix { device = config.sysconfig.opts.devices.main; }
];
}
(lib.mkIf (devices.bonus != null) {
(lib.mkIf (config.sysconfig.opts.devices.bonus != null) {
imports = [
(./disko_bonus.nix { devices = devices.bonus; })
(./disko_bonus.nix { devices = config.sysconfig.opts.devices.bonus; })
];
})

View File

@@ -9,9 +9,9 @@
outputs = { self, ... }@inputs: {
module = { config, lib, pkgs, devices, ... }: {
module = { config, lib, pkgs, ... }: {
imports = [
(import ./default.nix { inherit config lib pkgs devices; })
(import ./default.nix { inherit config lib pkgs; })
inputs.disko.nixosModules.default
];
};

View File

@@ -1,4 +1,4 @@
{ config, lib, ... }: {
{ lib, ... }: {
boot.initrd.postDeviceCommands = lib.mkAfter ''
mkdir /btrfs_tmp

View File

@@ -0,0 +1,23 @@
{ config, lib, core_inputs, ... }: {
options.sysconfig.firstBoot = lib.options.mkOption {
type = lib.types.bool;
default = false;
};
config = lib.mkIf config.sysconfig.firstBoot {
users.users.${core_inputs.user} = {
initialPassword = "7567";
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAsU69CxfQk58CvItPN426h5Alnpb60SH37wet97Vb57 nathan@laptop"
];
};
home-manager.users.${core_inputs.user} = core_inputs.${core_inputs.user}.homeManagerModule;
systemd.services.sshd.wantedBy = lib.mkForce [ "mulit-user.target" ];
sysconfig.opts.openssh.enable = lib.mkForce true;
};
}

View File

@@ -1,36 +1,77 @@
{
description = "Unified System Configuration";
description = "Unified System Configuration";
inputs = {
inputs = {
sddm.url = "./sddm";
srvcs.url = "./services";
srvcs.url = "./services";
pckgs.url = "./packages";
pckgs.url = "./packages";
prgms.url = "./programs";
prgms.url = "./programs";
diskoConfig.url = "./disko";
diskoConfig.url = "./disko";
impermanenceConfig.url = "./impermanence";
impermanenceConfig.url = "./impermanence";
};
outputs = { self, ... }@inputs: {
nixosModule = { config, lib, pkgs, core_inputs, ... }: {
imports = [
./configuration/configuration.nix
# inputs.diskoConfig.module
# inputs.impermanenceConfig.module
inputs.sddm.module
inputs.srvcs.module
inputs.pckgs.module
inputs.prgms.module
];
};
};
outputs = { self, ... }@inputs: {
nixosModule = { config, lib, pkgs, core_inputs, ... }: {
imports = [
./configuration/configuration.nix
# inputs.diskoConfig.module
# inputs.impermanenceConfig.module
inputs.srvcs.module
inputs.pckgs.module
inputs.prgms.module
];
options = {
sysconfig.opts = {
host = lib.options.mkOption {
type = lib.types.str;
default = null;
};
username = lib.options.mkOption {
type = lib.types.str;
default = "nathan";
};
devices = {
main = lib.options.mkOption {
type = lib.types.str;
default = null;
};
bonus = lib.options.mkOption {
type = lib.types.attrsOf lib.types.str;
default = null;
};
};
};
};
config = {
assertions = [
{
assertion = (config.sysconfig.opts.host != null);
message = "host cannot be null";
}
{
assertion = (config.sysconfig.opts.devices.main != null);
message = "devices.main cannot be null";
}
];
networking.hostname = config.sysconfig.opts.host;
users.users.${config.sysconfig.opts.username} = {
};
};
};
};
}

View File

@@ -8,11 +8,16 @@
outputs = { self, ... }: {
module = { config, lib, pkgs, ... }: {
services = {
upower.enable = true;
gvfs.enable = true;
power-profiles-daemon.enable = true;
};
options.sysconfig.opts.ags.enable = lib.options.mkOption {};
config = lib.mkIf config.sysconfig.opts.ags.enable {
services = {
upower.enable = true;
gvfs.enable = true;
power-profiles-daemon.enable = true;
};
};
};
};

View File

@@ -15,6 +15,9 @@
imports = [
inputs.hyprland.module
inputs.ags.module
./git
./nh
./steam
];
};

View File

@@ -0,0 +1,17 @@
{ config, lib, ... }: {
options.sysconfig.opts.git.enable = lib.opions.mkOption {};
config = lib.mkIf config.sysconfig.opts.git.enable {
programs.git = {
enable = true;
config = {
user = {
name = "blaknull";
email = "nathanblunkall5@gmail.com";
};
};
};
};
}

View File

@@ -9,15 +9,25 @@
module = { config, lib, pkgs, ... }: {
programs.hyprland = {
enable = true;
options.sysconfig.opts.hyprland.enable = lib.options.mkOption {};
xwayland.enable = true;
config = lib.mkIf config.sysconfig.opts.hyprland.enable {
package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
sysconfig.opts.sddm.enable = lib.mkDefault true;
environment.sessionVariables.NIXOS_OZONE_WL = "1";
programs.hyprland = {
enable = true;
xwayland.enable = true;
package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
portalPackage = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland;
};
};
portalPackage = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland;
};
};

View File

@@ -0,0 +1,21 @@
{ config, lib, ... }: {
options.sysconfig.opts.nh.enable = lib.options.mkOption {
type = lib.types.bool;
default = false;
};
config = lib.mkIf config.sysconfig.opts.nh.enable {
programs.nh = {
enable = true;
flake = "/home/nathan/Projects/System";
clean = {
enable = true;
dates = "weekly";
extraArgs = "--keep 5 --keep-since 3d";
};
};
};
}

View File

@@ -0,0 +1,14 @@
{ config, lib, ... }: {
options.sysconfig.opts.steam.enable = lib.options.mkOption {
type = lib.types.bool;
default = false;
};
config = lib.mkIf config.sysconfig.opts.steam.enable {
programs.steam = {
enable = true;
};
};
}

View File

@@ -1,34 +0,0 @@
{
description = "sddm config";
inputs = {
theme.url = "./themes/tokyo-night";
};
outputs = { self, ... }@inputs: {
module = { config, lib, pkgs, ... }: {
imports = [];
qt.enable = true;
services.displayManager.sddm = {
enable = true;
wayland.enable = true;
autoNumlock = true;
theme = "${inputs.theme.theme { inherit pkgs; }}";
enableHidpi = true;
extraPackages = with pkgs; [
libsForQt5.qtsvg
libsForQt5.qtquickcontrols2
libsForQt5.qtgraphicaleffects
];
};
};
};
}

View File

@@ -3,15 +3,17 @@
inputs = {
ollama.url = "./ollama";
sddm.url = "./sddm";
};
outputs = { self, ... }@inputs: {
module = { config, lib, pkgs, ... }: {
imports = [
inputs.ollama.module
inputs.sddm.module
./openssh
./ollama
./pipewire
];
};

View File

@@ -0,0 +1,16 @@
{ config, lib, ... }: {
options = {
sysconfig.opts.ollama.enable = lib.options.mkOption {
type = lib.types.bool;
default = false;
};
};
config = lib.mkIf config.sysconfig.opts.ollama.enable {
services.ollama = {
enable = true;
acceleration = "cuda";
};
};
}

View File

@@ -1,12 +0,0 @@
{
description = "ollama config";
inputs = {
};
outputs = { self, ... }: {
module = import ./ollama.nix;
};
}

View File

@@ -1,7 +0,0 @@
{ config, lib, pkgs, ... }: {
services.ollama = {
enable = true;
acceleration = "cuda";
};
}

View File

@@ -0,0 +1,21 @@
{ config, lib, ... }: {
options = {
sysconfig.opts.openssh.enable = lib.options.mkOption {
type = lib.types.bool;
default = false;
};
};
config = lib.mkIf config.sysconfig.opts.openssh.enable {
services.openssh = {
enable = true;
settings = {
PermitRootLogin = "no";
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
};
};
};
}

View File

@@ -0,0 +1,51 @@
{ config, lib, pkgs, ... }: {
options = {
sysconfig.opts.pipewire.enable = lib.options.mkOption {
type = lib.types.bool;
default = false;
};
};
config = lib.mkIf config.sysconfig.opts.pipewire.enable {
# Enable sound with pipewire.
sound.enable = true;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
package = pkgs.pipewire;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
extraConfig.pipewire-pulse."92-low-latency" = {
context.modules = [
{
name = "libpipewire-module-protocol-pulse";
args = {
pulse.min.req = "32/48000";
pulse.default.req = "32/48000";
pulse.max.req = "32/48000";
pulse.min.quantum = "32/48000";
pulse.max.quantum = "32/48000";
};
}
];
stream.properties = {
node.latency = "32/48000";
resample.quality = 1;
};
};
# If you want to use JACK applications, uncomment this
#jack.enable = true;
# use the example session manager (no others are packaged yet so this is enabled by default,
# no need to redefine it in your config for now)
wireplumber.enable = true;
};
};
}

View File

@@ -0,0 +1,40 @@
{
description = "sddm config";
inputs = {
theme.url = "./themes/tokyo-night";
};
outputs = { self, ... }@inputs: {
module = { config, lib, pkgs, ... }: {
options.sysconfig.opts.sddm.enable = lib.mkOption {
type = lib.types.bool;
default = false;
};
config = lib.mkIf config.sysconfig.opts.sddm.enable {
imports = [];
qt.enable = true;
services.displayManager.sddm = {
enable = true;
wayland.enable = true;
autoNumlock = true;
theme = "${inputs.theme.theme { inherit pkgs; }}";
enableHidpi = true;
extraPackages = with pkgs; [
libsForQt5.qtsvg
libsForQt5.qtquickcontrols2
libsForQt5.qtgraphicaleffects
];
};
};
};
};
}