More apps, base config

This commit is contained in:
Erwin Boskma 2021-11-17 16:32:18 +01:00
parent d76c245b5e
commit 761948de03
Signed by: erwin
GPG key ID: B4F4B090E4BD95A9
15 changed files with 912 additions and 33 deletions

View file

@ -82,12 +82,12 @@
# TODO: package as nix thingy # TODO: package as nix thingy
# "custom/now_playing" = { # "custom/now_playing" = {
# exec = "${HOME}/.config/waybar/ha-now-playing --host home.datarift.nl --entity media_player.sonos_woonkamer --token eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiI5OWJmN2YyNWYyODc0ZmZhOWVhMTZiNGM1MTQyZmUzZiIsImlhdCI6MTYwMzIyMDAyMiwiZXhwIjoxOTE4NTgwMDIyfQ.dNfjPN-cYStiPrSO-PVArJdShMWl2rdDeo8AXr1byIY"; # exec = "${HOME}/.config/waybar/ha-now-playing --host home.datarift.nl --entity media_player.sonos_woonkamer --token <TOKEN>";
# format = " ♪ {}"; # format = " ♪ {}";
# interval = 2; # interval = 2;
# on-click = "${HOME}/.config/waybar/ha-now-playing --host home.datarift.nl --entity media_player.sonos_woonkamer --token eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiI5OWJmN2YyNWYyODc0ZmZhOWVhMTZiNGM1MTQyZmUzZiIsImlhdCI6MTYwMzIyMDAyMiwiZXhwIjoxOTE4NTgwMDIyfQ.dNfjPN-cYStiPrSO-PVArJdShMWl2rdDeo8AXr1byIY play-pause"; # on-click = "${HOME}/.config/waybar/ha-now-playing --host home.datarift.nl --entity media_player.sonos_woonkamer --token <TOKEN> play-pause";
# on-scroll-down = "${HOME}/.config/waybar/ha-now-playing --host home.datarift.nl --entity media_player.sonos_woonkamer --token eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiI5OWJmN2YyNWYyODc0ZmZhOWVhMTZiNGM1MTQyZmUzZiIsImlhdCI6MTYwMzIyMDAyMiwiZXhwIjoxOTE4NTgwMDIyfQ.dNfjPN-cYStiPrSO-PVArJdShMWl2rdDeo8AXr1byIY volume-up"; # on-scroll-down = "${HOME}/.config/waybar/ha-now-playing --host home.datarift.nl --entity media_player.sonos_woonkamer --token <TOKEN> volume-up";
# on-scroll-up = "${HOME}/.config/waybar/ha-now-playing --host home.datarift.nl --entity media_player.sonos_woonkamer --token eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiI5OWJmN2YyNWYyODc0ZmZhOWVhMTZiNGM1MTQyZmUzZiIsImlhdCI6MTYwMzIyMDAyMiwiZXhwIjoxOTE4NTgwMDIyfQ.dNfjPN-cYStiPrSO-PVArJdShMWl2rdDeo8AXr1byIY volume-down"; # on-scroll-up = "${HOME}/.config/waybar/ha-now-playing --host home.datarift.nl --entity media_player.sonos_woonkamer --token <TOKEN> volume-down";
# }; # };
"sway/window" = { "sway/window" = {

View file

@ -0,0 +1,97 @@
{ lib, pkgs, config, ... }:
with lib;
let
cfg = config.eboskma.programs.alacritty;
in
{
options.eboskma.programs.alacritty.enable = mkEnableOption "Enable alacritty";
config = mkIf cfg.enable {
programs.alacritty = {
enable = true;
settings = {
window = {
decorations = "full";
startup_mode = "Maximized";
};
scrolling = {
history = 100000;
};
font = {
normal = {
family = "CaskaydiaCove Nerd Font";
style = "Medium";
};
size = 10.0;
};
colors = {
primary = {
background = "#2e3440";
foreground = "#d8dee9";
dim_foreground = "#a5abb6";
};
cursor = {
text = "#2e3440";
cursor = "#d8dee9";
};
vi_mode_cursor = {
text = "#2e3440";
cursor = "#d8dee9";
};
selection = {
text = "CellForeground";
background = "#4c566a";
};
search = {
matches = {
foreground = "CellBackground";
background = "#88c0d0";
};
bar = {
background = "#434c5e";
foreground = "#d8dee9";
};
};
normal = {
black = "#3b4252";
red = "#bf616a";
green = "#a3be8c";
yellow = "#ebcb8b";
blue = "#81a1c1";
magenta = "#b48ead";
cyan = "#88c0d0";
white = "#e5e9f0";
};
bright = {
black = "#4c566a";
red = "#bf616a";
green = "#a3be8c";
yellow = "#ebcb8b";
blue = "#81a1c1";
magenta = "#b48ead";
cyan = "#8fbcbb";
white = "#eceff4";
};
dim = {
black = "#373e4d";
red = "#94545d";
green = "#809575";
yellow = "#b29e75";
blue = "#68809a";
magenta = "#8c738c";
cyan = "#6d96a5";
white = "#aeb3bb";
};
background_opacity = 0.9;
live_config_reload = true;
mouse = {
hide_when_typing = true;
};
};
};
};
};
}

View file

@ -0,0 +1,45 @@
{ pkgs, config, lib, ... }:
with lib;
let
cfg = config.eboskma.programs.firefox;
profileSettings = {
"devtools.theme" = "dark";
"widget.content.allow-gtk-dark-theme" = true;
"ui.key.menuAccessKeyFocuses" = false;
"image.avif.enable" = true;
"privacy.webrtc.allowSilencingNotifications" = true;
"privacy.webrtc.legacyGlobalIndicator" = false;
};
in
{
options.eboskma.programs.firefox = {
enable = mkEnableOption "enable firefox";
work = mkOption {
description = "whether this is a work config";
type = types.bool;
default = false;
};
};
config = mkIf (cfg.enable) {
programs.firefox = {
enable = true;
profiles = {
private = {
id = 0;
isDefault = !cfg.work;
settings = profileSettings;
};
horus = {
id = 1;
isDefault = cfg.work;
settings = profileSettings;
};
};
};
};
}

View file

@ -0,0 +1,45 @@
{ pkgs, config, lib, ... }:
with lib;
let cfg = config.eboskma.programs.fish;
in
{
options.eboskma.programs.fish = {
enable = mkEnableOption "Enable fish shell";
};
config = mkIf (cfg.enable) {
programs.fish = {
enable = true;
# interactiveShellInit = ''
# '';
};
programs.starship = {
enable = true;
enableFishIntegration = true;
};
programs.fzf = {
enable = true;
enableFishIntegration = true;
changeDirWidgetCommand = "${pkgs.fd}/bin/fd -type d";
defaultCommand = "${pkgs.fd}/bin/fd -type f";
defaultOptions = [
"--cycle"
"--layout=reverse"
"--border"
"--height=90%"
"--preview-window=wrap"
"--marker='*'"
];
fileWidgetCommand = "${pkgs.fd}/bin/fd -type f";
};
programs.direnv = {
enable = true;
nix-direnv.enable = true;
};
};
}

View file

@ -0,0 +1,27 @@
{ pkgs, config, lib, ... }:
with lib;
let cfg = config.eboskma.programs.gpg;
in
{
options.eboskma.programs.gpg = {
enable = mkEnableOption "enable gpg";
};
config = mkIf (cfg.enable) {
home.packages = with pkgs; [
pinentry-curses
];
programs.gpg = {
enable = true;
};
services.gpg-agent = {
enable = true;
pinentryFlavor = "curses";
enableSshSupport = true;
defaultCacheTtlSsh = 14400;
maxCacheTtlSsh = 14400;
};
};
}

View file

@ -12,6 +12,7 @@ in
enable = true; enable = true;
package = pkgs.rofi-wayland; package = pkgs.rofi-wayland;
theme = ./launch.rasi; theme = ./launch.rasi;
terminal = "${pkgs.alacritty}/bin/alacritty";
}; };
}; };
} }

