Merge remote-tracking branch 'refs/remotes/origin/main'

This commit is contained in:
unexplrd
2025-03-02 22:50:07 +02:00
16 changed files with 125 additions and 23 deletions

View File

@ -39,7 +39,7 @@
url = "github:abenz1267/walker"; url = "github:abenz1267/walker";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
mysecrets.url = "path:/home/user/nix-secrets"; mysecrets.url = "git+ssh://gitea@gitea.linerds.us/unexplrd/nix-secrets";
mysecrets.flake = false; mysecrets.flake = false;
}; };

View File

@ -2,6 +2,7 @@
{ {
pkgs, pkgs,
inputs, inputs,
config,
... ...
}: { }: {
imports = with inputs; [ imports = with inputs; [
@ -13,13 +14,29 @@
./programs.nix ./programs.nix
./stylix.nix ./stylix.nix
./users.nix ./users.nix
./sops.nix
]; ];
desktop = { desktop = {
hyprland.enable = true; hyprland.enable = true;
}; };
nix.settings.experimental-features = ["nix-command" "flakes"]; nix = {
settings.experimental-features = ["nix-command" "flakes"];
distributedBuilds = true;
settings.builders-use-substitutes = true;
buildMachines = [
{
hostName = "dunamis";
sshUser = "remotebuild";
system = "x86_64-linux";
sshKey = config.sops.secrets."ssh-private-eldrid-rmbuild".path;
supportedFeatures = ["nixos-test" "big-parallel" "kvm" "benchmark"];
publicHostKey = builtins.readFile "${inputs.mysecrets}/ssh/ssh_host_ed25519_dunamis.base64";
}
];
};
system.stateVersion = "25.05"; system.stateVersion = "25.05";
time.timeZone = "Europe/Kyiv"; time.timeZone = "Europe/Kyiv";

View File

@ -10,8 +10,9 @@
clean.extraArgs = "--keep-since 7d --keep 3"; clean.extraArgs = "--keep-since 7d --keep 3";
flake = "/home/user/.config/nixos"; flake = "/home/user/.config/nixos";
}; };
programs.fish.enable = true;
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
helix helix
nushell # nushell
]; ];
} }

25
hosts/eldrid/sops.nix Normal file
View File

@ -0,0 +1,25 @@
{inputs, ...}: let
secretsPath = builtins.toString inputs.mysecrets;
in {
imports = [
inputs.sops-nix.nixosModules.sops
];
sops = {
age = {
sshKeyPaths = ["/etc/ssh/ssh_host_ed25519_key"];
keyFile = "/var/lib/sops-nix/key.txt";
generateKey = true;
};
defaultSopsFile = "${secretsPath}/secrets.yaml";
secrets = {
"user-password-hashed" = {};
"ssh-private-eldrid-rmbuild" = {};
"ssh-private-eldrid-user" = {
path = "/home/user/.ssh/id_ed25519";
mode = "0400";
owner = "user";
};
};
};
}

View File

