Formatting with alejandra

This commit is contained in:
Erwin Boskma 2022-03-01 22:19:03 +01:00
parent 4bb96c16be
commit d331343012
Signed by: erwin
GPG key ID: 270B20D17394F7E5
60 changed files with 1061 additions and 907 deletions

205
flake.nix
View file

@ -69,31 +69,37 @@
};
};
outputs = { self, sops, ha-now-playing, pamedia, ... }@inputs:
with inputs;
let
outputs = {
self,
sops,
ha-now-playing,
pamedia,
...
} @ inputs:
with inputs; let
defSystem = system: baseConfig:
nixpkgs.lib.nixosSystem {
system = "${system}";
modules = [
{ _module.args.inputs = inputs; }
{ _module.args.self-overlay = self.overlay; }
({ ... }: {
imports = builtins.attrValues self.nixosModules ++ [
{
nix.nixPath = [ "nixpkgs=${nixpkgs}" ];
nixpkgs.overlays = [
self.overlay
ha-now-playing.overlays.${system}
pamedia.overlays.${system}
];
}
{_module.args.inputs = inputs;}
{_module.args.self-overlay = self.overlay;}
({...}: {
imports =
builtins.attrValues self.nixosModules
++ [
{
nix.nixPath = ["nixpkgs=${nixpkgs}"];
nixpkgs.overlays = [
self.overlay
ha-now-playing.overlays.${system}
pamedia.overlays.${system}
];
}
baseConfig
home-manager.nixosModules.home-manager
{ home-manager.useUserPackages = true; }
];
baseConfig
home-manager.nixosModules.home-manager
{home-manager.useUserPackages = true;}
];
system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev;
nix.registry.nixpkgs.flake = nixpkgs;
@ -107,23 +113,25 @@
pkgs = nixpkgs.legacyPackages.${system};
format = "lxc";
modules = [
{ _module.args.inputs = inputs; }
{ _module.args.self-overlay = self.overlay; }
({ ... }: {
imports = builtins.attrValues self.nixosModules ++ [
{
nix.nixPath = [ "nixpkgs=${nixpkgs}" ];
nixpkgs.overlays = [
self.overlay
ha-now-playing.overlays.${system}
pamedia.overlays.${system}
];
}
{_module.args.inputs = inputs;}
{_module.args.self-overlay = self.overlay;}
({...}: {
imports =
builtins.attrValues self.nixosModules
++ [
{
nix.nixPath = ["nixpkgs=${nixpkgs}"];
nixpkgs.overlays = [
self.overlay
ha-now-playing.overlays.${system}
pamedia.overlays.${system}
];
}
baseConfig
home-manager.nixosModules.home-manager
{ home-manager.useUserPackages = true; }
];
baseConfig
home-manager.nixosModules.home-manager
{home-manager.useUserPackages = true;}
];
system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev;
nix.registry.nixpkgs.flake = nixpkgs;
@ -131,72 +139,71 @@
sops.nixosModules.sops
];
};
in
{
overlay = import ./overlays;
# overlay = final: prev: {
# unstable = import nixpkgs {
# system = "x86_64-linux";
# config.allowUnfree = true;
# };
# };
{
overlay = import ./overlays;
# overlay = final: prev: {
# unstable = import nixpkgs {
# system = "x86_64-linux";
# config.allowUnfree = true;
# };
# };
nixosModules = builtins.listToAttrs (map
nixosModules = builtins.listToAttrs (map
(x: {
name = x;
value = import (./modules + "/${x}");
})
(builtins.attrNames (builtins.readDir ./modules)));
nixosConfigurations = {
vm1 = defSystem "x86_64-linux" {
imports = [
(import (./machines/vm1/configuration.nix) { inherit self; })
];
};
vm2 = defSystem "x86_64-linux" {
imports = [
(import (./machines/vm2/configuration.nix) { inherit self; })
];
nixosConfigurations = {
vm1 = defSystem "x86_64-linux" {
imports = [
(import ./machines/vm1/configuration.nix {inherit self;})
];
};
vm2 = defSystem "x86_64-linux" {
imports = [
(import ./machines/vm2/configuration.nix {inherit self;})
];
};
loki = defSystem "x86_64-linux" {
imports = [
(import ./machines/loki/configuration.nix {inherit self;})
];
};
drone = defSystem "x86_64-linux" {
imports = [
(import ./machines/drone/configuration.nix {inherit self;})
];
};
proxy = defSystem "x86_64-linux" {
imports = [
(import ./machines/proxy/configuration.nix {inherit self;})
];
};
};
loki = defSystem "x86_64-linux" {
imports = [
(import (./machines/loki/configuration.nix) { inherit self; })
];
};
nixosContainers = {
drone = defContainer "x86_64-linux" {
imports = [
(import ./machines/drone/configuration.nix {inherit self;})
];
};
drone = defSystem "x86_64-linux" {
imports = [
(import (./machines/drone/configuration.nix) { inherit self; })
];
proxy = defContainer "x86_64-linux" {
imports = [
(import ./machines/proxy/configuration.nix {inherit self;})
];
};
};
proxy = defSystem "x86_64-linux" {
imports = [
(import (./machines/proxy/configuration.nix) { inherit self; })
];
};
};
nixosContainers = {
drone = defContainer "x86_64-linux" {
imports = [
(import (./machines/drone/configuration.nix) { inherit self; })
];
};
proxy = defContainer "x86_64-linux" {
imports = [
(import (./machines/proxy/configuration.nix) { inherit self; })
];
};
};
} //
(flake-utils.lib.eachSystem [ "aarch64-linux" "x86_64-linux" ])
(system:
let
}
// (flake-utils.lib.eachSystem ["aarch64-linux" "x86_64-linux"])
(
system: let
pkgs = import nixpkgs {
inherit system;
overlays = [
@ -209,8 +216,7 @@
allowUnfree = true;
};
};
in
rec {
in rec {
packages = flake-utils.lib.flattenTree {
rofi-wayland = pkgs.rofi-wayland;
nix-plugins = pkgs.nix-plugins;
@ -218,15 +224,16 @@
};
apps = {
rofi-wayland = flake-utils.lib.mkApp { drv = packages.rofi-wayland; };
nix-plugins = flake-utils.lib.mkApp { drv = packages.nix-plugins; };
backscrub = flake-utils.lib.mkApp { drv = packages.backscrub; };
rofi-wayland = flake-utils.lib.mkApp {drv = packages.rofi-wayland;};
nix-plugins = flake-utils.lib.mkApp {drv = packages.nix-plugins;};
backscrub = flake-utils.lib.mkApp {drv = packages.backscrub;};
};
devShell = with pkgs; mkShell {
nativeBuildInputs = [ sops ssh-to-pgp ];
packages = [ sops ];
};
devShell = with pkgs;
mkShell {
nativeBuildInputs = [sops ssh-to-pgp];
packages = [sops];
};
}
);
}

View file

@ -1,21 +1,25 @@
{ lib, pkgs, config, ... }:
with lib;
let
{
lib,
pkgs,
config,
...
}:
with lib; let
cfg = config.eboskma.programs.alacritty;
importYAML = name: yamlFile: (lib.importJSON ((pkgs.runCommandNoCC name { } ''
importYAML = name: yamlFile: (lib.importJSON ((pkgs.runCommandNoCC name {} ''
mkdir -p $out
${pkgs.yaml2json}/bin/yaml2json < ${yamlFile} | ${pkgs.jq}/bin/jq -a '.' > $out/tmp.json
'').outPath + "/tmp.json"));
'')
.outPath
+ "/tmp.json"));
theme = importYAML "theme" (builtins.fetchurl {
url = "https://raw.githubusercontent.com/dracula/alacritty/05faff15c0158712be87d200081633d9f4850a7d/dracula.yml";
sha256 = "1366rvvni2shbqlcrbypjv4f7p7ccdr6bvr685jnj8ipwqjjb6rn";
});
in
{
in {
options.eboskma.programs.alacritty.enable = mkEnableOption "Enable alacritty";
config = mkIf cfg.enable {
programs.alacritty = {
enable = true;
settings = {
@ -99,7 +103,6 @@ in
mouse = {
hide_when_typing = true;
};
};
};
};

View file

@ -1,8 +1,12 @@
{ pkgs, config, lib, ... }:
with lib;
let cfg = config.eboskma.programs.bat;
in
{
pkgs,
config,
lib,
...
}:
with lib; let
cfg = config.eboskma.programs.bat;
in {
options.eboskma.programs.bat = {
enable = mkEnableOption "enable bat";
};

View file

@ -1,10 +1,13 @@
{ lib, pkgs, config, ... }:
with lib;
let
cfg = config.eboskma.programs.dropbox;
in
{
options.eboskma.programs.dropbox = { enable = mkEnableOption "activate dropbox"; };
lib,
pkgs,
config,
...
}:
with lib; let
cfg = config.eboskma.programs.dropbox;
in {
options.eboskma.programs.dropbox = {enable = mkEnableOption "activate dropbox";};
config = mkIf cfg.enable {
services.dropbox.enable = true;

View file

@ -1,9 +1,12 @@
{ pkgs, config, lib, ... }:
with lib;
let
cfg = config.eboskma.programs.dunst;
in
{
pkgs,
config,
lib,
...
}:
with lib; let
cfg = config.eboskma.programs.dunst;
in {
options.eboskma.programs.dunst = {
enable = mkEnableOption "activate dunst";
};

View file

@ -1,9 +1,12 @@
{ pkgs, config, lib, ... }:
with lib;
let
cfg = config.eboskma.programs.electron;
in
{
pkgs,
config,
lib,
...
}:
with lib; let
cfg = config.eboskma.programs.electron;
in {
options.eboskma.programs.electron = {
enable = mkEnableOption "activate electron settings";
wayland = mkEnableOption "set Wayland compatibility settings";

View file

@ -1,10 +1,13 @@
{ pkgs, config, lib, ... }:
with lib;
let
cfg = config.eboskma.programs.emacs;
in
{
options.eboskma.programs.emacs = { enable = mkEnableOption "activate emacs"; };
pkgs,
config,
lib,
...
}:
with lib; let
cfg = config.eboskma.programs.emacs;
in {
options.eboskma.programs.emacs = {enable = mkEnableOption "activate emacs";};
# imports = [ inputs.nix-doom-emacs.hmModule ];

View file

@ -1,7 +1,10 @@
{ pkgs, config, lib, ... }:
with lib;
let
{
pkgs,
config,
lib,
...
}:
with lib; let
cfg = config.eboskma.programs.firefox;
profileSettings = {
@ -19,9 +22,23 @@ let
};
nonDefaultDesktop = pkgs.makeDesktopItem {
name = "firefox-" + (if cfg.work then "private" else "horus");
desktopName = "Firefox (" + (if cfg.work then "Private" else "Horus") + ")";
exec = "firefox -P " + (if cfg.work then "private" else "horus") + " %u";
name =
"firefox-"
+ (if cfg.work
then "private"
else "horus");
desktopName =
"Firefox ("
+ (if cfg.work
then "Private"
else "Horus")
+ ")";
exec =
"firefox -P "
+ (if cfg.work
then "private"
else "horus")
+ " %u";
icon = "firefox";
categories = "GNOME;GTK;Network;WebBrowser";
mimeType = "text/html;text/xml;application/xhtml+xml;application/xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;x-scheme-handler/chrome;video/webm;application/x-xpinstall;";
@ -30,8 +47,7 @@ let
"X-MultipleArgs" = "false";
};
};
in
{
in {
options.eboskma.programs.firefox = {
enable = mkEnableOption "enable firefox";
work = mkOption {
@ -61,6 +77,6 @@ in
};
};
home.packages = [ nonDefaultDesktop ];
home.packages = [nonDefaultDesktop];
};
}

View file

@ -1,9 +1,12 @@
{ pkgs, config, lib, ... }:
with lib;
let cfg = config.eboskma.programs.fish;
in
{
pkgs,
config,
lib,
...
}:
with lib; let
cfg = config.eboskma.programs.fish;
in {
options.eboskma.programs.fish = {
enable = mkEnableOption "Enable fish shell";
};
@ -11,7 +14,7 @@ in
config = mkIf (cfg.enable) {
programs.fish = {
enable = true;
functions = (import ./functions.nix { inherit (pkgs) git; });
functions = import ./functions.nix {inherit (pkgs) git;};
plugins = [
{

View file

@ -1,5 +1,4 @@
{ git }:
{
{git}: {
reload = {
body = ''
history --save
@ -28,7 +27,7 @@
for f in $files
set file (realpath $repo_path/$f)
echo "Processing $file"
set ext (string match -r ".*\.([^\.]+)\$" $file)[2]
if contains $ext $source_exts

View file

@ -1,9 +1,12 @@
{ lib, pkgs, config, ... }:
with lib;
let
cfg = config.eboskma.programs.foot;
in
{
lib,
pkgs,
config,
...
}:
with lib; let
cfg = config.eboskma.programs.foot;
in {
options.eboskma.programs.foot = {
enable = mkEnableOption "activate foot";
server = mkEnableOption "enable foot server";

View file

@ -1,8 +1,12 @@
{ pkgs, config, lib, ... }:
with lib;
let cfg = config.eboskma.programs.git;
in
{
pkgs,
config,
lib,
...
}:
with lib; let
cfg = config.eboskma.programs.git;
in {
options.eboskma.programs.git = {
enable = mkEnableOption "enable git";
@ -59,7 +63,7 @@ in
};
extraConfig = {
credential.helper = "${pkgs.git.override { withLibsecret = true; }}/bin/git-credential-libsecret";
credential.helper = "${pkgs.git.override {withLibsecret = true;}}/bin/git-credential-libsecret";
init = {
defaultBranch = "main";
};

View file

@ -1,8 +1,12 @@
{ pkgs, config, lib, ... }:
with lib;
let cfg = config.eboskma.programs.gpg;
in
{
pkgs,
config,
lib,
...
}:
with lib; let
cfg = config.eboskma.programs.gpg;
in {
options.eboskma.programs.gpg = {
enable = mkEnableOption "enable gpg";
};

View file

@ -1,10 +1,13 @@
{ lib, pkgs, config, ... }:
with lib;
let
cfg = config.eboskma.programs.neovim;
in
{
options.eboskma.programs.neovim = { enable = mkEnableOption "activate neovim"; };
lib,
pkgs,
config,
...
}:
with lib; let
cfg = config.eboskma.programs.neovim;
in {
options.eboskma.programs.neovim = {enable = mkEnableOption "activate neovim";};
config = mkIf cfg.enable {
# unfortunately this does properly support a Lua based config
@ -25,7 +28,7 @@ in
# '';
# };
home.packages = with pkgs; [ neovim ];
home.packages = with pkgs; [neovim];
xdg.configFile.nvim = {
source = ./config;

View file

@ -1,10 +1,13 @@
{ lib, pkgs, config, ... }:
with lib;
let
cfg = config.eboskma.programs.obs-studio;
in
{
options.eboskma.programs.obs-studio = { enable = mkEnableOption "activate obs-studio"; };
lib,
pkgs,
config,
...
}:
with lib; let
cfg = config.eboskma.programs.obs-studio;
in {
options.eboskma.programs.obs-studio = {enable = mkEnableOption "activate obs-studio";};
config = mkIf cfg.enable {
programs.obs-studio = {

View file

@ -1,13 +1,15 @@
{ lib, pkgs, config, ... }:
with lib;
let
cfg = config.eboskma.programs.rofi;
in
{
lib,
pkgs,
config,
...
}:
with lib; let
cfg = config.eboskma.programs.rofi;
in {
options.eboskma.programs.rofi.enable = mkEnableOption "Enable rofi";
config = mkIf cfg.enable {
programs.rofi = {
enable = true;
package = pkgs.rofi-wayland;

View file

@ -1,10 +1,13 @@
{ pkgs, config, lib, ... }:
with lib;
let
cfg = config.eboskma.programs.solvespace;
in
{
options.eboskma.programs.solvespace = { enable = mkEnableOption "activate solvespace"; };
pkgs,
config,
lib,
...
}:
with lib; let
cfg = config.eboskma.programs.solvespace;
in {
options.eboskma.programs.solvespace = {enable = mkEnableOption "activate solvespace";};
config = mkIf (cfg.enable) {
home.packages = with pkgs; [

View file

@ -1,10 +1,13 @@
{ pkgs, config, lib, ... }:
with lib;
let
cfg = config.eboskma.programs.ssh;
in
{
options.eboskma.programs.ssh = { enable = mkEnableOption "activate ssh"; };
pkgs,
config,
lib,
...
}:
with lib; let
cfg = config.eboskma.programs.ssh;
in {
options.eboskma.programs.ssh = {enable = mkEnableOption "activate ssh";};
config = mkIf (cfg.enable) {
programs.ssh = {

View file

@ -1,13 +1,16 @@
{ lib, pkgs, config, ... }:
with lib;
let
{
lib,
pkgs,
config,
...
}:
with lib; let
cfg = config.eboskma.programs.sway;
mod = "Mod4";
swaylockcmd = "${pkgs.swaylock-effects}/bin/swaylock --ignore-empty-password --daemonize --show-failed-attempts --indicator-caps-lock --clock --image ~/.wallpapers/river-2560.png --fade-in 0.5 --scaling fill";
# swaylockcmd = "${pkgs.swaylock}/bin/swaylock --ignore-empty-password --daemonize --show-failed-attempts --indicator-caps-lock --image ~/.wallpapers/river-2560.png --scaling fill";
rofiPower = pkgs.writeShellScriptBin "rofi-power" (builtins.readFile ./powermenu.sh);
in
{
in {
options.eboskma.programs.sway.enable = mkEnableOption "Enable sway";
config = mkIf cfg.enable {
@ -17,10 +20,10 @@ in
modifier = mod;
assigns = {
"1" = [{ app_id = "firefox"; }];
"2" = [{ app_id = "Alacritty"; } { app_id = "foot"; }];
"3" = [{ class = "Code"; }];
"10" = [{ class = "telegramdesktop"; } { app_id = "Signal"; }];
"1" = [{app_id = "firefox";}];
"2" = [{app_id = "Alacritty";} {app_id = "foot";}];
"3" = [{class = "Code";}];
"10" = [{class = "telegramdesktop";} {app_id = "Signal";}];
};
bars = [
{
@ -76,12 +79,12 @@ in
right = "o";
floating = {
criteria = [{ app_id = "gnome-calculator"; }];
criteria = [{app_id = "gnome-calculator";}];
modifier = mod;
};
fonts = {
names = [ "Iosevka Nerd Font" ];
names = ["Iosevka Nerd Font"];
style = "Regular";
size = 12.0;
};
@ -166,26 +169,16 @@ in
"${mod}+9" = "workspace number 9";
"${mod}+0" = "workspace number 10";
"${mod}+Shift+1" =
"move container to workspace number 1";
"${mod}+Shift+2" =
"move container to workspace number 2";
"${mod}+Shift+3" =
"move container to workspace number 3";
"${mod}+Shift+4" =
"move container to workspace number 4";
"${mod}+Shift+5" =
"move container to workspace number 5";
"${mod}+Shift+6" =
"move container to workspace number 6";
"${mod}+Shift+7" =
"move container to workspace number 7";
"${mod}+Shift+8" =
"move container to workspace number 8";
"${mod}+Shift+9" =
"move container to workspace number 9";
"${mod}+Shift+0" =
"move container to workspace number 10";
"${mod}+Shift+1" = "move container to workspace number 1";
"${mod}+Shift+2" = "move container to workspace number 2";
"${mod}+Shift+3" = "move container to workspace number 3";
"${mod}+Shift+4" = "move container to workspace number 4";
"${mod}+Shift+5" = "move container to workspace number 5";
"${mod}+Shift+6" = "move container to workspace number 6";
"${mod}+Shift+7" = "move container to workspace number 7";
"${mod}+Shift+8" = "move container to workspace number 8";
"${mod}+Shift+9" = "move container to workspace number 9";
"${mod}+Shift+0" = "move container to workspace number 10";
"${mod}+Shift+minus" = "move scratchpad";
"${mod}+minus" = "scratchpad show";
@ -222,7 +215,6 @@ in
hide_cursor = "when-typing enable";
};
};
};
extraConfig = ''
assign [app_id="firefox"] 1
@ -237,7 +229,7 @@ in
for_window [shell="xwayland"] title_format "%title [XWayland]"
exec --no-startup-id ${pkgs.networkmanagerapplet}/bin/nm-applet --indicator
include /etc/sway/config.d/*
'';
@ -282,11 +274,20 @@ in
swayidle = {
enable = true;
events = [
{ event = "after-resume"; command = "${pkgs.sway}/bin/swaymsg 'output * dpms on'"; }
{
event = "after-resume";
command = "${pkgs.sway}/bin/swaymsg 'output * dpms on'";
}
];
timeouts = [
{ timeout = 900; command = swaylockcmd; }
{ timeout = 1200; command = "${pkgs.sway}/bin/swaymsg 'output * dpms off'"; }
{
timeout = 900;
command = swaylockcmd;
}
{
timeout = 1200;
command = "${pkgs.sway}/bin/swaymsg 'output * dpms off'";
}
];
};
};
@ -294,7 +295,7 @@ in
systemd.user.targets.tray = {
Unit = {
Description = "Home Manager System Tray";
Requires = [ "graphical-session-pre.target" ];
Requires = ["graphical-session-pre.target"];
};
};
};

View file

@ -1,8 +1,12 @@
{ pkgs, config, lib, ... }:
with lib;
let cfg = config.eboskma.programs.tmux;
in
{
pkgs,
config,
lib,
...
}:
with lib; let
cfg = config.eboskma.programs.tmux;
in {
options.eboskma.programs.tmux = {
enable = mkEnableOption "enable tmux";
};

View file

@ -1,62 +1,65 @@
{ lib, pkgs, config, flake-inputs, ... }:
with lib;
let cfg = config.eboskma.programs.vscode;
in
{
lib,
pkgs,
config,
flake-inputs,
...
}:
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; [
arrterian.nix-env-selector
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
rubymaniac.vscode-paste-and-indent
# surajbarkale.ninja
timonwong.shellcheck
# twxs.cmake
vadimcn.vscode-lldb
# vscode-icons-team.vscode-icons
vscodevim.vim
wholroyd.jinja
xaver.clang-format
zxh404.vscode-proto3
]);
extensions = with pkgs.vscode-extensions; [
arrterian.nix-env-selector
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
rubymaniac.vscode-paste-and-indent
# surajbarkale.ninja
timonwong.shellcheck
# twxs.cmake
vadimcn.vscode-lldb
# vscode-icons-team.vscode-icons
vscodevim.vim
wholroyd.jinja
xaver.clang-format
zxh404.vscode-proto3
];
keybindings = [
{
@ -73,7 +76,7 @@ in
}
];
userSettings = (builtins.fromJSON (builtins.readFile ./settings.json));
userSettings = builtins.fromJSON (builtins.readFile ./settings.json);
};
home.packages = with pkgs; [

View file

@ -1,9 +1,12 @@
{ lib, pkgs, config, ... }:
with lib;
let
cfg = config.eboskma.programs.waybar;
in
{
lib,
pkgs,
config,
...
}:
with lib; let
cfg = config.eboskma.programs.waybar;
in {
options.eboskma.programs.waybar.enable = mkEnableOption "Enable waybar";
config = mkIf cfg.enable {
@ -137,7 +140,7 @@ in
phone = "";
portable = "";
car = "";
default = [ "" "奔" "" ];
default = ["" "奔" ""];
};
on-click = "pavucontrol";
};
@ -169,199 +172,196 @@ in
};
};
};
}
];
style =
''
@keyframes blink-warning {
70% {
color: white;
}
to {
color: white;
background-color: orange;
}
}
@keyframes blink-critical {
70% {
style = ''
@keyframes blink-warning {
70% {
color: white;
}
}
to {
color: white;
background-color: red;
}
}
to {
color: white;
background-color: orange;
}
}
* {
border: none;
border-radius: 0;
min-height: 0;
margin: 0;
padding: 0;
}
#waybar {
background: #323232;
@keyframes blink-critical {
70% {
color: white;
font-family: "MesloLGM Nerd Font", sans-serif;
font-size: 13px;
}
}
#battery,
#clock,
#cpu,
#custom-keyboard-layout,
#memory,
#mode,
#network,
#pulseaudio,
#temperature,
#tray,
#custom-now_playing,
#idle_inhibitor {
padding-left: 10px;
padding-right: 10px;
}
to {
color: white;
background-color: red;
}
}
#battery {
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
}
* {
border: none;
border-radius: 0;
min-height: 0;
margin: 0;
padding: 0;
}
#battery.warning {
color: orange;
}
#waybar {
background: #323232;
color: white;
font-family: "MesloLGM Nerd Font", sans-serif;
font-size: 13px;
}
#battery.critical {
color: red;
}
#battery,
#clock,
#cpu,
#custom-keyboard-layout,
#memory,
#mode,
#network,
#pulseaudio,
#temperature,
#tray,
#custom-now_playing,
#idle_inhibitor {
padding-left: 10px;
padding-right: 10px;
}
#battery.warning.discharging {
animation-name: blink-warning;
animation-duration: 3s;
}
#battery {
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
}
#battery.critical.discharging {
animation-name: blink-critical;
animation-duration: 2s;
}
#battery.warning {
color: orange;
}
#clock {
font-weight: bold;
}
#battery.critical {
color: red;
}
#cpu {
#battery.warning.discharging {
animation-name: blink-warning;
animation-duration: 3s;
}
#battery.critical.discharging {
animation-name: blink-critical;
animation-duration: 2s;
}
#clock {
font-weight: bold;
}
#cpu {
/* No styles */
}
#cpu.warning {
color: orange;
}
#cpu.critical {
color: red;
}
#memory {
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
}
#memory.warning {
color: orange;
}
#memory.critical {
color: red;
animation-name: blink-critical;
animation-duration: 2s;
}
#mode {
background: #64727D;
border-top: 2px solid white;
/* To compensate for the top border and still have vertical centering */
padding-bottom: 2px;
}
#network {
/* No styles */
}
}
#cpu.warning {
color: orange;
}
#network.disconnected {
color: orange;
}
#cpu.critical {
color: red;
}
#pulseaudio {
/* No styles */
}
#memory {
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
}
#pulseaudio.muted {
/* No styles */
}
#memory.warning {
color: orange;
}
#custom-spotify {
color: rgb(102, 220, 105);
}
#memory.critical {
color: red;
animation-name: blink-critical;
animation-duration: 2s;
}
#temperature {
/* No styles */
}
#mode {
background: #64727D;
border-top: 2px solid white;
/* To compensate for the top border and still have vertical centering */
padding-bottom: 2px;
}
#temperature.critical {
color: red;
}
#network {
/* No styles */
}
#tray {
/* No styles */
}
#network.disconnected {
color: orange;
}
#pulseaudio {
/* No styles */
}
#pulseaudio.muted {
/* No styles */
}
#custom-spotify {
color: rgb(102, 220, 105);
}
#temperature {
/* No styles */
}
#temperature.critical {
color: red;
}
#tray {
/* No styles */
}
#window {
font-weight: bold;
}
#workspaces button {
border-top: 2px solid transparent;
/* To compensate for the top border and still have vertical centering */
padding-bottom: 2px;
padding-left: 10px;
padding-right: 10px;
color: #888888;
}
#workspaces button.focused {
border-color: #4c7899;
color: white;
background-color: #285577;
}
#workspaces button.urgent {
border-color: #c9545d;
color: #c9545d;
}
#idle_inhibitor {
background-color: transparent;
#window {
font-weight: bold;
}
}
#idle_inhibitor.activated {
background-color: #c9545d;
color: #ffffff;
}
#workspaces button {
border-top: 2px solid transparent;
/* To compensate for the top border and still have vertical centering */
padding-bottom: 2px;
padding-left: 10px;
padding-right: 10px;
color: #888888;
}
#custom-now_playing {
font-weight: bold;
}
'';
#workspaces button.focused {
border-color: #4c7899;
color: white;
background-color: #285577;
}
#workspaces button.urgent {
border-color: #c9545d;
color: #c9545d;
}
#idle_inhibitor {
background-color: transparent;
font-weight: bold;
}
#idle_inhibitor.activated {
background-color: #c9545d;
color: #ffffff;
}
#custom-now_playing {
font-weight: bold;
}
'';
};
};
}

View file

@ -1,16 +1,19 @@
{ pkgs, config, lib, ... }:
with lib;
let
cfg = config.eboskma.programs.zathura;
in
{
options.eboskma.programs.zathura = { enable = mkEnableOption "activate zathura"; };
pkgs,
config,
lib,
...
}:
with lib; let
cfg = config.eboskma.programs.zathura;
in {
options.eboskma.programs.zathura = {enable = mkEnableOption "activate zathura";};
config = mkIf (cfg.enable) {
programs.zathura = {
enable = true;
extraConfig = (builtins.readFile ./theme);
extraConfig = builtins.readFile ./theme;
};
};
}

View file

@ -4,11 +4,13 @@ let
};
lib = import "${krops}/lib";
pkgs = import "${krops}/pkgs" { };
pkgs = import "${krops}/pkgs" {};
source = name:
lib.evalSource [{
machine-config.file = toString ./.;
}];
lib.evalSource [
{
machine-config.file = toString ./.;
}
];
command = targetPath: ''
nix-shell -p git --run '
@ -23,9 +25,7 @@ let
source = source name;
target = target;
};
in
rec {
in rec {
# Deployments
# Run with:

View file

@ -1,5 +1,4 @@
{ self, ... }:
{
{self, ...}: {
imports = [
./hardware-configuration.nix
../../users/root
@ -24,15 +23,17 @@
interfaces = {
eth0 = {
ipv4.addresses = [{
address = "10.0.0.202";
prefixLength = 24;
}];
ipv4.addresses = [
{
address = "10.0.0.202";
prefixLength = 24;
}
];
};
};
defaultGateway = "10.0.0.1";
nameservers = [ "10.0.0.254" ];
nameservers = ["10.0.0.254"];
};
environment.noXlibs = true;
@ -41,8 +42,8 @@
sops.defaultSopsFile = ./secrets.yaml;
sops.secrets = {
drone = { };
drone-runner = { };
drone = {};
drone-runner = {};
};
system.stateVersion = "21.11";

View file

@ -1,5 +1,10 @@
{ config, lib, pkgs, modulesPath, ... }:
{
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/virtualisation/lxc-container.nix")
];

View file

@ -1,6 +1,5 @@
{ self, ... }:
{
imports = [ ./hardware-configuration.nix ../../users/erwin ../../users/root ];
{self, ...}: {
imports = [./hardware-configuration.nix ../../users/erwin ../../users/root];
eboskma = {
# backscrub.enable = true;
@ -29,9 +28,9 @@
};
networking = {
enable = true;
dhcpInterfaces = [ "enp4s0" ];
dhcpInterfaces = ["enp4s0"];
hosts = {
"10.0.0.252" = [ "pve.datarift.nl" ];
"10.0.0.252" = ["pve.datarift.nl"];
};
};
nix-common = {

View file

@ -1,39 +1,38 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[
(modulesPath + "/installer/scan/not-detected.nix")
];
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" "apple-mfi-fastcharge" ];
boot.extraModulePackages = [ ];
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod"];
boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-amd" "apple-mfi-fastcharge"];
boot.extraModulePackages = [];
fileSystems."/" =
{
device = "/dev/disk/by-uuid/42065c7e-d0aa-4de8-a913-014cf59d48ac";
fsType = "ext4";
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/42065c7e-d0aa-4de8-a913-014cf59d48ac";
fsType = "ext4";
};
fileSystems."/boot" =
{
device = "/dev/disk/by-uuid/4064-A1BE";
fsType = "vfat";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/4064-A1BE";
fsType = "vfat";
};
fileSystems."/home" =
{
device = "/dev/disk/by-uuid/36d7ee19-f591-4c29-b7da-cafd9bf2c7f6";
fsType = "ext4";
};
fileSystems."/home" = {
device = "/dev/disk/by-uuid/36d7ee19-f591-4c29-b7da-cafd9bf2c7f6";
fsType = "ext4";
};
swapDevices =
[{ device = "/dev/disk/by-uuid/d93788f7-1b94-4687-8313-055d17f42b7e"; }];
swapDevices = [{device = "/dev/disk/by-uuid/d93788f7-1b94-4687-8313-055d17f42b7e";}];
# high-resolution display
hardware.video.hidpi.enable = lib.mkDefault true;

View file

@ -1,5 +1,4 @@
{ self, ... }:
{
{self, ...}: {
imports = [
./hardware-configuration.nix
../../users/root
@ -24,15 +23,17 @@
interfaces = {
eth0 = {
ipv4.addresses = [{
address = "10.0.0.251";
prefixLength = 24;
}];
ipv4.addresses = [
{
address = "10.0.0.251";
prefixLength = 24;
}
];
};
};
defaultGateway = "10.0.0.1";
nameservers = [ "10.0.0.254" ];
nameservers = ["10.0.0.254"];
};
environment.noXlibs = true;
@ -40,7 +41,7 @@
services.openssh.enable = true;
sops.defaultSopsFile = ./secrets.yaml;
sops.secrets = { };
sops.secrets = {};
system.stateVersion = "21.11";
}

View file

@ -1,5 +1,10 @@
{ config, lib, pkgs, modulesPath, ... }:
{
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/virtualisation/lxc-container.nix")
];

View file

@ -1,6 +1,5 @@
{ self, ... }:
{
imports = [ ./hardware-configuration.nix ];
{self, ...}: {
imports = [./hardware-configuration.nix];
eboskma = {
desktop = {

View file

@ -1,32 +1,31 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[
(modulesPath + "/profiles/qemu-guest.nix")
];
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/profiles/qemu-guest.nix")
];
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
boot.initrd.availableKernelModules = ["ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk"];
boot.initrd.kernelModules = [];
boot.kernelModules = [];
boot.extraModulePackages = [];
fileSystems."/" =
{
device = "/dev/disk/by-label/nixos";
fsType = "ext4";
};
fileSystems."/" = {
device = "/dev/disk/by-label/nixos";
fsType = "ext4";
};
fileSystems."/boot" =
{
device = "/dev/disk/by-label/boot";
fsType = "vfat";
};
swapDevices =
[{ device = "/dev/disk/by-label/swap"; }];
fileSystems."/boot" = {
device = "/dev/disk/by-label/boot";
fsType = "vfat";
};
swapDevices = [{device = "/dev/disk/by-label/swap";}];
}

View file

@ -1,6 +1,5 @@
{ self, ... }:
{
imports = [ ./hardware-configuration.nix ];
{self, ...}: {
imports = [./hardware-configuration.nix];
eboskma = {
base = {

View file

@ -1,32 +1,31 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[
(modulesPath + "/profiles/qemu-guest.nix")
];
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/profiles/qemu-guest.nix")
];
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk" ];
boot.initrd.kernelModules = [ "kvm-amd" ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
boot.initrd.availableKernelModules = ["ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk"];
boot.initrd.kernelModules = ["kvm-amd"];
boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = [];
fileSystems."/" =
{
device = "/dev/disk/by-label/nixos";
fsType = "ext4";
};
fileSystems."/" = {
device = "/dev/disk/by-label/nixos";
fsType = "ext4";
};
fileSystems."/boot" =
{
device = "/dev/disk/by-label/boot";
fsType = "vfat";
};
swapDevices =
[{ device = "/dev/disk/by-label/swap"; }];
fileSystems."/boot" = {
device = "/dev/disk/by-label/boot";
fsType = "vfat";
};
swapDevices = [{device = "/dev/disk/by-label/swap";}];
}

View file

@ -1,15 +1,18 @@
{ pkgs, config, lib, ... }:
with lib;
let
cfg = config.eboskma.backscrub;
in
{
pkgs,
config,
lib,
...
}:
with lib; let
cfg = config.eboskma.backscrub;
in {
options.eboskma.backscrub = {
enable = mkEnableOption "enable v4l2loopback kernel module";
};
config = mkIf (cfg.enable) {
boot.extraModulePackages = [ config.boot.kernelPackages.v4l2loopback ];
boot.extraModulePackages = [config.boot.kernelPackages.v4l2loopback];
# Register a v4l2loopback device at boot
boot.kernelModules = [
"v4l2loopback"
@ -22,6 +25,6 @@ in
options v4l2loopback card_label="VirtualCam"
'';
environment.systemPackages = with pkgs; [ backscrub ];
environment.systemPackages = with pkgs; [backscrub];
};
}

View file

@ -1,11 +1,13 @@
{ pkgs, config, lib, ... }:
with lib;
let
cfg = config.eboskma.base;
qmkUdevRules = (builtins.readFile ./qmk.rules);
in
{
pkgs,
config,
lib,
...
}:
with lib; let
cfg = config.eboskma.base;
qmkUdevRules = builtins.readFile ./qmk.rules;
in {
options.eboskma.base = {
kernel = mkOption {
description = "which kernel to run";

View file

@ -1,9 +1,12 @@
{ pkgs, config, lib, ... }:
with lib;
let
cfg = config.eboskma.bluetooth;
in
{
pkgs,
config,
lib,
...
}:
with lib; let
cfg = config.eboskma.bluetooth;
in {
options.eboskma.bluetooth = {
enable = mkEnableOption "activate bluetooth";
};

View file

@ -1,10 +1,15 @@
{ lib, pkgs, config, inputs, self-overlay, ... }:
with lib;
let
{
lib,
pkgs,
config,
inputs,
self-overlay,
...
}:
with lib; let
cfg = config.eboskma.desktop;
bt = config.eboskma.bluetooth;
in
{
in {
# imports = [ ../../users/erwin.nix ../../users/root.nix ];
options.eboskma.desktop = {
@ -38,7 +43,7 @@ in
EDITOR = "${pkgs.neovim}/bin/nvim";
};
nixpkgs.config = { allowUnfree = true; };
nixpkgs.config = {allowUnfree = true;};
home.stateVersion = "21.11";
@ -79,38 +84,39 @@ in
};
};
home.packages = with pkgs; [
bandwhich
bitwarden
bottom
# inputs.cq-flake.packages.${pkgs.system}.cq-editor
fd
ffmpeg
ffmpeg.bin
git
gnome.nautilus
imagemagick
imv
iotop
(jetbrains.clion.override { jdk = pkgs.jetbrains.jdk; })
mpv
nomachine-client
pamedia
pass
quintom-cursor-theme
procs
ripgrep
signal-desktop
steam
steamcmd
steam-tui
tdesktop
unzip
xdg-utils
wireshark
wl-clipboard
] ++
(with gst_all_1; [ gstreamer gstreamer.dev gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly gst-libav gst-vaapi ]);
home.packages = with pkgs;
[
bandwhich
bitwarden
bottom
# inputs.cq-flake.packages.${pkgs.system}.cq-editor
fd
ffmpeg
ffmpeg.bin
git
gnome.nautilus
imagemagick
imv
iotop
(jetbrains.clion.override {jdk = pkgs.jetbrains.jdk;})
mpv
nomachine-client
pamedia
pass
quintom-cursor-theme
procs
ripgrep
signal-desktop
steam
steamcmd
steam-tui
tdesktop
unzip
xdg-utils
wireshark
wl-clipboard
]
++ (with gst_all_1; [gstreamer gstreamer.dev gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly gst-libav gst-vaapi]);
xdg = {
enable = true;
@ -147,7 +153,7 @@ in
i18n.inputMethod = {
enabled = "fcitx5";
fcitx5.addons = with pkgs; [ fcitx5-m17n fcitx5-gtk fcitx5-configtool ];
fcitx5.addons = with pkgs; [fcitx5-m17n fcitx5-gtk fcitx5-configtool];
};
gtk = {
@ -236,13 +242,13 @@ in
portal = {
enable = true;
wlr.enable = true;
extraPortals = with pkgs; [ xdg-desktop-portal-gtk ];
extraPortals = with pkgs; [xdg-desktop-portal-gtk];
gtkUsePortal = true;
};
};
services = {
dbus.packages = [ pkgs.gcr ];
dbus.packages = [pkgs.gcr];
avahi.publish.workstation = true;
gvfs.enable = true;
};
@ -259,7 +265,7 @@ in
updateWtmp = true;
startSession = true;
};
pki.certificates = [ (builtins.readFile ./horus-ca.pem) ];
pki.certificates = [(builtins.readFile ./horus-ca.pem)];
};
environment.sessionVariables = {
@ -278,6 +284,5 @@ in
environment.etc = {
"X11/xkb".source = "${pkgs.xkeyboard_config}/etc/X11/xkb";
};
};
}

View file

@ -1,15 +1,16 @@
{ lib, pkgs, config, ... }:
with lib;
let
cfg = config.eboskma.docker;
in
{
options.eboskma.docker = { enable = mkEnableOption "activate docker"; };
lib,
pkgs,
config,
...
}:
with lib; let
cfg = config.eboskma.docker;
in {
options.eboskma.docker = {enable = mkEnableOption "activate docker";};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [ docker-compose ];
environment.systemPackages = with pkgs; [docker-compose];
virtualisation.docker = {
enable = true;
@ -19,8 +20,6 @@ in
};
};
users.extraUsers.${config.eboskma.var.mainUser}.extraGroups =
[ "docker" ];
users.extraUsers.${config.eboskma.var.mainUser}.extraGroups = ["docker"];
};
}

View file

@ -1,9 +1,12 @@
{ pkgs, config, lib, ... }:
with lib;
let
cfg = config.eboskma.drone;
in
{
pkgs,
config,
lib,
...
}:
with lib; let
cfg = config.eboskma.drone;
in {
options.eboskma.drone = {
enable = mkEnableOption "activate drone CI";
};
@ -15,8 +18,8 @@ in
drone = {
autoStart = true;
image = "drone/drone:2";
ports = [ "8100:80" ];
volumes = [ "drone_data:/data" ];
ports = ["8100:80"];
volumes = ["drone_data:/data"];
environmentFiles = [
/var/run/secrets/drone
];
@ -25,7 +28,7 @@ in
drone-runner-docker = {
autoStart = true;
image = "drone/drone-runner-docker:1";
ports = [ "3000:3000" ];
ports = ["3000:3000"];
volumes = [
"/var/run/docker.sock:/var/run/docker.sock"
];

View file

@ -1,15 +1,16 @@
{ lib, pkgs, config, ... }:
with lib;
let
{
lib,
pkgs,
config,
...
}:
with lib; let
cfg = config.eboskma.element-web;
matrixClientConfig = pkgs.writeText "element-web.json" (builtins.readFile ./element-web.json);
in
{
options.eboskma.element-web = { enable = mkEnableOption "activate element-web"; };
in {
options.eboskma.element-web = {enable = mkEnableOption "activate element-web";};
config = mkIf cfg.enable {
eboskma.docker.enable = true;
virtualisation.oci-containers.containers = {

View file

@ -1,19 +1,20 @@
{ lib, pkgs, config, ... }:
with lib;
let cfg = config.eboskma.fonts;
in
{
options.eboskma.fonts = { enable = mkEnableOption "activate fonts"; };
lib,
pkgs,
config,
...
}:
with lib; let
cfg = config.eboskma.fonts;
in {
options.eboskma.fonts = {enable = mkEnableOption "activate fonts";};
config = mkIf cfg.enable {
fonts = {
fontDir.enable = true;
fonts = with pkgs; [
(nerdfonts.override { fonts = [ "CascadiaCode" "DroidSansMono" "FantasqueSansMono" "FiraCode" "Iosevka" "JetBrainsMono" "Meslo" "Noto" "SourceCodePro" ]; })
(nerdfonts.override {fonts = ["CascadiaCode" "DroidSansMono" "FantasqueSansMono" "FiraCode" "Iosevka" "JetBrainsMono" "Meslo" "Noto" "SourceCodePro"];})
dejavu_fonts
google-fonts
kochi-substitute
@ -26,10 +27,10 @@ in
fontconfig = {
defaultFonts = {
serif = [ "Recursive Sans Casual Static Medium" ];
sansSerif = [ "Recursive Sans Linear Static Medium" ];
monospace = [ "Iosevka Nerd Font" ];
emoji = [ "Noto Color Emoji" ];
serif = ["Recursive Sans Casual Static Medium"];
sansSerif = ["Recursive Sans Linear Static Medium"];
monospace = ["Iosevka Nerd Font"];
emoji = ["Noto Color Emoji"];
};
};
};

View file

@ -1,8 +1,12 @@
{ pkgs, config, lib, ... }:
with lib;
let cfg = config.eboskma.gnome;
in
{
pkgs,
config,
lib,
...
}:
with lib; let
cfg = config.eboskma.gnome;
in {
options.eboskma.gnome.enable = mkEnableOption "activate gnome support settings";
config = mkIf (cfg.enable) {

View file

@ -1,65 +1,68 @@
{ pkgs, config, lib, ... }:
with lib;
let
cfg = config.eboskma.greetd;
in
{
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;
restart = true;
settings = {
default_session = {
command = "${pkgs.sway}/bin/sway --config /etc/greetd/sway-config";
};
{
services.greetd = {
enable = true;
restart = true;
settings = {
default_session = {
command = "${pkgs.sway}/bin/sway --config /etc/greetd/sway-config";
};
};
environment.systemPackages = with pkgs; [ greetd.gtkgreet quintom-cursor-theme papirus-icon-theme arc-theme ];
};
environment.systemPackages = with pkgs; [greetd.gtkgreet quintom-cursor-theme papirus-icon-theme arc-theme];
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'
include /etc/sway/config.d/*
'';
user = "greeter";
group = "greeter";
};
"greetd/environments" = {
text = ''
${pkgs.sway}/bin/sway
${pkgs.bash}/bin/bash
'';
user = "greeter";
group = "greeter";
};
"sway/config.d/systemd-env.conf" = {
text = ''
exec_always --no-startup-id systemctl --user import-environment _JAVA_AWT_WM_NONREPARENTING MOZ_ENABLE_WAYLAND MOZ_DBUS_REMOTE QT_QPA_PLATFORM QT_WAYLAND_DISABLE_WINDOWDECORATION QT_QPA_PLATFORMTHEME SDL_VIDEODRIVER SSH_AUTH_SOCK
exec_always --no-startup-id dbus-update-activation-environment --systemd _JAVA_AWT_WM_NONREPARENTING MOZ_ENABLE_WAYLAND MOZ_DBUS_REMOTE QT_QPA_PLATFORM QT_WAYLAND_DISABLE_WINDOWDECORATION QT_QPA_PLATFORMTHEME SDL_VIDEODRIVER SSH_AUTH_SOCK
'';
};
"xdg/gtk-3.0/settings.ini" = {
text = generators.toINI { } {
Settings = {
gtk-theme-name = "Arc-Dark";
gtk-icon-theme-name = "Papirus-Dark";
gtk-cursor-theme-name = "Quintom_Ink";
gtk-application-prefer-dark-theme = "true";
};
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'
include /etc/sway/config.d/*
'';
user = "greeter";
group = "greeter";
};
"greetd/environments" = {
text = ''
${pkgs.sway}/bin/sway
${pkgs.bash}/bin/bash
'';
user = "greeter";
group = "greeter";
};
"sway/config.d/systemd-env.conf" = {
text = ''
exec_always --no-startup-id systemctl --user import-environment _JAVA_AWT_WM_NONREPARENTING MOZ_ENABLE_WAYLAND MOZ_DBUS_REMOTE QT_QPA_PLATFORM QT_WAYLAND_DISABLE_WINDOWDECORATION QT_QPA_PLATFORMTHEME SDL_VIDEODRIVER SSH_AUTH_SOCK
exec_always --no-startup-id dbus-update-activation-environment --systemd _JAVA_AWT_WM_NONREPARENTING MOZ_ENABLE_WAYLAND MOZ_DBUS_REMOTE QT_QPA_PLATFORM QT_WAYLAND_DISABLE_WINDOWDECORATION QT_QPA_PLATFORMTHEME SDL_VIDEODRIVER SSH_AUTH_SOCK
'';
};
"xdg/gtk-3.0/settings.ini" = {
text = generators.toINI {} {
Settings = {
gtk-theme-name = "Arc-Dark";
gtk-icon-theme-name = "Papirus-Dark";
gtk-cursor-theme-name = "Quintom_Ink";
gtk-application-prefer-dark-theme = "true";
};
};
};
};
};
}

View file

@ -1,9 +1,12 @@
{ pkgs, config, lib, ... }:
with lib;
let
cfg = config.eboskma.livebook;
in
{
pkgs,
config,
lib,
...
}:
with lib; let
cfg = config.eboskma.livebook;
in {
options.eboskma.livebook = {
enable = mkEnableOption "Start a livebook container";
dataDir = mkOption {

View file

@ -1,8 +1,12 @@
{ pkgs, config, lib, ... }:
with lib;
let cfg = config.eboskma.networking;
in
{
pkgs,
config,
lib,
...
}:
with lib; let
cfg = config.eboskma.networking;
in {
options.eboskma.networking = {
enable = mkEnableOption "activate networing settings";
@ -21,31 +25,31 @@ in
networking = {
networkmanager.enable = true;
interfaces = listToAttrs (builtins.map
(iface: {
name = iface;
value = { useDHCP = true; };
})
cfg.dhcpInterfaces);
(iface: {
name = iface;
value = {useDHCP = true;};
})
cfg.dhcpInterfaces);
hosts = cfg.hosts;
firewall = {
trustedInterfaces = [ "lo" ];
trustedInterfaces = ["lo"];
interfaces = listToAttrs (builtins.map
(iface: {
name = iface;
value = {
allowedTCPPorts = [
# Horus System V2
12345
5555
5556
];
};
})
cfg.dhcpInterfaces);
(iface: {
name = iface;
value = {
allowedTCPPorts = [
# Horus System V2
12345
5555
5556
];
};
})
cfg.dhcpInterfaces);
};
};
users.extraUsers.${config.eboskma.var.mainUser}.extraGroups = [ "networkmanager" ];
users.extraUsers.${config.eboskma.var.mainUser}.extraGroups = ["networkmanager"];
environment.systemPackages = with pkgs; [
nmap

View file

@ -1,10 +1,13 @@
{ pkgs, config, lib, ... }:
with lib;
let
cfg = config.eboskma.nginx-proxy-manager;
in
{
options.eboskma.nginx-proxy-manager = { enable = mkEnableOption "Nginx Proxy Manager"; };
pkgs,
config,
lib,
...
}:
with lib; let
cfg = config.eboskma.nginx-proxy-manager;
in {
options.eboskma.nginx-proxy-manager = {enable = mkEnableOption "Nginx Proxy Manager";};
config = mkIf (cfg.enable) {
eboskma.docker.enable = true;

View file

@ -1,8 +1,12 @@
{ lib, pkgs, config, ... }:
with lib;
let cfg = config.eboskma.nix-common;
in
{
lib,
pkgs,
config,
...
}:
with lib; let
cfg = config.eboskma.nix-common;
in {
options.eboskma.nix-common = {
enable = mkEnableOption "activate nix-common";
disable-cache = mkEnableOption "no not use binary cache";
@ -16,12 +20,12 @@ in
nix = {
package = pkgs.nixFlakes;
extraOptions = ''
experimental-features = nix-command flakes
experimental-features = nix-command flakes
'';
settings = {
auto-optimise-store = true;
allowed-users = [ "root" ];
allowed-users = ["root"];
substituters = [
"https://nix-community.cachix.org"
];
@ -29,7 +33,6 @@ in
trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
};
gc = {
@ -37,7 +40,6 @@ in
dates = "weekly";
options = "--delete-older-than=30d";
};
};
};
}

View file

@ -1,9 +1,12 @@
{ lib, pkgs, config, ... }:
with lib;
let cfg = config.eboskma.var;
in
{
lib,
pkgs,
config,
...
}:
with lib; let
cfg = config.eboskma.var;
in {
options.eboskma.var.mainUser = lib.mkOption {
type = lib.types.str;
default = "erwin";
@ -19,5 +22,4 @@ in
System type
'';
};
}

View file

@ -1,8 +1,12 @@
{ pkgs, config, lib, ... }:
with lib;
let cfg = config.eboskma.sound;
in
{
pkgs,
config,
lib,
...
}:
with lib; let
cfg = config.eboskma.sound;
in {
options.eboskma.sound.enable = mkEnableOption "activate sound settings";
config = mkIf (cfg.enable) {
@ -17,10 +21,10 @@ in
config = {
bluez-monitor.rules = [
{
matches = [{ "device.name" = "~bluez_card.*"; }];
matches = [{"device.name" = "~bluez_card.*";}];
actions = {
"update-props" = {
"bluez5.reconnect-profiles" = [ "hfp_hf" "hsp_hs" "a2dp_sink" ];
"bluez5.reconnect-profiles" = ["hfp_hf" "hsp_hs" "a2dp_sink"];
"bluez5.msbc-support" = true;
"bluez5.sbc-xq-support" = true;
};
@ -28,8 +32,8 @@ in
}
{
matches = [
{ "node.name" = "~bluez_input.*"; }
{ "node.name" = "~bluez_output.*"; }
{"node.name" = "~bluez_input.*";}
{"node.name" = "~bluez_output.*";}
];
actions = {
"node.pause-on-idle" = false;
@ -43,8 +47,8 @@ in
security.rtkit.enable = true;
environment.systemPackages = with pkgs; [ pavucontrol ];
environment.systemPackages = with pkgs; [pavucontrol];
users.extraUsers.${config.eboskma.var.mainUser}.extraGroups = [ "audio" ];
users.extraUsers.${config.eboskma.var.mainUser}.extraGroups = ["audio"];
};
}

View file

@ -1,9 +1,12 @@
{ pkgs, config, lib, ... }:
with lib;
let
cfg = config.eboskma.systemd;
in
{
pkgs,
config,
lib,
...
}:
with lib; let
cfg = config.eboskma.systemd;
in {
options.eboskma.systemd = {
enable = mkEnableOption "activate systemd settings";
};

View file

@ -1,11 +1,11 @@
final: prev: rec {
rofi-wayland = prev.pkgs.callPackage ../pkgs/rofi-wayland { };
nix-plugins = prev.pkgs.callPackage ../pkgs/nix-plugins { };
lunarvim = prev.pkgs.callPackage ../pkgs/lunarvim { };
rofi-wayland = prev.pkgs.callPackage ../pkgs/rofi-wayland {};
nix-plugins = prev.pkgs.callPackage ../pkgs/nix-plugins {};
lunarvim = prev.pkgs.callPackage ../pkgs/lunarvim {};
backscrub = prev.pkgs.callPackage ../pkgs/backscrub
{
inherit (prev.pkgs) gcc cmake opencv curl stdenv git tensorflow-lite flatbuffers;
};
onnx-runtime = prev.pkgs.callPackage ../pkgs/onnx-runtime { inherit (prev.pkgs) stdenv; };
obs-backgroundremoval = prev.pkgs.callPackage ../pkgs/obs-backgroundremoval { inherit (prev.pkgs) stdenv fetchFromGitHub cmake obs-studio opencv onnx-runtime; };
{
inherit (prev.pkgs) gcc cmake opencv curl stdenv git tensorflow-lite flatbuffers;
};
onnx-runtime = prev.pkgs.callPackage ../pkgs/onnx-runtime {inherit (prev.pkgs) stdenv;};
obs-backgroundremoval = prev.pkgs.callPackage ../pkgs/obs-backgroundremoval {inherit (prev.pkgs) stdenv fetchFromGitHub cmake obs-studio opencv onnx-runtime;};
}

View file

@ -1,4 +1,14 @@
{ stdenv, fetchFromGitHub, cmake, opencv, gcc, curl, git, tensorflow-lite, flatbuffers }:
{
stdenv,
fetchFromGitHub,
cmake,
opencv,
gcc,
curl,
git,
tensorflow-lite,
flatbuffers,
}:
stdenv.mkDerivation {
name = "backscrub";
pname = "backscrub";
@ -11,7 +21,7 @@ stdenv.mkDerivation {
sha256 = "14gd77m7dy0wg15y0i8zhki8cm7np2spx7yi162b2xqaav04b1cj";
};
nativeBuildInputs = [ gcc cmake git ];
buildInputs = [ opencv curl tensorflow-lite flatbuffers ];
patches = [ ./fix-cmake-for-nixos.patch ];
nativeBuildInputs = [gcc cmake git];
buildInputs = [opencv curl tensorflow-lite flatbuffers];
patches = [./fix-cmake-for-nixos.patch];
}

View file

@ -1,37 +1,36 @@
{ pkgs, ... }:
with pkgs;
let
nvim-customized = wrapNeovim neovim-unwrapped { };
{pkgs, ...}:
with pkgs; let
nvim-customized = wrapNeovim neovim-unwrapped {};
in
stdenv.mkDerivation rec {
pname = "lunarvim";
version = "0.0.1";
stdenv.mkDerivation rec {
pname = "lunarvim";
version = "0.0.1";
src = fetchFromGitHub {
owner = "LunarVim";
repo = "LunarVim";
rev = "0e531891b1dfd04fa02a22b48ce075120b512277";
sha256 = "0yfr3vh8p1s9wy21s6bgpp6kp6s9pqlb6k66s76sa22vz4sjiyxb";
};
src = fetchFromGitHub {
owner = "LunarVim";
repo = "LunarVim";
rev = "0e531891b1dfd04fa02a22b48ce075120b512277";
sha256 = "0yfr3vh8p1s9wy21s6bgpp6kp6s9pqlb6k66s76sa22vz4sjiyxb";
};
nativeBuildInputs = [ makeWrapper nvim-customized ];
buildInputs = [ nvim-customized ];
nativeBuildInputs = [makeWrapper nvim-customized];
buildInputs = [nvim-customized];
buildPhase = ''
echo "hello"
'';
buildPhase = ''
echo "hello"
'';
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp -r $(pwd) $out/lvim
export shim="$out/lvim/utils/bin/lvim"
substituteInPlace "$shim" \
--replace "exec nvim" "exec ${nvim-customized}/bin/nvim"
chmod +x "$shim"
makeWrapper "$shim" "$out/bin/lvim" \
--set LUNARVIM_RUNTIME_DIR "$out" \
--prefix PATH : ${lib.makeBinPath [ fzf git ripgrep ]}
runHook postInstall
'';
}
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp -r $(pwd) $out/lvim
export shim="$out/lvim/utils/bin/lvim"
substituteInPlace "$shim" \
--replace "exec nvim" "exec ${nvim-customized}/bin/nvim"
chmod +x "$shim"
makeWrapper "$shim" "$out/bin/lvim" \
--set LUNARVIM_RUNTIME_DIR "$out" \
--prefix PATH : ${lib.makeBinPath [fzf git ripgrep]}
runHook postInstall
'';
}

View file

@ -1,5 +1,13 @@
{ lib, stdenv, fetchFromGitHub, nixUnstable, cmake, pkg-config, boost, nlohmann_json }:
{
lib,
stdenv,
fetchFromGitHub,
nixUnstable,
cmake,
pkg-config,
boost,
nlohmann_json,
}:
stdenv.mkDerivation rec {
pname = "nix-plugins";
version = "d0df32b31f3054180741adf5865fd56d6731c572";
@ -11,9 +19,9 @@ stdenv.mkDerivation rec {
sha256 = "sha256-Zbc0iq5ZAr73B+NJvpBHm9GIJhb9qrq0vFmV/ucNT5I=";
};
nativeBuildInputs = [ cmake pkg-config ];
nativeBuildInputs = [cmake pkg-config];
buildInputs = [ nixUnstable boost nlohmann_json ];
buildInputs = [nixUnstable boost nlohmann_json];
meta = {
description = "Collection of miscellaneous plugins for the nix expression language";

View file

@ -1,4 +1,12 @@
{ fetchFromGitHub, stdenv, cmake, obs-studio, opencv, onnx-runtime, git }:
{
fetchFromGitHub,
stdenv,
cmake,
obs-studio,
opencv,
onnx-runtime,
git,
}:
stdenv.mkDerivation rec {
pname = "obs-backgroundremoval";
version = "0.4.0";
@ -10,9 +18,9 @@ stdenv.mkDerivation rec {
sha256 = "TI1FlhE0+JL50gAZCSsI+g8savX8GRQkH3jYli/66hQ=";
};
cmakeFlags = [ "-DGIT_TAG=v${version}" ];
patches = [ ./cmake_set_version.patch ];
cmakeFlags = ["-DGIT_TAG=v${version}"];
patches = [./cmake_set_version.patch];
nativeBuildInputs = [ cmake git ];
buildInputs = [ opencv onnx-runtime obs-studio ];
nativeBuildInputs = [cmake git];
buildInputs = [opencv onnx-runtime obs-studio];
}

View file

@ -1,4 +1,4 @@
{ stdenv }:
{stdenv}:
stdenv.mkDerivation {
pname = "onnx-runtime";
version = "1.7.0";

View file

@ -1,51 +1,51 @@
{ pkgs, ... }:
{pkgs, ...}:
with pkgs;
stdenv.mkDerivation rec {
pname = "rofi-wayland-unwrapped";
version = "1.7.3";
stdenv.mkDerivation rec {
pname = "rofi-wayland-unwrapped";
version = "1.7.3";
src = fetchFromGitHub {
owner = "lbonn";
repo = "rofi";
rev = "${version}+wayland1";
fetchSubmodules = true;
sha256 = "1h6lh4lrkxzs6iy2rzn5g71dnz6qck4j8cxpgy1ja179vrnj1sf7";
};
src = fetchFromGitHub {
owner = "lbonn";
repo = "rofi";
rev = "${version}+wayland1";
fetchSubmodules = true;
sha256 = "1h6lh4lrkxzs6iy2rzn5g71dnz6qck4j8cxpgy1ja179vrnj1sf7";
};
preConfigure = ''
patchShebangs "script"
# root not present in build /etc/passwd
sed -i 's/~root/~nobody/g' test/helper-expand.c
'';
preConfigure = ''
patchShebangs "script"
# root not present in build /etc/passwd
sed -i 's/~root/~nobody/g' test/helper-expand.c
'';
nativeBuildInputs = [ meson ninja pkgconfig ];
buildInputs = with pkgs; [
libxkbcommon
pango
cairo
git
bison
flex
librsvg
check
libstartup_notification
xorg.libxcb
xorg.xcbutil
xorg.xcbutilwm
xcb-util-cursor
xcbutilxrm
which
wayland-protocols
wayland
];
nativeBuildInputs = [meson ninja pkgconfig];
buildInputs = with pkgs; [
libxkbcommon
pango
cairo
git
bison
flex
librsvg
check
libstartup_notification
xorg.libxcb
xorg.xcbutil
xorg.xcbutilwm
xcb-util-cursor
xcbutilxrm
which
wayland-protocols
wayland
];
doCheck = false;
doCheck = false;
meta = with lib; {
description = "Window switcher, run dialog and dmenu replacement";
homepage = "https://github.com/davatorium/rofi";
license = licenses.mit;
maintainers = with maintainers; [ c0deaddict ];
platforms = with platforms; linux;
};
}
meta = with lib; {
description = "Window switcher, run dialog and dmenu replacement";
homepage = "https://github.com/davatorium/rofi";
license = licenses.mit;
maintainers = with maintainers; [c0deaddict];
platforms = with platforms; linux;
};
}

View file

@ -1,9 +1,8 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
users.users.erwin = {
isNormalUser = true;
home = "/home/erwin";
extraGroups = [ "wheel" "adm" "audio" "video" ];
extraGroups = ["wheel" "adm" "audio" "video"];
shell = pkgs.fish;
openssh.authorizedKeys.keyFiles = [
(pkgs.fetchurl {
@ -13,5 +12,5 @@
];
};
nix.settings.allowed-users = [ "erwin" ];
nix.settings.allowed-users = ["erwin"];
}

View file

@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
users.users.root = {
openssh.authorizedKeys.keyFiles = [
(pkgs.fetchurl {