View file

@ -6,7 +6,7 @@ configuration {
* { * {
blue: #009ad1; blue: #009ad1;
orange: #d14200; orange: #d14200;
text: #efefef; text: #efefef;
text-alt: #c2c2c2; text-alt: #c2c2c2;
bg: #333333; bg: #333333;
@ -15,26 +15,26 @@ configuration {
background-color: transparent; background-color: transparent;
font: "DroidSansMono Nerd Font Mono, 14, FontAwesome5Free, 14"; font: "DroidSansMono Nerd Font Mono, 14, FontAwesome5Free, 14";
highlight: bold; highlight: bold;
text-color: @text; text-color: @text;
} }
window { window {
transparency: "real"; transparency: "real";
y-offset: -1.5em; y-offset: -1.5em;
x-offset: -0.5em; x-offset: -0.5em;
width: 27em; width: 27em;
background-color: transparent; background-color: transparent;
} }
inputbar { inputbar {
enabled: false; enabled: false;
border: 1px; border: 1px;
border-color: @orange; border-color: @orange;
border-radius: 5px; border-radius: 5px;
padding: 10px; padding: 10px;
margin: 0 5px; margin: 0 5px;
background-color: @bg; background-color: @bg;
} }
prompt { prompt {
@ -57,8 +57,8 @@ listview {
dynamic: true; dynamic: true;
scrollbar: false; scrollbar: false;
lines: 1; lines: 1;
columns: 5; columns: 5;
background-color: transparent; background-color: transparent;
} }
element { element {
@ -67,8 +67,8 @@ element {
highlight: bold #95ee8f; /* green */ highlight: bold #95ee8f; /* green */
background-color: @bg; background-color: @bg;
border-radius: 5px; border-radius: 5px;
border: 1px; border: 1px;
border-color: @orange; border-color: @orange;
} }
element-icon { element-icon {
size: 1em; size: 1em;
@ -76,8 +76,8 @@ element-icon {
} }
element selected { element selected {
border: 0 0 0 1px; border: 0 0 0 1px;
background-color: @blue; background-color: @blue;
text-color: @text; text-color: @text;
} }

View file

@ -0,0 +1,64 @@
{ lib, pkgs, config, ... }:
with lib;
let cfg = config.eboskma.programs.vscode;
in
{
options.eboskma.programs.vscode.enable = mkEnableOption "enable vscode";
config = mkIf cfg.enable {
programs.vscode = {
enable = true;
package = pkgs.vscode;
extensions = with pkgs.vscode-extensions; [
bbenoist.nix
brettm12345.nixfmt-vscode
# aaronduino.nix-lsp
# aliariff.auto-add-brackets
bradlc.vscode-tailwindcss
# bungcip.better-toml
coolbear.systemd-unit-file
# dawhite.mustache
dbaeumer.vscode-eslint
denoland.vscode-deno
# dlasagno.rasi
# dprint.dprint
editorconfig.editorconfig
esbenp.prettier-vscode
# EugenWiens.bitbake
elixir-lsp.vscode-elixir-ls # this is the one by Jake Becker, not the deprecated one
# kumar-harsh.graphql-for-vscode
matklad.rust-analyzer
# monokai.theme-monokai-pro-vscode
ms-azuretools.vscode-docker
ms-python.python
ms-python.vscode-pylance
ms-toolsai.jupyter
# ms-toolsai.jupyter-keymap
# ms-toolsai.jupyter-renderers
# ms-vscode-remote.remote-containers
ms-vscode-remote.remote-ssh
# ms-vscode-remote.remote-ssh-edit
# ms-vscode.cmake-tools
ms-vscode.cpptools
# msaraiva.surface
# pgourlain.erlang
# phoenixframework.phoenix
# surajbarkale.ninja
timonwong.shellcheck
# twxs.cmake
# vscode-icons-team.vscode-icons
vscodevim.vim
wholroyd.jinja
xaver.clang-format
zxh404.vscode-proto3
];
userSettings = (builtins.fromJSON (builtins.readFile ./settings.json));
};
home.packages = with pkgs; [
rnix-lsp
];
};
}

View file

@ -0,0 +1,469 @@
{
"editor.formatOnSave": true,
"editor.fontFamily": "Iosevka Nerd Font",
"workbench.iconTheme": "vscode-icons",
"editor.fontLigatures": true,
"vsicons.dontShowNewVersionMessage": true,
"workbench.startupEditor": "newUntitledFile",
"rust-analyzer.cargo.allFeatures": true,
"rust-analyzer.checkOnSave.command": "clippy",
"editor.suggestSelection": "first",
"git.autofetch": true,
"vim.cursorStylePerMode.insert": "line",
"vim.cursorStylePerMode.normal": "block",
"vim.cursorStylePerMode.replace": "block-outline",
"vim.cursorStylePerMode.visual": "underline",
"vim.cursorStylePerMode.visualblock": "underline",
"vim.cursorStylePerMode.visualline": "underline",
"vim.normalModeKeyBindingsNonRecursive": [
{
"before": ["h"],
"after": ["h"]
},
{
"before": ["n"],
"after": ["j"]
},
{
"before": ["e"],
"after": ["k"]
},
{
"before": ["i"],
"after": ["l"]
},
{
"before": ["l"],
"after": ["b"]
},
{
"before": ["L"],
"after": ["B"]
},
{
"before": ["u"],
"after": ["e"]
},
{
"before": ["U"],
"after": ["E"]
},
{
"before": ["y"],
"after": ["W"]
},
{
"before": ["Y"],
"after": ["W"]
},
{
"before": ["s"],
"after": ["i"]
},
{
"before": ["S"],
"after": ["I"]
},
{
"before": ["t"],
"after": ["a"]
},
{
"before": ["T"],
"after": ["A"]
},
{
"before": ["w"],
"after": ["c"]
},
{
"before": ["W"],
"after": ["C"]
},
{
"before": ["ww"],
"after": ["cc"]
},
{
"before": ["x"],
"after": ["x"]
},
{
"before": ["c"],
"after": ["y"]
},
{
"before": ["v"],
"after": ["p"]
},
{
"before": ["X"],
"after": ["dd"]
},
{
"before": ["C"],
"after": ["yy"]
},
{
"before": ["V"],
"after": ["P"]
},
{
"before": ["gv"],
"after": ["gp"]
},
{
"before": ["gV"],
"after": ["gP"]
},
{
"before": ["z"],
"after": ["u"]
},
{
"before": ["gz"],
"after": ["U"]
},
{
"before": ["Z"],
"after": ["<C-R>"]
},
{
"before": ["a"],
"after": ["v"]
},
{
"before": ["A"],
"after": ["V"]
},
{
"before": ["ga"],
"after": ["gv"]
},
{
"before": ["p"],
"after": ["t"]
},
{
"before": ["P"],
"after": ["T"]
},
{
"before": ["b"],
"after": [";"]
},
{
"before": ["B"],
"after": [","]
},
{
"before": ["k"],
"after": ["n"]
},
{
"before": ["K"],
"after": ["N"]
},
{
"before": ["j"],
"after": ["z"]
},
{
"before": ["jn"],
"after": ["zj"]
},
{
"before": ["je"],
"after": ["zk"]
},
{
"before": ["gX"],
"after": ["X"]
},
{
"before": ["gK"],
"after": ["K"]
},
{
"before": ["gL"],
"after": ["L"]
},
{
"before": ["<C-W>h"],
"after": ["<C-W>h"]
},
{
"before": ["<C-W>n"],
"after": ["<C-W>j"]
},
{
"before": ["<C-W>e"],
"after": ["<C-W>k"]
},
{
"before": ["<C-W>i"],
"after": ["<C-W>l"]
}
],
"vim.visualModeKeyBindingsNonRecursive": [
{
"before": ["h"],
"after": ["h"]
},
{
"before": ["n"],
"after": ["j"]
},
{
"before": ["e"],
"after": ["k"]
},
{
"before": ["i"],
"after": ["l"]
},
{
"before": ["l"],
"after": ["b"]
},
{
"before": ["L"],
"after": ["B"]
},
{
"before": ["u"],
"after": ["e"]
},
{
"before": ["U"],
"after": ["E"]
},
{
"before": ["y"],
"after": ["W"]
},
{
"before": ["Y"],
"after": ["W"]
},
{
"before": ["w"],
"after": ["c"]
},
{
"before": ["W"],
"after": ["C"]
},
{
"before": ["x"],
"after": ["x"]
},
{
"before": ["c"],
"after": ["y"]
},
{
"before": ["v"],
"after": ["p"]
},
{
"before": ["X"],
"after": ["d"]
},
{
"before": ["C"],
"after": ["y"]
},
{
"before": ["V"],
"after": ["P"]
},
{
"before": ["gv"],
"after": ["gp"]
},
{
"before": ["gV"],
"after": ["gP"]
},
{
"before": ["z"],
"after": [":<C-U>undo<CR>"]
},
{
"before": ["gz"],
"after": [":<C-U>undo<CR>"]
},
{
"before": ["Z"],
"after": [":<C-U>redo<CR>"]
},
{
"before": ["a"],
"after": ["v"]
},
{
"before": ["A"],
"after": ["V"]
},
{
"before": ["<silent> <expr> s"],
"after": ["(mode() =~# \"[V]\" ? \"<C-V>0o$I\" : \"I\""]
},
{
"before": ["<silent> <expr> S"],
"after": ["(mode() =~# \"[V]\" ? \"<C-V>0o$I\" : \"I\""]
},
{
"before": ["<silent> <expr> t"],
"after": ["(mode() =~# \"[V]\" ? \"<C-V>0o$A\" : \"I\""]
},
{
"before": ["<silent> <expr> T"],
"after": ["(mode() =~# \"[V]\" ? \"<C-V>0o$A\" : \"I\""]
},
{
"before": ["p"],
"after": ["t"]
},
{
"before": ["P"],
"after": ["T"]
},
{
"before": ["b"],
"after": [";"]
},
{
"before": ["B"],
"after": [","]
},
{
"before": ["k"],
"after": ["n"]
},
{
"before": ["K"],
"after": ["N"]
},
{
"before": ["j"],
"after": ["z"]
},
{
"before": ["jn"],
"after": ["zj"]
},
{
"before": ["je"],
"after": ["zk"]
},
{
"before": ["gX"],
"after": ["X"]
},
{
"before": ["gK"],
"after": ["K"]
},
{
"before": ["gL"],
"after": ["L"]
},
{
"before": ["<C-W>h"],
"after": ["<C-W>h"]
},
{
"before": ["<C-W>n"],
"after": ["<C-W>j"]
},
{
"before": ["<C-W>e"],
"after": ["<C-W>k"]
},
{
"before": ["<C-W>i"],
"after": ["<C-W>l"]
}
],
"vim.textwidth": 120,
"workbench.editor.enablePreviewFromQuickOpen": false,
"editor.lineNumbers": "relative",
"emmet.includeLanguages": {
"html-leex": "html"
},
"emmet.triggerExpansionOnTab": true,
"python.languageServer": "Default",
"shellcheck.executablePath": "/usr/bin/shellcheck",
"shellcheck.enableQuickFix": true,
"shellcheck.customArgs": ["--enable=all"],
"python.defaultInterpreterPath": "/usr/bin/python",
"workbench.colorTheme": "Monokai Pro",
"[elixir]": {
"editor.defaultFormatter": "JakeBecker.elixir-ls"
},
"remote.SSH.useLocalServer": false,
"remote.SSH.remotePlatform": {
"horus-vpn": "linux",
"horus": "linux"
},
"tailwindCSS.includeLanguages": {
"svelte": "html",
"surface": "html"
},
"tailwindCSS.emmetCompletions": true,
"docker.showStartPage": false,
"workbench.editorAssociations": {
"*.ipynb": "jupyter.notebook.ipynb"
},
"zigLanguageClient.path": "/home/erwin/zls/zls",
"zig.buildOnSave": true,
"editor.cursorStyle": "line",
"editor.wordSeparators": "/\\()\"':,.;<>~!@#$%^&*|+=[]{}`?-",
"editor.wordWrap": "off",
"editor.tabSize": 2,
"[typescript]": {
"editor.defaultFormatter": "vscode.typescript-language-features"
},
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[svelte]": {
"editor.defaultFormatter": "svelte.svelte-vscode"
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[markdown]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[rust]": {
"editor.defaultFormatter": "dprint.dprint"
},
"[cpp]": {
"editor.defaultFormatter": "xaver.clang-format"
},
"files.associations": {
"*.livemd": "markdown"
},
"[python]": {
"editor.tabSize": 4
},
"editor.minimap.enabled": false,
"editor.bracketPairColorization.enabled": true,
"[nix]": {
"editor.defaultFormatter": "aaronduino.nix-lsp"
},
"python.formatting.provider": "black",
"telemetry.telemetryLevel": "off"
}

View file

@ -90,12 +90,12 @@ in
# TODO: package as nix thingy # TODO: package as nix thingy
# "custom/now_playing" = { # "custom/now_playing" = {
# exec = "${HOME}/.config/waybar/ha-now-playing --host home.datarift.nl --entity media_player.sonos_woonkamer --token eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiI5OWJmN2YyNWYyODc0ZmZhOWVhMTZiNGM1MTQyZmUzZiIsImlhdCI6MTYwMzIyMDAyMiwiZXhwIjoxOTE4NTgwMDIyfQ.dNfjPN-cYStiPrSO-PVArJdShMWl2rdDeo8AXr1byIY"; # exec = "${HOME}/.config/waybar/ha-now-playing --host home.datarift.nl --entity media_player.sonos_woonkamer --token <TOKEN>";
# format = " ♪ {}"; # format = " ♪ {}";
# interval = 2; # interval = 2;
# on-click = "${HOME}/.config/waybar/ha-now-playing --host home.datarift.nl --entity media_player.sonos_woonkamer --token eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiI5OWJmN2YyNWYyODc0ZmZhOWVhMTZiNGM1MTQyZmUzZiIsImlhdCI6MTYwMzIyMDAyMiwiZXhwIjoxOTE4NTgwMDIyfQ.dNfjPN-cYStiPrSO-PVArJdShMWl2rdDeo8AXr1byIY play-pause"; # on-click = "${HOME}/.config/waybar/ha-now-playing --host home.datarift.nl --entity media_player.sonos_woonkamer --token <TOKEN>";
# on-scroll-down = "${HOME}/.config/waybar/ha-now-playing --host home.datarift.nl --entity media_player.sonos_woonkamer --token eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiI5OWJmN2YyNWYyODc0ZmZhOWVhMTZiNGM1MTQyZmUzZiIsImlhdCI6MTYwMzIyMDAyMiwiZXhwIjoxOTE4NTgwMDIyfQ.dNfjPN-cYStiPrSO-PVArJdShMWl2rdDeo8AXr1byIY volume-up"; # on-scroll-down = "${HOME}/.config/waybar/ha-now-playing --host home.datarift.nl --entity media_player.sonos_woonkamer --token <TOKEN>";
# on-scroll-up = "${HOME}/.config/waybar/ha-now-playing --host home.datarift.nl --entity media_player.sonos_woonkamer --token eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiI5OWJmN2YyNWYyODc0ZmZhOWVhMTZiNGM1MTQyZmUzZiIsImlhdCI6MTYwMzIyMDAyMiwiZXhwIjoxOTE4NTgwMDIyfQ.dNfjPN-cYStiPrSO-PVArJdShMWl2rdDeo8AXr1byIY volume-down"; # on-scroll-up = "${HOME}/.config/waybar/ha-now-playing --host home.datarift.nl --entity media_player.sonos_woonkamer --token <TOKEN>";
# }; # };
"sway/window" = { "sway/window" = {

View file

@ -3,6 +3,10 @@
imports = [ ./hardware-configuration.nix ]; imports = [ ./hardware-configuration.nix ];
eboskma = { eboskma = {
base = {
plymouth.enable = true;
work = false;
};
desktop = { desktop = {
enable = true; enable = true;
home-manager = true; home-manager = true;
@ -10,6 +14,7 @@
nix-common = { nix-common = {
enable = true; enable = true;
}; };
greetd.enable = true;
}; };
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;

33
modules/base/default.nix Normal file
View file

@ -0,0 +1,33 @@
{ pkgs, config, lib, ... }:
with lib;
let
cfg = config.eboskma.base;
in
{
options.eboskma.base = {
kernel = mkOption {
description = "which kernel to run";
type = types.unspecified;
default = pkgs.linuxKernel.packages.linux_5_14;
};
plymouth = {
enable = mkEnableOption "enable plymouth splash screen";
};
work = mkOption {
description = "whether this is a work machine.";
type = types.bool;
default = false;
};
};
config = {
boot.kernelPackages = cfg.kernel;
boot.plymouth = mkIf (cfg.plymouth.enable) {
enable = true;
};
};
}

View file

@ -33,31 +33,71 @@ in
eboskma = { eboskma = {
programs = { programs = {
sway.enable = true; alacritty.enable = true;
firefox = {
enable = true;
work = config.eboskma.base.work;
};
fish.enable = true;
gpg.enable = true;
rofi.enable = true; rofi.enable = true;
vscode.enable = true;
sway.enable = true;
waybar.enable = true; waybar.enable = true;
}; };
}; };
home.packages = with pkgs; [ home.packages = with pkgs; [
(nerdfonts.override { fonts = [ "CascadiaCode" "FantasqueSansMono" "FiraCode" "Iosevka" "JetBrainsMono" "Meslo" "Noto" "SourceCodePro" ]; }) (nerdfonts.override { fonts = [ "CascadiaCode" "FantasqueSansMono" "FiraCode" "Iosevka" "JetBrainsMono" "Meslo" "Noto" "SourceCodePro" ]; })
(callPackage ../../pkgs/pamedia { }) bitwarden
gnome.nautilus
jetbrains.clion
neovim
signal-desktop
steam
tdesktop
unzip
]; ];
xdg = {
enable = true;
};
imports = [ imports = [
{ {
nixpkgs.overlays = [ self-overlay ]; nixpkgs.overlays = [ self-overlay ];
} }
../../home-manager/modules/alacritty
../../home-manager/modules/firefox
../../home-manager/modules/fish
../../home-manager/modules/gpg
../../home-manager/modules/rofi
../../home-manager/modules/vscode
../../home-manager/modules/sway ../../home-manager/modules/sway
../../home-manager/modules/waybar ../../home-manager/modules/waybar
../../home-manager/modules/rofi
]; ];
}; };
services.pipewire = { xdg = {
enable = true; mime.enable = true;
pulse.enable = true; menus.enable = true;
media-session.enable = true; icons.enable = true;
sounds.enable = true;
autostart.enable = true;
portal = {
enable = true;
wlr.enable = true;
gtkUsePortal = true;
};
};
services = {
pipewire = {
enable = true;
pulse.enable = true;
media-session.enable = true;
};
}; };
}; };
} }

View file

@ -0,0 +1,48 @@
{ pkgs, config, lib, ... }:
with lib;
let
cfg = config.eboskma.greetd;
in
{
options.eboskma.greetd = {
enable = mkEnableOption "enable greetd";
};
config = mkIf (cfg.enable)
{
services.greetd = {
enable = true;
package = pkgs.greetd.gtkgreet;
restart = true;
settings = {
default_session = {
command = "${pkgs.sway}/bin/sway --config /etc/greetd/sway-config";
};
};
};
environment.etc = {
"greetd/sway-config" = {
text = ''
# `-l` activates layer-shell mode. Notice that `swaymsg exit` will run after gtkgreet.
exec "${pkgs.greetd.gtkgreet}/bin/gtkgreet -l; swaymsg exit"
bindsym Mod4+shift+e exec swaynag \
-t warning \
-m 'What do you want to do?' \
-b 'Poweroff' 'systemctl poweroff' \
-b 'Reboot' 'systemctl reboot'
'';
user = "greeter";
group = "greeter";
};
"greetd/environments" = {
text = ''
${pkgs.sway}/bin/sway
${pkgs.bash}/bin/bash
'';
user = "greeter";
group = "greeter";
};
};
};
}

View file

@ -0,0 +1,5 @@
exec "gtkgreet -l; swaymsg exit"
bindsym Mod4+shift+e exec swaynag -t warning -m 'What would you like to do?' -b 'Poweroff' 'systemctl poweroff' -b 'Reboot' 'systemctl reboot'
include /etc/sway/config.d/*