Signed-off-by: unexplrd <unexplrd@linerds.us>
This commit is contained in:
2025-03-26 00:10:37 +02:00
parent 9286d95f0a
commit d9df333e58
6 changed files with 122 additions and 54 deletions

View File

@ -1,8 +1,8 @@
# device-specific setup # device-specific setup
{ {
pkgs, pkgs,
inputs,
config, config,
inputs,
... ...
}: { }: {
imports = with inputs; [ imports = with inputs; [
@ -10,28 +10,30 @@
lix.nixosModules.default lix.nixosModules.default
self.nixosModules.desktop self.nixosModules.desktop
self.nixosModules.system self.nixosModules.system
./hardware-conf.nix ./hardware.nix
./programs.nix ./programs.nix
./stylix.nix ./stylix.nix
./users.nix ./users.nix
./sops.nix
]; ];
desktop = { desktop = {
hyprland.enable = true; niri.enable = true;
# cosmic.enable = true;
}; };
nix = { nix = {
settings.experimental-features = ["nix-command" "flakes"]; channel.enable = false;
daemonCPUSchedPolicy = "idle";
settings = {
experimental-features = ["nix-command" "flakes"];
builders-use-substitutes = true;
};
distributedBuilds = true; distributedBuilds = true;
settings.builders-use-substitutes = true;
buildMachines = [ buildMachines = [
{ {
hostName = "dunamis"; hostName = "dunamis";
sshUser = "remotebuild"; sshUser = "nix-ssh";
system = "x86_64-linux"; system = "x86_64-linux";
sshKey = config.sops.secrets."ssh-private-eldrid-rmbuild".path; sshKey = config.sops.secrets."ssh-eldrid-user".path;
supportedFeatures = ["nixos-test" "big-parallel" "kvm" "benchmark"]; supportedFeatures = ["nixos-test" "big-parallel" "kvm" "benchmark"];
publicHostKey = builtins.readFile "${inputs.mysecrets}/ssh/ssh_host_ed25519_dunamis.base64"; publicHostKey = builtins.readFile "${inputs.mysecrets}/ssh/ssh_host_ed25519_dunamis.base64";
} }
@ -46,10 +48,8 @@
networking = { networking = {
networkmanager.enable = true; networkmanager.enable = true;
hostName = "eldrid"; hostName = "eldrid";
# required for syncthing hosts = {
firewall = { "192.168.1.42" = ["dunamis"];
allowedTCPPorts = [22000];
allowedUDPPorts = [21027 22000];
}; };
}; };
@ -75,6 +75,15 @@
flatpak.enable = true; flatpak.enable = true;
fstrim.enable = true; fstrim.enable = true;
openssh.enable = true; openssh.enable = true;
syncthing.openDefaultPorts = true;
dnscrypt-proxy2 = {
enable = true;
settings = {
require_dnssec = true;
server_names = ["mullvad-doh"];
bootstrap_resolvers = ["9.9.9.11:53" "9.9.9.9:53"];
};
};
}; };
services.scx = { services.scx = {
enable = true; enable = true;

View File

@ -14,17 +14,41 @@ in {
defaultSopsFile = "${secretsPath}/secrets.yaml"; defaultSopsFile = "${secretsPath}/secrets.yaml";
secrets = { secrets = {
"user-password-hashed".neededForUsers = true; "user-password-hashed".neededForUsers = true;
"ssh-private-eldrid-rmbuild" = {};
"ssh-config" = { "ssh-config" = {
path = "/home/user/.ssh/config"; path = "/home/user/.ssh/config";
mode = "0400"; mode = "0400";
owner = "user"; owner = "user";
}; };
"ssh-private-eldrid-user" = { "ssh-eldrid-user" = {
path = "/home/user/.ssh/id_ed25519"; path = "/home/user/.ssh/id_ed25519";
mode = "0400"; mode = "0400";
owner = "user"; owner = "user";
}; };
"ssh-eldrid-user.pub" = {
path = "/home/user/.ssh/id_ed25519.pub";
mode = "0400";
owner = "user";
};
"ssh-unexplrd" = {
path = "/home/user/.ssh/id_unexplrd_ed25519";
mode = "0400";
owner = "user";
};
"ssh-unexplrd.pub" = {
path = "/home/user/.ssh/id_unexplrd_ed25519.pub";
mode = "0400";
owner = "user";
};
"ssh-uni" = {
path = "/home/user/.ssh/id_uni_ed25519";
mode = "0400";
owner = "user";
};
"ssh-uni.pub" = {
path = "/home/user/.ssh/id_uni_ed25519.pub";
mode = "0400";
owner = "user";
};
}; };
}; };
} }

View File

@ -0,0 +1,50 @@
{
pkgs,
inputs,
config,
...
}: {
imports = with inputs; [
stylix.nixosModules.stylix
];
environment.systemPackages = with pkgs; [
nerd-fonts.iosevka
];
stylix = {
enable = true;
base16Scheme = "${pkgs.base16-schemes}/share/themes/nord-light.yaml";
polarity = "light";
cursor = {
package = pkgs.bibata-cursors;
name = "Bibata-Modern-Ice";
size = 24;
};
image = builtins.fetchurl {
url = "https://w.wallhaven.cc/full/e7/wallhaven-e7djlk.png";
name = "wallhaven-e7djlk.png";
sha256 = "1mwvnmflp0z1biyyhfz7mjn7i1nna94n7jyns3na2shbfkaq7i0h";
};
opacity.terminal = 0.9;
fonts = {
sizes = {
applications = 13;
desktop = 14;
popups = 13;
terminal = 15;
};
serif = {
package = pkgs.nerd-fonts.iosevka;
name = "Iosevka Nerd Font Propo";
};
sansSerif = config.stylix.fonts.serif;
monospace = {
package = pkgs.nerd-fonts.iosevka-term;
name = "IosevkaTerm Nerd Font Mono";
};
emoji = {
package = pkgs.noto-fonts-emoji;
name = "Noto Color Emoji";
};
};
};
}

View File

@ -1,28 +1,28 @@
{ {
pkgs, pkgs,
inputs, inputs,
config,
... ...
}: { }: {
imports = [ imports = with inputs; [
inputs.stylix.nixosModules.stylix stylix.nixosModules.stylix
]; ];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
#papirus-icon-theme
nerd-fonts.iosevka nerd-fonts.iosevka
]; ];
stylix = { stylix = {
enable = true; enable = true;
base16Scheme = "${pkgs.base16-schemes}/share/themes/tomorrow.yaml"; base16Scheme = "${pkgs.base16-schemes}/share/themes/nord.yaml";
polarity = "light"; polarity = "dark";
cursor = { cursor = {
package = pkgs.bibata-cursors; package = pkgs.bibata-cursors;
name = "Bibata-Modern-Ice"; name = "Bibata-Modern-Classic";
size = 24; size = 24;
}; };
image = builtins.fetchurl { image = builtins.fetchurl {
url = "https://w.wallhaven.cc/full/d6/wallhaven-d6163o.jpg"; url = "https://w.wallhaven.cc/full/l8/wallhaven-l8l9gq.png";
name = "wallhaven-d6163o"; name = "wallhaven-l8l9gq.png";
sha256 = "c6d298be1520546c0440d64d1073e33a356043e2481a8a67e940d5262c0c2e28"; sha256 = "0ypr44sg0fn55m1b52dgr1nnscpi2p6rfkjsm7vvrdqw7bafbx2z";
}; };
opacity.terminal = 0.9; opacity.terminal = 0.9;
fonts = { fonts = {
@ -36,15 +36,11 @@
package = pkgs.nerd-fonts.iosevka; package = pkgs.nerd-fonts.iosevka;
name = "Iosevka Nerd Font Propo"; name = "Iosevka Nerd Font Propo";
}; };
sansSerif = { sansSerif = config.stylix.fonts.serif;
package = pkgs.nerd-fonts.iosevka;
name = "Iosevka Nerd Font Propo";
};
monospace = { monospace = {
package = pkgs.nerd-fonts.iosevka; package = pkgs.nerd-fonts.iosevka-term;
name = "Iosevka Nerd Font Mono"; name = "IosevkaTerm Nerd Font Mono";
}; };
emoji = { emoji = {
package = pkgs.noto-fonts-emoji; package = pkgs.noto-fonts-emoji;
name = "Noto Color Emoji"; name = "Noto Color Emoji";

View File

@ -1,9 +1,10 @@
{inputs, ...}: { {inputs, ...}: {
imports = [ imports = with inputs; [
inputs.nix-flatpak.homeManagerModules.nix-flatpak nix-flatpak.homeManagerModules.nix-flatpak
]; ];
services.flatpak = { services.flatpak = {
enable = true; enable = true;
uninstallUnmanaged = true;
remotes = [ remotes = [
{ {
name = "flathub"; name = "flathub";
@ -16,17 +17,17 @@
]; ];
packages = [ packages = [
# misc # misc
"io.github.zen_browser.zen" "app.zen_browser.zen"
"net.mullvad.MullvadBrowser" "net.mullvad.MullvadBrowser"
"com.obsproject.Studio" "com.obsproject.Studio"
"com.bitwarden.desktop" "com.bitwarden.desktop"
"com.github.tchx84.Flatseal" "com.github.tchx84.Flatseal"
"de.haeckerfelix.Fragments"
"org.qbittorrent.qBittorrent" "org.qbittorrent.qBittorrent"
# "com.transmissionbt.Transmission" # "com.transmissionbt.Transmission"
"com.usebottles.bottles" "com.usebottles.bottles"
"com.logseq.Logseq" "com.logseq.Logseq"
"io.github.martchus.syncthingtray"
# chatting # chatting
"org.signal.Signal" "org.signal.Signal"
@ -36,7 +37,7 @@
"org.mozilla.Thunderbird" "org.mozilla.Thunderbird"
# media # media
"org.atheme.audacious" "io.bassi.Amberol"
"io.freetubeapp.FreeTube" "io.freetubeapp.FreeTube"
#"io.github.celluloid_player.Celluloid" #"io.github.celluloid_player.Celluloid"
# "io.mpv.Mpv" # "io.mpv.Mpv"
@ -58,38 +59,29 @@
Context = { Context = {
sockets = ["wayland" "!x11" "!fallback-x11"]; sockets = ["wayland" "!x11" "!fallback-x11"];
filesystems = [ filesystems = [
"!host"
"!home"
"!~/.ssh"
"xdg-run/pipewire-0" "xdg-run/pipewire-0"
"xdg-config/gtk-3.0:ro" "xdg-config/gtk-3.0:ro"
"xdg-config/gtk-4.0:ro" "xdg-config/gtk-4.0:ro"
# "~/.local/share/fonts:ro"
"~/.local/share/icons:ro" "~/.local/share/icons:ro"
# "~/.nix-profile/share/icons:ro"
# "~/.nix-profile/share/fonts:ro"
"/nix/store:ro" "/nix/store:ro"
]; ];
}; };
Environment = { Environment = {
XCURSOR_PATH = "/run/host/user-share/icons:/run/host/share/icons";
ELECTRON_OZONE_PLATFORM_HINT = "wayland"; ELECTRON_OZONE_PLATFORM_HINT = "wayland";
#GTK_THEME = "adw-gtk3";
}; };
}; };
"io.github.martchus.syncthingtray".Context.filesystems = ["/storage/games/heroic/Factorio/game/saves"];
"org.octave.Octave".Context.sockets = ["x11"];
"org.octave.Octave".Environment = {QT_QPA_PLATFORM = "xcb";};
"com.valvesoftware.Steam" = { "com.valvesoftware.Steam" = {
Context = { Context = {
sockets = ["x11" "wayland"]; sockets = ["x11" "wayland"];
filesystems = ["/storage/games/steam"]; filesystems = ["/storage/games/steam"];
}; };
Environment = { Environment.STEAM_FORCE_DESKTOPUI_SCALING = "1.3";
STEAM_FORCE_DESKTOPUI_SCALING = "1.3";
};
}; };
"org.signal.Signal" = { "org.signal.Signal" = {
Environment = { Environment.SIGNAL_PASSWORD_STORE = "gnome-libsecret";
SIGNAL_PASSWORD_STORE = "gnome-libsecret";
};
}; };
"net.lutris.Lutris".Context = { "net.lutris.Lutris".Context = {
sockets = ["x11" "wayland"]; sockets = ["x11" "wayland"];
@ -100,10 +92,7 @@
filesystems = ["/storage/games/heroic" "~/games/heroic"]; filesystems = ["/storage/games/heroic" "~/games/heroic"];
}; };
"com.usebottles.Bottles" = { "com.usebottles.Bottles" = {
Context = { Context.sockets = ["x11" "wayland"];
sockets = ["x11" "wayland"];
filesystems = ["/home/user/docs/nure/tex-template/assets/BridgeKSG"];
};
}; };
}; };
}; };