Add syncthing base

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2024-07-08 15:56:42 +03:00
parent 47325206d0
commit 9dfbe1203d
103 changed files with 1285 additions and 951 deletions

View File

@@ -7,7 +7,5 @@
};
};
environment.persistence."/persist".directories = [
"/var/lib/bluetooth"
];
environment.persistence."/persist".directories = [ "/var/lib/bluetooth" ];
}

View File

@@ -1,5 +1,4 @@
{ pkgs, ... }:
{
boot = {
loader = {
@@ -14,6 +13,9 @@
initrd.systemd.enable = true;
kernelPackages = pkgs.linuxPackages_latest;
supportedFilesystems = [ "btrfs" "ntfs" ];
supportedFilesystems = [
"btrfs"
"ntfs"
];
};
}

View File

@@ -1,12 +1,16 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
{
environment.systemPackages = with pkgs; [ brightnessctl ];
services.udev.extraRules =
let
chgrp = "${pkgs.coreutils-full}/bin/chgrp";
chmod = "${pkgs.coreutils-full}/bin/chmod";
chgrp = "${pkgs.coreutils}/bin/chgrp";
chmod = "${pkgs.coreutils}/bin/chmod";
in
''
ACTION=="add", SUBSYSTEM=="backlight", RUN+="${chgrp} video /sys/class/backlight/%k/brightness"
@@ -17,8 +21,9 @@
users.groups =
let
members = builtins.attrNames
(lib.attrsets.filterAttrs (_: config: config.isNormalUser) config.users.users);
members = builtins.attrNames (
lib.attrsets.filterAttrs (_: config: config.isNormalUser) config.users.users
);
in
{
video.members = members;

View File

@@ -1,5 +1,4 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [ btop ];
}

View File

@@ -1,5 +1,4 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [ fastfetch ];
}

View File

@@ -1,5 +1,4 @@
{ config, lib, ... }:
{
services.getty.extraArgs = lib.mkIf (config.services.getty.autologinUser != null) [
"--skip-login"

View File

@@ -1,3 +1 @@
{
programs.gnupg.agent.enable = true;
}
{ programs.gnupg.agent.enable = true; }

View File

@@ -1,7 +1,5 @@
{
networking.networkmanager.enable = true;
environment.persistence."/persist".directories = [
"/etc/NetworkManager/system-connections"
];
environment.persistence."/persist".directories = [ "/etc/NetworkManager/system-connections" ];
}

View File

@@ -1,10 +1,12 @@
{ inputs, ... }:
{
nix = {
settings = {
use-xdg-base-directories = true;
experimental-features = [ "nix-command" "flakes" ];
experimental-features = [
"nix-command"
"flakes"
];
};
registry.self.flake = inputs.self;

View File

@@ -1,5 +1,4 @@
{ inputs, pkgs, ... }:
{
imports = [ inputs.impermanence.nixosModules.impermanence ];
@@ -39,8 +38,6 @@
"/var/lib/systemd/coredump"
"/var/log"
];
files = [
"/etc/machine-id"
];
files = [ "/etc/machine-id" ];
};
}

View File

@@ -8,10 +8,12 @@
pulse.enable = true;
jack.enable = true;
extraConfig.pipewire-pulse = {
pulse.cmd = [{
cmd = "load-module";
args = "module-switch-on-connect";
}];
pulse.cmd = [
{
cmd = "load-module";
args = "module-switch-on-connect";
}
];
};
};
}

View File

@@ -1,5 +1,4 @@
{ pkgs, ... }:
{
boot = {
plymouth =
@@ -9,9 +8,7 @@
{
enable = true;
inherit theme;
themePackages = with pkgs; [
(adi1090x-plymouth-themes.override { selected_themes = [ theme ]; })
];
themePackages = with pkgs; [ (adi1090x-plymouth-themes.override { selected_themes = [ theme ]; }) ];
};
initrd.verbose = false;

View File

@@ -1,5 +1,4 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [ ranger ];
}

View File

@@ -1,5 +1,4 @@
{ inputs, pkgs, ... }:
{
imports = [ inputs.sops-nix.nixosModules.sops ];

View File

@@ -1,5 +1,4 @@
{ inputs, ... }:
{
system = {
autoUpgrade = {

View File

@@ -1,5 +1,4 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [ tree ];
}

View File

@@ -1,5 +1,4 @@
{ pkgs, ... }:
{
users = {
mutableUsers = false;

View File

@@ -1,11 +1,10 @@
{ pkgs, ... }:
{
environment.systemPackages = [
(pkgs.writeShellApplication {
name = "nix-cleanup";
runtimeInputs = with pkgs; [
coreutils-full
coreutils
util-linux
findutils
btrfs-progs

View File

@@ -1,9 +1,16 @@
{ config, inputs, lib, pkgs, ... }:
{
config,
inputs,
lib,
pkgs,
...
}:
{
imports = [
inputs.disko.nixosModules.disko
(import ../format.nix { device = "/dev/disk/by-id/nvme-SAMSUNG_MZVL22T0HBLB-00BL2_S64RNE0R602762"; })
(import ../format.nix {
device = "/dev/disk/by-id/nvme-SAMSUNG_MZVL22T0HBLB-00BL2_S64RNE0R602762";
})
./hardware-configuration.nix
../.
];
@@ -58,31 +65,38 @@
};
boot = {
kernelParams = [ "amd_pstate=active" "video=eDP-1:2560x1600@165" ];
kernelParams = [
"amd_pstate=active"
"video=eDP-1:2560x1600@165"
];
initrd.kernelModules = [ "amdgpu" ];
};
home-manager.sharedModules = lib.mkIf config.programs.hyprland.enable [{
wayland.windowManager.hyprland.settings = {
monitor = "eDP-1, 2560x1600@165, 0x0, 1.25";
env = [ "WLR_DRM_DEVICES,$HOME/.config/hypr/card" ];
device = [{
name = "syna2ba6:00-06cb:ce44-touchpad";
sensitivity = 0.5;
}];
gestures.workspace_swipe_distance = 600;
};
home-manager.sharedModules = lib.mkIf config.programs.hyprland.enable [
{
wayland.windowManager.hyprland.settings = {
monitor = "eDP-1, 2560x1600@165, 0x0, 1.25";
env = [ "WLR_DRM_DEVICES,$HOME/.config/hypr/card" ];
device = [
{
name = "syna2ba6:00-06cb:ce44-touchpad";
sensitivity = 0.5;
}
];
gestures.workspace_swipe_distance = 600;
};
programs = {
zsh.loginExtra = lib.mkBefore (builtins.readFile ./card.sh);
# VSCode does not play well with fractional scaling
vscode.userSettings."window.zoomLevel" = (1.25 - 1) / 0.2;
};
programs = {
zsh.loginExtra = lib.mkBefore (builtins.readFile ./card.sh);
# VSCode does not play well with fractional scaling
vscode.userSettings."window.zoomLevel" = (1.25 - 1) / 0.2;
};
theme = {
cursor.size = 24;
};
}];
theme = {
cursor.size = 24;
};
}
];
nixpkgs.config = {
cudaSupport = true;

View File

@@ -1,10 +1,13 @@
{ lib, modulesPath, ... }:
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot = {
initrd.availableKernelModules = [ "nvme" "ahci" "usbhid" ];
initrd.availableKernelModules = [
"nvme"
"ahci"
"usbhid"
];
kernelModules = [ "kvm-amd" ];
};

View File

@@ -4,5 +4,6 @@
(import ../../users/nick { autologin = true; })
];
sops.defaultSopsFile = ./secrets/secrets.yaml;
time.timeZone = "Europe/Athens";
}

View File

@@ -1,5 +1,7 @@
{ device ? throw "device argument is required", ... }:
{
device ? throw "device argument is required",
...
}:
{
disko.devices = {
disk.main = {
@@ -49,15 +51,24 @@
};
"@persist" = {
mountpoint = "/persist";
mountOptions = [ "compress=zstd" "noatime" ];
mountOptions = [
"compress=zstd"
"noatime"
];
};
"@nix" = {
mountpoint = "/nix";
mountOptions = [ "compress=zstd" "noatime" ];
mountOptions = [
"compress=zstd"
"noatime"
];
};
"@cache" = {
mountpoint = "/cache";
mountOptions = [ "compress=zstd" "noatime" ];
mountOptions = [
"compress=zstd"
"noatime"
];
};
};
};

View File

@@ -1,5 +1,9 @@
{ config, inputs, lib, ... }:
{
config,
inputs,
lib,
...
}:
{
imports = [
inputs.disko.nixosModules.disko
@@ -17,5 +21,7 @@
fsType = "virtiofs";
};
home-manager.sharedModules = lib.mkIf config.programs.hyprland.enable [{ wayland.windowManager.hyprland.settings.monitor = "Virtual-1, 2560x1600@60, 0x0, 1"; }];
home-manager.sharedModules = lib.mkIf config.programs.hyprland.enable [
{ wayland.windowManager.hyprland.settings.monitor = "Virtual-1, 2560x1600@60, 0x0, 1"; }
];
}

View File

@@ -1,10 +1,16 @@
{ lib, modulesPath, ... }:
{
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
boot = {
initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "virtio_scsi" "sr_mod" "virtio_blk" ];
initrd.availableKernelModules = [
"ahci"
"xhci_pci"
"virtio_pci"
"virtio_scsi"
"sr_mod"
"virtio_blk"
];
kernelModules = [ "kvm-amd" ];
};