@ -12,14 +12,18 @@
]; ];
stylix = { stylix = {
enable = true; enable = true;
base16Scheme = "${pkgs.base16-schemes}/share/themes/helios.yaml"; base16Scheme = "${pkgs.base16-schemes}/share/themes/tomorrow-night.yaml";
polarity = "dark"; polarity = "dark";
cursor = { cursor = {
package = pkgs.google-cursor; package = pkgs.google-cursor;
name = "GoogleDot-Blue"; name = "GoogleDot-Blue";
size = 24; size = 24;
}; };
image = ../../wallpapers/wallhaven-d5qlwj.jpg; image = builtins.fetchurl {
url = "https://w.wallhaven.cc/full/9m/wallhaven-9mwzwk.jpg";
name = "wallhaven-9mwzwk";
sha256 = "0pj2k30mfhqr02dzdj40z62awmy58s5gg5mm4xzxiialclbd5n8d";
};
opacity.terminal = 0.9; opacity.terminal = 0.9;
fonts = { fonts = {
sizes = { sizes = {

View File

@ -4,7 +4,7 @@
user = { user = {
isNormalUser = true; isNormalUser = true;
extraGroups = ["wheel" "video" "libvirtd" "dialout"]; extraGroups = ["wheel" "video" "libvirtd" "dialout"];
shell = pkgs.nushell; shell = pkgs.fish;
}; };
# work = { # work = {
# isNormalUser = true; # isNormalUser = true;

View File

@ -1,6 +1,6 @@
{pkgs, ...}: { {pkgs, ...}: {
shell = { shell = {
nushell.enable = true; fish.enable = true;
oh-my-posh.enable = true; oh-my-posh.enable = true;
}; };

View File

@ -13,6 +13,7 @@
./programs.nix ./programs.nix
./stylix.nix ./stylix.nix
./users.nix ./users.nix
./sops.nix
]; ];
desktop = { desktop = {

View File

@ -69,6 +69,10 @@
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
services.thermald.enable = true;
services.upower.enable = true;
powerManagement.powertop.enable = true;
services.udev.extraHwdb = '' services.udev.extraHwdb = ''
evdev:input:b0011v0001p0001eAB83* evdev:input:b0011v0001p0001eAB83*
KEYBOARD_KEY_d5=sysrq KEYBOARD_KEY_d5=sysrq

24
hosts/sarien/sops.nix Normal file
View File

@ -0,0 +1,24 @@
{inputs, ...}: let
secretsPath = builtins.toString inputs.mysecrets;
in {
imports = [
inputs.sops-nix.nixosModules.sops
];
sops = {
age = {
sshKeyPaths = ["/etc/ssh/ssh_host_ed25519_key"];
keyFile = "/var/lib/sops-nix/key.txt";
generateKey = true;
};
defaultSopsFile = "${secretsPath}/secrets.yaml";
secrets = {
"user-password-hashed" = {};
"ssh-private-sarien-user" = {
path = "/home/user/.ssh/id_ed25519";
mode = "0400";
owner = "user";
};
};
};
}

View File

@ -12,7 +12,7 @@
]; ];
stylix = { stylix = {
enable = true; enable = true;
base16Scheme = "${pkgs.base16-schemes}/share/themes/onedark.yaml"; base16Scheme = "${pkgs.base16-schemes}/share/themes/tomorrow-night.yaml";
polarity = "dark"; polarity = "dark";
cursor = { cursor = {
package = pkgs.google-cursor; package = pkgs.google-cursor;
@ -20,10 +20,10 @@
size = 24; size = 24;
}; };
image = builtins.fetchurl { image = builtins.fetchurl {
url = "https://w.wallhaven.cc/full/57/wallhaven-573e81.png"; url = "https://w.wallhaven.cc/full/9m/wallhaven-9mwzwk.jpg";
name = "wallhaven-573e81"; name = "wallhaven-9mwzwk";
sha256 = "1ygsmmzk6icnvkr18s2r3mqh2kmigwb1424chji730cjhm8zc3cx"; sha256 = "0pj2k30mfhqr02dzdj40z62awmy58s5gg5mm4xzxiialclbd5n8d";
}; # ../../wallpapers/wallhaven-jxmo1y.jpg; };
opacity.terminal = 0.9; opacity.terminal = 0.9;
fonts = { fonts = {
sizes = { sizes = {

View File

@ -1,15 +1,24 @@
{pkgs, ...}: { {
inputs,
config,
pkgs,
...
}: let
sopSec = config.sops.secrets;
secrets = inputs.mysecrets;
in {
nix.settings.trusted-users = ["user"]; nix.settings.trusted-users = ["user"];
users.mutableUsers = false;
users.users = { users.users = {
user = { user = {
hashedPasswordFile = sopSec."user-password-hashed".path;
isNormalUser = true; isNormalUser = true;
extraGroups = ["wheel" "video" "libvirtd" "dialout"]; extraGroups = ["wheel" "video" "libvirtd" "dialout"];
shell = pkgs.fish; shell = pkgs.fish;
openssh.authorizedKeys.keyFiles = [
"${secrets}/ssh/id_ed25519_sarien_user.pub"
"${secrets}/ssh/id_ed25519_eldrid_user.pub"
];
}; };
# work = {
# isNormalUser = true;
# extraGroups = ["video"];
# shell = pkgs.nushell;
# };
}; };
} }

View File

@ -4,6 +4,7 @@
]; ];
services.flatpak = { services.flatpak = {
enable = true; enable = true;
uninstallUnmanaged = true;
remotes = [ remotes = [
{ {
name = "flathub"; name = "flathub";

View File

@ -1,5 +1,6 @@
{inputs, ...}: { {inputs, ...}: {
imports = with inputs; [ imports = with inputs; [
nix-index-database.hmModules.nix-index
self.homeModules.desktop self.homeModules.desktop
self.homeModules.programs self.homeModules.programs
./programs.nix ./programs.nix

View File

@ -7,6 +7,7 @@
console.yazi.enable = true; console.yazi.enable = true;
stylix.targets.fzf.enable = false;
programs = { programs = {
bat.enable = true; bat.enable = true;
btop = { btop = {
@ -15,7 +16,13 @@
}; };
eza.enable = true; eza.enable = true;
fd.enable = true; fd.enable = true;
fzf.enable = true; fzf = {
enable = true;
defaultOptions = ["--color=16"];
};
pay-respects.enable = true;
nix-index.enable = true;
nix-index-database.comma.enable = true;
gitui.enable = true; gitui.enable = true;
git = { git = {
enable = true; enable = true;
@ -38,6 +45,7 @@
editor = { editor = {
helix.enable = true; helix.enable = true;
neve.enable = true; neve.enable = true;
zed.enable = true;
}; };
home.packages = with pkgs; [ home.packages = with pkgs; [
@ -45,14 +53,16 @@
flatpak # flatpak cli flatpak # flatpak cli
trashy # trash cli trashy # trash cli
procs # ps in rust procs # ps in rust
ouch # archive manager in runt
dust # du in rust dust # du in rust
fend # calc in rust fend # calc in rust
moar # better pager
tree # tree util tree # tree util
rbw # bitwarden cli in rust rbw # bitwarden cli in rust
zip # zip util pinentry-qt # pinentry for rbw
vial # qmk keyboard configuring app vial # qmk keyboard configuring app
unzip # unzip util
waycheck # check wayland protocols waycheck # check wayland protocols
virt-manager # libvirt gui virt-manager # libvirt gui
]; ];
systemd.user.settings.Manager.DefaultEnvironment.PAGER = "moar";
} }

View File

@ -37,7 +37,10 @@ in {
settings = { settings = {
input = { input = {
kb_layout = "us,ua"; kb_layout = "us,ua";
resolve_binds_by_sym = 0; resolve_binds_by_sym =
if hostname == "dunamis"
then 1
else 0;
repeat_rate = 50; repeat_rate = 50;
repeat_delay = 300; repeat_delay = 300;
# mouse # mouse
@ -157,6 +160,8 @@ in {
scroller = { scroller = {
column_widths = "onethird onehalf twothirds one"; column_widths = "onethird onehalf twothirds one";
window_heights = "onethird onehalf twothirds one"; window_heights = "onethird onehalf twothirds one";
gesture_scroll_fingers = 3;
gesture_overview_fingers = 3;
jump_labels_font = "${config.stylix.fonts.sansSerif.name}"; jump_labels_font = "${config.stylix.fonts.sansSerif.name}";
jump_labels_color = "0xff${config.lib.stylix.colors.base0A}"; jump_labels_color = "0xff${config.lib.stylix.colors.base0A}";
}; };
@ -364,7 +369,7 @@ in {
"$mod ALT, mouse:272, resizewindow" "$mod ALT, mouse:272, resizewindow"
]; ];
gestures = { gestures = {
workspace_swipe = true; workspace_swipe = false;
workspace_swipe_fingers = 3; workspace_swipe_fingers = 3;
workspace_swipe_distance = 300; workspace_swipe_distance = 300;
}; };