Add syncthing base
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
12
flake.lock
generated
12
flake.lock
generated
@@ -27,11 +27,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1720056646,
|
||||
"narHash": "sha256-BymcV4HWtx2VFuabDCM4/nEJcfivCx0S02wUCz11mAY=",
|
||||
"lastModified": 1720402389,
|
||||
"narHash": "sha256-zJv6euDOrJWMHBhxfp/ay+Dvjwpe8YtMuEI5b09bxmo=",
|
||||
"owner": "nix-community",
|
||||
"repo": "disko",
|
||||
"rev": "64679cd7f318c9b6595902b47d4585b1d51d5f9e",
|
||||
"rev": "f1a00e7f55dc266ef286cc6fc8458fa2b5ca2414",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -47,11 +47,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1720367448,
|
||||
"narHash": "sha256-GttUD2lobMaLCYC3f39SBFSH2Ji7v1Yf+JOFYKYuQ7Y=",
|
||||
"lastModified": 1720443333,
|
||||
"narHash": "sha256-VS0HCv6M2Fr+XpCYpqkUNm74GboXlK2mPLWvSPsGMBg=",
|
||||
"owner": "karaolidis",
|
||||
"repo": "home-manager",
|
||||
"rev": "f837c613224c4709412e563d43f3ec3b50acedda",
|
||||
"rev": "178325dcb3e4afbf725d21cdc7f366f1c7f1a448",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
14
flake.nix
14
flake.nix
@@ -46,19 +46,27 @@
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, ... } @ inputs: {
|
||||
outputs =
|
||||
{ self, nixpkgs, ... }@inputs:
|
||||
{
|
||||
nixosConfigurations = {
|
||||
eirene-vm = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = { inherit inputs; };
|
||||
specialArgs = {
|
||||
inherit inputs;
|
||||
};
|
||||
system = "x86_64-linux";
|
||||
modules = [ ./hosts/eirene/vm ];
|
||||
};
|
||||
|
||||
eirene = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = { inherit inputs; };
|
||||
specialArgs = {
|
||||
inherit inputs;
|
||||
};
|
||||
system = "x86_64-linux";
|
||||
modules = [ ./hosts/eirene/base ];
|
||||
};
|
||||
};
|
||||
|
||||
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixfmt-rfc-style;
|
||||
};
|
||||
}
|
||||
|
@@ -7,7 +7,5 @@
|
||||
};
|
||||
};
|
||||
|
||||
environment.persistence."/persist".directories = [
|
||||
"/var/lib/bluetooth"
|
||||
];
|
||||
environment.persistence."/persist".directories = [ "/var/lib/bluetooth" ];
|
||||
}
|
||||
|
@@ -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"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
@@ -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;
|
||||
|
@@ -1,5 +1,4 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [ btop ];
|
||||
}
|
||||
|
@@ -1,5 +1,4 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [ fastfetch ];
|
||||
}
|
||||
|
@@ -1,5 +1,4 @@
|
||||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
services.getty.extraArgs = lib.mkIf (config.services.getty.autologinUser != null) [
|
||||
"--skip-login"
|
||||
|
@@ -1,3 +1 @@
|
||||
{
|
||||
programs.gnupg.agent.enable = true;
|
||||
}
|
||||
{ programs.gnupg.agent.enable = true; }
|
||||
|
@@ -1,7 +1,5 @@
|
||||
{
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
environment.persistence."/persist".directories = [
|
||||
"/etc/NetworkManager/system-connections"
|
||||
];
|
||||
environment.persistence."/persist".directories = [ "/etc/NetworkManager/system-connections" ];
|
||||
}
|
||||
|
@@ -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;
|
||||
|
@@ -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" ];
|
||||
};
|
||||
}
|
||||
|
@@ -8,10 +8,12 @@
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
extraConfig.pipewire-pulse = {
|
||||
pulse.cmd = [{
|
||||
pulse.cmd = [
|
||||
{
|
||||
cmd = "load-module";
|
||||
args = "module-switch-on-connect";
|
||||
}];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@@ -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;
|
||||
|
@@ -1,5 +1,4 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [ ranger ];
|
||||
}
|
||||
|
@@ -1,5 +1,4 @@
|
||||
{ inputs, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [ inputs.sops-nix.nixosModules.sops ];
|
||||
|
||||
|
@@ -1,5 +1,4 @@
|
||||
{ inputs, ... }:
|
||||
|
||||
{
|
||||
system = {
|
||||
autoUpgrade = {
|
||||
|
@@ -1,5 +1,4 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [ tree ];
|
||||
}
|
||||
|
@@ -1,5 +1,4 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
users = {
|
||||
mutableUsers = false;
|
||||
|
@@ -1,11 +1,10 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = [
|
||||
(pkgs.writeShellApplication {
|
||||
name = "nix-cleanup";
|
||||
runtimeInputs = with pkgs; [
|
||||
coreutils-full
|
||||
coreutils
|
||||
util-linux
|
||||
findutils
|
||||
btrfs-progs
|
||||
|
@@ -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,18 +65,24 @@
|
||||
};
|
||||
|
||||
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 [{
|
||||
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 = [{
|
||||
device = [
|
||||
{
|
||||
name = "syna2ba6:00-06cb:ce44-touchpad";
|
||||
sensitivity = 0.5;
|
||||
}];
|
||||
}
|
||||
];
|
||||
gestures.workspace_swipe_distance = 600;
|
||||
};
|
||||
|
||||
@@ -82,7 +95,8 @@
|
||||
theme = {
|
||||
cursor.size = 24;
|
||||
};
|
||||
}];
|
||||
}
|
||||
];
|
||||
|
||||
nixpkgs.config = {
|
||||
cudaSupport = true;
|
||||
|
@@ -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" ];
|
||||
};
|
||||
|
||||
|
@@ -4,5 +4,6 @@
|
||||
(import ../../users/nick { autologin = true; })
|
||||
];
|
||||
|
||||
sops.defaultSopsFile = ./secrets/secrets.yaml;
|
||||
time.timeZone = "Europe/Athens";
|
||||
}
|
||||
|
@@ -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"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@@ -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"; }
|
||||
];
|
||||
}
|
||||
|
@@ -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" ];
|
||||
};
|
||||
|
||||
|
@@ -1,5 +1,9 @@
|
||||
{ config, inputs, lib, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
users = lib.attrsets.filterAttrs (_: config: config.isNormalUser) config.users.users;
|
||||
in
|
||||
@@ -10,19 +14,17 @@ in
|
||||
[
|
||||
"d /persist/home 0755 root root -"
|
||||
"d /cache/home 0755 root root -"
|
||||
] ++
|
||||
lib.attrsets.mapAttrsToList (user: config: "d /persist${config.home} 0700 ${user} users -") users ++
|
||||
lib.attrsets.mapAttrsToList (user: config: "d /cache${config.home} 0700 ${user} users -") users
|
||||
]
|
||||
++ lib.attrsets.mapAttrsToList (user: config: "d /persist${config.home} 0700 ${user} users -") users
|
||||
++ lib.attrsets.mapAttrsToList (user: config: "d /cache${config.home} 0700 ${user} users -") users
|
||||
);
|
||||
|
||||
home-manager.users = lib.attrsets.mapAttrs
|
||||
(user: config: ({
|
||||
home-manager.users = lib.attrsets.mapAttrs (user: config: {
|
||||
imports = [ inputs.impermanence.nixosModules.home-manager.impermanence ];
|
||||
|
||||
home.persistence = {
|
||||
"/persist${config.home}".allowOther = true;
|
||||
"/cache${config.home}".allowOther = true;
|
||||
};
|
||||
}))
|
||||
users;
|
||||
}) users;
|
||||
}
|
||||
|
@@ -1,12 +1,15 @@
|
||||
{ config, inputs, lib, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
users = lib.attrsets.filterAttrs (_: config: config.isNormalUser) config.users.users;
|
||||
sopsKeyPath = ".config/sops-nix/key.txt";
|
||||
in
|
||||
{
|
||||
home-manager.users = lib.attrsets.mapAttrs
|
||||
(user: config: ({
|
||||
home-manager.users = lib.attrsets.mapAttrs (user: config: {
|
||||
imports = [ inputs.sops-nix.homeManagerModules.sops ];
|
||||
|
||||
sops.age.keyFile = "/persist${config.home}/${sopsKeyPath}";
|
||||
@@ -15,6 +18,5 @@ in
|
||||
persistence."/persist${config.home}".files = [ sopsKeyPath ];
|
||||
sessionVariables.SOPS_AGE_KEY_FILE = "${config.home}/${sopsKeyPath}";
|
||||
};
|
||||
}))
|
||||
users;
|
||||
}) users;
|
||||
}
|
||||
|
@@ -1,11 +1,9 @@
|
||||
{ config, lib, ... }:
|
||||
|
||||
let
|
||||
users = lib.attrsets.filterAttrs (_: config: config.isNormalUser) config.users.users;
|
||||
in
|
||||
{
|
||||
home-manager.users = lib.attrsets.mapAttrs
|
||||
(user: cfg: ({
|
||||
home-manager.users = lib.attrsets.mapAttrs (user: cfg: {
|
||||
xdg = {
|
||||
enable = true;
|
||||
mimeApps.enable = true;
|
||||
@@ -30,6 +28,5 @@ in
|
||||
"VMs"
|
||||
"git"
|
||||
];
|
||||
}))
|
||||
users;
|
||||
}) users;
|
||||
}
|
||||
|
@@ -1,5 +1,4 @@
|
||||
{ config, inputs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
inputs.home-manager.nixosModules.default
|
||||
@@ -10,10 +9,13 @@
|
||||
];
|
||||
|
||||
home-manager = {
|
||||
extraSpecialArgs = { inherit inputs; };
|
||||
extraSpecialArgs = {
|
||||
inherit inputs;
|
||||
};
|
||||
backupFileExtension = "bak";
|
||||
useGlobalPkgs = true;
|
||||
sharedModules = [{
|
||||
sharedModules = [
|
||||
{
|
||||
imports = [
|
||||
./options/home-manager/xdg
|
||||
./options/home-manager/hyprland
|
||||
@@ -25,7 +27,8 @@
|
||||
systemd.user.startServices = "sd-switch";
|
||||
nix.settings = config.nix.settings;
|
||||
nixpkgs.config = config.nixpkgs.config;
|
||||
}];
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
programs.dconf.enable = true;
|
||||
|
@@ -1,7 +1,10 @@
|
||||
{ lib, ... }:
|
||||
|
||||
let
|
||||
userOptions = with lib; with types; { config, ... }: {
|
||||
userOptions =
|
||||
with lib;
|
||||
with types;
|
||||
{ config, ... }:
|
||||
{
|
||||
options.email = mkOption {
|
||||
type = nullOr str;
|
||||
description = "Email address of the user.";
|
||||
@@ -14,9 +17,10 @@ let
|
||||
};
|
||||
in
|
||||
{
|
||||
options = with lib; with types; {
|
||||
users.users = mkOption {
|
||||
type = attrsOf (submodule userOptions);
|
||||
};
|
||||
options =
|
||||
with lib;
|
||||
with types;
|
||||
{
|
||||
users.users = mkOption { type = attrsOf (submodule userOptions); };
|
||||
};
|
||||
}
|
||||
|
@@ -1,10 +1,17 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.wayland.windowManager.hyprland;
|
||||
in
|
||||
{
|
||||
options.wayland.windowManager.hyprland = with lib; with types; {
|
||||
options.wayland.windowManager.hyprland =
|
||||
with lib;
|
||||
with types;
|
||||
{
|
||||
initExtraConfig = mkOption {
|
||||
type = lines;
|
||||
default = "";
|
||||
@@ -19,14 +26,18 @@ in
|
||||
};
|
||||
|
||||
config = {
|
||||
wayland.windowManager.hyprland.settings.exec-once = lib.meta.getExe (pkgs.writeShellApplication {
|
||||
wayland.windowManager.hyprland.settings.exec-once = lib.meta.getExe (
|
||||
pkgs.writeShellApplication {
|
||||
name = "init-hyprland";
|
||||
text = cfg.initExtraConfig;
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
wayland.windowManager.hyprland.settings.exec = lib.meta.getExe (pkgs.writeShellApplication {
|
||||
wayland.windowManager.hyprland.settings.exec = lib.meta.getExe (
|
||||
pkgs.writeShellApplication {
|
||||
name = "reload-hyprland";
|
||||
text = cfg.reloadExtraConfig;
|
||||
});
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
|
@@ -1,11 +1,18 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.programs.matugen;
|
||||
in
|
||||
{
|
||||
# https://github.com/Theaninova/matugen/blob/add-home-manager-module/hm-module.nix
|
||||
options.programs.matugen = with lib; with types; {
|
||||
options.programs.matugen =
|
||||
with lib;
|
||||
with types;
|
||||
{
|
||||
enable = mkEnableOption "matugen";
|
||||
package = mkPackageOption pkgs "matugen" { };
|
||||
settings = mkOption {
|
||||
|
@@ -1,11 +1,18 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.theme;
|
||||
init = pkgs.writeShellApplication {
|
||||
name = "theme";
|
||||
runtimeInputs = with pkgs; [ coreutils-full ];
|
||||
bashOptions = [ "nounset" "pipefail" ];
|
||||
runtimeInputs = with pkgs; [ coreutils ];
|
||||
bashOptions = [
|
||||
"nounset"
|
||||
"pipefail"
|
||||
];
|
||||
runtimeEnv = {
|
||||
CONFIG = cfg.configDir;
|
||||
DEFAULT_WALLPAPER = cfg.wallpaper;
|
||||
@@ -17,7 +24,10 @@ let
|
||||
in
|
||||
{
|
||||
# https://github.com/Theaninova/TheaninovOS/blob/master/modules/home-manager/theme/md3-evo.nix
|
||||
options.theme = with lib; with types; {
|
||||
options.theme =
|
||||
with lib;
|
||||
with types;
|
||||
{
|
||||
enable = mkEnableOption "theme";
|
||||
|
||||
configDir = mkOption {
|
||||
@@ -60,7 +70,10 @@ in
|
||||
};
|
||||
|
||||
mode = mkOption {
|
||||
type = enum [ "dark" "light" ];
|
||||
type = enum [
|
||||
"dark"
|
||||
"light"
|
||||
];
|
||||
default = "dark";
|
||||
description = "The default mode of the theme.";
|
||||
};
|
||||
@@ -281,13 +294,19 @@ in
|
||||
emoji = {
|
||||
names = mkOption {
|
||||
type = listOf str;
|
||||
default = [ "Noto Emoji" "Font Awesome" ];
|
||||
default = [
|
||||
"Noto Emoji"
|
||||
"Font Awesome"
|
||||
];
|
||||
description = "The emoji font families.";
|
||||
};
|
||||
|
||||
packages = mkOption {
|
||||
type = listOf package;
|
||||
default = with pkgs; [ noto-fonts-color-emoji font-awesome ];
|
||||
default = with pkgs; [
|
||||
noto-fonts-color-emoji
|
||||
font-awesome
|
||||
];
|
||||
description = "The emoji font packages.";
|
||||
};
|
||||
};
|
||||
@@ -340,13 +359,13 @@ in
|
||||
config = lib.mkIf cfg.enable {
|
||||
home = {
|
||||
packages =
|
||||
[ cfg.pkg ] ++
|
||||
cfg.font.sansSerif.packages ++
|
||||
cfg.font.serif.packages ++
|
||||
cfg.font.monospace.packages ++
|
||||
cfg.font.emoji.packages ++
|
||||
cfg.icon.packages ++
|
||||
cfg.cursor.packages;
|
||||
[ cfg.pkg ]
|
||||
++ cfg.font.sansSerif.packages
|
||||
++ cfg.font.serif.packages
|
||||
++ cfg.font.monospace.packages
|
||||
++ cfg.font.emoji.packages
|
||||
++ cfg.icon.packages
|
||||
++ cfg.cursor.packages;
|
||||
|
||||
pointerCursor = {
|
||||
name = builtins.head cfg.cursor.names;
|
||||
|
@@ -1,19 +1,19 @@
|
||||
{ config, lib, ... }:
|
||||
|
||||
let
|
||||
cfg = config.xdg;
|
||||
in
|
||||
{
|
||||
options.xdg = with lib; with types; {
|
||||
options.xdg =
|
||||
with lib;
|
||||
with types;
|
||||
{
|
||||
relativeCacheHome = mkOption {
|
||||
type = str;
|
||||
default = ".cache";
|
||||
description = "Relative path to directory holding application caches.";
|
||||
};
|
||||
|
||||
cacheHome = mkOption {
|
||||
default = "${config.home.homeDirectory}/${cfg.relativeCacheHome}";
|
||||
};
|
||||
cacheHome = mkOption { default = "${config.home.homeDirectory}/${cfg.relativeCacheHome}"; };
|
||||
|
||||
relativeConfigHome = mkOption {
|
||||
type = str;
|
||||
@@ -21,9 +21,7 @@ in
|
||||
description = "Relative path to directory holding application configurations.";
|
||||
};
|
||||
|
||||
configHome = mkOption {
|
||||
default = "${config.home.homeDirectory}/${cfg.relativeConfigHome}";
|
||||
};
|
||||
configHome = mkOption { default = "${config.home.homeDirectory}/${cfg.relativeConfigHome}"; };
|
||||
|
||||
relativeDataHome = mkOption {
|
||||
type = str;
|
||||
@@ -31,9 +29,7 @@ in
|
||||
description = "Relative path to directory holding application data.";
|
||||
};
|
||||
|
||||
dataHome = mkOption {
|
||||
default = "${config.home.homeDirectory}/${cfg.relativeDataHome}";
|
||||
};
|
||||
dataHome = mkOption { default = "${config.home.homeDirectory}/${cfg.relativeDataHome}"; };
|
||||
|
||||
relativeStateHome = mkOption {
|
||||
type = str;
|
||||
@@ -41,8 +37,6 @@ in
|
||||
description = "Relative path to directory holding application states.";
|
||||
};
|
||||
|
||||
stateHome = mkOption {
|
||||
default = "${config.home.homeDirectory}/${cfg.relativeStateHome}";
|
||||
};
|
||||
stateHome = mkOption { default = "${config.home.homeDirectory}/${cfg.relativeStateHome}"; };
|
||||
};
|
||||
}
|
||||
|
@@ -1,19 +0,0 @@
|
||||
{ user ? throw "user argument is required" }: { config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
home-manager.users.${user.name}.systemd.user.services.mpris-proxy = {
|
||||
Unit = {
|
||||
Description = "MPRIS proxy";
|
||||
Requires = [ "sound.target" ];
|
||||
After = [ "network.target" "sound.target" ];
|
||||
};
|
||||
|
||||
Service.ExecStart = lib.meta.getExe (pkgs.writeShellApplication {
|
||||
name = "init-mpris-proxy";
|
||||
runtimeInputs = with pkgs; [ bluez ];
|
||||
text = "exec mpris-proxy";
|
||||
});
|
||||
|
||||
Install.WantedBy = [ "default.target" ];
|
||||
};
|
||||
}
|
@@ -1,16 +0,0 @@
|
||||
{ user ? throw "user argument is required" }: { lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
home-manager.users.${user.name} = {
|
||||
home.packages = with pkgs; [ brightnessctl ];
|
||||
|
||||
wayland.windowManager.hyprland.settings.bindle =
|
||||
let
|
||||
brightnessctl = lib.meta.getExe pkgs.brightnessctl;
|
||||
in
|
||||
[
|
||||
", XF86MonBrightnessUp, exec, ${brightnessctl} -q s 5%+"
|
||||
", XF86MonBrightnessDown, exec, ${brightnessctl} -q s 5%-"
|
||||
];
|
||||
};
|
||||
}
|
@@ -1,36 +0,0 @@
|
||||
{ user ? throw "user argument is required", gpu ? false }: { config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user.name};
|
||||
in
|
||||
{
|
||||
home-manager.users.${user.name} = {
|
||||
programs = {
|
||||
btop = {
|
||||
enable = true;
|
||||
settings = {
|
||||
color_theme = "matugen";
|
||||
theme_background = false;
|
||||
presets = "";
|
||||
vim_keys = true;
|
||||
shown_boxes = "cpu mem net proc gpu0 gpu1";
|
||||
update_ms = 1000;
|
||||
proc_tree = true;
|
||||
cpu_single_graph = true;
|
||||
disks_filter = "/ /nix /persist /cache";
|
||||
};
|
||||
};
|
||||
|
||||
matugen.settings.templates.btop = {
|
||||
input_path = ./theme.theme;
|
||||
output_path = "${hmConfig.xdg.configHome}/btop/themes/matugen.theme";
|
||||
};
|
||||
};
|
||||
|
||||
theme.extraConfig = "${lib.meta.getExe (pkgs.writeShellApplication {
|
||||
name = "reload-btop";
|
||||
runtimeInputs = with pkgs; [ procps ];
|
||||
text = "exec pkill btop -SIGUSR2";
|
||||
})} &";
|
||||
};
|
||||
}
|
31
users/configs/console/bluetooth/default.nix
Normal file
31
users/configs/console/bluetooth/default.nix
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
home-manager.users.${user.name}.systemd.user.services.mpris-proxy = {
|
||||
Unit = {
|
||||
Description = "MPRIS proxy";
|
||||
Requires = [ "sound.target" ];
|
||||
After = [
|
||||
"network.target"
|
||||
"sound.target"
|
||||
];
|
||||
};
|
||||
|
||||
Service.ExecStart = lib.meta.getExe (
|
||||
pkgs.writeShellApplication {
|
||||
name = "init-mpris-proxy";
|
||||
runtimeInputs = with pkgs; [ bluez ];
|
||||
text = "exec mpris-proxy";
|
||||
}
|
||||
);
|
||||
|
||||
Install.WantedBy = [ "default.target" ];
|
||||
};
|
||||
}
|
7
users/configs/console/brightnessctl/default.nix
Normal file
7
users/configs/console/brightnessctl/default.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
}:
|
||||
{ lib, pkgs, ... }:
|
||||
{
|
||||
home-manager.users.${user.name}.home.packages = with pkgs; [ brightnessctl ];
|
||||
}
|
19
users/configs/console/btop/default.nix
Normal file
19
users/configs/console/btop/default.nix
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
}:
|
||||
{ ... }:
|
||||
{
|
||||
home-manager.users.${user.name}.programs.btop = {
|
||||
enable = true;
|
||||
settings = {
|
||||
theme_background = false;
|
||||
presets = "";
|
||||
vim_keys = true;
|
||||
shown_boxes = "cpu mem net proc gpu0 gpu1";
|
||||
update_ms = 1000;
|
||||
proc_tree = true;
|
||||
cpu_single_graph = true;
|
||||
disks_filter = "/ /nix /persist /cache";
|
||||
};
|
||||
};
|
||||
}
|
@@ -1,5 +1,12 @@
|
||||
{ user ? throw "user argument is required" }: { config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user.name};
|
||||
in
|
||||
@@ -22,11 +29,13 @@ in
|
||||
};
|
||||
|
||||
hooks = {
|
||||
commit-msg = lib.meta.getExe (pkgs.writeShellApplication {
|
||||
commit-msg = lib.meta.getExe (
|
||||
pkgs.writeShellApplication {
|
||||
name = "git-commit-msg-hook";
|
||||
runtimeInputs = with pkgs; [ git ];
|
||||
text = builtins.readFile ./commit-msg.sh;
|
||||
});
|
||||
}
|
||||
);
|
||||
};
|
||||
};
|
||||
|
@@ -1,5 +1,12 @@
|
||||
{ user ? throw "user argument is required" }: { config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user.name};
|
||||
gpgPath = "${hmConfig.xdg.dataHome}/gnupg";
|
||||
@@ -20,10 +27,11 @@ in
|
||||
systemd.user = {
|
||||
services.gpg-agent-import =
|
||||
let
|
||||
init = lib.meta.getExe (pkgs.writeShellApplication {
|
||||
init = lib.meta.getExe (
|
||||
pkgs.writeShellApplication {
|
||||
name = "import-gpg-keys";
|
||||
runtimeInputs = with pkgs; [
|
||||
coreutils-full
|
||||
coreutils
|
||||
gnugrep
|
||||
gnupg
|
||||
];
|
||||
@@ -32,13 +40,20 @@ in
|
||||
HOME = user.home;
|
||||
};
|
||||
text = builtins.readFile ./import-gpg-keys.sh;
|
||||
});
|
||||
}
|
||||
);
|
||||
in
|
||||
{
|
||||
Unit = {
|
||||
Description = "Auto-import GPG keys";
|
||||
Requires = [ "sops-nix.service" "gpg-agent.socket" ];
|
||||
After = [ "sops-nix.service" "gpg-agent.socket" ];
|
||||
Requires = [
|
||||
"sops-nix.service"
|
||||
"gpg-agent.socket"
|
||||
];
|
||||
After = [
|
||||
"sops-nix.service"
|
||||
"gpg-agent.socket"
|
||||
];
|
||||
};
|
||||
|
||||
Service = {
|
@@ -1,5 +1,7 @@
|
||||
{ user ? throw "user argument is required" }: { ... }:
|
||||
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
}:
|
||||
{ ... }:
|
||||
{
|
||||
home-manager.users.${user.name} = {
|
||||
programs.neovim = {
|
13
users/configs/console/pipewire/default.nix
Normal file
13
users/configs/console/pipewire/default.nix
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
}:
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home-manager.users.${user.name} = {
|
||||
home.packages = with pkgs; [
|
||||
wireplumber
|
||||
playerctl
|
||||
];
|
||||
services.playerctld.enable = true;
|
||||
};
|
||||
}
|
35
users/configs/console/syncthing/default.nix
Normal file
35
users/configs/console/syncthing/default.nix
Normal file
@@ -0,0 +1,35 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
}:
|
||||
{ config, ... }:
|
||||
{
|
||||
networking.firewall = {
|
||||
allowedTCPPorts = [ 22000 ];
|
||||
allowedUDPPorts = [
|
||||
21027
|
||||
22000
|
||||
];
|
||||
};
|
||||
|
||||
sops.secrets = {
|
||||
# openssl ecparam -name prime256v1 -genkey -noout -out key.pem
|
||||
"syncthing/key" = {
|
||||
owner = user.name;
|
||||
group = "users";
|
||||
};
|
||||
# openssl req -new -x509 -key key.pem -out cert.pem -days 3650
|
||||
"syncthing/cert" = {
|
||||
owner = user.name;
|
||||
group = "users";
|
||||
};
|
||||
};
|
||||
|
||||
home-manager.users.${user.name}.services.syncthing = {
|
||||
enable = true;
|
||||
key = config.sops.secrets."syncthing/key".path;
|
||||
cert = config.sops.secrets."syncthing/cert".path;
|
||||
extraOptions = [ "-no-default-folder" ];
|
||||
|
||||
settings.options.urAccepted = -1;
|
||||
};
|
||||
}
|
@@ -1,5 +1,7 @@
|
||||
{ user ? throw "user argument is required" }: { config, ... }:
|
||||
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
}:
|
||||
{ config, ... }:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user.name};
|
||||
in
|
@@ -1,5 +1,7 @@
|
||||
{ pkgs ? import <nixpkgs> { }, ... }:
|
||||
|
||||
{
|
||||
pkgs ? import <nixpkgs> { },
|
||||
...
|
||||
}:
|
||||
pkgs.stdenv.mkDerivation {
|
||||
name = "ags-config";
|
||||
|
@@ -1,8 +1,16 @@
|
||||
{ user ? throw "user argument is required" }: { config, lib, pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user.name};
|
||||
agsConfig = (import ./config { inherit pkgs; });
|
||||
agsConfig = import ./config { inherit pkgs; };
|
||||
in
|
||||
{
|
||||
home-manager.users.${user.name} = {
|
||||
@@ -23,7 +31,10 @@ in
|
||||
systemd.user = {
|
||||
targets.tray.Unit = {
|
||||
BindsTo = [ "ags.service" ];
|
||||
After = [ "graphical-session.target" "ags.service" ];
|
||||
After = [
|
||||
"graphical-session.target"
|
||||
"ags.service"
|
||||
];
|
||||
};
|
||||
|
||||
services.ags = {
|
||||
@@ -37,7 +48,8 @@ in
|
||||
Type = "notify";
|
||||
NotifyAccess = "all";
|
||||
|
||||
ExecStart = lib.meta.getExe (pkgs.writeShellApplication {
|
||||
ExecStart = lib.meta.getExe (
|
||||
pkgs.writeShellApplication {
|
||||
name = "init-ags";
|
||||
runtimeInputs = with pkgs; [
|
||||
inputs.ags.packages.${stdenv.hostPlatform.system}.default
|
||||
@@ -50,7 +62,8 @@ in
|
||||
libdbusmenu-gtk3
|
||||
];
|
||||
text = "exec ags";
|
||||
});
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
Install.WantedBy = [ "graphical-session.target" ];
|
@@ -1,5 +1,12 @@
|
||||
{ user ? throw "user argument is required" }: { config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
services.blueman.enable = true;
|
||||
|
14
users/configs/gui/brightnessctl/default.nix
Normal file
14
users/configs/gui/brightnessctl/default.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
}:
|
||||
{ lib, pkgs, ... }:
|
||||
{
|
||||
home-manager.users.${user.name}.wayland.windowManager.hyprland.settings.bindle =
|
||||
let
|
||||
brightnessctl = lib.meta.getExe pkgs.brightnessctl;
|
||||
in
|
||||
[
|
||||
", XF86MonBrightnessUp, exec, ${brightnessctl} -q s 5%+"
|
||||
", XF86MonBrightnessDown, exec, ${brightnessctl} -q s 5%-"
|
||||
];
|
||||
}
|
34
users/configs/gui/btop/default.nix
Normal file
34
users/configs/gui/btop/default.nix
Normal file
@@ -0,0 +1,34 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user.name};
|
||||
in
|
||||
{
|
||||
home-manager.users.${user.name} = {
|
||||
programs = {
|
||||
btop.settings.color_theme = "matugen";
|
||||
|
||||
matugen.settings.templates.btop = {
|
||||
input_path = ./theme.theme;
|
||||
output_path = "${hmConfig.xdg.configHome}/btop/themes/matugen.theme";
|
||||
};
|
||||
};
|
||||
|
||||
theme.extraConfig = "${
|
||||
lib.meta.getExe (
|
||||
pkgs.writeShellApplication {
|
||||
name = "reload-btop";
|
||||
runtimeInputs = with pkgs; [ procps ];
|
||||
text = "exec pkill btop -SIGUSR2";
|
||||
}
|
||||
)
|
||||
} &";
|
||||
};
|
||||
}
|
@@ -1,5 +1,12 @@
|
||||
{ user ? throw "user argument is required" }: { config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
home-manager.users.${user.name} = {
|
||||
services.cbatticon = {
|
@@ -1,12 +1,22 @@
|
||||
{ user ? throw "user argument is required" }: { config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user.name};
|
||||
in
|
||||
{
|
||||
home-manager.users.${user.name} = {
|
||||
home = {
|
||||
packages = with pkgs; [ wl-clipboard cliphist ];
|
||||
packages = with pkgs; [
|
||||
wl-clipboard
|
||||
cliphist
|
||||
];
|
||||
persistence."/cache${user.home}".directories = [ "${hmConfig.xdg.relativeCacheHome}/cliphist" ];
|
||||
};
|
||||
|
@@ -1,5 +1,7 @@
|
||||
{ user ? throw "user argument is required" }: { lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
}:
|
||||
{ lib, pkgs, ... }:
|
||||
{
|
||||
home-manager.users.${user.name} = {
|
||||
programs.firefox = {
|
||||
@@ -47,38 +49,59 @@
|
||||
"Wikipedia (en)".metaData.alias = "@w";
|
||||
|
||||
"Nix Packages" = {
|
||||
urls = [{
|
||||
urls = [
|
||||
{
|
||||
template = "https://search.nixos.org/packages";
|
||||
params = [
|
||||
{ name = "type"; value = "packages"; }
|
||||
{ name = "query"; value = "{searchTerms}"; }
|
||||
{
|
||||
name = "type";
|
||||
value = "packages";
|
||||
}
|
||||
{
|
||||
name = "query";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
}];
|
||||
|
||||
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||
definedAliases = [ "@np" ];
|
||||
};
|
||||
|
||||
"Nix Options" = {
|
||||
urls = [{
|
||||
urls = [
|
||||
{
|
||||
template = "https://search.nixos.org/options";
|
||||
params = [
|
||||
{ name = "type"; value = "options"; }
|
||||
{ name = "query"; value = "{searchTerms}"; }
|
||||
{
|
||||
name = "type";
|
||||
value = "options";
|
||||
}
|
||||
{
|
||||
name = "query";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
}];
|
||||
|
||||
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||
definedAliases = [ "@no" ];
|
||||
};
|
||||
|
||||
"Home Manager Options" = {
|
||||
urls = [{
|
||||
urls = [
|
||||
{
|
||||
template = "https://home-manager-options.extranix.com/";
|
||||
params = [
|
||||
{ name = "query"; value = "{searchTerms}"; }
|
||||
{
|
||||
name = "query";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
}];
|
||||
|
||||
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||
definedAliases = [ "@nh" ];
|
||||
@@ -88,9 +111,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
wayland.windowManager.hyprland.settings.bind = [
|
||||
"$mod, b, exec, ${lib.meta.getExe pkgs.firefox}"
|
||||
];
|
||||
wayland.windowManager.hyprland.settings.bind = [ "$mod, b, exec, ${lib.meta.getExe pkgs.firefox}" ];
|
||||
|
||||
home.persistence = {
|
||||
"/persist${user.home}".directories = [ ".mozilla" ];
|
@@ -1,5 +1,12 @@
|
||||
{ user ? throw "user argument is required" }: { config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user.name};
|
||||
in
|
||||
@@ -42,7 +49,9 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
theme.extraConfig = "${lib.meta.getExe (pkgs.writeShellApplication {
|
||||
theme.extraConfig = "${
|
||||
lib.meta.getExe (
|
||||
pkgs.writeShellApplication {
|
||||
name = "theme-gtk";
|
||||
runtimeInputs = with pkgs; [ dconf ];
|
||||
text = ''
|
||||
@@ -57,6 +66,8 @@ in
|
||||
dconf write /org/gnome/desktop/interface/gtk-theme "'$GTK_THEME'"
|
||||
dconf write /org/gnome/desktop/interface/color-scheme "'prefer-$MODE'"
|
||||
'';
|
||||
})} &";
|
||||
}
|
||||
)
|
||||
} &";
|
||||
};
|
||||
}
|
@@ -1,5 +1,12 @@
|
||||
{ user ? throw "user argument is required" }: { config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user.name};
|
||||
in
|
||||
@@ -133,11 +140,15 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
theme.extraConfig = "${lib.meta.getExe (pkgs.writeShellApplication {
|
||||
theme.extraConfig = "${
|
||||
lib.meta.getExe (
|
||||
pkgs.writeShellApplication {
|
||||
name = "reload-hyprland";
|
||||
runtimeInputs = with pkgs; [ hyprland ];
|
||||
text = "exec hyprctl reload";
|
||||
})} &";
|
||||
}
|
||||
)
|
||||
} &";
|
||||
|
||||
home.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
};
|
@@ -1,26 +1,38 @@
|
||||
{ user ? throw "user argument is required" }: { config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user.name};
|
||||
in
|
||||
{
|
||||
home-manager.users.${user.name} = {
|
||||
home = {
|
||||
packages = with pkgs; [ hyprshot swappy ];
|
||||
packages = with pkgs; [
|
||||
hyprshot
|
||||
swappy
|
||||
];
|
||||
sessionVariables.HYPRSHOT_DIR = "${hmConfig.xdg.userDirs.pictures}/screenshots";
|
||||
};
|
||||
|
||||
wayland.windowManager.hyprland.settings.bind =
|
||||
let
|
||||
hyprshot = lib.meta.getExe pkgs.hyprshot;
|
||||
date = "${pkgs.coreutils-full}/bin/date";
|
||||
date = "${pkgs.coreutils}/bin/date";
|
||||
filename = "\"$(${date} +'%Y-%m-%d-%H%M%S.png')\"";
|
||||
|
||||
swappyWrapper = lib.meta.getExe (pkgs.writeShellApplication {
|
||||
swappyWrapper = lib.meta.getExe (
|
||||
pkgs.writeShellApplication {
|
||||
name = "swappy-wrapper";
|
||||
runtimeInputs = with pkgs; [ swappy ];
|
||||
text = "exec swappy -f \"$1\"";
|
||||
});
|
||||
}
|
||||
);
|
||||
in
|
||||
[
|
||||
", Print, exec, ${hyprshot} -m output -m active -f ${filename}"
|
@@ -1,5 +1,12 @@
|
||||
{ user ? throw "user argument is required" }: { config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user.name};
|
||||
in
|
||||
@@ -27,11 +34,15 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
theme.extraConfig = "${lib.meta.getExe (pkgs.writeShellApplication {
|
||||
theme.extraConfig = "${
|
||||
lib.meta.getExe (
|
||||
pkgs.writeShellApplication {
|
||||
name = "reload-kitty";
|
||||
runtimeInputs = with pkgs; [ procps ];
|
||||
text = "exec pkill kitty -SIGUSR1";
|
||||
})} &";
|
||||
}
|
||||
)
|
||||
} &";
|
||||
|
||||
home.persistence."/cache${user.home}".directories = [ "${hmConfig.xdg.relativeCacheHome}/kitty" ];
|
||||
};
|
@@ -1,5 +1,12 @@
|
||||
{ user ? throw "user argument is required" }: { config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user.name};
|
||||
in
|
||||
@@ -54,8 +61,8 @@ in
|
||||
blur = builtins.toString hmConfig.theme.blur;
|
||||
opacity = builtins.toString hmConfig.theme.opacity;
|
||||
opacity_hex = builtins.toString (percentageToHex hmConfig.theme.opacity);
|
||||
opacity_shadow = builtins.toString (hmConfig.theme.opacity * .75);
|
||||
opacity_shadow_hex = builtins.toString (percentageToHex (hmConfig.theme.opacity * .75));
|
||||
opacity_shadow = builtins.toString (hmConfig.theme.opacity * 0.75);
|
||||
opacity_shadow_hex = builtins.toString (percentageToHex (hmConfig.theme.opacity * 0.75));
|
||||
font_size = builtins.toString hmConfig.theme.font.size;
|
||||
font_sans_serif = builtins.head hmConfig.theme.font.sansSerif.names;
|
||||
font_sans_serif_all = builtins.concatStringsSep ", " hmConfig.theme.font.sansSerif.names;
|
||||
@@ -72,7 +79,9 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
theme.extraConfig = lib.mkBefore (lib.meta.getExe (pkgs.writeShellApplication {
|
||||
theme.extraConfig = lib.mkBefore (
|
||||
lib.meta.getExe (
|
||||
pkgs.writeShellApplication {
|
||||
name = "theme-matugen";
|
||||
runtimeInputs = with pkgs; [ matugen ];
|
||||
text = ''
|
||||
@@ -81,6 +90,8 @@ in
|
||||
--mode "$(cat "${hmConfig.theme.configDir}/mode")" \
|
||||
--contrast ${builtins.toString hmConfig.theme.contrast}
|
||||
'';
|
||||
}));
|
||||
}
|
||||
)
|
||||
);
|
||||
};
|
||||
}
|
@@ -1,5 +1,7 @@
|
||||
{ user ? throw "user argument is required" }: { ... }:
|
||||
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
}:
|
||||
{ ... }:
|
||||
{
|
||||
home-manager.users.${user.name} = {
|
||||
services.network-manager-applet.enable = true;
|
@@ -1,10 +1,15 @@
|
||||
{ user ? throw "user argument is required" }: { pkgs, ... }:
|
||||
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
}:
|
||||
{ lib, pkgs, ... }:
|
||||
{
|
||||
home-manager.users.${user.name} = {
|
||||
home.packages = with pkgs; [ pavucontrol ];
|
||||
|
||||
wayland.windowManager.hyprland.settings =
|
||||
let
|
||||
wpctl = "${pkgs.wireplumber}/bin/wpctl";
|
||||
playerctl = lib.meta.getExe pkgs.playerctl;
|
||||
in
|
||||
{
|
||||
bindle = [
|
||||
@@ -12,11 +17,17 @@
|
||||
", XF86AudioLowerVolume, exec, ${wpctl} set-volume @DEFAULT_AUDIO_SINK@ -l 2.0 2%-"
|
||||
"CTRL, XF86AudioRaiseVolume, exec, ${wpctl} set-volume @DEFAULT_AUDIO_SOURCE@ -l 1.0 2%+"
|
||||
"CTRL, XF86AudioLowerVolume, exec, ${wpctl} set-volume @DEFAULT_AUDIO_SOURCE@ -l 1.0 2%-"
|
||||
", XF86AudioNext, exec, ${playerctl} next"
|
||||
", XF86AudioPrev, exec, ${playerctl} previous"
|
||||
"CTRL, XF86AudioNext, exec, ${playerctl} position 10+"
|
||||
"CTRL, XF86AudioPrev, exec, ${playerctl} position 10-"
|
||||
];
|
||||
|
||||
bindl = [
|
||||
", XF86AudioMute, exec, ${wpctl} set-mute @DEFAULT_AUDIO_SINK@ toggle"
|
||||
", XF86AudioMicMute, exec, ${wpctl} set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
|
||||
", XF86AudioPlay, exec, ${playerctl} play-pause"
|
||||
", XF86AudioStop, exec, ${playerctl} stop"
|
||||
];
|
||||
};
|
||||
};
|
50
users/configs/gui/qalculate/default.nix
Normal file
50
users/configs/gui/qalculate/default.nix
Normal file
@@ -0,0 +1,50 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
}:
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user.name};
|
||||
qalculate-gtk = pkgs.qalculate-gtk.overrideAttrs (oldAttrs: {
|
||||
patches = oldAttrs.patches or [ ] ++ [ ./skip-save-prefs.patch ];
|
||||
});
|
||||
in
|
||||
{
|
||||
home-manager.users.${user.name} = {
|
||||
home = {
|
||||
packages = [ qalculate-gtk ];
|
||||
persistence."/cache${user.home}".files = [
|
||||
"${hmConfig.xdg.relativeConfigHome}/qalculate/qalculate-gtk.history"
|
||||
];
|
||||
};
|
||||
|
||||
xdg.configFile."qalculate/qalculate-gtk.cfg".source =
|
||||
(pkgs.formats.ini { }).generate "qalculate-gtk.cfg"
|
||||
{
|
||||
General = {
|
||||
allow_multiple_instances = 1;
|
||||
width = 500;
|
||||
save_history_separately = 1;
|
||||
auto_update_exchange_rates = 1;
|
||||
local_currency_conversion = 1;
|
||||
use_binary_prefixes = 1;
|
||||
persistent_keypad = 1;
|
||||
copy_ascii = 1;
|
||||
copy_ascii_without_units = 1;
|
||||
};
|
||||
Mode = {
|
||||
calculate_as_you_type = 1;
|
||||
excessive_parenthesis = 1;
|
||||
};
|
||||
};
|
||||
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
bind = [ ", XF86Calculator, exec, ${lib.meta.getExe qalculate-gtk}" ];
|
||||
windowrulev2 = [ "float, class:(qalculate-gtk)" ];
|
||||
};
|
||||
};
|
||||
}
|
Before Width: | Height: | Size: 216 KiB After Width: | Height: | Size: 216 KiB |
@@ -1,5 +1,12 @@
|
||||
{ user ? throw "user argument is required" }: { config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user.name};
|
||||
in
|
||||
@@ -34,9 +41,7 @@ in
|
||||
|
||||
xdg.configFile =
|
||||
let
|
||||
qtConfig = (pkgs.formats.ini { }).generate "qt5ct.conf" {
|
||||
Appearance.style = "kvantum";
|
||||
};
|
||||
qtConfig = (pkgs.formats.ini { }).generate "qt5ct.conf" { Appearance.style = "kvantum"; };
|
||||
in
|
||||
{
|
||||
"qt5ct/qt5ct.conf".source = qtConfig;
|
@@ -1,5 +1,12 @@
|
||||
{ user ? throw "user argument is required" }: { config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user.name};
|
||||
in
|
64
users/configs/gui/swww/default.nix
Normal file
64
users/configs/gui/swww/default.nix
Normal file
@@ -0,0 +1,64 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user.name};
|
||||
themeSwww = lib.meta.getExe (
|
||||
pkgs.writeShellApplication {
|
||||
name = "theme-swww";
|
||||
runtimeInputs = with pkgs; [
|
||||
coreutils
|
||||
swww
|
||||
];
|
||||
text = "exec swww img \"${hmConfig.theme.configDir}/wallpaper\"";
|
||||
}
|
||||
);
|
||||
in
|
||||
{
|
||||
home-manager.users.${user.name} = {
|
||||
home = {
|
||||
packages = with pkgs; [ swww ];
|
||||
persistence."/cache${user.home}".directories = [ "${hmConfig.xdg.relativeCacheHome}/swww" ];
|
||||
};
|
||||
|
||||
systemd.user.services.swww = {
|
||||
Unit = {
|
||||
Description = "Wallpaper daemon";
|
||||
BindsTo = [ "graphical-session.target" ];
|
||||
After = [ "graphical-session.target" ];
|
||||
};
|
||||
|
||||
Service = {
|
||||
Type = "forking";
|
||||
|
||||
ExecStart = lib.meta.getExe (
|
||||
pkgs.writeShellApplication {
|
||||
name = "init-swww";
|
||||
runtimeInputs = with pkgs; [ swww ];
|
||||
text = "exec swww init";
|
||||
}
|
||||
);
|
||||
|
||||
ExecStartPost = themeSwww;
|
||||
|
||||
ExecStop = lib.meta.getExe (
|
||||
pkgs.writeShellApplication {
|
||||
name = "kill-swww";
|
||||
runtimeInputs = with pkgs; [ swww ];
|
||||
text = "exec swww kill";
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
Install.WantedBy = [ "graphical-session.target" ];
|
||||
};
|
||||
|
||||
theme.extraConfig = lib.mkAfter "${themeSwww} &";
|
||||
};
|
||||
}
|
@@ -1,5 +1,13 @@
|
||||
{ user ? throw "user argument is required" }: { config, inputs, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
inputs,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user.name};
|
||||
themeBin = lib.meta.getExe hmConfig.theme.pkg;
|
||||
@@ -14,7 +22,9 @@ in
|
||||
];
|
||||
|
||||
home = {
|
||||
activation.themeInit = inputs.home-manager.lib.hm.dag.entryAfter [ "writeBoundary" ] "run ${themeBin}";
|
||||
activation.themeInit = inputs.home-manager.lib.hm.dag.entryAfter [
|
||||
"writeBoundary"
|
||||
] "run ${themeBin}";
|
||||
persistence."/persist${user.home}".directories = [ "${hmConfig.xdg.relativeConfigHome}/theme" ];
|
||||
};
|
||||
};
|
@@ -1,5 +1,13 @@
|
||||
{ user ? throw "user argument is required" }: { config, inputs, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
inputs,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user.name};
|
||||
in
|
||||
@@ -7,7 +15,10 @@ in
|
||||
home-manager.users.${user.name} = {
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
|
||||
mutableExtensionsDir = false;
|
||||
extensions = with pkgs.vscode-extensions; [ naumovs.color-highlight ];
|
||||
|
||||
userSettings = {
|
||||
"diffEditor.ignoreTrimWhitespace" = false;
|
||||
"editor.accessibilitySupport" = "off";
|
||||
@@ -65,9 +76,7 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
imports = [
|
||||
./langs/nix.nix
|
||||
];
|
||||
imports = [ ./langs/nix.nix ];
|
||||
|
||||
home.persistence = {
|
||||
"/persist${user.home}".directories = [ ".config/Code" ];
|
@@ -1,5 +1,4 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.vscode = {
|
||||
userSettings = {
|
||||
@@ -7,9 +6,7 @@
|
||||
"nix.formatterPath" = "nixpkgs-fmt";
|
||||
"nix.serverSettings" = { };
|
||||
};
|
||||
extensions = with pkgs; with vscode-extensions; [
|
||||
jnoortheen.nix-ide
|
||||
];
|
||||
extensions = with pkgs; with vscode-extensions; [ jnoortheen.nix-ide ];
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
@@ -1,5 +1,7 @@
|
||||
{ user ? throw "user argument is required" }: { pkgs, ... }:
|
||||
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
}:
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home-manager.users.${user.name}.home.packages = with pkgs; [ wev ];
|
||||
}
|
@@ -1,5 +1,7 @@
|
||||
{ user ? throw "user argument is required" }: { config, ... }:
|
||||
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
}:
|
||||
{ config, ... }:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user.name};
|
||||
in
|
@@ -1,5 +0,0 @@
|
||||
{ user ? throw "user argument is required" }: { pkgs, ... }:
|
||||
|
||||
{
|
||||
home-manager.users.${user.name}.home.packages = with pkgs; [ pavucontrol ];
|
||||
}
|
@@ -1,21 +0,0 @@
|
||||
{ user ? throw "user argument is required" }: { lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
home-manager.users.${user.name} = {
|
||||
home.packages = with pkgs; [ playerctl ];
|
||||
services.playerctld.enable = true;
|
||||
|
||||
wayland.windowManager.hyprland.settings.bindle =
|
||||
let
|
||||
playerctl = lib.meta.getExe pkgs.playerctl;
|
||||
in
|
||||
[
|
||||
", XF86AudioPlay, exec, ${playerctl} play-pause"
|
||||
", XF86AudioStop, exec, ${playerctl} stop"
|
||||
", XF86AudioNext, exec, ${playerctl} next"
|
||||
", XF86AudioPrev, exec, ${playerctl} previous"
|
||||
"CTRL, XF86AudioNext, exec, ${playerctl} position 10+"
|
||||
"CTRL, XF86AudioPrev, exec, ${playerctl} position 10-"
|
||||
];
|
||||
};
|
||||
}
|
@@ -1,39 +0,0 @@
|
||||
{ user ? throw "user argument is required" }: { lib, config, pkgs, ... }:
|
||||
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user.name};
|
||||
qalculate-gtk = pkgs.qalculate-gtk.overrideAttrs (oldAttrs: {
|
||||
patches = oldAttrs.patches or [ ] ++ [ ./skip-save-prefs.patch ];
|
||||
});
|
||||
in
|
||||
{
|
||||
home-manager.users.${user.name} = {
|
||||
home = {
|
||||
packages = [ qalculate-gtk ];
|
||||
persistence."/cache${user.home}".files = [ "${hmConfig.xdg.relativeConfigHome}/qalculate/qalculate-gtk.history" ];
|
||||
};
|
||||
|
||||
xdg.configFile."qalculate/qalculate-gtk.cfg".source = (pkgs.formats.ini { }).generate "qalculate-gtk.cfg" {
|
||||
General = {
|
||||
allow_multiple_instances = 1;
|
||||
width = 500;
|
||||
save_history_separately = 1;
|
||||
auto_update_exchange_rates = 1;
|
||||
local_currency_conversion = 1;
|
||||
use_binary_prefixes = 1;
|
||||
persistent_keypad = 1;
|
||||
copy_ascii = 1;
|
||||
copy_ascii_without_units = 1;
|
||||
};
|
||||
Mode = {
|
||||
calculate_as_you_type = 1;
|
||||
excessive_parenthesis = 1;
|
||||
};
|
||||
};
|
||||
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
bind = [ ", XF86Calculator, exec, ${lib.meta.getExe qalculate-gtk}" ];
|
||||
windowrulev2 = [ "float, class:(qalculate-gtk)" ];
|
||||
};
|
||||
};
|
||||
}
|
@@ -1,51 +0,0 @@
|
||||
{ user ? throw "user argument is required" }: { config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user.name};
|
||||
themeSwww = lib.meta.getExe (pkgs.writeShellApplication {
|
||||
name = "theme-swww";
|
||||
runtimeInputs = with pkgs; [
|
||||
coreutils-full
|
||||
swww
|
||||
];
|
||||
text = "exec swww img \"${hmConfig.theme.configDir}/wallpaper\"";
|
||||
});
|
||||
in
|
||||
{
|
||||
home-manager.users.${user.name} = {
|
||||
home = {
|
||||
packages = with pkgs; [ swww ];
|
||||
persistence."/cache${user.home}".directories = [ "${hmConfig.xdg.relativeCacheHome}/swww" ];
|
||||
};
|
||||
|
||||
systemd.user.services.swww = {
|
||||
Unit = {
|
||||
Description = "Wallpaper daemon";
|
||||
BindsTo = [ "graphical-session.target" ];
|
||||
After = [ "graphical-session.target" ];
|
||||
};
|
||||
|
||||
Service = {
|
||||
Type = "forking";
|
||||
|
||||
ExecStart = lib.meta.getExe (pkgs.writeShellApplication {
|
||||
name = "init-swww";
|
||||
runtimeInputs = with pkgs; [ swww ];
|
||||
text = "exec swww init";
|
||||
});
|
||||
|
||||
ExecStartPost = themeSwww;
|
||||
|
||||
ExecStop = lib.meta.getExe (pkgs.writeShellApplication {
|
||||
name = "kill-swww";
|
||||
runtimeInputs = with pkgs; [ swww ];
|
||||
text = "exec swww kill";
|
||||
});
|
||||
};
|
||||
|
||||
Install.WantedBy = [ "graphical-session.target" ];
|
||||
};
|
||||
|
||||
theme.extraConfig = lib.mkAfter "${themeSwww} &";
|
||||
};
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user