Compare commits

...

3 commits

Author SHA1 Message Date
2462e16382
flake.nix: add prettier hook 2024-02-01 17:49:02 -05:00
c65b649ff4
ags: fmt with prettier 2024-02-01 17:48:30 -05:00
3a3965b4d9
docs: fmt with prettier 2024-02-01 17:31:35 -05:00
15 changed files with 155 additions and 163 deletions

View file

@ -25,8 +25,8 @@
## :open_book: Table of contents
+ :house_with_garden: [home](src/branch/master/home)
+ :computer: [hosts](src/branch/master/hosts)
- :house_with_garden: [home](src/branch/master/home)
- :computer: [hosts](src/branch/master/hosts)
- :cloud_with_rain: [ame](src/branch/master/hosts/ame)
- :cloud_with_lightning_and_rain: [arashi](src/branch/master/hosts/arashi)
- :hibiscus: [haru](src/branch/master/hosts/haru)
@ -37,29 +37,31 @@
- :full_moon: [tsuki](src/branch/master/hosts/tsuki)
- :building_construction: [tsuru](src/branch/master/hosts/tsuru)
- :snowflake: [yuki](src/branch/master/hosts/yuki)
+ :electric_plug: [modules](src/branch/master/modules)
+ :package: [pkgs](src/branch/master/pkgs)
+ :lock: [secrets](src/branch/master/secrets)
- :electric_plug: [modules](src/branch/master/modules)
- :package: [pkgs](src/branch/master/pkgs)
- :lock: [secrets](src/branch/master/secrets)
## :spiral_notepad: Features
+ multi-config repo, with configs for servers, laptop, and desktop
+ multi-system home-manager setup
+ secrets provisioning with [sops-nix](https://github.com/Mic92/sops-nix)
+ multiple fully declarative self hosted services (and some containerized ones, with a docker backend)
+ wayland config for hyprland
+ custom packages not found in nixpkgs
+ linted & styled with [alejandra](https://github.com/kamadorueda/alejandra), [deadnix](https://github.com/astro/deadnix), and [statix](https://github.com/nerdypepper/statix)
- multi-config repo, with configs for servers, laptop, and desktop
- multi-system home-manager setup
- secrets provisioning with [sops-nix](https://github.com/Mic92/sops-nix)
- multiple fully declarative self hosted services (and some containerized ones, with a docker backend)
- wayland config for hyprland
- custom packages not found in nixpkgs
- linted & styled with [alejandra](https://github.com/kamadorueda/alejandra), [deadnix](https://github.com/astro/deadnix), and [statix](https://github.com/nerdypepper/statix)
## :busts_in_silhouette: Credit
#### people who've inspired me to dive into nix, and i've stolen stuff from (you guys are awesome!)
+ [fufexan](https://github.com/fufexan) - a ton of home manager, hyprland stuff, and some gh workflows
+ [Misterio77](https://github.com/Misterio77) - flake, and some other boilerplate
+ [NobbZ](https://github.com/NobbZ) - general nix assistance
+ [MatthiasBenaets](https://github.com/MatthiasBenaets) - amazing nixos introduction video
+ [sioodmy](https://github.com/sioodmy) - general dotfile, readme badges, and hyprland stuff
+ [MatthewCroughan](https://github.com/MatthewCroughan) - traefik config used as reference
+ [seqizz](https://github.com/seqizz/nixos-config/blob/3ee51f406a8c7aa3afde9cdee97a43641b2ed2ef/modules/server/rustypaste.nix) - rustypaste config
+ [Yavko](https://github.com/yavko) - ironbar config used as reference
+ [hlissner](https://github.com/hlissner) - [security.nix](modules/security.nix)
+ [noc](https://git.flake.sh/noc) - networking diagram + a ton of other stuff
- [fufexan](https://github.com/fufexan) - a ton of home manager, hyprland stuff, and some gh workflows
- [Misterio77](https://github.com/Misterio77) - flake, and some other boilerplate
- [NobbZ](https://github.com/NobbZ) - general nix assistance
- [MatthiasBenaets](https://github.com/MatthiasBenaets) - amazing nixos introduction video
- [sioodmy](https://github.com/sioodmy) - general dotfile, readme badges, and hyprland stuff
- [MatthewCroughan](https://github.com/MatthewCroughan) - traefik config used as reference
- [seqizz](https://github.com/seqizz/nixos-config/blob/3ee51f406a8c7aa3afde9cdee97a43641b2ed2ef/modules/server/rustypaste.nix) - rustypaste config
- [Yavko](https://github.com/yavko) - ironbar config used as reference
- [hlissner](https://github.com/hlissner) - [security.nix](modules/security.nix)
- [noc](https://git.flake.sh/noc) - networking diagram + a ton of other stuff

View file

@ -63,6 +63,10 @@
enable = true;
excludes = ["overlays.nix"];
};
prettier = {
enable = true;
files = "\\.(js|ts|md)$";
};
};
};
};
@ -72,13 +76,8 @@
packages = with pkgs; [
git
sops
alejandra
statix
deadnix
stylua
yaml-language-server
lua-language-server
nodePackages.typescript-language-server
];
};
formatter.${system} = pkgs.alejandra;

View file

@ -2,27 +2,27 @@
the home of my dotfiles. configured in, and managed by home-manager.
name | description
--------------- | -----------
`ags` | aylurs gtk shell
`anyrun` | wayland native application launcher
`cava` | terminal audio visualizer
`direnv` | a shell extension, that loads environment variables in certain directories
`editors` | houses my main editors, helix and nvim
`default` | used for commonly shared modules, for multiple home-manager configs
`git` | version control system
`gtk` | themes
`helix` | modal text editor
`ironbar` | wayland specific bar, written in Rust
`lazygit` | terminal based git command system
`mako` | a lightweight wayland notification daemon
`neofetch` | fetch program
`nushell` | my shell of choice
`spotify-player`| terminal music player for spotify
`starship` | shell prompt
`wayland` | has my hyprland config, along with session variables for wayland
`wezterm` | my terminal of choice
`yazi` | terminal file manager
`zathura` | pdf viewer
`zellij` | terminal multiplexer
`zoxide` | a smarter cd command
| name | description |
| ---------------- | -------------------------------------------------------------------------- |
| `ags` | aylurs gtk shell |
| `anyrun` | wayland native application launcher |
| `cava` | terminal audio visualizer |
| `direnv` | a shell extension, that loads environment variables in certain directories |
| `editors` | houses my main editors, helix and nvim |
| `default` | used for commonly shared modules, for multiple home-manager configs |
| `git` | version control system |
| `gtk` | themes |
| `helix` | modal text editor |
| `ironbar` | wayland specific bar, written in Rust |
| `lazygit` | terminal based git command system |
| `mako` | a lightweight wayland notification daemon |
| `neofetch` | fetch program |
| `nushell` | my shell of choice |
| `spotify-player` | terminal music player for spotify |
| `starship` | shell prompt |
| `wayland` | has my hyprland config, along with session variables for wayland |
| `wezterm` | my terminal of choice |
| `yazi` | terminal file manager |
| `zathura` | pdf viewer |
| `zellij` | terminal multiplexer |
| `zoxide` | a smarter cd command |

View file

@ -1,26 +1,23 @@
module.exports = {
"env": {
"browser": true,
"es2021": true
},
"extends": "eslint:recommended",
"overrides": [
{
"env": {
"node": true
},
"files": [
".eslintrc.{js,cjs}"
],
"parserOptions": {
"sourceType": "script"
}
}
],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"rules": {
env: {
browser: true,
es2021: true
},
extends: "eslint:recommended",
overrides: [
{
env: {
node: true
},
files: [".eslintrc.{js,cjs}"],
parserOptions: {
sourceType: "script"
}
}
}
],
parserOptions: {
ecmaVersion: "latest",
sourceType: "module"
},
rules: {}
};

View file

@ -0,0 +1,3 @@
{
"trailingComma" : "none"
}

View file

@ -7,17 +7,15 @@ const css = App.configDir + "/style.css";
Utils.exec(`sass ${scss} ${css}`);
function reloadCss() {
console.log("scss updating");
Utils.exec(`sass ${scss} ${css}`);
App.resetCss();
App.applyCss(css);
console.log("scss updating");
Utils.exec(`sass ${scss} ${css}`);
App.resetCss();
App.applyCss(css);
}
Utils.monitorFile(`${App.configDir}/scss`, reloadCss, "directory");
export default {
style: css,
windows: [
Bar(2),
],
};
style: css,
windows: [Bar(2)]
};

View file

@ -7,23 +7,16 @@ import { Workspaces } from "./widgets/hyprland.js";
const Start = () =>
Widget.Box({
hpack: "start",
children: [
nixosLogo(),
Workspaces(),
],
children: [nixosLogo(), Workspaces()]
});
const Center = () =>
Widget.Box({
children: [
Media(),
],
children: [Media()]
});
const End = () =>
Widget.Box({
hpack: "end",
children: [
Time(),
],
children: [Time()]
});
const Bar = (monitor) =>
@ -35,8 +28,8 @@ const Bar = (monitor) =>
child: Widget.CenterBox({
startWidget: Start(),
centerWidget: Center(),
endWidget: End(),
}),
endWidget: End()
})
});
export { Bar };

View file

@ -8,11 +8,12 @@ const Workspaces = () =>
Widget.Button({
on_clicked: () => Hyprland.sendMessage(`dispatch workspace ${id}`),
child: Widget.Label(`${id}`),
class_name: Hyprland.active.workspace.bind("id")
.transform((i) => `${i === id ? "focused" : ""}`),
class_name: Hyprland.active.workspace
.bind("id")
.transform((i) => `${i === id ? "focused" : ""}`)
})
);
}),
})
});
export { Workspaces };

View file

@ -3,14 +3,18 @@ import { Mpris, Widget } from "../../import.js";
const Media = () =>
Widget.Box({
class_name: "media",
child: Widget.Label("-").hook(Mpris, (self) => {
if (Mpris.players[0]) {
const { track_artists, track_title } = Mpris.players[0];
self.label = `${track_artists.join(", ")} - ${track_title}`;
} else {
self.label = "Nothing is playing";
}
}, "player-changed"),
child: Widget.Label("-").hook(
Mpris,
(self) => {
if (Mpris.players[0]) {
const { track_artists, track_title } = Mpris.players[0];
self.label = `${track_artists.join(", ")} - ${track_title}`;
} else {
self.label = "Nothing is playing";
}
},
"player-changed"
)
});
export { Media };

View file

@ -3,14 +3,12 @@ import { Utils, Widget } from "../../import.js";
const Time = () =>
Widget.Box({
child: Widget.Label({
className: "date",
}).poll(
1000,
(self) =>
Utils.execAsync(["date", "+%a %b %d %H:%M"]).then((time) =>
self.label = time
),
),
className: "date"
}).poll(1000, (self) =>
Utils.execAsync(["date", "+%a %b %d %H:%M"]).then(
(time) => (self.label = time)
)
)
});
export { Time };
export { Time };

View file

@ -1,15 +1,12 @@
{
"compilerOptions": {
"module": "ESNext",
"moduleResolution": "Node",
"target": "ES2020",
"jsx": "react",
"allowImportingTsExtensions": true,
"strictNullChecks": true,
"strictFunctionTypes": true
},
"exclude": [
"node_modules",
"**/node_modules/*"
]
}
"compilerOptions": {
"module": "ESNext",
"moduleResolution": "Node",
"target": "ES2020",
"jsx": "react",
"allowImportingTsExtensions": true,
"strictNullChecks": true,
"strictFunctionTypes": true
},
"exclude": ["node_modules", "**/node_modules/*"]
}

View file

@ -2,17 +2,17 @@
my different hosts, each with their own unique configurations and purposes.
Name | Description
--------------- | -----------
`ame` | T480 laptop, mainly used for experimenting atm
`arashi` | postgres / redis vm
`haru` | adblocker / DNS proxy vm
`kariru` | *arr stack / seedbox vm
`kaze` | s3 storage ran on a [buyvm slice](https://buyvm.net/kvm-dedicated-server-slices/), with block storage attached.
`sakura` | main vm, hosting most internet connected services
`sora` | hetzner vps
`tsuki` | main machine running hyprland
`tsuru` | vm for ci/cd runners, and (potentially) a binary cache
`yuki` | my old proxmox machine, now running pure nix
`default` | defines `nixosConfigurations`
`deploy` | defines deployment nodes for deploy-rs
| Name | Description |
| --------- | --------------------------------------------------------------------------------------------------------------- |
| `ame` | T480 laptop, mainly used for experimenting atm |
| `arashi` | postgres / redis vm |
| `haru` | adblocker / DNS proxy vm |
| `kariru` | \*arr stack / seedbox vm |
| `kaze` | s3 storage ran on a [buyvm slice](https://buyvm.net/kvm-dedicated-server-slices/), with block storage attached. |
| `sakura` | main vm, hosting most internet connected services |
| `sora` | hetzner vps |
| `tsuki` | main machine running hyprland |
| `tsuru` | vm for ci/cd runners, and (potentially) a binary cache |
| `yuki` | my old proxmox machine, now running pure nix |
| `default` | defines `nixosConfigurations` |
| `deploy` | defines deployment nodes for deploy-rs |

View file

@ -2,16 +2,16 @@
this directory hosts some common modules / services / security tweaks used on (most) hosts.
name | description
--------------- | -----------
`prometheus` | has default prometheus config for all hosts, along with exporters for select hosts
`default` | used for commonly shared modules
`fonts` | font handling
`nix` | common nix configuration
`openssh` | configures openssh options
`security` | stolen from [hlissner](https://github.com/hlissner)
`sops` | configures sops-nix
`system` | commonly shared system settings
`time` | force sets the time on all systems
`users` | defines all hosts users & groups
`virtualisation`| basic docker configuration
| name | description |
| ---------------- | ---------------------------------------------------------------------------------- |
| `prometheus` | has default prometheus config for all hosts, along with exporters for select hosts |
| `default` | used for commonly shared modules |
| `fonts` | font handling |
| `nix` | common nix configuration |
| `openssh` | configures openssh options |
| `security` | stolen from [hlissner](https://github.com/hlissner) |
| `sops` | configures sops-nix |
| `system` | commonly shared system settings |
| `time` | force sets the time on all systems |
| `users` | defines all hosts users & groups |
| `virtualisation` | basic docker configuration |

View file

@ -2,8 +2,8 @@
this directory hosts derivations of packages not found in nixpkgs, and overrides.
name | description
--------------- | -----------
`chatterino7` | [7tv fork](https://github.com/SevenTV/chatterino7) of chatterino2, a chat client for twitch.tv
`jellyfin-rpc` | [discord rpc client](https://github.com/Radiicall/jellyfin-rpc) for jellyfin
`overlays.nix` | has overlays that i use
| name | description |
| -------------- | ---------------------------------------------------------------------------------------------- |
| `chatterino7` | [7tv fork](https://github.com/SevenTV/chatterino7) of chatterino2, a chat client for twitch.tv |
| `jellyfin-rpc` | [discord rpc client](https://github.com/Radiicall/jellyfin-rpc) for jellyfin |
| `overlays.nix` | has overlays that i use |

View file

@ -1,3 +1,3 @@
# :lock: secrets
houses my secrets, managed with [sops-nix](https://github.com/Mic92/sops-nix)
houses my secrets, managed with [sops-nix](https://github.com/Mic92/sops-nix)