mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 14:01:34 +01:00
Switch to 4 space indentation
This commit is contained in:
parent
a4cc33577c
commit
d7aed49725
32 changed files with 796 additions and 783 deletions
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
imports = [
|
||||
./qtile
|
||||
./vscode.nix
|
||||
./shell.nix
|
||||
./theming.nix
|
||||
./ssh-client.nix
|
||||
./git.nix
|
||||
./neovim.nix
|
||||
./kitty.nix
|
||||
];
|
||||
imports = [
|
||||
./qtile
|
||||
./vscode.nix
|
||||
./shell.nix
|
||||
./theming.nix
|
||||
./ssh-client.nix
|
||||
./git.nix
|
||||
./neovim.nix
|
||||
./kitty.nix
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,22 +1,22 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
options.myConfig.git.enable = lib.mkEnableOption "";
|
||||
options.myConfig.git.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.git.enable {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
config = lib.mkIf config.myConfig.git.enable {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
|
||||
userName = "SebastianStork";
|
||||
userEmail = "sebastian.stork@pm.me";
|
||||
userName = "SebastianStork";
|
||||
userEmail = "sebastian.stork@pm.me";
|
||||
|
||||
extraConfig = {
|
||||
init.defaultBranch = "main";
|
||||
};
|
||||
extraConfig = {
|
||||
init.defaultBranch = "main";
|
||||
};
|
||||
};
|
||||
|
||||
programs.lazygit.enable = true;
|
||||
};
|
||||
|
||||
programs.lazygit.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,22 +1,22 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
options.myConfig.kitty.enable = lib.mkEnableOption "";
|
||||
options.myConfig.kitty.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.kitty.enable {
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
font_family = "JetBrainsMono Nerd Font";
|
||||
confirm_os_window_close = 0;
|
||||
background_opacity = "0.7";
|
||||
scrollback_lines = 10000;
|
||||
enable_audio_bell = false;
|
||||
update_check_interval = 0;
|
||||
};
|
||||
config = lib.mkIf config.myConfig.kitty.enable {
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
font_family = "JetBrainsMono Nerd Font";
|
||||
confirm_os_window_close = 0;
|
||||
background_opacity = "0.7";
|
||||
scrollback_lines = 10000;
|
||||
enable_audio_bell = false;
|
||||
update_check_interval = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,17 +1,17 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
options.myConfig.neovim.enable = lib.mkEnableOption "";
|
||||
options.myConfig.neovim.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.neovim.enable {
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
vimdiffAlias = true;
|
||||
config = lib.mkIf config.myConfig.neovim.enable {
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
vimdiffAlias = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,44 +1,44 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
osConfig,
|
||||
...
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
osConfig,
|
||||
...
|
||||
}: {
|
||||
options.myConfig.qtile.enable = lib.mkEnableOption "";
|
||||
options.myConfig.qtile.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.qtile.enable {
|
||||
assertions = [
|
||||
{
|
||||
assertion = osConfig.services.xserver.windowManager.qtile.enable;
|
||||
message = "Qtile has to be enabled on the system level";
|
||||
}
|
||||
];
|
||||
config = lib.mkIf config.myConfig.qtile.enable {
|
||||
assertions = [
|
||||
{
|
||||
assertion = osConfig.services.xserver.windowManager.qtile.enable;
|
||||
message = "Qtile has to be enabled on the system level";
|
||||
}
|
||||
];
|
||||
|
||||
home.file.".config/qtile/config.py".source = ./files/qtile.py;
|
||||
home.file.".background-image".source = ./files/background-image;
|
||||
home.file.".config/qtile/config.py".source = ./files/qtile.py;
|
||||
home.file.".background-image".source = ./files/background-image;
|
||||
|
||||
home.packages = [
|
||||
# Widget dependencies
|
||||
pkgs.python311Packages.iwlib
|
||||
pkgs.python311Packages.psutil
|
||||
pkgs.lm_sensors
|
||||
home.packages = [
|
||||
# Widget dependencies
|
||||
pkgs.python311Packages.iwlib
|
||||
pkgs.python311Packages.psutil
|
||||
pkgs.lm_sensors
|
||||
|
||||
# Hotkey dependencies
|
||||
pkgs.playerctl
|
||||
pkgs.brightnessctl
|
||||
];
|
||||
# Hotkey dependencies
|
||||
pkgs.playerctl
|
||||
pkgs.brightnessctl
|
||||
];
|
||||
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
theme = ./files/rofi-theme.rasi;
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
theme = ./files/rofi-theme.rasi;
|
||||
};
|
||||
|
||||
services.picom = {
|
||||
enable = true;
|
||||
vSync = true;
|
||||
};
|
||||
|
||||
services.dunst.enable = true;
|
||||
};
|
||||
|
||||
services.picom = {
|
||||
enable = true;
|
||||
vSync = true;
|
||||
};
|
||||
|
||||
services.dunst.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,70 +1,70 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.shell;
|
||||
cfg = config.myConfig.shell;
|
||||
in {
|
||||
options.myConfig.shell = {
|
||||
bash.enable = lib.mkEnableOption "";
|
||||
zsh.enable = lib.mkEnableOption "";
|
||||
starship.enable = lib.mkEnableOption "";
|
||||
nixAliases.enable = lib.mkEnableOption "";
|
||||
improvedCommands.enable = lib.mkEnableOption "";
|
||||
direnv.enable = lib.mkEnableOption "";
|
||||
};
|
||||
options.myConfig.shell = {
|
||||
bash.enable = lib.mkEnableOption "";
|
||||
zsh.enable = lib.mkEnableOption "";
|
||||
starship.enable = lib.mkEnableOption "";
|
||||
nixAliases.enable = lib.mkEnableOption "";
|
||||
improvedCommands.enable = lib.mkEnableOption "";
|
||||
direnv.enable = lib.mkEnableOption "";
|
||||
};
|
||||
|
||||
config = {
|
||||
programs.bash.enable = cfg.bash.enable;
|
||||
config = {
|
||||
programs.bash.enable = cfg.bash.enable;
|
||||
|
||||
programs.zsh.enable = cfg.zsh.enable;
|
||||
programs.zsh.enable = cfg.zsh.enable;
|
||||
|
||||
programs.starship = lib.mkIf cfg.starship.enable {
|
||||
enable = true;
|
||||
enableBashIntegration = cfg.bash.enable;
|
||||
enableZshIntegration = cfg.zsh.enable;
|
||||
settings = {
|
||||
cmd_duration.disabled = true;
|
||||
directory = {
|
||||
truncation_length = 0;
|
||||
truncation_symbol = "…/";
|
||||
truncate_to_repo = false;
|
||||
programs.starship = lib.mkIf cfg.starship.enable {
|
||||
enable = true;
|
||||
enableBashIntegration = cfg.bash.enable;
|
||||
enableZshIntegration = cfg.zsh.enable;
|
||||
settings = {
|
||||
cmd_duration.disabled = true;
|
||||
directory = {
|
||||
truncation_length = 0;
|
||||
truncation_symbol = "…/";
|
||||
truncate_to_repo = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
home.shellAliases = let
|
||||
nixAliases = lib.mkIf cfg.nixAliases.enable {
|
||||
nrs = "sudo nixos-rebuild switch";
|
||||
nrb = "sudo nixos-rebuild boot";
|
||||
nrrb = "nrb && reboot";
|
||||
nrt = "sudo nixos-rebuild test";
|
||||
nu = "sudo nix flake update";
|
||||
};
|
||||
commandAliases = lib.mkIf cfg.improvedCommands.enable {
|
||||
cat = "bat -p";
|
||||
};
|
||||
in
|
||||
lib.mkMerge [nixAliases commandAliases];
|
||||
|
||||
programs.lsd = lib.mkIf cfg.improvedCommands.enable {
|
||||
enable = true;
|
||||
enableAliases = true;
|
||||
};
|
||||
|
||||
programs.bat.enable = cfg.improvedCommands.enable;
|
||||
|
||||
programs.fzf.enable = cfg.improvedCommands.enable;
|
||||
|
||||
programs.zoxide = lib.mkIf cfg.improvedCommands.enable {
|
||||
enable = true;
|
||||
options = ["--cmd cd"];
|
||||
};
|
||||
|
||||
programs.direnv = lib.mkIf cfg.direnv.enable {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
config.global.hide_env_diff = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
home.shellAliases = let
|
||||
nixAliases = lib.mkIf cfg.nixAliases.enable {
|
||||
nrs = "sudo nixos-rebuild switch";
|
||||
nrb = "sudo nixos-rebuild boot";
|
||||
nrrb = "nrb && reboot";
|
||||
nrt = "sudo nixos-rebuild test";
|
||||
nu = "sudo nix flake update";
|
||||
};
|
||||
commandAliases = lib.mkIf cfg.improvedCommands.enable {
|
||||
cat = "bat -p";
|
||||
};
|
||||
in
|
||||
lib.mkMerge [nixAliases commandAliases];
|
||||
|
||||
programs.lsd = lib.mkIf cfg.improvedCommands.enable {
|
||||
enable = true;
|
||||
enableAliases = true;
|
||||
};
|
||||
|
||||
programs.bat.enable = cfg.improvedCommands.enable;
|
||||
|
||||
programs.fzf.enable = cfg.improvedCommands.enable;
|
||||
|
||||
programs.zoxide = lib.mkIf cfg.improvedCommands.enable {
|
||||
enable = true;
|
||||
options = ["--cmd cd"];
|
||||
};
|
||||
|
||||
programs.direnv = lib.mkIf cfg.direnv.enable {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
config.global.hide_env_diff = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,21 +1,21 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
options.myConfig.ssh-client.enable = lib.mkEnableOption "";
|
||||
options.myConfig.ssh-client.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.ssh-client.enable {
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
config = lib.mkIf config.myConfig.ssh-client.enable {
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
|
||||
matchBlocks.kluebero-vm1 = {
|
||||
hostname = "10.5.251.175";
|
||||
user = "seb";
|
||||
identitiesOnly = true;
|
||||
identityFile = ["~/.ssh/kluebero/id_ed25519"];
|
||||
};
|
||||
matchBlocks.kluebero-vm1 = {
|
||||
hostname = "10.5.251.175";
|
||||
user = "seb";
|
||||
identitiesOnly = true;
|
||||
identityFile = ["~/.ssh/kluebero/id_ed25519"];
|
||||
};
|
||||
};
|
||||
services.ssh-agent.enable = true;
|
||||
};
|
||||
services.ssh-agent.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,45 +1,45 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
options.myConfig.theming.enable = lib.mkEnableOption "";
|
||||
options.myConfig.theming.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.theming.enable {
|
||||
dconf.settings."org/gnome/desktop/interface".color-scheme = "prefer-dark";
|
||||
config = lib.mkIf config.myConfig.theming.enable {
|
||||
dconf.settings."org/gnome/desktop/interface".color-scheme = "prefer-dark";
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
gtk = {
|
||||
enable = true;
|
||||
|
||||
gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
|
||||
gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
|
||||
|
||||
theme.name = "Adwaita-dark";
|
||||
theme.package = pkgs.gnome.gnome-themes-extra;
|
||||
theme.name = "Adwaita-dark";
|
||||
theme.package = pkgs.gnome.gnome-themes-extra;
|
||||
|
||||
iconTheme.name = "Adwaita";
|
||||
iconTheme.package = pkgs.gnome.adwaita-icon-theme;
|
||||
iconTheme.name = "Adwaita";
|
||||
iconTheme.package = pkgs.gnome.adwaita-icon-theme;
|
||||
|
||||
font.name = "Open Sans";
|
||||
font.package = pkgs.open-sans;
|
||||
font.name = "Open Sans";
|
||||
font.package = pkgs.open-sans;
|
||||
};
|
||||
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme = "gnome";
|
||||
style.name = "adwaita-dark";
|
||||
style.package = pkgs.adwaita-qt;
|
||||
};
|
||||
|
||||
home.pointerCursor = {
|
||||
name = "Bibata-Original-Classic";
|
||||
package = pkgs.bibata-cursors;
|
||||
size = 24;
|
||||
x11.enable = true;
|
||||
x11.defaultCursor = "X_cursor";
|
||||
gtk.enable = true;
|
||||
};
|
||||
|
||||
fonts.fontconfig.enable = true;
|
||||
};
|
||||
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme = "gnome";
|
||||
style.name = "adwaita-dark";
|
||||
style.package = pkgs.adwaita-qt;
|
||||
};
|
||||
|
||||
home.pointerCursor = {
|
||||
name = "Bibata-Original-Classic";
|
||||
package = pkgs.bibata-cursors;
|
||||
size = 24;
|
||||
x11.enable = true;
|
||||
x11.defaultCursor = "X_cursor";
|
||||
gtk.enable = true;
|
||||
};
|
||||
|
||||
fonts.fontconfig.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,50 +1,63 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
options.myConfig.vscode.enable = lib.mkEnableOption "";
|
||||
options.myConfig.vscode.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.vscode.enable {
|
||||
home.packages = [pkgs.nil];
|
||||
config = lib.mkIf config.myConfig.vscode.enable {
|
||||
home.packages = let
|
||||
alejandra4 = pkgs.alejandra.overrideAttrs {
|
||||
passthru.tests.version = lib.mkForce {};
|
||||
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)'
|
||||
rm -r src/alejandra/tests
|
||||
'';
|
||||
};
|
||||
in [
|
||||
pkgs.nil
|
||||
alejandra4
|
||||
];
|
||||
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
package = pkgs.vscodium;
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
package = pkgs.vscodium;
|
||||
|
||||
mutableExtensionsDir = false;
|
||||
extensions = [
|
||||
pkgs.vscode-extensions.jnoortheen.nix-ide
|
||||
pkgs.vscode-extensions.kamadorueda.alejandra
|
||||
pkgs.vscode-extensions.pkief.material-icon-theme
|
||||
pkgs.vscode-extensions.mkhl.direnv
|
||||
];
|
||||
mutableExtensionsDir = false;
|
||||
extensions = [
|
||||
pkgs.vscode-extensions.jnoortheen.nix-ide
|
||||
pkgs.vscode-extensions.pkief.material-icon-theme
|
||||
pkgs.vscode-extensions.mkhl.direnv
|
||||
];
|
||||
};
|
||||
|
||||
systemd.user.tmpfiles.rules = let
|
||||
settings = builtins.replaceStrings ["\n"] ["\\n"] ''
|
||||
{
|
||||
"editor.fontFamily": "JetBrainsMono Nerd Font",
|
||||
"explorer.confirmDelete": false,
|
||||
"explorer.confirmDragAndDrop": false,
|
||||
"extensions.autoCheckUpdates": false,
|
||||
"files.autoSave": "afterDelay",
|
||||
"git.autofetch": true,
|
||||
"git.confirmSync": false,
|
||||
"nix.enableLanguageServer": true,
|
||||
"nix.serverPath": "nil",
|
||||
"update.mode": "none",
|
||||
"git.suggestSmartCommit": false,
|
||||
"workbench.sideBar.location": "right",
|
||||
"editor.renderWhitespace": "none",
|
||||
"workbench.iconTheme": "material-icon-theme",
|
||||
"editor.minimap.enabled": false
|
||||
}
|
||||
'';
|
||||
in [
|
||||
"f+ %h/.config/VSCodium/User/settings.json - - - - ${settings}"
|
||||
"f+ %h/.config/VSCodium/User/settings-default.json - - - - ${settings}"
|
||||
];
|
||||
};
|
||||
|
||||
systemd.user.tmpfiles.rules = let
|
||||
settings = builtins.replaceStrings ["\n"] ["\\n"] ''
|
||||
{
|
||||
"editor.fontFamily": "JetBrainsMono Nerd Font",
|
||||
"explorer.confirmDelete": false,
|
||||
"explorer.confirmDragAndDrop": false,
|
||||
"extensions.autoCheckUpdates": false,
|
||||
"files.autoSave": "afterDelay",
|
||||
"git.autofetch": true,
|
||||
"git.confirmSync": false,
|
||||
"nix.enableLanguageServer": true,
|
||||
"nix.serverPath": "nil",
|
||||
"update.mode": "none",
|
||||
"git.suggestSmartCommit": false,
|
||||
"workbench.sideBar.location": "right",
|
||||
"editor.renderWhitespace": "none",
|
||||
"workbench.iconTheme": "material-icon-theme",
|
||||
"editor.minimap.enabled": false
|
||||
}
|
||||
'';
|
||||
in [
|
||||
"f+ %h/.config/VSCodium/User/settings.json - - - - ${settings}"
|
||||
"f+ %h/.config/VSCodium/User/settings-default.json - - - - ${settings}"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,25 +1,25 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
options.myConfig.auto-cpufreq.enable = lib.mkEnableOption "";
|
||||
options.myConfig.auto-cpufreq.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.auto-cpufreq.enable {
|
||||
services.auto-cpufreq = {
|
||||
enable = true;
|
||||
settings = {
|
||||
charger = {
|
||||
governor = "powersave";
|
||||
turbo = "never";
|
||||
energy_performance_preference = "power";
|
||||
config = lib.mkIf config.myConfig.auto-cpufreq.enable {
|
||||
services.auto-cpufreq = {
|
||||
enable = true;
|
||||
settings = {
|
||||
charger = {
|
||||
governor = "powersave";
|
||||
turbo = "never";
|
||||
energy_performance_preference = "power";
|
||||
};
|
||||
battery = {
|
||||
governor = "powersave";
|
||||
turbo = "never";
|
||||
energy_performance_preference = "power";
|
||||
};
|
||||
};
|
||||
};
|
||||
battery = {
|
||||
governor = "powersave";
|
||||
turbo = "never";
|
||||
energy_performance_preference = "power";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
options.myConfig.auto-gc.enable = lib.mkEnableOption "";
|
||||
options.myConfig.auto-gc.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.auto-gc.enable {
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 7d";
|
||||
config = lib.mkIf config.myConfig.auto-gc.enable {
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 7d";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,16 +1,16 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
options.myConfig.bluetooth.enable = lib.mkEnableOption "";
|
||||
options.myConfig.bluetooth.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.bluetooth.enable {
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
powerOnBoot = true;
|
||||
config = lib.mkIf config.myConfig.bluetooth.enable {
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
powerOnBoot = true;
|
||||
};
|
||||
services.blueman.enable = true;
|
||||
hardware.logitech.wireless.enable = true;
|
||||
};
|
||||
services.blueman.enable = true;
|
||||
hardware.logitech.wireless.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,20 +1,20 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
options.myConfig.boot-loader.systemd-boot.enable = lib.mkEnableOption "";
|
||||
options.myConfig.boot-loader.systemd-boot.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.boot-loader.systemd-boot.enable {
|
||||
boot.tmp.cleanOnBoot = true;
|
||||
boot.loader = {
|
||||
systemd-boot = {
|
||||
enable = true;
|
||||
editor = false;
|
||||
configurationLimit = 50;
|
||||
};
|
||||
efi.canTouchEfiVariables = true;
|
||||
timeout = 3;
|
||||
config = lib.mkIf config.myConfig.boot-loader.systemd-boot.enable {
|
||||
boot.tmp.cleanOnBoot = true;
|
||||
boot.loader = {
|
||||
systemd-boot = {
|
||||
enable = true;
|
||||
editor = false;
|
||||
configurationLimit = 50;
|
||||
};
|
||||
efi.canTouchEfiVariables = true;
|
||||
timeout = 3;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,16 +1,16 @@
|
|||
{
|
||||
inputs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
inputs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
imports = [inputs.nix-index-database.nixosModules.nix-index];
|
||||
imports = [inputs.nix-index-database.nixosModules.nix-index];
|
||||
|
||||
options.myConfig.comma.enable = lib.mkEnableOption "";
|
||||
options.myConfig.comma.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.comma.enable {
|
||||
programs.command-not-found.enable = false;
|
||||
programs.nix-index.enable = true;
|
||||
programs.nix-index-database.comma.enable = true;
|
||||
};
|
||||
config = lib.mkIf config.myConfig.comma.enable {
|
||||
programs.command-not-found.enable = false;
|
||||
programs.nix-index.enable = true;
|
||||
programs.nix-index-database.comma.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,18 +1,18 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
options.myConfig.de.qtile.enable = lib.mkEnableOption "";
|
||||
options.myConfig.de.qtile.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.de.qtile.enable {
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
config = lib.mkIf config.myConfig.de.qtile.enable {
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
|
||||
windowManager.qtile.enable = true;
|
||||
desktopManager.wallpaper.mode = "fill";
|
||||
windowManager.qtile.enable = true;
|
||||
desktopManager.wallpaper.mode = "fill";
|
||||
};
|
||||
|
||||
myConfig.x-input.enable = true;
|
||||
};
|
||||
|
||||
myConfig.x-input.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,19 +1,19 @@
|
|||
{
|
||||
imports = [
|
||||
./flatpak.nix
|
||||
./vm.nix
|
||||
./wlan.nix
|
||||
./doas.nix
|
||||
./vpn.nix
|
||||
./comma.nix
|
||||
./auto-gc.nix
|
||||
./sops.nix
|
||||
./bluetooth.nix
|
||||
./auto-cpufreq.nix
|
||||
./x-input.nix
|
||||
./de.nix
|
||||
./dm.nix
|
||||
./sound.nix
|
||||
./boot-loader.nix
|
||||
];
|
||||
imports = [
|
||||
./flatpak.nix
|
||||
./vm.nix
|
||||
./wlan.nix
|
||||
./doas.nix
|
||||
./vpn.nix
|
||||
./comma.nix
|
||||
./auto-gc.nix
|
||||
./sops.nix
|
||||
./bluetooth.nix
|
||||
./auto-cpufreq.nix
|
||||
./x-input.nix
|
||||
./de.nix
|
||||
./dm.nix
|
||||
./sound.nix
|
||||
./boot-loader.nix
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,20 +1,20 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
options.myConfig.dm.lightdm.enable = lib.mkEnableOption "";
|
||||
options.myConfig.dm.lightdm.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.dm.lightdm.enable {
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
config = lib.mkIf config.myConfig.dm.lightdm.enable {
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
|
||||
displayManager.lightdm = {
|
||||
enable = true;
|
||||
greeters.slick.enable = true;
|
||||
};
|
||||
displayManager.lightdm = {
|
||||
enable = true;
|
||||
greeters.slick.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
myConfig.x-input.enable = true;
|
||||
};
|
||||
|
||||
myConfig.x-input.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,25 +1,25 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
options.myConfig.doas.enable = lib.mkEnableOption "";
|
||||
options.myConfig.doas.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.doas.enable {
|
||||
security.sudo.enable = false;
|
||||
config = lib.mkIf config.myConfig.doas.enable {
|
||||
security.sudo.enable = false;
|
||||
|
||||
security.doas = {
|
||||
enable = true;
|
||||
extraRules = [
|
||||
{
|
||||
groups = ["wheel"];
|
||||
keepEnv = true;
|
||||
persist = true;
|
||||
}
|
||||
];
|
||||
security.doas = {
|
||||
enable = true;
|
||||
extraRules = [
|
||||
{
|
||||
groups = ["wheel"];
|
||||
keepEnv = true;
|
||||
persist = true;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
environment.shellAliases.sudo = "doas";
|
||||
programs.bash.interactiveShellInit = lib.mkIf config.myConfig.shell.bash.enable "complete -F _command doas";
|
||||
};
|
||||
|
||||
environment.shellAliases.sudo = "doas";
|
||||
programs.bash.interactiveShellInit = lib.mkIf config.myConfig.shell.bash.enable "complete -F _command doas";
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,30 +1,30 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
options.myConfig.flatpak.enable = lib.mkEnableOption "";
|
||||
options.myConfig.flatpak.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.flatpak.enable {
|
||||
services.flatpak.enable = true;
|
||||
config = lib.mkIf config.myConfig.flatpak.enable {
|
||||
services.flatpak.enable = true;
|
||||
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
extraPortals = [pkgs.xdg-desktop-portal-gtk];
|
||||
config.common.default = "*";
|
||||
};
|
||||
|
||||
home-manager.sharedModules = [
|
||||
{
|
||||
xdg = {
|
||||
enable = true;
|
||||
systemDirs.data = [
|
||||
"/var/lib/flatpak/exports/share"
|
||||
"/home/seb/.local/share/flatpak/exports/share"
|
||||
];
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
extraPortals = [pkgs.xdg-desktop-portal-gtk];
|
||||
config.common.default = "*";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
home-manager.sharedModules = [
|
||||
{
|
||||
xdg = {
|
||||
enable = true;
|
||||
systemDirs.data = [
|
||||
"/var/lib/flatpak/exports/share"
|
||||
"/home/seb/.local/share/flatpak/exports/share"
|
||||
];
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,17 +1,17 @@
|
|||
{
|
||||
inputs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
inputs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
imports = [inputs.sops-nix.nixosModules.sops];
|
||||
imports = [inputs.sops-nix.nixosModules.sops];
|
||||
|
||||
options.myConfig.sops.enable = lib.mkEnableOption "";
|
||||
options.myConfig.sops.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.sops.enable {
|
||||
sops = {
|
||||
age.sshKeyPaths = ["/etc/ssh/ssh_host_ed25519_key"];
|
||||
defaultSopsFile = ../../hosts/dell-laptop/secrets.yaml;
|
||||
config = lib.mkIf config.myConfig.sops.enable {
|
||||
sops = {
|
||||
age.sshKeyPaths = ["/etc/ssh/ssh_host_ed25519_key"];
|
||||
defaultSopsFile = ../../hosts/dell-laptop/secrets.yaml;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,19 +1,19 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
options.myConfig.sound.pipewire.enable = lib.mkEnableOption "";
|
||||
options.myConfig.sound.pipewire.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.sound.pipewire.enable {
|
||||
security.rtkit.enable = true;
|
||||
hardware.pulseaudio.enable = false;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
wireplumber.enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
config = lib.mkIf config.myConfig.sound.pipewire.enable {
|
||||
security.rtkit.enable = true;
|
||||
hardware.pulseaudio.enable = false;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
wireplumber.enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,28 +1,28 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
options.myConfig.vm.qemu.enable = lib.mkEnableOption "";
|
||||
options.myConfig.vm.qemu.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.vm.qemu.enable {
|
||||
virtualisation.libvirtd.enable = true;
|
||||
config = lib.mkIf config.myConfig.vm.qemu.enable {
|
||||
virtualisation.libvirtd.enable = true;
|
||||
|
||||
programs.virt-manager.enable = true;
|
||||
programs.virt-manager.enable = true;
|
||||
|
||||
environment.systemPackages = [
|
||||
pkgs.quickemu
|
||||
pkgs.quickgui
|
||||
];
|
||||
environment.systemPackages = [
|
||||
pkgs.quickemu
|
||||
pkgs.quickgui
|
||||
];
|
||||
|
||||
home-manager.sharedModules = [
|
||||
{
|
||||
dconf.settings."org/virt-manager/virt-manager/connections" = {
|
||||
autoconnect = ["qemu:///system"];
|
||||
uris = ["qemu:///system"];
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
home-manager.sharedModules = [
|
||||
{
|
||||
dconf.settings."org/virt-manager/virt-manager/connections" = {
|
||||
autoconnect = ["qemu:///system"];
|
||||
uris = ["qemu:///system"];
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,37 +1,37 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
options.myConfig.vpn.lgs.enable = lib.mkEnableOption "";
|
||||
options.myConfig.vpn.lgs.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.vpn.lgs.enable {
|
||||
sops.secrets = {
|
||||
"vpn/lgs/crt" = {};
|
||||
"vpn/lgs/key" = {};
|
||||
config = lib.mkIf config.myConfig.vpn.lgs.enable {
|
||||
sops.secrets = {
|
||||
"vpn/lgs/crt" = {};
|
||||
"vpn/lgs/key" = {};
|
||||
};
|
||||
|
||||
services.openvpn.servers.lgs = {
|
||||
autoStart = false;
|
||||
|
||||
config = ''
|
||||
dev tap
|
||||
persist-tun
|
||||
persist-key
|
||||
data-ciphers AES-128-GCM:AES-256-CBC
|
||||
data-ciphers-fallback AES-256-CBC
|
||||
auth SHA1
|
||||
tls-client
|
||||
client
|
||||
resolv-retry infinite
|
||||
remote 194.9.190.11 1194 udp4
|
||||
nobind
|
||||
auth-user-pass
|
||||
ca ${config.sops.secrets."vpn/lgs/crt".path}
|
||||
tls-auth ${config.sops.secrets."vpn/lgs/key".path} 1
|
||||
remote-cert-tls server
|
||||
explicit-exit-notify
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
services.openvpn.servers.lgs = {
|
||||
autoStart = false;
|
||||
|
||||
config = ''
|
||||
dev tap
|
||||
persist-tun
|
||||
persist-key
|
||||
data-ciphers AES-128-GCM:AES-256-CBC
|
||||
data-ciphers-fallback AES-256-CBC
|
||||
auth SHA1
|
||||
tls-client
|
||||
client
|
||||
resolv-retry infinite
|
||||
remote 194.9.190.11 1194 udp4
|
||||
nobind
|
||||
auth-user-pass
|
||||
ca ${config.sops.secrets."vpn/lgs/crt".path}
|
||||
tls-auth ${config.sops.secrets."vpn/lgs/key".path} 1
|
||||
remote-cert-tls server
|
||||
explicit-exit-notify
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,96 +1,96 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
options.myConfig.wlan.enable = lib.mkEnableOption "";
|
||||
options.myConfig.wlan.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.wlan.enable {
|
||||
sops.secrets."wlan.env" = {};
|
||||
config = lib.mkIf config.myConfig.wlan.enable {
|
||||
sops.secrets."wlan.env" = {};
|
||||
|
||||
networking.networkmanager = {
|
||||
enable = true;
|
||||
networking.networkmanager = {
|
||||
enable = true;
|
||||
|
||||
ensureProfiles = {
|
||||
environmentFiles = [config.sops.secrets."wlan.env".path];
|
||||
ensureProfiles = {
|
||||
environmentFiles = [config.sops.secrets."wlan.env".path];
|
||||
|
||||
profiles = {
|
||||
home = {
|
||||
connection = {
|
||||
id = "home";
|
||||
uuid = "24b856a6-27eb-4c4f-b85c-f59ab0824965";
|
||||
type = "wifi";
|
||||
interface-name = "wlp2s0";
|
||||
};
|
||||
wifi = {
|
||||
mode = "infrastructure";
|
||||
ssid = "$HOME_SSID";
|
||||
};
|
||||
wifi-security = {
|
||||
auth-alg = "open";
|
||||
key-mgmt = "wpa-psk";
|
||||
psk = "$HOME_PSK";
|
||||
};
|
||||
ipv4 = {method = "auto";};
|
||||
ipv6 = {
|
||||
addr-gen-mode = "default";
|
||||
method = "auto";
|
||||
};
|
||||
};
|
||||
profiles = {
|
||||
home = {
|
||||
connection = {
|
||||
id = "home";
|
||||
uuid = "24b856a6-27eb-4c4f-b85c-f59ab0824965";
|
||||
type = "wifi";
|
||||
interface-name = "wlp2s0";
|
||||
};
|
||||
wifi = {
|
||||
mode = "infrastructure";
|
||||
ssid = "$HOME_SSID";
|
||||
};
|
||||
wifi-security = {
|
||||
auth-alg = "open";
|
||||
key-mgmt = "wpa-psk";
|
||||
psk = "$HOME_PSK";
|
||||
};
|
||||
ipv4 = {method = "auto";};
|
||||
ipv6 = {
|
||||
addr-gen-mode = "default";
|
||||
method = "auto";
|
||||
};
|
||||
};
|
||||
|
||||
mobile = {
|
||||
connection = {
|
||||
id = "mobile";
|
||||
uuid = "e3a749cf-a103-4e1e-a50c-4a4898bafcf6";
|
||||
type = "wifi";
|
||||
interface-name = "wlp2s0";
|
||||
};
|
||||
wifi = {
|
||||
mode = "infrastructure";
|
||||
ssid = "$MOBILE_SSID";
|
||||
};
|
||||
wifi-security = {
|
||||
auth-alg = "open";
|
||||
key-mgmt = "wpa-psk";
|
||||
psk = "$MOBILE_PSK";
|
||||
};
|
||||
ipv4 = {method = "auto";};
|
||||
ipv6 = {
|
||||
addr-gen-mode = "default";
|
||||
method = "auto";
|
||||
};
|
||||
};
|
||||
mobile = {
|
||||
connection = {
|
||||
id = "mobile";
|
||||
uuid = "e3a749cf-a103-4e1e-a50c-4a4898bafcf6";
|
||||
type = "wifi";
|
||||
interface-name = "wlp2s0";
|
||||
};
|
||||
wifi = {
|
||||
mode = "infrastructure";
|
||||
ssid = "$MOBILE_SSID";
|
||||
};
|
||||
wifi-security = {
|
||||
auth-alg = "open";
|
||||
key-mgmt = "wpa-psk";
|
||||
psk = "$MOBILE_PSK";
|
||||
};
|
||||
ipv4 = {method = "auto";};
|
||||
ipv6 = {
|
||||
addr-gen-mode = "default";
|
||||
method = "auto";
|
||||
};
|
||||
};
|
||||
|
||||
school = {
|
||||
connection = {
|
||||
id = "school";
|
||||
uuid = "bfdf4e7f-d2c4-4ab6-b833-37ecd5199b22";
|
||||
type = "wifi";
|
||||
interface-name = "wlp2s0";
|
||||
school = {
|
||||
connection = {
|
||||
id = "school";
|
||||
uuid = "bfdf4e7f-d2c4-4ab6-b833-37ecd5199b22";
|
||||
type = "wifi";
|
||||
interface-name = "wlp2s0";
|
||||
};
|
||||
wifi = {
|
||||
mode = "infrastructure";
|
||||
ssid = "$SCHOOL_SSID";
|
||||
};
|
||||
wifi-security = {
|
||||
auth-alg = "open";
|
||||
key-mgmt = "wpa-eap";
|
||||
};
|
||||
"802-1x" = {
|
||||
domain-suffix-match = "lgs-hu.eu";
|
||||
eap = "ttls;";
|
||||
identity = "$SCHOOL_ID";
|
||||
password = "$SCHOOL_PSK";
|
||||
phase2-auth = "pap";
|
||||
};
|
||||
ipv4 = {method = "auto";};
|
||||
ipv6 = {
|
||||
addr-gen-mode = "default";
|
||||
method = "auto";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
wifi = {
|
||||
mode = "infrastructure";
|
||||
ssid = "$SCHOOL_SSID";
|
||||
};
|
||||
wifi-security = {
|
||||
auth-alg = "open";
|
||||
key-mgmt = "wpa-eap";
|
||||
};
|
||||
"802-1x" = {
|
||||
domain-suffix-match = "lgs-hu.eu";
|
||||
eap = "ttls;";
|
||||
identity = "$SCHOOL_ID";
|
||||
password = "$SCHOOL_PSK";
|
||||
phase2-auth = "pap";
|
||||
};
|
||||
ipv4 = {method = "auto";};
|
||||
ipv6 = {
|
||||
addr-gen-mode = "default";
|
||||
method = "auto";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,29 +1,29 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
options.myConfig.x-input.enable = lib.mkEnableOption "";
|
||||
options.myConfig.x-input.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.x-input.enable {
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
xkb = {
|
||||
layout = "de";
|
||||
variant = "nodeadkeys";
|
||||
};
|
||||
config = lib.mkIf config.myConfig.x-input.enable {
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
xkb = {
|
||||
layout = "de";
|
||||
variant = "nodeadkeys";
|
||||
};
|
||||
|
||||
libinput = {
|
||||
enable = true;
|
||||
libinput = {
|
||||
enable = true;
|
||||
|
||||
touchpad = {
|
||||
accelProfile = "adaptive";
|
||||
naturalScrolling = true;
|
||||
disableWhileTyping = true;
|
||||
touchpad = {
|
||||
accelProfile = "adaptive";
|
||||
naturalScrolling = true;
|
||||
disableWhileTyping = true;
|
||||
};
|
||||
|
||||
mouse.accelProfile = "flat";
|
||||
};
|
||||
};
|
||||
|
||||
mouse.accelProfile = "flat";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue