This commit is contained in:
Erwin Boskma 2022-03-18 21:14:51 +01:00
parent 87e99d61cf
commit f5f5322622
Signed by: erwin
GPG key ID: 270B20D17394F7E5
13 changed files with 128 additions and 109 deletions

View file

@ -151,12 +151,12 @@
"rev": "bbef9ba8195a85022a5aa19a988872b6b7036836", "rev": "bbef9ba8195a85022a5aa19a988872b6b7036836",
"revCount": 21, "revCount": 21,
"type": "git", "type": "git",
"url": "ssh://git@git.datarift.nl/erwin/ha-now-playing.git" "url": "https://git.datarift.nl/erwin/ha-now-playing.git"
}, },
"original": { "original": {
"ref": "main", "ref": "main",
"type": "git", "type": "git",
"url": "ssh://git@git.datarift.nl/erwin/ha-now-playing.git" "url": "https://git.datarift.nl/erwin/ha-now-playing.git"
} }
}, },
"home-manager": { "home-manager": {
@ -319,12 +319,12 @@
"rev": "7c037fef4cdc5933a70694d8c743b5439c8354ea", "rev": "7c037fef4cdc5933a70694d8c743b5439c8354ea",
"revCount": 4, "revCount": 4,
"type": "git", "type": "git",
"url": "ssh://git@git.datarift.nl/erwin/pamedia-rs.git" "url": "https://git.datarift.nl/erwin/pamedia-rs.git"
}, },
"original": { "original": {
"ref": "main", "ref": "main",
"type": "git", "type": "git",
"url": "ssh://git@git.datarift.nl/erwin/pamedia-rs.git" "url": "https://git.datarift.nl/erwin/pamedia-rs.git"
} }
}, },
"pybind11-stubgen-src": { "pybind11-stubgen-src": {

View file

@ -54,7 +54,7 @@
}; };
ha-now-playing = { ha-now-playing = {
url = "git+ssh://git@git.datarift.nl/erwin/ha-now-playing.git?ref=main"; url = "git+https://git.datarift.nl/erwin/ha-now-playing.git?ref=main";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
inputs.utils.follows = "flake-utils"; inputs.utils.follows = "flake-utils";
inputs.naersk.follows = "naersk"; inputs.naersk.follows = "naersk";
@ -62,7 +62,7 @@
}; };
pamedia = { pamedia = {
url = "git+ssh://git@git.datarift.nl/erwin/pamedia-rs.git?ref=main"; url = "git+https://git.datarift.nl/erwin/pamedia-rs.git?ref=main";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
inputs.utils.follows = "flake-utils"; inputs.utils.follows = "flake-utils";
inputs.naersk.follows = "naersk"; inputs.naersk.follows = "naersk";
@ -150,11 +150,11 @@
# }; # };
nixosModules = builtins.listToAttrs (map nixosModules = builtins.listToAttrs (map
(x: { (x: {
name = x; name = x;
value = import (./modules + "/${x}"); value = import (./modules + "/${x}");
}) })
(builtins.attrNames (builtins.readDir ./modules))); (builtins.attrNames (builtins.readDir ./modules)));
nixosConfigurations = { nixosConfigurations = {
vm1 = defSystem "x86_64-linux" { vm1 = defSystem "x86_64-linux" {

View file

@ -7,11 +7,11 @@
with lib; let with lib; let
cfg = config.eboskma.programs.alacritty; cfg = config.eboskma.programs.alacritty;
importYAML = name: yamlFile: (lib.importJSON ((pkgs.runCommandNoCC name {} '' importYAML = name: yamlFile: (lib.importJSON ((pkgs.runCommandNoCC name {} ''
mkdir -p $out mkdir -p $out
${pkgs.yaml2json}/bin/yaml2json < ${yamlFile} | ${pkgs.jq}/bin/jq -a '.' > $out/tmp.json ${pkgs.yaml2json}/bin/yaml2json < ${yamlFile} | ${pkgs.jq}/bin/jq -a '.' > $out/tmp.json
'') '')
.outPath .outPath
+ "/tmp.json")); + "/tmp.json"));
theme = importYAML "theme" (builtins.fetchurl { theme = importYAML "theme" (builtins.fetchurl {
url = "https://raw.githubusercontent.com/dracula/alacritty/05faff15c0158712be87d200081633d9f4850a7d/dracula.yml"; url = "https://raw.githubusercontent.com/dracula/alacritty/05faff15c0158712be87d200081633d9f4850a7d/dracula.yml";
sha256 = "1366rvvni2shbqlcrbypjv4f7p7ccdr6bvr685jnj8ipwqjjb6rn"; sha256 = "1366rvvni2shbqlcrbypjv4f7p7ccdr6bvr685jnj8ipwqjjb6rn";

View file

@ -21,5 +21,11 @@ in {
# emacsPackage = pkgs.emacs-nox; # emacsPackage = pkgs.emacs-nox;
# doomPrivateDir = ./doom.d; # doomPrivateDir = ./doom.d;
# }; # };
home.packages = with pkgs; [
(texlive.combine {
inherit (texlive) scheme-small wrapfig ulem capt-of;
})
];
}; };
} }

View file

@ -24,20 +24,26 @@ with lib; let
nonDefaultDesktop = pkgs.makeDesktopItem { nonDefaultDesktop = pkgs.makeDesktopItem {
name = name =
"firefox-" "firefox-"
+ (if cfg.work + (
then "private" if cfg.work
else "horus"); then "private"
else "horus"
);
desktopName = desktopName =
"Firefox (" "Firefox ("
+ (if cfg.work + (
then "Private" if cfg.work
else "Horus") then "Private"
else "Horus"
)
+ ")"; + ")";
exec = exec =
"firefox -P " "firefox -P "
+ (if cfg.work + (
then "private" if cfg.work
else "horus") then "private"
else "horus"
)
+ " %u"; + " %u";
icon = "firefox"; icon = "firefox";
categories = ["GNOME" "GTK" "Network" "WebBrowser"]; categories = ["GNOME" "GTK" "Network" "WebBrowser"];

View file

@ -257,7 +257,7 @@ in {
xwayland = true; xwayland = true;
systemdIntegration = false; systemdIntegration = true;
}; };
home = { home = {

View file

@ -28,6 +28,7 @@ in {
denoland.vscode-deno denoland.vscode-deno
# dlasagno.rasi # dlasagno.rasi
# dprint.dprint # dprint.dprint
eamodio.gitlens
editorconfig.editorconfig editorconfig.editorconfig
esbenp.prettier-vscode esbenp.prettier-vscode
# EugenWiens.bitbake # EugenWiens.bitbake

View file

@ -23,7 +23,7 @@ let
pkgs.krops.writeCommand "deploy-${name}" { pkgs.krops.writeCommand "deploy-${name}" {
inherit command; inherit command;
source = source name; source = source name;
target = target; target = lib.mkTarget target;
}; };
in rec { in rec {
# Deployments # Deployments

View file

@ -60,6 +60,7 @@ in {
nix-template nix-template
nvd nvd
usbutils usbutils
zip
]; ];
services.udev = { services.udev = {

View file

@ -252,6 +252,7 @@ in {
dbus.packages = [pkgs.gcr]; dbus.packages = [pkgs.gcr];
avahi.publish.workstation = true; avahi.publish.workstation = true;
gvfs.enable = true; gvfs.enable = true;
pcscd.enable = true;
}; };
security = { security = {
@ -269,21 +270,23 @@ in {
pki.certificates = [(builtins.readFile ./horus-ca.pem)]; pki.certificates = [(builtins.readFile ./horus-ca.pem)];
}; };
environment.sessionVariables = { environment = {
_JAVA_AWT_WM_NONREPARENTING = "1"; sessionVariables = {
MOZ_ENABLE_WAYLAND = "1"; _JAVA_AWT_WM_NONREPARENTING = "1";
MOZ_DBUS_REMOTE = "1"; MOZ_ENABLE_WAYLAND = "1";
QT_QPA_PLATFORM = "wayland"; MOZ_DBUS_REMOTE = "1";
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; QT_QPA_PLATFORM = "wayland";
QT_QPA_PLATFORMTHEME = "qt5ct"; QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
SDL_VIDEODRIVER = "wayland"; QT_QPA_PLATFORMTHEME = "qt5ct";
SSH_AUTH_SOCK = ''''${XDG_RUNTIME_DIR}/gnupg/S.gpg-agent.ssh''; SDL_VIDEODRIVER = "wayland";
AMD_VULKAN_ICD = "RADV"; SSH_AUTH_SOCK = ''''${XDG_RUNTIME_DIR}/gnupg/S.gpg-agent.ssh'';
# NIXOS_OZONE_WL = "1"; AMD_VULKAN_ICD = "RADV";
}; # NIXOS_OZONE_WL = "1";
};
environment.etc = { etc = {
"X11/xkb".source = "${pkgs.xkeyboard_config}/etc/X11/xkb"; "X11/xkb".source = "${pkgs.xkeyboard_config}/etc/X11/xkb";
};
}; };
}; };
} }

View file

@ -11,58 +11,59 @@ in {
enable = mkEnableOption "enable greetd"; enable = mkEnableOption "enable greetd";
}; };
config = mkIf (cfg.enable) config =
{ mkIf (cfg.enable)
services.greetd = { {
enable = true; services.greetd = {
restart = true; enable = true;
settings = { restart = true;
default_session = { settings = {
command = "${pkgs.sway}/bin/sway --config /etc/greetd/sway-config"; 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 = { environment.etc = {
"greetd/sway-config" = { "greetd/sway-config" = {
text = '' text = ''
# `-l` activates layer-shell mode. Notice that `swaymsg exit` will run after gtkgreet. # `-l` activates layer-shell mode. Notice that `swaymsg exit` will run after gtkgreet.
exec "${pkgs.greetd.gtkgreet}/bin/gtkgreet -l; swaymsg exit" exec "${pkgs.greetd.gtkgreet}/bin/gtkgreet -l; swaymsg exit"
bindsym Mod4+shift+e exec swaynag \ bindsym Mod4+shift+e exec swaynag \
-t warning \ -t warning \
-m 'What do you want to do?' \ -m 'What do you want to do?' \
-b 'Poweroff' 'systemctl poweroff' \ -b 'Poweroff' 'systemctl poweroff' \
-b 'Reboot' 'systemctl reboot' -b 'Reboot' 'systemctl reboot'
include /etc/sway/config.d/* include /etc/sway/config.d/*
''; '';
user = "greeter"; user = "greeter";
group = "greeter"; group = "greeter";
}; };
"greetd/environments" = { "greetd/environments" = {
text = '' text = ''
${pkgs.sway}/bin/sway ${pkgs.sway}/bin/sway
${pkgs.bash}/bin/bash ${pkgs.bash}/bin/bash
''; '';
user = "greeter"; user = "greeter";
group = "greeter"; group = "greeter";
}; };
"sway/config.d/systemd-env.conf" = { "sway/config.d/systemd-env.conf" = {
text = '' 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 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 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" = { "xdg/gtk-3.0/settings.ini" = {
text = generators.toINI {} { text = generators.toINI {} {
Settings = { Settings = {
gtk-theme-name = "Arc-Dark"; gtk-theme-name = "Arc-Dark";
gtk-icon-theme-name = "Papirus-Dark"; gtk-icon-theme-name = "Papirus-Dark";
gtk-cursor-theme-name = "Quintom_Ink"; gtk-cursor-theme-name = "Quintom_Ink";
gtk-application-prefer-dark-theme = "true"; gtk-application-prefer-dark-theme = "true";
};
}; };
}; };
}; };
}; };
};
} }

View file

@ -25,28 +25,28 @@ in {
networking = { networking = {
networkmanager.enable = true; networkmanager.enable = true;
interfaces = listToAttrs (builtins.map interfaces = listToAttrs (builtins.map
(iface: { (iface: {
name = iface; name = iface;
value = {useDHCP = true;}; value = {useDHCP = true;};
}) })
cfg.dhcpInterfaces); cfg.dhcpInterfaces);
hosts = cfg.hosts; hosts = cfg.hosts;
firewall = { firewall = {
trustedInterfaces = ["lo"]; trustedInterfaces = ["lo"];
interfaces = listToAttrs (builtins.map interfaces = listToAttrs (builtins.map
(iface: { (iface: {
name = iface; name = iface;
value = { value = {
allowedTCPPorts = [ allowedTCPPorts = [
# Horus System V2 # Horus System V2
12345 12345
5555 5555
5556 5556
]; ];
}; };
}) })
cfg.dhcpInterfaces); cfg.dhcpInterfaces);
}; };
}; };
users.extraUsers.${config.eboskma.var.mainUser}.extraGroups = ["networkmanager"]; users.extraUsers.${config.eboskma.var.mainUser}.extraGroups = ["networkmanager"];

View file

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