mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 15:11:34 +01:00
Switch to nixfmt
This commit is contained in:
parent
1d70117186
commit
b38d2df431
55 changed files with 1559 additions and 1540 deletions
28
flake.nix
28
flake.nix
|
|
@ -33,14 +33,13 @@
|
|||
};
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
...
|
||||
} @ inputs: let
|
||||
outputs =
|
||||
{ self, nixpkgs, ... }@inputs:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in {
|
||||
in
|
||||
{
|
||||
nixosConfigurations = {
|
||||
north = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
|
|
@ -64,21 +63,8 @@
|
|||
};
|
||||
};
|
||||
|
||||
formatter.${system} = nixpkgs.legacyPackages.${system}.alejandra.overrideAttrs {
|
||||
passthru.tests.version = {};
|
||||
postPatch = ''
|
||||
substituteInPlace src/alejandra/src/builder.rs \
|
||||
--replace '2 * build_ctx.indentation' '4 * build_ctx.indentation'
|
||||
substituteInPlace src/alejandra/src/rules/string.rs \
|
||||
--replace 'format!(" {}", line)' 'format!(" {}", line)'
|
||||
substituteInPlace src/alejandra_cli/src/cli.rs \
|
||||
--replace 'eprint!("{}", random_ad());' ""
|
||||
rm -r src/alejandra/tests
|
||||
'';
|
||||
};
|
||||
devShells.${system}.default = pkgs.mkShell { packages = [ pkgs.sops ]; };
|
||||
|
||||
devShells.${system}.default = pkgs.mkShell {
|
||||
packages = [pkgs.sops];
|
||||
};
|
||||
formatter.${system} = nixpkgs.legacyPackages.${system}.nixfmt-rfc-style;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
{pkgs, ...}: {
|
||||
imports = [../modules/system];
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [ ../modules/system ];
|
||||
|
||||
system.stateVersion = "23.11";
|
||||
|
||||
|
|
@ -39,7 +40,7 @@
|
|||
vimAlias = true;
|
||||
};
|
||||
|
||||
environment.systemPackages = [pkgs.git];
|
||||
environment.systemPackages = [ pkgs.git ];
|
||||
|
||||
fonts.packages = [
|
||||
pkgs.corefonts
|
||||
|
|
@ -53,7 +54,8 @@
|
|||
})
|
||||
];
|
||||
|
||||
nixpkgs.config.allowUnfreePredicate = pkg:
|
||||
nixpkgs.config.allowUnfreePredicate =
|
||||
pkg:
|
||||
builtins.elem (pkgs.lib.getName pkg) [
|
||||
"steam"
|
||||
"steam-original"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
../common.nix
|
||||
./hardware.nix
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
{...}: {
|
||||
{ ... }:
|
||||
{
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/92437114-de06-4a78-9ee3-c7d0ffcabf95";
|
||||
fsType = "ext4";
|
||||
|
|
@ -9,7 +10,7 @@
|
|||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [{device = "/dev/disk/by-uuid/1eba93d1-4853-4534-8cfd-5c14e29c6ff6";}];
|
||||
swapDevices = [ { device = "/dev/disk/by-uuid/1eba93d1-4853-4534-8cfd-5c14e29c6ff6"; } ];
|
||||
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
boot.initrd.availableKernelModules = [
|
||||
|
|
@ -19,7 +20,7 @@
|
|||
"usb_storage"
|
||||
"sd_mod"
|
||||
];
|
||||
boot.kernelModules = ["kvm-amd"];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
nixpkgs.hostPlatform = "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
../common.nix
|
||||
./hardware.nix
|
||||
|
|
|
|||
|
|
@ -4,7 +4,8 @@
|
|||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
inputs.disko.nixosModules.default
|
||||
./disko.nix
|
||||
|
|
@ -27,11 +28,12 @@
|
|||
nixpkgs.hostPlatform = "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = true;
|
||||
|
||||
services.xserver.videoDrivers = ["nvidia"];
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
hardware.nvidia = {
|
||||
modesetting.enable = true;
|
||||
powerManagement.enable = true;
|
||||
package = let
|
||||
package =
|
||||
let
|
||||
rcu_patch = pkgs.fetchpatch {
|
||||
url = "https://github.com/gentoo/gentoo/raw/c64caf53/x11-drivers/nvidia-drivers/files/nvidia-drivers-470.223.02-gpl-pfn_valid.patch";
|
||||
hash = "sha256-eZiQQp2S/asE7MfGvfe6dA/kdCvek9SYa/FFGp24dVg=";
|
||||
|
|
@ -59,9 +61,9 @@
|
|||
};
|
||||
|
||||
systemd.services.gpu-temp-reader = {
|
||||
wantedBy = ["multi-user.target"];
|
||||
requires = ["fancontrol.service"];
|
||||
before = ["fancontrol.service"];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
requires = [ "fancontrol.service" ];
|
||||
before = [ "fancontrol.service" ];
|
||||
|
||||
script = ''
|
||||
${lib.getExe' pkgs.coreutils "touch"} /tmp/nvidia-gpu-temp
|
||||
|
|
|
|||
|
|
@ -4,7 +4,8 @@
|
|||
lib,
|
||||
wrappers,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
options.myConfig.clipboard.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.clipboard.enable {
|
||||
|
|
@ -12,7 +13,9 @@
|
|||
|
||||
home.packages = [
|
||||
(pkgs.writeScriptBin "clipboard" ''
|
||||
${lib.getExe pkgs.cliphist} list | ${lib.getExe (wrappers.rofi {inherit (config.myConfig.de) theme;})} -dmenu -display-columns 2 | ${lib.getExe pkgs.cliphist} decode | ${lib.getExe' pkgs.wl-clipboard "wl-copy"}
|
||||
${lib.getExe pkgs.cliphist} list | ${
|
||||
lib.getExe (wrappers.rofi { inherit (config.myConfig.de) theme; })
|
||||
} -dmenu -display-columns 2 | ${lib.getExe pkgs.cliphist} decode | ${lib.getExe' pkgs.wl-clipboard "wl-copy"}
|
||||
'')
|
||||
];
|
||||
};
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@
|
|||
lib,
|
||||
wrappers,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
options.myConfig.de.hypridlelock.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.de.hypridlelock.enable {
|
||||
|
|
@ -12,9 +13,11 @@
|
|||
|
||||
settings = {
|
||||
general = {
|
||||
lock_cmd = let
|
||||
lock_cmd =
|
||||
let
|
||||
hyprlockExe = "${lib.getExe wrappers.hyprlock}";
|
||||
in "pidof ${hyprlockExe} || ${hyprlockExe}";
|
||||
in
|
||||
"pidof ${hyprlockExe} || ${hyprlockExe}";
|
||||
before_sleep_cmd = "loginctl lock-session";
|
||||
after_sleep_cmd = "hyprctl dispatch dpms on";
|
||||
};
|
||||
|
|
|
|||
|
|
@ -3,13 +3,14 @@
|
|||
lib,
|
||||
wrappers,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
config = lib.mkIf config.myConfig.de.hyprland.enable {
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
exec-once = ["${lib.getExe wrappers.hyprpaper}"];
|
||||
exec-once = [ "${lib.getExe wrappers.hyprpaper}" ];
|
||||
|
||||
input = {
|
||||
kb_layout = "de";
|
||||
|
|
|
|||
|
|
@ -1,10 +1,5 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.de;
|
||||
in {
|
||||
imports = [
|
||||
./config.nix
|
||||
./keybinds.nix
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@
|
|||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
config = lib.mkIf config.myConfig.de.hyprland.enable {
|
||||
wayland.windowManager.hyprland.extraConfig = ''
|
||||
# Bindflags:
|
||||
|
|
@ -54,8 +55,12 @@
|
|||
bind = SUPER SHIFT, M, togglespecialworkspace, minimize
|
||||
|
||||
# Switch workspace
|
||||
${lib.concatMapStringsSep "\n" (n: "bind=SUPER, ${toString n}, workspace, ${toString n}") (lib.range 1 9)}
|
||||
${lib.concatMapStringsSep "\n" (n: "bind=SUPER:SHIFT, ${toString n}, movetoworkspacesilent, ${toString n}") (lib.range 1 9)}
|
||||
${lib.concatMapStringsSep "\n" (n: "bind=SUPER, ${toString n}, workspace, ${toString n}") (
|
||||
lib.range 1 9
|
||||
)}
|
||||
${lib.concatMapStringsSep "\n" (
|
||||
n: "bind=SUPER:SHIFT, ${toString n}, movetoworkspacesilent, ${toString n}"
|
||||
) (lib.range 1 9)}
|
||||
|
||||
# Scroll through workspaces
|
||||
bind = SUPER, mouse_down, workspace, e-1
|
||||
|
|
@ -71,14 +76,16 @@
|
|||
bindl = , switch:on:Lid Switch, exec, systemctl suspend
|
||||
|
||||
# Control media
|
||||
${let
|
||||
${
|
||||
let
|
||||
play-pause = "${lib.getExe pkgs.playerctl} --ignore-player=brave play-pause";
|
||||
play-next = "${lib.getExe pkgs.playerctl} --ignore-player=brave next";
|
||||
play-previous = "${lib.getExe pkgs.playerctl} --ignore-player=brave previous";
|
||||
mute = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
|
||||
volume-up = "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+";
|
||||
volume-down = "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-";
|
||||
in ''
|
||||
in
|
||||
''
|
||||
bindl = , XF86AudioPlay, exec, ${play-pause}
|
||||
bindel = SHIFT, XF86AudioRaiseVolume, exec, ${play-next}
|
||||
bindel = SHIFT, XF86AudioLowerVolume, exec, ${play-previous}
|
||||
|
|
@ -92,7 +99,8 @@
|
|||
bindl = SUPER ALT, BACKSPACE, exec, ${mute}
|
||||
bindel = SUPER ALT, up, exec, ${volume-up}
|
||||
bindel = SUPER ALT, down, exec, ${volume-down}
|
||||
''}
|
||||
''
|
||||
}
|
||||
|
||||
# Adjust brightness
|
||||
bindel = , XF86MonBrightnessUp, exec, ${lib.getExe pkgs.brightnessctl} -e set +2%
|
||||
|
|
|
|||
|
|
@ -3,10 +3,12 @@
|
|||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.myConfig.de;
|
||||
in {
|
||||
options.myConfig.de.theme = lib.mkOption {type = lib.types.str;};
|
||||
in
|
||||
{
|
||||
options.myConfig.de.theme = lib.mkOption { type = lib.types.str; };
|
||||
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf (cfg.theme == "dark") {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@
|
|||
lib,
|
||||
wrappers,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
options.myConfig.de.waybar.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.de.waybar.enable {
|
||||
|
|
@ -13,6 +14,6 @@
|
|||
systemd.enable = true;
|
||||
};
|
||||
|
||||
systemd.user.services.waybar.Unit.After = ["sound.target"];
|
||||
systemd.user.services.waybar.Unit.After = [ "sound.target" ];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,5 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
options.myConfig.equalizer.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.equalizer.enable {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,5 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
options.myConfig.git.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.git.enable {
|
||||
|
|
|
|||
|
|
@ -1,10 +1,8 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.myConfig.shell;
|
||||
in {
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./starship.nix
|
||||
./enhancement.nix
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@
|
|||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
options.myConfig.shell.enhancement.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.shell.enhancement.enable {
|
||||
|
|
@ -11,35 +12,78 @@
|
|||
|
||||
programs.zoxide = {
|
||||
enable = true;
|
||||
options = ["--cmd cd"];
|
||||
options = [ "--cmd cd" ];
|
||||
};
|
||||
|
||||
home.shellAliases = let
|
||||
lsAliases = let
|
||||
home.shellAliases =
|
||||
let
|
||||
lsAliases =
|
||||
let
|
||||
listCmd = "${lib.getExe pkgs.eza} --header --group --time-style=long-iso --group-directories-first --sort=name --icons=auto --git --git-repos-no-status --binary";
|
||||
aliasList = lib.mapCartesianProduct ({
|
||||
aliasList =
|
||||
lib.mapCartesianProduct
|
||||
(
|
||||
{
|
||||
a,
|
||||
b,
|
||||
c,
|
||||
}:
|
||||
a + b + c) {
|
||||
a = ["ll" "lt" "l"];
|
||||
b = ["" "a"];
|
||||
c = ["" "d" "f"];
|
||||
a + b + c
|
||||
)
|
||||
{
|
||||
a = [
|
||||
"ll"
|
||||
"lt"
|
||||
"l"
|
||||
];
|
||||
b = [
|
||||
""
|
||||
"a"
|
||||
];
|
||||
c = [
|
||||
""
|
||||
"d"
|
||||
"f"
|
||||
];
|
||||
};
|
||||
convertAliasToCmd = str: "${listCmd} " + (builtins.replaceStrings ["ll" "lt" "l" "a" "d" "f"] ["--long " "--tree " "--oneline --dereference " "--all " "--only-dirs " "--only-files "] str);
|
||||
convertAliasToCmd =
|
||||
str:
|
||||
"${listCmd} "
|
||||
+ (builtins.replaceStrings
|
||||
[
|
||||
"ll"
|
||||
"lt"
|
||||
"l"
|
||||
"a"
|
||||
"d"
|
||||
"f"
|
||||
]
|
||||
[
|
||||
"--long "
|
||||
"--tree "
|
||||
"--oneline --dereference "
|
||||
"--all "
|
||||
"--only-dirs "
|
||||
"--only-files "
|
||||
]
|
||||
str
|
||||
);
|
||||
aliasAttrs = lib.genAttrs aliasList convertAliasToCmd;
|
||||
in
|
||||
aliasAttrs // {ls = "l";};
|
||||
aliasAttrs // { ls = "l"; };
|
||||
|
||||
catAlias = let
|
||||
catAlias =
|
||||
let
|
||||
theme =
|
||||
{
|
||||
dark = "";
|
||||
light = "GitHub";
|
||||
}
|
||||
.${config.myConfig.de.theme};
|
||||
in {cat = "${lib.getExe pkgs.bat} --plain --theme=${theme}";};
|
||||
in
|
||||
{
|
||||
cat = "${lib.getExe pkgs.bat} --plain --theme=${theme}";
|
||||
};
|
||||
in
|
||||
lib.mkMerge [
|
||||
lsAliases
|
||||
|
|
|
|||
|
|
@ -1,8 +1,5 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
options.myConfig.shell.starship.enable = lib.mkEnableOption "";
|
||||
|
||||
config.programs.starship = lib.mkIf config.myConfig.shell.starship.enable {
|
||||
|
|
|
|||
|
|
@ -4,14 +4,15 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
imports = [inputs.sops-nix.homeManagerModules.sops];
|
||||
}:
|
||||
{
|
||||
imports = [ inputs.sops-nix.homeManagerModules.sops ];
|
||||
|
||||
options.myConfig.sops.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.sops.enable {
|
||||
sops = {
|
||||
age.sshKeyPaths = ["${config.home.homeDirectory}/.ssh/id_ed25519"];
|
||||
age.sshKeyPaths = [ "${config.home.homeDirectory}/.ssh/id_ed25519" ];
|
||||
defaultSopsFile = "${self}/users/${config.home.username}/secrets.yaml";
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,8 +1,5 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
options.myConfig.ssh-client.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.ssh-client.enable {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,8 @@
|
|||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
options.myConfig.vscode.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.vscode.enable {
|
||||
|
|
@ -13,9 +14,11 @@
|
|||
|
||||
package = pkgs.vscode-with-extensions.override {
|
||||
vscode = pkgs.vscodium;
|
||||
vscodeExtensions = let
|
||||
vscodeExtensions =
|
||||
let
|
||||
open-ext = inputs.nix-vscode-extensions.extensions.${pkgs.system}.open-vsx;
|
||||
in [
|
||||
in
|
||||
[
|
||||
open-ext.jnoortheen.nix-ide
|
||||
open-ext.yzhang.markdown-all-in-one
|
||||
|
||||
|
|
@ -25,8 +28,10 @@
|
|||
};
|
||||
};
|
||||
|
||||
systemd.user.tmpfiles.rules = let
|
||||
settings = builtins.replaceStrings [","] [",\\n"] (builtins.toJSON {
|
||||
systemd.user.tmpfiles.rules =
|
||||
let
|
||||
settings = builtins.replaceStrings [ "," ] [ ",\\n" ] (
|
||||
builtins.toJSON {
|
||||
"workbench.colorTheme" =
|
||||
{
|
||||
dark = "GitHub Dark";
|
||||
|
|
@ -50,8 +55,10 @@
|
|||
"editor.minimap.enabled" = false;
|
||||
"window.menuBarVisibility" = "toggle";
|
||||
"workbench.editor.decorations.colors" = false;
|
||||
});
|
||||
in [
|
||||
}
|
||||
);
|
||||
in
|
||||
[
|
||||
"f+ %h/.config/VSCodium/User/settings.json - - - - ${settings}"
|
||||
"f+ %h/.config/VSCodium/User/settings-default.json - - - - ${settings}"
|
||||
];
|
||||
|
|
|
|||
|
|
@ -1,8 +1,5 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
options.myConfig.bluetooth.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.bluetooth.enable {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,5 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
options.myConfig.boot-loader = {
|
||||
systemd-boot.enable = lib.mkEnableOption "";
|
||||
silent = lib.mkEnableOption "";
|
||||
|
|
|
|||
|
|
@ -3,10 +3,12 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.myConfig.comma;
|
||||
in {
|
||||
imports = [inputs.nix-index-database.nixosModules.nix-index];
|
||||
in
|
||||
{
|
||||
imports = [ inputs.nix-index-database.nixosModules.nix-index ];
|
||||
|
||||
options.myConfig.comma.enable = lib.mkEnableOption "";
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@
|
|||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
options.myConfig.de.hyprland.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.de.hyprland.enable {
|
||||
|
|
@ -16,7 +17,7 @@
|
|||
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
extraPortals = [pkgs.xdg-desktop-portal-gtk];
|
||||
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
||||
};
|
||||
|
||||
services.gvfs.enable = true;
|
||||
|
|
|
|||
|
|
@ -3,9 +3,11 @@
|
|||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.myConfig.dm;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.myConfig.dm = {
|
||||
gdm.enable = lib.mkEnableOption "";
|
||||
tuigreet.enable = lib.mkEnableOption "";
|
||||
|
|
@ -20,9 +22,11 @@ in {
|
|||
services.greetd = lib.mkIf cfg.tuigreet.enable {
|
||||
enable = true;
|
||||
settings = {
|
||||
default_session = let
|
||||
default_session =
|
||||
let
|
||||
base = config.services.xserver.displayManager.sessionData.desktops;
|
||||
in {
|
||||
in
|
||||
{
|
||||
command = "${lib.getExe pkgs.greetd.tuigreet} --time --asterisks --remember --remember-user-session --sessions ${base}/share/wayland-sessions:${base}/share/xsessions";
|
||||
user = "greeter";
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,8 +1,5 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
options.myConfig.flatpak.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.flatpak.enable {
|
||||
|
|
|
|||
|
|
@ -1,10 +1,8 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.myConfig.nix-helper;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.myConfig.nix-helper = {
|
||||
enable = lib.mkEnableOption "";
|
||||
auto-gc.enable = lib.mkEnableOption "";
|
||||
|
|
@ -13,9 +11,11 @@ in {
|
|||
config = lib.mkIf cfg.enable {
|
||||
programs.nh.enable = true;
|
||||
|
||||
environment.shellAliases = let
|
||||
environment.shellAliases =
|
||||
let
|
||||
rebuild = "sudo -v && nh os";
|
||||
in {
|
||||
in
|
||||
{
|
||||
nrs = "${rebuild} switch";
|
||||
nrt = "${rebuild} test";
|
||||
nrb = "${rebuild} boot";
|
||||
|
|
|
|||
|
|
@ -1,8 +1,5 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
options.myConfig.printing.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.printing.enable {
|
||||
|
|
|
|||
|
|
@ -4,14 +4,15 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
imports = [inputs.sops-nix.nixosModules.sops];
|
||||
}:
|
||||
{
|
||||
imports = [ inputs.sops-nix.nixosModules.sops ];
|
||||
|
||||
options.myConfig.sops.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.sops.enable {
|
||||
sops = {
|
||||
age.sshKeyPaths = ["/etc/ssh/ssh_host_ed25519_key"];
|
||||
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
||||
defaultSopsFile = "${self}/hosts/${config.networking.hostName}/secrets.yaml";
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,8 +1,5 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
options.myConfig.sound.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.sound.enable {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,5 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
options.myConfig.syncthing.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.syncthing.enable {
|
||||
|
|
@ -22,7 +19,8 @@
|
|||
inspiron.id = "GUXHL6J-J2HWYNN-7JZJ5CN-6LPYGJD-H7GYRLQ-ORZ4PJJ-5K4WT7I-MELMIQO";
|
||||
};
|
||||
|
||||
folders = let
|
||||
folders =
|
||||
let
|
||||
allDevices = [
|
||||
"north"
|
||||
"inspiron"
|
||||
|
|
@ -34,7 +32,8 @@
|
|||
maxAge = "15552000"; # 180 days in seconds
|
||||
};
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
Documents = {
|
||||
path = "/home/seb/Documents";
|
||||
devices = allDevices;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@
|
|||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
options.myConfig.vm.qemu.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.vm.qemu.enable {
|
||||
|
|
@ -19,8 +20,8 @@
|
|||
home-manager.sharedModules = [
|
||||
{
|
||||
dconf.settings."org/virt-manager/virt-manager/connections" = {
|
||||
autoconnect = ["qemu:///system"];
|
||||
uris = ["qemu:///system"];
|
||||
autoconnect = [ "qemu:///system" ];
|
||||
uris = [ "qemu:///system" ];
|
||||
};
|
||||
}
|
||||
];
|
||||
|
|
|
|||
|
|
@ -1,14 +1,11 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
options.myConfig.vpn.lgs.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.vpn.lgs.enable {
|
||||
sops.secrets = {
|
||||
"vpn/lgs/crt" = {};
|
||||
"vpn/lgs/key" = {};
|
||||
"vpn/lgs/crt" = { };
|
||||
"vpn/lgs/key" = { };
|
||||
};
|
||||
|
||||
services.openvpn.servers.lgs = {
|
||||
|
|
|
|||
|
|
@ -3,14 +3,15 @@
|
|||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
options.myConfig.wlan.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.wlan.enable {
|
||||
sops.secrets = {
|
||||
"iwd/WLAN-233151" = {};
|
||||
"iwd/Fairphone4" = {};
|
||||
"iwd/LGS" = {};
|
||||
"iwd/WLAN-233151" = { };
|
||||
"iwd/Fairphone4" = { };
|
||||
"iwd/LGS" = { };
|
||||
};
|
||||
|
||||
networking.wireless.iwd = {
|
||||
|
|
@ -29,6 +30,6 @@
|
|||
"C /var/lib/iwd/LGS.8021x 0600 root root - ${config.sops.secrets."iwd/LGS".path}"
|
||||
];
|
||||
|
||||
environment.systemPackages = [pkgs.iwgtk];
|
||||
environment.systemPackages = [ pkgs.iwgtk ];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,6 @@
|
|||
{ self, inputs, ... }:
|
||||
{
|
||||
self,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
imports = [inputs.home-manager.nixosModules.home-manager];
|
||||
imports = [ inputs.home-manager.nixosModules.home-manager ];
|
||||
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
|
|
|
|||
|
|
@ -1,9 +1,6 @@
|
|||
{ pkgs, lib, ... }:
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
imports = [./default.nix];
|
||||
imports = [ ./default.nix ];
|
||||
|
||||
home-manager.users.seb = {
|
||||
myConfig.de.theme = "light";
|
||||
|
|
|
|||
|
|
@ -1,9 +1,6 @@
|
|||
{ pkgs, lib, ... }:
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
imports = [./default.nix];
|
||||
imports = [ ./default.nix ];
|
||||
|
||||
home-manager.users.seb = {
|
||||
home.packages = [
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
{config, ...}: {
|
||||
imports = [../common.nix];
|
||||
{ config, ... }:
|
||||
{
|
||||
imports = [ ../common.nix ];
|
||||
|
||||
sops.secrets.seb-password.neededForUsers = true;
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,8 @@
|
|||
osConfig,
|
||||
wrappers,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
xdg.userDirs.extraConfig.XDG_SCREENSHOTS_DIR = "${config.xdg.userDirs.pictures}/Screenshots";
|
||||
|
||||
myConfig = {
|
||||
|
|
@ -42,7 +43,7 @@
|
|||
wrappers.obsidian
|
||||
wrappers.marktext
|
||||
wrappers.webcord
|
||||
(wrappers.kitty {inherit (config.myConfig.de) theme;})
|
||||
(wrappers.rofi {inherit (config.myConfig.de) theme;})
|
||||
(wrappers.kitty { inherit (config.myConfig.de) theme; })
|
||||
(wrappers.rofi { inherit (config.myConfig.de) theme; })
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,5 @@
|
|||
{
|
||||
assembleWrapper,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{ assembleWrapper, pkgs, ... }:
|
||||
assembleWrapper {
|
||||
basePackage = pkgs.bottom;
|
||||
flags = ["--group"];
|
||||
flags = [ "--group" ];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,19 +3,22 @@
|
|||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
assembleWrapper = wrapperConfig:
|
||||
}:
|
||||
let
|
||||
assembleWrapper =
|
||||
wrapperConfig:
|
||||
(inputs.wrapper-manager.lib {
|
||||
inherit pkgs;
|
||||
modules = [{wrappers.wrappedPackage = wrapperConfig;}];
|
||||
})
|
||||
.config
|
||||
.wrappers
|
||||
.wrappedPackage
|
||||
.wrapped;
|
||||
in {
|
||||
modules = [ { wrappers.wrappedPackage = wrapperConfig; } ];
|
||||
}).config.wrappers.wrappedPackage.wrapped;
|
||||
in
|
||||
{
|
||||
_module.args.wrappers = lib.pipe (builtins.readDir ./.) [
|
||||
(lib.filterAttrs (name: value: name != "default.nix"))
|
||||
(lib.concatMapAttrs (name: _: {${lib.removeSuffix ".nix" name} = import ./${name} {inherit assembleWrapper pkgs lib;};}))
|
||||
(lib.concatMapAttrs (
|
||||
name: _: {
|
||||
${lib.removeSuffix ".nix" name} = import ./${name} { inherit assembleWrapper pkgs lib; };
|
||||
}
|
||||
))
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +1,9 @@
|
|||
{
|
||||
assembleWrapper,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{ assembleWrapper, pkgs, ... }:
|
||||
assembleWrapper {
|
||||
basePackage = pkgs.hyprlock;
|
||||
|
||||
flags = let
|
||||
flags =
|
||||
let
|
||||
hyprlock-config = pkgs.writeText "hyprlock-config" ''
|
||||
background {
|
||||
monitor =
|
||||
|
|
@ -18,7 +15,8 @@ assembleWrapper {
|
|||
monitor =
|
||||
}
|
||||
'';
|
||||
in [
|
||||
in
|
||||
[
|
||||
"--config"
|
||||
hyprlock-config
|
||||
];
|
||||
|
|
|
|||
|
|
@ -1,18 +1,16 @@
|
|||
{
|
||||
assembleWrapper,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{ assembleWrapper, pkgs, ... }:
|
||||
assembleWrapper {
|
||||
basePackage = pkgs.hyprpaper;
|
||||
|
||||
flags = let
|
||||
flags =
|
||||
let
|
||||
hyprpaper-config = pkgs.writeText "hyprpaper-config" ''
|
||||
preload = ~/Pictures/.wallpaper
|
||||
wallpaper = , ~/Pictures/.wallpaper
|
||||
splash = false
|
||||
'';
|
||||
in [
|
||||
in
|
||||
[
|
||||
"--config"
|
||||
hyprpaper-config
|
||||
];
|
||||
|
|
|
|||
|
|
@ -3,19 +3,22 @@
|
|||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {theme ? "dark"}:
|
||||
}:
|
||||
{
|
||||
theme ? "dark",
|
||||
}:
|
||||
assembleWrapper {
|
||||
basePackage = pkgs.kitty;
|
||||
|
||||
flags = let
|
||||
flags =
|
||||
let
|
||||
toKittyConfig = lib.generators.toKeyValue {
|
||||
mkKeyValue = key: value: let
|
||||
value' = (
|
||||
if lib.isBool value
|
||||
then lib.hm.booleans.yesNo value
|
||||
else toString value
|
||||
);
|
||||
in "${key} ${value'}";
|
||||
mkKeyValue =
|
||||
key: value:
|
||||
let
|
||||
value' = (if lib.isBool value then lib.hm.booleans.yesNo value else toString value);
|
||||
in
|
||||
"${key} ${value'}";
|
||||
};
|
||||
kitty-config = pkgs.writeText "kitty-config" (toKittyConfig {
|
||||
font_family = "JetBrainsMono Nerd Font";
|
||||
|
|
@ -25,12 +28,15 @@ assembleWrapper {
|
|||
update_check_interval = 0;
|
||||
cursor_shape = "beam";
|
||||
});
|
||||
kitty-theme = pkgs.writeText "kitty-theme" "include ${pkgs.kitty-themes}/share/kitty-themes/themes/${{
|
||||
kitty-theme = pkgs.writeText "kitty-theme" "include ${pkgs.kitty-themes}/share/kitty-themes/themes/${
|
||||
{
|
||||
dark = "default.conf";
|
||||
light = "GitHub_Light.conf";
|
||||
}
|
||||
.${theme}}";
|
||||
in [
|
||||
.${theme}
|
||||
}";
|
||||
in
|
||||
[
|
||||
"--config"
|
||||
kitty-config
|
||||
"--config"
|
||||
|
|
|
|||
|
|
@ -1,9 +1,5 @@
|
|||
{
|
||||
assembleWrapper,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{ assembleWrapper, pkgs, ... }:
|
||||
assembleWrapper {
|
||||
basePackage = pkgs.marktext;
|
||||
flags = ["--disable-gpu"];
|
||||
flags = [ "--disable-gpu" ];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,5 @@
|
|||
{
|
||||
assembleWrapper,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{ assembleWrapper, pkgs, ... }:
|
||||
assembleWrapper {
|
||||
basePackage = pkgs.obsidian;
|
||||
flags = ["--disable-gpu"];
|
||||
flags = [ "--disable-gpu" ];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,19 +3,27 @@
|
|||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {theme ? "dark"}:
|
||||
}:
|
||||
{
|
||||
theme ? "dark",
|
||||
}:
|
||||
assembleWrapper {
|
||||
basePackage = pkgs.rofi-wayland;
|
||||
|
||||
flags = let
|
||||
flags =
|
||||
let
|
||||
color-file =
|
||||
{
|
||||
dark = ./dark.rasi;
|
||||
light = ./light.rasi;
|
||||
}
|
||||
.${theme};
|
||||
rofi-config = pkgs.concatText "rofi-config" [./config.rasi color-file];
|
||||
in [
|
||||
rofi-config = pkgs.concatText "rofi-config" [
|
||||
./config.rasi
|
||||
color-file
|
||||
];
|
||||
in
|
||||
[
|
||||
"-config"
|
||||
rofi-config
|
||||
];
|
||||
|
|
|
|||
|
|
@ -1,9 +1,5 @@
|
|||
{
|
||||
assembleWrapper,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{ assembleWrapper, pkgs, ... }:
|
||||
assembleWrapper {
|
||||
basePackage = pkgs.spotify;
|
||||
flags = ["--disable-gpu"];
|
||||
flags = [ "--disable-gpu" ];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,19 +1,16 @@
|
|||
{
|
||||
assembleWrapper,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{ assembleWrapper, pkgs, ... }:
|
||||
assembleWrapper {
|
||||
basePackage = pkgs.waybar;
|
||||
|
||||
flags = let
|
||||
waybar-config = (pkgs.formats.json {}).generate "waybar-config" {
|
||||
flags =
|
||||
let
|
||||
waybar-config = (pkgs.formats.json { }).generate "waybar-config" {
|
||||
layer = "top";
|
||||
position = "bottom";
|
||||
spacing = 10;
|
||||
|
||||
modules-left = ["clock"];
|
||||
modules-center = ["hyprland/workspaces"];
|
||||
modules-left = [ "clock" ];
|
||||
modules-center = [ "hyprland/workspaces" ];
|
||||
modules-right = [
|
||||
"tray"
|
||||
"network"
|
||||
|
|
@ -107,7 +104,8 @@ assembleWrapper {
|
|||
font-size: 15px;
|
||||
}
|
||||
'';
|
||||
in [
|
||||
in
|
||||
[
|
||||
"--config"
|
||||
waybar-config
|
||||
"--style"
|
||||
|
|
|
|||
|
|
@ -1,9 +1,5 @@
|
|||
{
|
||||
assembleWrapper,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{ assembleWrapper, pkgs, ... }:
|
||||
assembleWrapper {
|
||||
basePackage = pkgs.webcord;
|
||||
flags = ["--disable-gpu"];
|
||||
flags = [ "--disable-gpu" ];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue