Compare commits

..

No commits in common. "ebefce894a193ae2bf37b9eaf3ed7b96b59b9248" and "4b2f0ccb5425c3ec7c7112d40da602925724ec75" have entirely different histories.

154 changed files with 725 additions and 881 deletions

View file

@ -1,13 +1,9 @@
{ { config, lib, inputs, self, ... }:
config, let
lib,
inputs,
self,
...
}: let
myHmConf = config.myOptions.home-manager; myHmConf = config.myOptions.home-manager;
username = config.myOptions.system.username; username = config.myOptions.system.username;
in { in
{
home-manager = lib.mkIf myHmConf.enable { home-manager = lib.mkIf myHmConf.enable {
# Use verbose mode for home-manager # Use verbose mode for home-manager
verbose = true; verbose = true;
@ -27,7 +23,7 @@ in {
backupFileExtension = "hm.old"; backupFileExtension = "hm.old";
# These will be passed to all hm modules # These will be passed to all hm modules
extraSpecialArgs = {inherit inputs self;}; extraSpecialArgs = { inherit inputs self; };
users.${username} = { users.${username} = {
# These imports will be scoped under this key so all settings # These imports will be scoped under this key so all settings

View file

@ -7,21 +7,18 @@
inherit (lib) mkIf; inherit (lib) mkIf;
cfg = osConfig.myOptions.system.impermanence.home; cfg = osConfig.myOptions.system.impermanence.home;
in { in {
imports = [inputs.impermanence.nixosModules.home-manager.impermanence]; imports = [ inputs.impermanence.nixosModules.home-manager.impermanence ];
config = mkIf cfg.enable { config = mkIf cfg.enable {
home.persistence."${cfg.persistentMountPoint}" = { home.persistence."${cfg.persistentMountPoint}" = {
directories = directories = [
[ ".cache/nix"
".cache/nix" ".cache/nix-index"
".cache/nix-index" ] ++ cfg.extraDirectories;
]
++ cfg.extraDirectories;
files = files = [
[
] ] ++ cfg.extraFiles;
++ cfg.extraFiles;
# Allow other users (such as root), to access files through the bind # Allow other users (such as root), to access files through the bind
# mounted directories listed in `directories`. Useful for `sudo` operations, # mounted directories listed in `directories`. Useful for `sudo` operations,
@ -30,15 +27,13 @@ in {
}; };
home.persistence."${cfg.persistentDataMountPoint}" = { home.persistence."${cfg.persistentDataMountPoint}" = {
directories = directories = [
[
]
++ cfg.extraDataDirectories;
files = ] ++ cfg.extraDataDirectories;
[
] files = [
++ cfg.extraDataFiles;
] ++ cfg.extraDataFiles;
# See comment for this above # See comment for this above
allowOther = true; allowOther = true;

View file

@ -7,7 +7,7 @@
inherit (lib) mkIf; inherit (lib) mkIf;
devType = osConfig.myOptions.device.roles.type; devType = osConfig.myOptions.device.roles.type;
acceptedTypes = ["laptop" "desktop"]; acceptedTypes = [ "laptop" "desktop" ];
in { in {
config = mkIf (builtins.elem devType acceptedTypes) { config = mkIf (builtins.elem devType acceptedTypes) {
home.packages = with pkgs; [ home.packages = with pkgs; [

View file

@ -1,11 +1,15 @@
{pkgs, ...}: let {
scriptPkgs = import ./packages {inherit pkgs;}; pkgs,
...
}: let
scriptPkgs = (import ./packages {inherit pkgs;});
in { in {
home.packages = with scriptPkgs; [ home.packages = with scriptPkgs; [
bitcoin bitcoin
cheatsh cheatsh
colors256 colors256
unix unix
gh-notify gh-notify
]; ];
} }

View file

@ -1,4 +1,5 @@
{pkgs, ...}: (pkgs.writeShellApplication { {pkgs, ...}:
(pkgs.writeShellApplication {
name = "bitcoin"; name = "bitcoin";
runtimeInputs = with pkgs; [coreutils curl jq]; runtimeInputs = with pkgs; [coreutils curl jq];
text = '' text = ''

View file

@ -1,4 +1,5 @@
{pkgs, ...}: (pkgs.writeShellApplication { {pkgs, ...}:
(pkgs.writeShellApplication {
name = "cheat.sh"; name = "cheat.sh";
runtimeInputs = with pkgs; [coreutils curl jq gnugrep fzf]; runtimeInputs = with pkgs; [coreutils curl jq gnugrep fzf];
text = '' text = ''

View file

@ -1,7 +1,9 @@
{pkgs, ...}: (pkgs.writeShellApplication { {pkgs, ...}:
(pkgs.writeShellApplication {
name = "colors-256"; name = "colors-256";
runtimeInputs = with pkgs; [coreutils]; runtimeInputs = with pkgs; [coreutils];
text = '' text = ''
${builtins.readFile ./colors-256.sh} ${builtins.readFile ./colors-256.sh}
''; '';
}) })

View file

@ -1,4 +1,7 @@
{pkgs, ...}: let {
pkgs,
...
}: let
packages = { packages = {
bitcoin = pkgs.callPackage ./bitcoin.nix {}; bitcoin = pkgs.callPackage ./bitcoin.nix {};
cheatsh = pkgs.callPackage ./cheatsh {}; cheatsh = pkgs.callPackage ./cheatsh {};
@ -8,3 +11,4 @@
}; };
in in
packages packages

View file

@ -1,4 +1,5 @@
{pkgs, ...}: (pkgs.writeShellApplication { {pkgs, ...}:
(pkgs.writeShellApplication {
name = "gh-notify"; name = "gh-notify";
runtimeInputs = with pkgs; [ runtimeInputs = with pkgs; [
coreutils coreutils
@ -11,3 +12,5 @@
${builtins.readFile ./gh-notify.sh} ${builtins.readFile ./gh-notify.sh}
''; '';
}) })

View file

@ -1,7 +1,10 @@
{pkgs, ...}: (pkgs.writeShellApplication { {pkgs, ...}:
(pkgs.writeShellApplication {
name = "unix"; name = "unix";
runtimeInputs = with pkgs; [coreutils]; runtimeInputs = with pkgs; [coreutils];
text = '' text = ''
${builtins.readFile ./unix.sh} ${builtins.readFile ./unix.sh}
''; '';
}) })

View file

@ -7,9 +7,10 @@
... ...
}: let }: let
inherit (lib) mkIf; inherit (lib) mkIf;
in { in {
config = mkIf osConfig.myOptions.home-manager.wms.isWayland { config = mkIf osConfig.myOptions.home-manager.wms.isWayland {
home.packages = with pkgs; [swappy]; home.packages = with pkgs; [ swappy ];
xdg.configFile."swappy/config".text = lib.generators.toINI {} { xdg.configFile."swappy/config".text = lib.generators.toINI {} {
Default = { Default = {

View file

@ -5,8 +5,11 @@
... ...
}: let }: let
inherit (lib) mkIf; inherit (lib) mkIf;
in { in {
config = mkIf osConfig.myOptions.home-manager.wms.isWayland { config = mkIf osConfig.myOptions.home-manager.wms.isWayland {
home.packages = with pkgs; [wlogout]; home.packages = with pkgs; [ wlogout ];
}; };
} }

View file

@ -16,3 +16,6 @@ in {
]; ];
}; };
} }

View file

@ -9,6 +9,6 @@
cfg = osConfig.myOptions.home-manager.programs.applications.qalculate-gtk; cfg = osConfig.myOptions.home-manager.programs.applications.qalculate-gtk;
in { in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
home.packages = with pkgs; [qalculate-gtk]; home.packages = with pkgs; [ qalculate-gtk ];
}; };
} }

View file

@ -14,3 +14,4 @@ in {
]; ];
}; };
} }

View file

@ -14,3 +14,4 @@ in {
]; ];
}; };
} }

View file

@ -9,13 +9,13 @@
cfg = osConfig.myOptions.home-manager.programs.applications.vesktop; cfg = osConfig.myOptions.home-manager.programs.applications.vesktop;
in { in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
home.packages = with pkgs; [vesktop]; home.packages = with pkgs; [ vesktop ];
systemd.user.services."vesktop" = mkIf cfg.autoStart { systemd.user.services."vesktop" = mkIf cfg.autoStart {
Unit = { Unit = {
Description = "Vesktop (An alternate client for Discord with Vencord built-in)"; Description = "Vesktop (An alternate client for Discord with Vencord built-in)";
After = ["graphical-session.target"]; After = [ "graphical-session.target" ];
PartOf = ["graphical-session.target"]; PartOf = [ "graphical-session.target" ];
}; };
Service = { Service = {
@ -24,7 +24,7 @@ in {
ExecStart = "${pkgs.vesktop}/bin/vesktop"; ExecStart = "${pkgs.vesktop}/bin/vesktop";
}; };
Install.WantedBy = ["graphical-session.target"]; Install.WantedBy = [ "graphical-session.target" ];
}; };
}; };
} }

View file

@ -17,8 +17,8 @@ in {
systemd.user.services."webcord" = mkIf cfg.autoStart { systemd.user.services."webcord" = mkIf cfg.autoStart {
Unit = { Unit = {
Description = "Webcord (An electron-based Discord client implemented without Discord API with Vencord built-in)"; Description = "Webcord (An electron-based Discord client implemented without Discord API with Vencord built-in)";
After = ["graphical-session.target"]; After = [ "graphical-session.target" ];
PartOf = ["graphical-session.target"]; PartOf = [ "graphical-session.target" ];
}; };
Service = { Service = {
@ -27,7 +27,8 @@ in {
ExecStart = "${pkgs.webcord-vencord}/bin/webcord"; ExecStart = "${pkgs.webcord-vencord}/bin/webcord";
}; };
Install.WantedBy = ["graphical-session.target"]; Install.WantedBy = [ "graphical-session.target" ];
}; };
}; };
} }

View file

@ -6,7 +6,7 @@
}: let }: let
inherit (lib) mkIf; inherit (lib) mkIf;
scriptPkgs = import ../../../../packages/cli/scripts/packages {inherit pkgs;}; scriptPkgs = (import ../../../../packages/cli/scripts/packages {inherit pkgs;});
cfg = osConfig.myOptions.home-manager.programs.bars.eww; cfg = osConfig.myOptions.home-manager.programs.bars.eww;
in { in {
@ -44,8 +44,8 @@ in {
in { in {
Unit = { Unit = {
Description = "ElKowar's Wacky Widgets (eww) daemon"; Description = "ElKowar's Wacky Widgets (eww) daemon";
After = ["graphical-session-pre.target"]; After = [ "graphical-session-pre.target" ];
PartOf = ["graphical-session.target"]; PartOf = [ "graphical-session.target" ];
}; };
Service = { Service = {
@ -63,14 +63,14 @@ in {
Nice = 19; Nice = 19;
}; };
Install.WantedBy = ["graphical-session.target"]; Install.WantedBy = [ "graphical-session.target" ];
}; };
"eww-window-bar0" = { "eww-window-bar0" = {
Unit = { Unit = {
Description = "Open bar0 eww (ElKowar's Wacky Widgets) window"; Description = "Open bar0 eww (ElKowar's Wacky Widgets) window";
After = ["eww.service"]; After = [ "eww.service" ];
PartOf = ["graphical-session.target" "eww.service"]; PartOf = [ "graphical-session.target" "eww.service" ];
}; };
Service = { Service = {
@ -82,7 +82,7 @@ in {
Restart = "on-failure"; Restart = "on-failure";
}; };
Install.WantedBy = ["graphical-session.target"]; Install.WantedBy = [ "graphical-session.target" ];
}; };
}; };
}; };

View file

@ -14,8 +14,7 @@ in {
enable = true; enable = true;
package = pkgs.ungoogled-chromium.override { package = pkgs.ungoogled-chromium.override {
commandLineArgs = commandLineArgs = [
[
# Ungoogled features # Ungoogled features
"--disable-search-engine-collection" "--disable-search-engine-collection"
"--extension-mime-request-handling=always-prompt-for-install" "--extension-mime-request-handling=always-prompt-for-install"
@ -61,12 +60,12 @@ in {
"--disable-sync" "--disable-sync"
"--disable-speech-api" "--disable-speech-api"
"--disable-speech-synthesis-api" "--disable-speech-synthesis-api"
] ] ++ optionals isWayland [
++ optionals isWayland [
"--ozone-platform=wayland" "--ozone-platform=wayland"
"--enable-features=UseOzonePlatform" "--enable-features=UseOzonePlatform"
]; ];
}; };
}; };
}; };
} }

View file

@ -6,3 +6,4 @@ _: {
./firefox ./firefox
]; ];
} }

View file

@ -34,7 +34,7 @@ in {
search = { search = {
defaultSearchEngine = "Brave"; defaultSearchEngine = "Brave";
removeEngines = ["Bing" "Amazon.com" "eBay" "Twitter" "Wikipedia" "LibRedirect"]; removeEngines = [ "Bing" "Amazon.com" "eBay" "Twitter" "Wikipedia" "LibRedirect" ];
searxUrl = "https://searx.be"; searxUrl = "https://searx.be";
searxQuery = "https://searx.be/search?q={searchTerms}&categories=general"; searxQuery = "https://searx.be/search?q={searchTerms}&categories=general";
@ -47,32 +47,32 @@ in {
URLTemplate = "https://search.brave.com/search?q={searchTerms}"; URLTemplate = "https://search.brave.com/search?q={searchTerms}";
} }
{ {
Name = "NixOS Packages"; Name = "NixOS Packages";
Description = "NixOS Unstable package search"; Description = "NixOS Unstable package search";
Alias = "!np"; Alias = "!np";
Method = "GET"; Method = "GET";
URLTemplate = "https://search.nixos.org/packages?channel=unstable&query={searchTerms}"; URLTemplate = "https://search.nixos.org/packages?channel=unstable&query={searchTerms}";
} }
{ {
Name = "NixOS Options"; Name = "NixOS Options";
Description = "NixOS Unstable option search"; Description = "NixOS Unstable option search";
Alias = "!no"; Alias = "!no";
Method = "GET"; Method = "GET";
URLTemplate = "https://search.nixos.org/options?channel=unstable&query={searchTerms}"; URLTemplate = "https://search.nixos.org/options?channel=unstable&query={searchTerms}";
} }
{ {
Name = "NixOS Wiki"; Name = "NixOS Wiki";
Description = "NixOS Wiki search"; Description = "NixOS Wiki search";
Alias = "!nw"; Alias = "!nw";
Method = "GET"; Method = "GET";
URLTemplate = "https://nixos.wiki/index.php?search={searchTerms}"; URLTemplate = "https://nixos.wiki/index.php?search={searchTerms}";
} }
{ {
Name = "Home Manager Options"; Name = "Home Manager Options";
Description = "Home Manager option search"; Description = "Home Manager option search";
Alias = "!hm"; Alias = "!hm";
Method = "GET"; Method = "GET";
URLTemplate = "https://mipmip.github.io/home-manager-option-search?query={searchTerms}"; URLTemplate = "https://mipmip.github.io/home-manager-option-search?query={searchTerms}";
} }
{ {
Name = "MyNixOS"; Name = "MyNixOS";
@ -82,25 +82,25 @@ in {
URLTemplate = "https://mynixos.com/search?q={searchTerms}"; URLTemplate = "https://mynixos.com/search?q={searchTerms}";
} }
{ {
Name = "Arch Wiki"; Name = "Arch Wiki";
Description = "Arch Wiki search"; Description = "Arch Wiki search";
Alias = "!aw"; Alias = "!aw";
Method = "GET"; Method = "GET";
URLTemplate = "https://wiki.archlinux.org/index.php?search={searchTerms}"; URLTemplate = "https://wiki.archlinux.org/index.php?search={searchTerms}";
} }
{ {
Name = "Gentoo Wiki"; Name = "Gentoo Wiki";
Description = "Gentoo Wiki search"; Description = "Gentoo Wiki search";
Alias = "!gw"; Alias = "!gw";
Method = "GET"; Method = "GET";
URLTemplate = "https://wiki.gentoo.org/index.php?search={searchTerms}"; URLTemplate = "https://wiki.gentoo.org/index.php?search={searchTerms}";
} }
{ {
Name = "Debian Wiki"; Name = "Debian Wiki";
Description = "Debian Wiki search"; Description = "Debian Wiki search";
Alias = "!dw"; Alias = "!dw";
Method = "GET"; Method = "GET";
URLTemplate = "https://wiki.debian.org/FrontPage?action=fullsearch&value={searchTerms}"; URLTemplate = "https://wiki.debian.org/FrontPage?action=fullsearch&value={searchTerms}";
} }
]; ];
}; };
@ -142,10 +142,10 @@ in {
} }
]; ];
extraExtensions = builtins.foldl' (acc: ext: acc // {ext.id = {install_url = mkUrl ext.name;};}) {} extensions; extraExtensions = builtins.foldl' (acc: ext: acc // {ext.id = { install_url = mkUrl ext.name;};}) {} extensions;
in in extraExtensions;
extraExtensions;
}; };
}; };
}; };
} }

View file

@ -10,7 +10,7 @@
cfgPreferences = osConfig.myOptions.home-manager.preferences; cfgPreferences = osConfig.myOptions.home-manager.preferences;
in { in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
home.packages = with pkgs; [lxqt.pcmanfm-qt]; home.packages = with pkgs; [ lxqt.pcmanfm-qt ];
xdg.configFile."pcmanfm-qt/default/settings.conf".text = lib.generators.toINI {} { xdg.configFile."pcmanfm-qt/default/settings.conf".text = lib.generators.toINI {} {
Behavior = { Behavior = {
@ -109,7 +109,7 @@ in {
Thumbnail = { Thumbnail = {
MaxExternalThumbnailFileSize = -1; MaxExternalThumbnailFileSize = -1;
MaxThumbnailFileSize = 40960; # 40 MB MaxThumbnailFileSize = 40960; # 40 MB
ShowThumbnails = true; ShowThumbnails = true;
ThumbnailLocalFilesOnly = true; ThumbnailLocalFilesOnly = true;
}; };

View file

@ -9,6 +9,6 @@
cfg = osConfig.myOptions.home-manager.programs.games.prismlauncher; cfg = osConfig.myOptions.home-manager.programs.games.prismlauncher;
in { in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
home.packages = with pkgs; [prismlauncher]; home.packages = with pkgs; [ prismlauncher ];
}; };
} }

View file

@ -8,7 +8,7 @@
inherit (lib) mkIf; inherit (lib) mkIf;
cfg = osConfig.myOptions.home-manager.programs.launchers.walker; cfg = osConfig.myOptions.home-manager.programs.launchers.walker;
in { in {
imports = [inputs.walker.homeManagerModules.walker]; imports = [ inputs.walker.homeManagerModules.walker ];
config = mkIf cfg.enable { config = mkIf cfg.enable {
programs.walker = { programs.walker = {
enable = true; enable = true;
@ -25,13 +25,13 @@ in {
fullscreen = false; fullscreen = false;
scrollbar_policy = "automatic"; scrollbar_policy = "automatic";
websearch = { websearch = {
engines = ["google" "duckduckgo"]; engines = ["google" "duckduckgo"];
}; };
hyprland = { hyprland = {
context_aware_history = false; context_aware_history = false;
}; };
applications = { applications = {
enable_cache = false; # disabling doesn't cause slowdowns, and allows picking up new apps automatically enable_cache = false; # disabling doesn't cause slowdowns, and allows picking up new apps automatically
}; };
# Mode for picking the entry with keyboard using labels # Mode for picking the entry with keyboard using labels
@ -48,7 +48,7 @@ in {
hide_spinner = false; hide_spinner = false;
}; };
runner = { runner = {
excludes = ["rm"]; # commands to be excluded from the runner excludes = ["rm"]; # commands to be excluded from the runner
}; };
clipboard = { clipboard = {
max_entries = 10; max_entries = 10;
@ -82,7 +82,7 @@ in {
}; };
orientation = "vertical"; orientation = "vertical";
icons = { icons = {
theme = ""; # GTK Icon theme (default) theme = ""; # GTK Icon theme (default)
hide = false; hide = false;
size = 28; size = 28;
image_height = 200; image_height = 200;
@ -127,7 +127,7 @@ in {
switcher_exclusive = true; switcher_exclusive = true;
} }
{ {
name = "websearch"; # uses google name = "websearch"; # uses google
prefix = ""; prefix = "";
switcher_exclusive = true; switcher_exclusive = true;
} }

View file

@ -10,3 +10,4 @@
}; };
}; };
} }

View file

@ -1,4 +1,7 @@
{osConfig, ...}: let {
osConfig,
...
}: let
cfg = osConfig.myOptions.home-manager.wms.hyprland; cfg = osConfig.myOptions.home-manager.wms.hyprland;
in { in {
wayland.windowManager.hyprland.settings = { wayland.windowManager.hyprland.settings = {
@ -26,3 +29,4 @@ in {
monitor = cfg.monitor; monitor = cfg.monitor;
}; };
} }

View file

@ -1,8 +1,4 @@
{ { config, osConfig, ... }: let
config,
osConfig,
...
}: let
cfgPreferences = osConfig.myOptions.home-manager.preferences; cfgPreferences = osConfig.myOptions.home-manager.preferences;
in { in {
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
@ -25,7 +21,7 @@ in {
"SUPER, W, killactive," "SUPER, W, killactive,"
"SUPER, F, togglefloating," "SUPER, F, togglefloating,"
"SUPER, Space, fullscreen, 0" "SUPER, Space, fullscreen, 0"
"SUPER_SHIFT, Space, fullscreen, 1" # maximize "SUPER_SHIFT, Space, fullscreen, 1" # maximize
"CTRL_SHIFT, Space, exec, toggle-fake-fullscreen" # fake fullscreen + custom border "CTRL_SHIFT, Space, exec, toggle-fake-fullscreen" # fake fullscreen + custom border
"SUPER_SHIFT, S, layoutmsg, togglesplit" "SUPER_SHIFT, S, layoutmsg, togglesplit"
@ -195,6 +191,7 @@ in {
# Global keybinds (passing keys to other programs) # Global keybinds (passing keys to other programs)
# #
"CTRL, F10, pass, ^(com\.obsproject\.Studio)$" "CTRL, F10, pass, ^(com\.obsproject\.Studio)$"
]; ];
# Mouse bindings # Mouse bindings

View file

@ -1,6 +1,6 @@
{ {
wayland.windowManager.hyprland.settings = { wayland.windowManager.hyprland.settings = {
general.layout = "dwindle"; general.layout = "dwindle";
dwindle = { dwindle = {
# Don't change the split (side/top) regardless of what happens to the container # Don't change the split (side/top) regardless of what happens to the container

View file

@ -1,5 +1,10 @@
{config, ...}: { {
config,
...
}:
{
wayland.windowManager.hyprland.settings = { wayland.windowManager.hyprland.settings = {
# #
# Window gaps # Window gaps
# #
@ -29,12 +34,12 @@
group = { group = {
# Groupped windows # Groupped windows
"col.border_active" = "rgba(00A500FF)"; # green "col.border_active" = "rgba(00A500FF)"; # green
"col.border_inactive" = "rgba(5AA500FF)"; # transparent green "col.border_inactive" = "rgba(5AA500FF)"; # transparent green
# Locked groupped windows # Locked groupped windows
"col.border_locked_active" = "rgba(A0A500FF)"; # yellow "col.border_locked_active" = "rgba(A0A500FF)"; # yellow
"col.border_locked_inactive" = "rgba(A0A500AA)"; # transparent yellow "col.border_locked_inactive" = "rgba(A0A500AA)"; # transparent yellow
}; };
# #
@ -47,7 +52,7 @@
render_titles = false; # disable, looks kinda bad render_titles = false; # disable, looks kinda bad
font_family = "Monaspace Krypton"; font_family = "Monaspace Krypton";
font_size = 11; font_size = 11;
text_color = "rgba(FFFFFFFF)"; # white text_color = "rgba(FFFFFFFF)"; # white
# Gradients should be enabled only if title rendering is also enabled # Gradients should be enabled only if title rendering is also enabled
# on their own, they look really bad # on their own, they look really bad
@ -76,6 +81,7 @@
"col.shadow_inactive" = "rgba(0F0F0F99)"; "col.shadow_inactive" = "rgba(0F0F0F99)";
}; };
# #
# Window Blur # Window Blur
# #
@ -86,6 +92,7 @@
passes = 1; passes = 1;
}; };
# #
# Dim inactive windows # Dim inactive windows
# #
@ -117,3 +124,4 @@
misc.animate_manual_resizes = true; misc.animate_manual_resizes = true;
}; };
} }

View file

@ -109,3 +109,4 @@
]; ];
}; };
} }

View file

@ -6,7 +6,7 @@
}: let }: let
inherit (lib) mkIf; inherit (lib) mkIf;
hyprPkgs = import ./packages {inherit pkgs;}; hyprPkgs = (import ./packages {inherit pkgs;});
# TODO: Switch to flake # TODO: Switch to flake
hyprlandPkg = pkgs.hyprland; hyprlandPkg = pkgs.hyprland;
@ -15,7 +15,7 @@
cfg = osConfig.myOptions.home-manager.wms.hyprland; cfg = osConfig.myOptions.home-manager.wms.hyprland;
in { in {
imports = [ imports = [
./config ./config
]; ];
config = mkIf cfg.enable { config = mkIf cfg.enable {

View file

@ -1,4 +1,4 @@
{pkgs, ...}: {pkgs, ...}:
pkgs.writeShellScriptBin "brightness" '' pkgs.writeShellScriptBin "brightness" ''
${builtins.readFile ./brightness.sh} ${builtins.readFile ./brightness.sh}
'' ''

View file

@ -1,4 +1,7 @@
{pkgs, ...}: let {
pkgs,
...
}: let
packages = { packages = {
hyprland-move-window = pkgs.callPackage ./hyprland-move-window {}; hyprland-move-window = pkgs.callPackage ./hyprland-move-window {};
brightness = pkgs.callPackage ./brightness {}; brightness = pkgs.callPackage ./brightness {};

View file

@ -1,4 +1,5 @@
{pkgs, ...}: {pkgs, ...}:
pkgs.writeShellScriptBin "hyprland-move-window" '' pkgs.writeShellScriptBin "hyprland-move-window" ''
${builtins.readFile ./hyprland-move-window.sh} ${builtins.readFile ./hyprland-move-window.sh}
'' ''

View file

@ -13,3 +13,4 @@ pkgs.writeShellApplication {
${builtins.readFile ./quick-record.sh} ${builtins.readFile ./quick-record.sh}
''; '';
} }

View file

@ -10,3 +10,5 @@ pkgs.writeShellApplication {
${builtins.readFile ./toggle-fake-fullscreen.sh} ${builtins.readFile ./toggle-fake-fullscreen.sh}
''; '';
} }

View file

@ -10,3 +10,6 @@ pkgs.writeShellApplication {
${builtins.readFile ./toggle-notifications.sh} ${builtins.readFile ./toggle-notifications.sh}
''; '';
} }

View file

@ -9,6 +9,6 @@
cfg = osConfig.myOptions.home-manager.programs.coding.python; cfg = osConfig.myOptions.home-manager.programs.coding.python;
in { in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
home.packages = with pkgs; [python312Packages.ipython]; home.packages = with pkgs; [ python312Packages.ipython ];
}; };
} }

View file

@ -9,6 +9,6 @@
cfg = osConfig.myOptions.home-manager.programs.coding.python; cfg = osConfig.myOptions.home-manager.programs.coding.python;
in { in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
home.packages = with pkgs; [python312Packages.mypy]; home.packages = with pkgs; [ python312Packages.mypy ];
}; };
} }

View file

@ -9,6 +9,6 @@
cfg = osConfig.myOptions.home-manager.programs.coding.python; cfg = osConfig.myOptions.home-manager.programs.coding.python;
in { in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
home.packages = with pkgs; [pyright]; home.packages = with pkgs; [ pyright ];
}; };
} }

View file

@ -15,52 +15,52 @@ in {
line-length = 119; line-length = 119;
lint = { lint = {
select = [ select = [
"F" # Pyflakes "F" # Pyflakes
"E" # Pycodestyle (errors) "E" # Pycodestyle (errors)
"W" # Pycodestyle (warnigns) "W" # Pycodestyle (warnigns)
"N" # pep8-naming "N" # pep8-naming
"D" # pydocstyle "D" # pydocstyle
"UP" # pyupgrade "UP" # pyupgrade
"YTT" # flake8-2020 "YTT" # flake8-2020
"ANN" # flake8-annotations "ANN" # flake8-annotations
"ASYNC" # flake8-async "ASYNC" # flake8-async
"S" # flake8-bandit "S" # flake8-bandit
"BLE" # flake8-blind-except "BLE" # flake8-blind-except
"B" # flake8-bugbear "B" # flake8-bugbear
"A" # flake8-builtins "A" # flake8-builtins
"COM" # flake8-commas "COM" # flake8-commas
"C4" # flake8-comprehensions "C4" # flake8-comprehensions
"DTZ" # flake8-datetimez "DTZ" # flake8-datetimez
"T10" # flake8-debugger "T10" # flake8-debugger
"EM" # flake8-errmsg "EM" # flake8-errmsg
"EXE" # flake8-executable "EXE" # flake8-executable
"FA" # flake8-future-annotations "FA" # flake8-future-annotations
"ISC" # flake8-implicit-str-concat "ISC" # flake8-implicit-str-concat
"ICN" # flake8-import-conventions "ICN" # flake8-import-conventions
"LOG" # flake8-logging "LOG" # flake8-logging
"G" # flake8-logging-format "G" # flake8-logging-format
"INP" # flake8-no-pep420 "INP" # flake8-no-pep420
"PIE" # flake8-pie "PIE" # flake8-pie
"T20" # flake8-print "T20" # flake8-print
"PYI" # flake8-pyi "PYI" # flake8-pyi
"PT" # flake8-pytest-style "PT" # flake8-pytest-style
"Q" # flake8-quotes "Q" # flake8-quotes
"RSE" # flake8-raise "RSE" # flake8-raise
"RET" # flake8-return "RET" # flake8-return
"SLOT" # flake8-slots "SLOT" # flake8-slots
"SIM" # flake8-simplify "SIM" # flake8-simplify
"TID" # flake8-tidy-imports "TID" # flake8-tidy-imports
"TCH" # flake8-type-checking "TCH" # flake8-type-checking
"INT" # flake8-gettext "INT" # flake8-gettext
"PTH" # flake8-use-pathlib "PTH" # flake8-use-pathlib
"TD" # flake8-todos "TD" # flake8-todos
"ERA" # flake8-eradicate "ERA" # flake8-eradicate
"PGH" # pygrep-hooks "PGH" # pygrep-hooks
"PL" # pylint "PL" # pylint
"TRY" # tryceratops "TRY" # tryceratops
"FLY" # flynt "FLY" # flynt
"PERF" # perflint "PERF" # perflint
"RUF" # ruff-specific rules "RUF" # ruff-specific rules
]; ];
ignore = [ ignore = [
"D100" # Missing docstring in public module "D100" # Missing docstring in public module
@ -100,25 +100,25 @@ in {
"TD002" # Missing author in TODO "TD002" # Missing author in TODO
"TD003" # Missing issue link on the line following this TODO "TD003" # Missing issue link on the line following this TODO
"PT011" # pytest.raises without match parameter is too broad # TODO: Unignore this "PT011" # pytest.raises without match parameter is too broad # TODO: Unignore this
"TRY003" # No f-strings in raise statements "TRY003" # No f-strings in raise statements
"EM101" # No string literals in exception init "EM101" # No string literals in exception init
"EM102" # No f-strings in exception init "EM102" # No f-strings in exception init
"UP024" # Using errors that alias OSError "UP024" # Using errors that alias OSError
"PLR2004" # Using unnamed numerical constants "PLR2004" # Using unnamed numerical constants
"PGH003" # Using specific rule codes in type ignores "PGH003" # Using specific rule codes in type ignores
"E731" # Don't asign a lambda expression, use a def "E731" # Don't asign a lambda expression, use a def
# Redundant rules with ruff-format: # Redundant rules with ruff-format:
"E111" # Indentation of a non-multiple of 4 spaces "E111" # Indentation of a non-multiple of 4 spaces
"E114" # Comment with indentation of a non-multiple of 4 spaces "E114" # Comment with indentation of a non-multiple of 4 spaces
"E117" # Cheks for over-indented code "E117" # Cheks for over-indented code
"D206" # Checks for docstrings indented with tabs "D206" # Checks for docstrings indented with tabs
"D300" # Checks for docstring that use ''' instead of """ "D300" # Checks for docstring that use ''' instead of """
"Q000" # Checks of inline strings that use wrong quotes (' instead of ") "Q000" # Checks of inline strings that use wrong quotes (' instead of ")
"Q001" # Multiline string that use wrong quotes (''' instead of """) "Q001" # Multiline string that use wrong quotes (''' instead of """)
"Q002" # Checks for docstrings that use wrong quotes (''' instead of """) "Q002" # Checks for docstrings that use wrong quotes (''' instead of """)
"Q003" # Checks for avoidable escaped quotes ("\"" -> '"') "Q003" # Checks for avoidable escaped quotes ("\"" -> '"')
"COM812" # Missing trailing comma (in multi-line lists/tuples/...) "COM812" # Missing trailing comma (in multi-line lists/tuples/...)
"COM819" # Prohibited trailing comma (in single-line lists/tuples/...) "COM819" # Prohibited trailing comma (in single-line lists/tuples/...)
"ISC001" # Single line implicit string concatenation ("hi" "hey" -> "hihey") "ISC001" # Single line implicit string concatenation ("hi" "hey" -> "hihey")
@ -126,7 +126,7 @@ in {
]; ];
extend-per-file-ignores = { extend-per-file-ignores = {
"tests/*" = [ "tests/*" = [
"ANN" # flake8-annotations "ANN" # flake8-annotations
"S101" # Use of assert "S101" # Use of assert
]; ];
"docs/conf.py" = [ "docs/conf.py" = [
@ -139,10 +139,10 @@ in {
combine-as-imports = true; combine-as-imports = true;
# Redundant rules with ruff-format # Redundant rules with ruff-format
force-single-line = false; # forces all imports to appear on their own line force-single-line = false; # forces all imports to appear on their own line
force-wrap-aliases = false; # Split imports with multiple members and at least one alias force-wrap-aliases = false; # Split imports with multiple members and at least one alias
lines-after-imports = -1; # The number of blank lines to place after imports lines-after-imports = -1; # The number of blank lines to place after imports
lines-between-types = 0; # Number of lines to place between "direct" and import from imports lines-between-types = 0; # Number of lines to place between "direct" and import from imports
split-on-trailing-comma = false; # if last member of multiline import has a comma, don't fold it to single line split-on-trailing-comma = false; # if last member of multiline import has a comma, don't fold it to single line
}; };
pylint = { pylint = {

View file

@ -13,7 +13,7 @@
in { in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
home = { home = {
packages = with pkgs; [rye]; packages = with pkgs; [ rye ];
sessionVariables = { sessionVariables = {
RYE_HOME = "${config.xdg.configHome}/rye"; RYE_HOME = "${config.xdg.configHome}/rye";
@ -32,7 +32,7 @@ in {
# see: <https://rye.astral.sh/guide/config/#config-file> # see: <https://rye.astral.sh/guide/config/#config-file>
xdg.configFile."rye/config.toml".source = toTOML "config.toml" { xdg.configFile."rye/config.toml".source = toTOML "config.toml" {
default.license = "GPL-3.0-or-later"; default.license = "GPL-3.0-or-later";
behavior.global-python = true; behavior.global-python=true;
}; };
}; };
} }

View file

@ -1,6 +1,6 @@
_: { _: {
imports = [ imports = [
./neovim ./neovim
./helix
]; ];
} }

View file

@ -1,49 +0,0 @@
{pkgs, ...}: {
programs.helix = {
enable = true;
settings = {
theme = "tokyonight";
editor = {
line-number = "relative";
bufferline = "multiple";
cursor-shape.insert = "bar";
lsp.display-messages = true;
};
keys = {
normal = {
esc = ["collapse_selection" "keep_primary_selection"];
};
};
};
languages = {
language = [
{
name = "python";
scope = "source.python";
injection-regex = "python";
file-types = ["py" "pyi" "py3" "pyw" ".pythonstartup" ".pythonrc"];
shebangs = ["python"];
roots = ["." "pyproject.toml" "pyrightconfig.json"];
comment-token = "#";
language-servers = ["basedpyright" "ruff"];
indent = {
tab-width = 4;
unit = " ";
};
auto-format = true;
}
];
language-server = {
ruff = {
command = "ruff-lsp";
};
basedpyright = {
command = "basedpyright-langserver";
args = ["--stdio"];
};
};
};
};
}

View file

@ -8,3 +8,5 @@ _: {
./kitty.nix ./kitty.nix
]; ];
} }

View file

@ -1,4 +1,7 @@
{pkgs, ...}: { {
pkgs,
...
}: {
home.packages = with pkgs; [ home.packages = with pkgs; [
libsixel # for displaying images libsixel # for displaying images
]; ];
@ -59,3 +62,4 @@
}; };
}; };
} }

View file

@ -92,3 +92,4 @@ in {
}; };
}; };
} }

View file

@ -9,3 +9,4 @@ _: {
./ranger.nix ./ranger.nix
]; ];
} }

View file

@ -16,3 +16,4 @@ in {
${(optionalString config.programs.kitty.enable "set preview_images_method kitty")} ${(optionalString config.programs.kitty.enable "set preview_images_method kitty")}
''; '';
} }

View file

@ -49,3 +49,4 @@
} }
''; '';
} }

View file

@ -12,3 +12,4 @@ pkgs: {
hash = "sha256-k/yre9SYNPYBM2W1DPpL6Ypt3w3EMO9dznHwa+fw/n0="; hash = "sha256-k/yre9SYNPYBM2W1DPpL6Ypt3w3EMO9dznHwa+fw/n0=";
}; };
} }

View file

@ -38,3 +38,4 @@
}; };
}; };
} }

View file

@ -144,3 +144,4 @@
"*.pkg" = ""; "*.pkg" = "";
}; };
} }

View file

@ -61,3 +61,4 @@
syntect_theme = ""; syntect_theme = "";
}; };
} }

View file

@ -43,3 +43,4 @@
permissions_s = {fg = "darkgray";}; permissions_s = {fg = "darkgray";};
}; };
} }

View file

@ -1,11 +1,8 @@
{ { config, pkgs, lib, ... }:
config, let
pkgs,
lib,
...
}: let
nr = "${pkgs.nixos-rebuild}/bin/nixos-rebuild"; nr = "${pkgs.nixos-rebuild}/bin/nixos-rebuild";
in { in
{
programs.zsh.shellAliases = { programs.zsh.shellAliases = {
# I'm not the greatest typist # I'm not the greatest typist
sl = "ls"; sl = "ls";

View file

@ -1,8 +1,4 @@
{ { config, pkgs, ... }: {
config,
pkgs,
...
}: {
imports = [ imports = [
./plugins.nix ./plugins.nix
./aliases.nix ./aliases.nix

View file

@ -1,6 +1,9 @@
_: let _:
let
inherit (builtins) readFile; inherit (builtins) readFile;
in { in
{
# I prefer having the rc files split across multiple files in my system rather # I prefer having the rc files split across multiple files in my system rather
# than just using readFile and putting them all into the generated zshrc # than just using readFile and putting them all into the generated zshrc
# this also allows me to source them individually if I need to # this also allows me to source them individually if I need to

View file

@ -1,10 +1,8 @@
{ { config, pkgs, ... }:
config, let
pkgs,
...
}: let
inherit (pkgs) fetchFromGitHub; inherit (pkgs) fetchFromGitHub;
in { in
{
programs.zsh.plugins = [ programs.zsh.plugins = [
{ {
name = "zsh-nix-shell"; name = "zsh-nix-shell";

View file

@ -1,6 +1,6 @@
{pkgs, ...}: { {pkgs, ...}: {
home.sessionVariables = { home.sessionVariables = {
DIRENV_LOG_FORMAT = ""; DIRENV_LOG_FORMAT="";
}; };
programs.direnv = { programs.direnv = {
enable = true; enable = true;

View file

@ -11,3 +11,4 @@ in {
programs.fastfetch.enable = true; programs.fastfetch.enable = true;
}; };
} }

View file

@ -1,5 +1,9 @@
{pkgs, ...}: let {
scriptPkgs = import ./bin {inherit pkgs;}; pkgs,
...
}: let
scriptPkgs = (import ./bin {inherit pkgs;});
in { in {
programs.git = { programs.git = {
aliases = { aliases = {
@ -66,8 +70,6 @@ in {
set-upstream = "!git branch --set-upstream-to=origin/`git symbolic-ref --short HEAD`"; set-upstream = "!git branch --set-upstream-to=origin/`git symbolic-ref --short HEAD`";
fixup-picker = "!git log -n 50 --pretty=format:'%h %s' --no-merges | fzf | cut -c -7 | xargs -o git commit --fixup";
staash = "stash --all"; staash = "stash --all";
stash-staged = "!sh -c 'git stash --keep-index; git stash push -m \"staged\" --keep-index; git stash pop stash@{1}'"; stash-staged = "!sh -c 'git stash --keep-index; git stash push -m \"staged\" --keep-index; git stash pop stash@{1}'";

View file

@ -1,4 +1,4 @@
{pkgs, ...}: {pkgs, ...}:
pkgs.writeShellScriptBin "better-git-branch" '' pkgs.writeShellScriptBin "better-git-branch" ''
${builtins.readFile ./better-git-branch.sh} ${builtins.readFile ./better-git-branch.sh}
'' ''

View file

@ -1,4 +1,7 @@
{pkgs, ...}: let {
pkgs,
...
}: let
packages = { packages = {
better-git-branch = pkgs.callPackage ./better-git-branch {}; better-git-branch = pkgs.callPackage ./better-git-branch {};
}; };

View file

@ -1,10 +1,8 @@
{ { osConfig, pkgs, ... }:
osConfig, let
pkgs,
...
}: let
myGitConf = osConfig.myOptions.home-manager.git; myGitConf = osConfig.myOptions.home-manager.git;
in { in
{
imports = [ imports = [
./gh.nix ./gh.nix
./ignores.nix ./ignores.nix

View file

@ -1,4 +1,4 @@
{pkgs, ...}: { { pkgs, ... }: {
programs.gh = { programs.gh = {
enable = true; enable = true;
gitCredentialHelper.enable = false; gitCredentialHelper.enable = false;

View file

@ -1,4 +1,4 @@
{config, ...}: { { config, ... }: {
programs = { programs = {
gpg = { gpg = {
enable = true; enable = true;

View file

@ -10,7 +10,7 @@
cfg = osConfig.myOptions.home-manager.programs.applications.iamb; cfg = osConfig.myOptions.home-manager.programs.applications.iamb;
in { in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
home.packages = with pkgs; [iamb]; home.packages = with pkgs; [ iamb ];
xdg.configFile."iamb/config.json".text = builtins.toJSON { xdg.configFile."iamb/config.json".text = builtins.toJSON {
settings = { settings = {
@ -33,12 +33,10 @@ in {
}; };
default_profile = cfg.defaultProfile; default_profile = cfg.defaultProfile;
profiles = profiles = lib.mapAttrs (name: profile: {
lib.mapAttrs (name: profile: { user_id = profile.userId;
user_id = profile.userId; url = profile.homeServer;
url = profile.homeServer; }) cfg.profiles;
})
cfg.profiles;
dirs = { dirs = {
cache = "${config.xdg.cacheHome}/iamb/"; cache = "${config.xdg.cacheHome}/iamb/";

View file

@ -1,9 +1,5 @@
# Config copied from https://git.notashelf.dev/NotAShelf/nyx # Config copied from https://git.notashelf.dev/NotAShelf/nyx
{ { pkgs, lib, ... }: let
pkgs,
lib,
...
}: let
inherit (lib) getExe; inherit (lib) getExe;
mpv = "${getExe pkgs.mpv}"; mpv = "${getExe pkgs.mpv}";
@ -73,5 +69,5 @@ in {
macro v set browser "${mpv} %u" ; open-in-browser ; set browser "firefox %u" -- "Open video on mpv" macro v set browser "${mpv} %u" ; open-in-browser ; set browser "firefox %u" -- "Open video on mpv"
macro , open-in-browser macro , open-in-browser
''; '';
}; };
} }

View file

@ -57,3 +57,4 @@
{url = "https://kiszamolo.hu/feed";} {url = "https://kiszamolo.hu/feed";}
]; ];
} }

View file

@ -1,4 +1,4 @@
{config, ...}: { { config, ... }: {
programs = { programs = {
# nix-index is a file database for nixpkgs # nix-index is a file database for nixpkgs
# this provides `nix-locate` command. # this provides `nix-locate` command.

View file

@ -1,6 +1,7 @@
{ {
programs = { programs = {
ssh = { ssh = {
# TODO: Enable this after figuring out how to add protected/encrypted blocks here. # TODO: Enable this after figuring out how to add protected/encrypted blocks here.
# I don't like the idea of expising IPs/hostnames in the config. # I don't like the idea of expising IPs/hostnames in the config.
# For now, I just persist the .ssh directory, managing stuff manually. # For now, I just persist the .ssh directory, managing stuff manually.

View file

@ -1,5 +1,5 @@
# Attribute set of files to link into the user's XDG directories # Attribute set of files to link into the user's XDG directories
{config, ...}: let { config, ... }: let
XDG_CACHE_HOME = config.xdg.cacheHome; XDG_CACHE_HOME = config.xdg.cacheHome;
XDG_CONFIG_HOME = config.xdg.configHome; XDG_CONFIG_HOME = config.xdg.configHome;
XDG_DATA_HOME = config.xdg.dataHome; XDG_DATA_HOME = config.xdg.dataHome;
@ -7,6 +7,7 @@
XDG_RUNTIME_DIR = config.home.sessionVariables.XDG_RUNTIME_DIR; XDG_RUNTIME_DIR = config.home.sessionVariables.XDG_RUNTIME_DIR;
XDG_BIN_HOME = config.home.sessionVariables.XDG_BIN_HOME; XDG_BIN_HOME = config.home.sessionVariables.XDG_BIN_HOME;
in { in {
# Variables set to force apps into the XDG base directories # Variables set to force apps into the XDG base directories
# These will get set at login # These will get set at login
# Defined in /etc/profiles/per-user/$USER/etc/profile.d/hm-session-vars.sh # Defined in /etc/profiles/per-user/$USER/etc/profile.d/hm-session-vars.sh

View file

@ -1,8 +1,4 @@
{ {config, pkgs, ...}: {
config,
pkgs,
...
}: {
imports = [ imports = [
./mime-apps.nix ./mime-apps.nix
./user-dirs.nix ./user-dirs.nix
@ -27,5 +23,5 @@
# xdg-ninja is a CLI tool that checks $HOME for unwanted # xdg-ninja is a CLI tool that checks $HOME for unwanted
# files/dirs and shows how to move them to XDG dirs # files/dirs and shows how to move them to XDG dirs
home.packages = [pkgs.xdg-ninja]; home.packages = [ pkgs.xdg-ninja ];
} }

View file

@ -1,5 +1,8 @@
# Manage $XDG_CONFIG_HOME/mimeapps.list # Manage $XDG_CONFIG_HOME/mimeapps.list
{osConfig, ...}: let {
osConfig,
...
}: let
cfgPreferences = osConfig.myOptions.home-manager.preferences; cfgPreferences = osConfig.myOptions.home-manager.preferences;
in { in {
xdg.mimeApps = let xdg.mimeApps = let

View file

@ -1,5 +1,5 @@
# Manage $XDG_CONFIG_HOME/user-dirs.dirs # Manage $XDG_CONFIG_HOME/user-dirs.dirs
{config, ...}: { { config, ... }: {
xdg.userDirs = { xdg.userDirs = {
enable = true; enable = true;
createDirectories = true; createDirectories = true;

View file

@ -12,11 +12,11 @@
in { in {
config = mkIf (cfg.enable && cfgIsWayland) { config = mkIf (cfg.enable && cfgIsWayland) {
systemd.user.services.hyprpaper = { systemd.user.services.hyprpaper = {
Install.WantedBy = ["hyprland-session.target"]; Install.WantedBy = [ "hyprland-session.target" ];
Unit = { Unit = {
Description = "Hyprpaper (Hyprland wallpaper daemon)"; Description = "Hyprpaper (Hyprland wallpaper daemon)";
PartOf = ["graphical-session.target"]; PartOf = [ "graphical-session.target" ];
After = ["graphical-session.target"]; After = [ "graphical-session.target" ];
}; };
Service = { Service = {
Type = "simple"; Type = "simple";
@ -31,3 +31,4 @@ in {
''; '';
}; };
} }

View file

@ -1,4 +1,7 @@
{osConfig, ...}: let {
osConfig,
...
}: let
cfg = osConfig.myOptions.home-manager.theme.cursor; cfg = osConfig.myOptions.home-manager.theme.cursor;
in { in {
home = { home = {

View file

@ -18,11 +18,7 @@ in {
GTK_THEME = "${cfg.theme.name}"; GTK_THEME = "${cfg.theme.name}";
# gtk applications should use filepickers specified by xdg # gtk applications should use filepickers specified by xdg
GTK_USE_PORTAL = "${toString ( GTK_USE_PORTAL = "${toString (if cfg.usePortal then 1 else 0)}";
if cfg.usePortal
then 1
else 0
)}";
}; };
}; };

View file

@ -80,6 +80,7 @@ in {
}; };
"Kvantum/${cfg.kvantumTheme.name}".source = "${cfg.kvantumTheme.package}/share/Kvantum/${cfg.kvantumTheme.name}"; "Kvantum/${cfg.kvantumTheme.name}".source = "${cfg.kvantumTheme.package}/share/Kvantum/${cfg.kvantumTheme.name}";
# Set icon theme using qtct # Set icon theme using qtct
"qt5ct/qt5ct.conf".text = lib.generators.toINI {} { "qt5ct/qt5ct.conf".text = lib.generators.toINI {} {
Appearance = { Appearance = {

View file

@ -1,4 +1,5 @@
{inputs, ...}: let { inputs, ... }:
let
inherit (inputs) self; inherit (inputs) self;
inherit (inputs.nixpkgs) lib; inherit (inputs.nixpkgs) lib;
@ -8,30 +9,27 @@
../home ../home
../options ../options
]; ];
in { in
{
herugrim = lib.nixosSystem { herugrim = lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
specialArgs = {inherit lib inputs self;}; specialArgs = { inherit lib inputs self; };
modules = modules = [
[ ./herugrim
./herugrim inputs.home-manager.nixosModules.home-manager
inputs.home-manager.nixosModules.home-manager inputs.impermanence.nixosModules.impermanence
inputs.impermanence.nixosModules.impermanence inputs.lanzaboote.nixosModules.lanzaboote
inputs.lanzaboote.nixosModules.lanzaboote ] ++ shared;
]
++ shared;
}; };
voyager = lib.nixosSystem { voyager = lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
specialArgs = {inherit lib inputs self;}; specialArgs = { inherit lib inputs self; };
modules = modules = [
[ ./voyager
./voyager inputs.home-manager.nixosModules.home-manager
inputs.home-manager.nixosModules.home-manager inputs.impermanence.nixosModules.impermanence
inputs.impermanence.nixosModules.impermanence inputs.lanzaboote.nixosModules.lanzaboote
inputs.lanzaboote.nixosModules.lanzaboote ] ++ shared;
]
++ shared;
}; };
} }

View file

@ -1,13 +1,10 @@
{ lib, pkgs, ... }:
{ {
lib,
pkgs,
...
}: {
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
]; ];
boot.supportedFilesystems = ["btrfs"]; boot.supportedFilesystems = [ "btrfs" ];
# My flake disables this by default for security reasons. However, # My flake disables this by default for security reasons. However,
# with an encrypted setup, which requires entering password before # with an encrypted setup, which requires entering password before
@ -45,7 +42,7 @@
# Configure automatic root subvolume wiping on boot from initrd # Configure automatic root subvolume wiping on boot from initrd
autoWipeBtrfs = { autoWipeBtrfs = {
enable = true; enable = true;
devices."/dev/disk/by-label/NIXROOT".subvolumes = ["root"]; devices."/dev/disk/by-label/NIXROOT".subvolumes = [ "root" ];
}; };
}; };

View file

@ -1,64 +1,60 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ { config, lib, pkgs, modulesPath, ... }:
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usb_storage" "sd_mod"]; {
boot.initrd.kernelModules = []; imports =
boot.kernelModules = ["kvm-amd"]; [ (modulesPath + "/installer/scan/not-detected.nix")
boot.extraModulePackages = []; ];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
boot.initrd.luks.devices."cryptfs".device = "/dev/disk/by-label/NIXCRYPTROOT"; boot.initrd.luks.devices."cryptfs".device = "/dev/disk/by-label/NIXCRYPTROOT";
fileSystems."/" = { fileSystems."/" =
device = "/dev/disk/by-label/NIXROOT"; { device = "/dev/disk/by-label/NIXROOT";
fsType = "btrfs"; fsType = "btrfs";
options = ["subvol=root" "noatime" "compress=zstd:3"]; options = [ "subvol=root" "noatime" "compress=zstd:3" ];
}; };
fileSystems."/home" = { fileSystems."/home" =
device = "/dev/disk/by-label/NIXROOT"; { device = "/dev/disk/by-label/NIXROOT";
fsType = "btrfs"; fsType = "btrfs";
options = ["subvol=home" "noatime" "compress=zstd:3"]; options = [ "subvol=home" "noatime" "compress=zstd:3" ];
}; };
fileSystems."/nix" = { fileSystems."/nix" =
device = "/dev/disk/by-label/NIXROOT"; { device = "/dev/disk/by-label/NIXROOT";
fsType = "btrfs"; fsType = "btrfs";
options = ["subvol=nix" "noatime" "compress=zstd:3"]; options = [ "subvol=nix" "noatime" "compress=zstd:3" ];
}; };
fileSystems."/var/log" = { fileSystems."/var/log" =
device = "/dev/disk/by-label/NIXROOT"; { device = "/dev/disk/by-label/NIXROOT";
fsType = "btrfs"; fsType = "btrfs";
options = ["subvol=log" "noatime" "compress=zstd:3"]; options = [ "subvol=log" "noatime" "compress=zstd:3" ];
neededForBoot = true; neededForBoot = true;
}; };
fileSystems."/persist" = { fileSystems."/persist" =
device = "/dev/disk/by-label/NIXROOT"; { device = "/dev/disk/by-label/NIXROOT";
fsType = "btrfs"; fsType = "btrfs";
options = ["subvol=persist" "noatime" "compress=zstd:3"]; options = [ "subvol=persist" "noatime" "compress=zstd:3" ];
neededForBoot = true; neededForBoot = true;
}; };
fileSystems."/boot" = { fileSystems."/boot" =
device = "/dev/disk/by-label/NIXBOOT"; { device = "/dev/disk/by-label/NIXBOOT";
fsType = "vfat"; fsType = "vfat";
}; };
swapDevices = [ swapDevices =
{device = "/dev/disk/by-label/SWAP";} [ { device = "/dev/disk/by-label/SWAP"; }
]; ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's # (the default) this is the recommended approach. When using systemd-networkd it's

View file

@ -1,18 +1,16 @@
# Edit this configuration file to define what should be installed on # Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page, on # your system. Help is available in the configuration.nix(5) man page, on
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`). # https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
{
config,
lib,
pkgs,
...
}: {
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
];
boot.supportedFilesystems = ["btrfs"]; { config, lib, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
boot.supportedFilesystems = [ "btrfs" ];
hardware.enableAllFirmware = true; hardware.enableAllFirmware = true;
# My flake disables this by default for security reasons. However, with an encrypted setup, # My flake disables this by default for security reasons. However, with an encrypted setup,
@ -85,7 +83,6 @@
".local/state/nvim" ".local/state/nvim"
".config/github-copilot" ".config/github-copilot"
".config/ipython" ".config/ipython"
".cache/pre-commit"
# Services # Services
".local/state/wireplumber" # volume settings ".local/state/wireplumber" # volume settings
@ -122,7 +119,7 @@
# Configure automatic root subvolume wiping on boot from initrd # Configure automatic root subvolume wiping on boot from initrd
autoWipeBtrfs = { autoWipeBtrfs = {
enable = true; enable = true;
devices."/dev/disk/by-label/NIXOS-FS".subvolumes = ["root"]; devices."/dev/disk/by-label/NIXOS-FS".subvolumes = [ "root" ];
}; };
}; };
@ -135,7 +132,7 @@
device = { device = {
roles = { roles = {
type = "laptop"; type = "laptop";
virtual-machine = false; virtual-machine = false;
}; };
cpu.type = "amd"; cpu.type = "amd";
gpu.type = "amd"; gpu.type = "amd";
@ -146,7 +143,7 @@
security = { security = {
auditd = { auditd = {
enable = true; enable = true;
autoPrune.enable = true; autoPrune.enable = true;
}; };
}; };
@ -163,28 +160,28 @@
git = { git = {
userName = "ItsDrike"; userName = "ItsDrike";
userEmail = "itsdrike@protonmail.com"; userEmail = "itsdrike@protonmail.com";
signing = { signing = {
enable = true; enable = true;
key = "FA2745890B7048C0"; key = "FA2745890B7048C0";
}; };
}; };
wms.hyprland = { wms.hyprland = {
enable = true; enable = true;
monitor = [ monitor = [
# Primary / laptop display # Primary / laptop display
"eDP-1, 1920x1200@60, 0x1080, 1" "eDP-1, 1920x1200@60, 0x1080, 1"
# HDMI-A-1 above primary # HDMI-A-1 above primary
"HDMI-A-1, 1920x1080@60, 0x0, 1" "HDMI-A-1, 1920x1080@60, 0x0, 1"
# HDMI-A-1 left to primary # HDMI-A-1 left to primary
#"HDMI-A-1, 1920x1080@60, 1920x1080, 1" #"HDMI-A-1, 1920x1080@60, 1920x1080, 1"
# Mirror the primary (laptop) monitor on externals # Mirror the primary (laptop) monitor on externals
", preferred, auto, 1, mirror, eDP-1" ", preferred, auto, 1, mirror, eDP-1"
]; ];
}; };
programs = { programs = {
@ -207,7 +204,7 @@
}; };
webcord.enable = true; webcord.enable = true;
mpv.enable = true; mpv.enable = true;
nomacs.enable = true; # TODO: probably disable nomacs.enable = true; # TODO: probably disable
qimgv.enable = true; qimgv.enable = true;
qbittorrent.enable = true; qbittorrent.enable = true;
obs.enable = true; obs.enable = true;

View file

@ -1,64 +1,60 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ { config, lib, pkgs, modulesPath, ... }:
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "usb_storage" "sd_mod"]; {
boot.initrd.kernelModules = []; imports =
boot.kernelModules = ["kvm-amd"]; [ (modulesPath + "/installer/scan/not-detected.nix")
boot.extraModulePackages = []; ];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
boot.initrd.luks.devices."cryptfs".device = "/dev/disk/by-label/NIXOS-CRYPTFS"; boot.initrd.luks.devices."cryptfs".device = "/dev/disk/by-label/NIXOS-CRYPTFS";
fileSystems."/" = { fileSystems."/" =
device = "/dev/disk/by-label/NIXOS-FS"; { device = "/dev/disk/by-label/NIXOS-FS";
fsType = "btrfs"; fsType = "btrfs";
options = ["subvol=root" "noatime" "compress=zstd:3"]; options = [ "subvol=root" "noatime" "compress=zstd:3" ];
}; };
fileSystems."/nix" = { fileSystems."/nix" =
device = "/dev/disk/by-label/NIXOS-FS"; { device = "/dev/disk/by-label/NIXOS-FS";
fsType = "btrfs"; fsType = "btrfs";
options = ["subvol=nix" "noatime" "compress=zstd:3"]; options = [ "subvol=nix" "noatime" "compress=zstd:3" ];
}; };
fileSystems."/persist" = { fileSystems."/persist" =
device = "/dev/disk/by-label/NIXOS-FS"; { device = "/dev/disk/by-label/NIXOS-FS";
fsType = "btrfs"; fsType = "btrfs";
options = ["subvol=persist" "noatime" "compress=zstd:3"]; options = [ "subvol=persist" "noatime" "compress=zstd:3" ];
neededForBoot = true; neededForBoot = true;
}; };
fileSystems."/data" = { fileSystems."/data" =
device = "/dev/disk/by-label/NIXOS-FS"; { device = "/dev/disk/by-label/NIXOS-FS";
fsType = "btrfs"; fsType = "btrfs";
options = ["subvol=data" "noatime" "compress=zstd:3"]; options = [ "subvol=data" "noatime" "compress=zstd:3" ];
}; };
fileSystems."/boot" = { fileSystems."/boot" =
device = "/dev/disk/by-label/EFI"; { device = "/dev/disk/by-label/EFI";
fsType = "vfat"; fsType = "vfat";
options = ["fmask=0022" "dmask=0022"]; options = [ "fmask=0022" "dmask=0022" ];
}; };
fileSystems."/.btrfs" = { fileSystems."/.btrfs" =
device = "/dev/disk/by-label/NIXOS-FS"; { device = "/dev/disk/by-label/NIXOS-FS";
fsType = "btrfs"; fsType = "btrfs";
options = ["noatime" "compress=zstd:3"]; options = [ "noatime" "compress=zstd:3" ];
}; };
swapDevices = [ swapDevices =
{device = "/dev/disk/by-label/SWAP";} [ { device = "/dev/disk/by-label/SWAP"; }
]; ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's # (the default) this is the recommended approach. When using systemd-networkd it's

View file

@ -1,9 +1,10 @@
{lib, ...}: let { lib, ... }: let
inherit (lib) mkOption mkEnableOption types; inherit (lib) mkOption mkEnableOption types;
in { in
{
options.myOptions.device = { options.myOptions.device = {
cpu.type = mkOption { cpu.type = mkOption {
type = with types; nullOr (enum ["intel" "amd"]); type = with types; nullOr (enum [ "intel" "amd" ]);
default = null; default = null;
description = '' description = ''
The manifaturer/type of the primary system CPU. The manifaturer/type of the primary system CPU.
@ -15,7 +16,7 @@ in {
}; };
gpu.type = mkOption { gpu.type = mkOption {
type = with types; nullOr (enum ["nvidia" "amd" "intel" "hybrid-nvidia" "hybrid-amd"]); type = with types; nullOr (enum [ "nvidia" "amd" "intel" "hybrid-nvidia" "hybrid-amd" ]);
default = null; default = null;
description = '' description = ''
The manifaturer/type of the primary system GPU. The manifaturer/type of the primary system GPU.

View file

@ -1,8 +1,4 @@
{ { lib, config, ... }: let
lib,
config,
...
}: let
inherit (lib) mkOption types; inherit (lib) mkOption types;
cfg = config.myOptions.device.roles; cfg = config.myOptions.device.roles;

View file

@ -1,7 +1,7 @@
{lib, ...}: { lib, ... }: with lib; let
with lib; let
inherit (lib) mkEnableOption mkOption; inherit (lib) mkEnableOption mkOption;
in { in
{
imports = [ imports = [
./programs ./programs
./git.nix ./git.nix
@ -21,3 +21,4 @@ in {
}; };
}; };
} }

View file

@ -1,7 +1,7 @@
{lib, ...}: { lib, ... }: with lib; let
with lib; let
inherit (lib) mkEnableOption mkOption; inherit (lib) mkEnableOption mkOption;
in { in
{
options.myOptions.home-manager.git = { options.myOptions.home-manager.git = {
userName = mkOption { userName = mkOption {
type = types.str; type = types.str;

View file

@ -1,25 +1,24 @@
{lib, ...}: let { lib, ... }: let
inherit (lib) mkOption types; inherit (lib) mkOption types;
mkPreferenceCmdOption = name: commandDefault: mkPreferenceCmdOption = name: commandDefault: mkOption {
mkOption { type = types.str;
type = types.str; description = "The command to start your preferred ${name}.";
description = "The command to start your preferred ${name}."; default = commandDefault;
default = commandDefault; };
};
mkPreferenceDesktopOption = name: desktopDefault: mkPreferenceDesktopOption = name: desktopDefault: mkOption {
mkOption { type = types.str;
type = types.str; description = "The desktop (application) file for your preferred ${name}.";
description = "The desktop (application) file for your preferred ${name}."; default = desktopDefault;
default = desktopDefault; };
};
mkPreferenceOptions = name: commandDefault: desktopDefault: { mkPreferenceOptions = name: commandDefault: desktopDefault: {
command = mkPreferenceCmdOption name commandDefault; command = mkPreferenceCmdOption name commandDefault;
desktop = mkPreferenceDesktopOption name desktopDefault; desktop = mkPreferenceDesktopOption name desktopDefault;
}; };
in { in
{
options.myOptions.home-manager.preferences = { options.myOptions.home-manager.preferences = {
browser = mkPreferenceOptions "browser" "firefox" "firefox.desktop"; browser = mkPreferenceOptions "browser" "firefox" "firefox.desktop";
terminalEmulator = mkPreferenceOptions "terminal emulator" "kitty" "kitty.desktop"; terminalEmulator = mkPreferenceOptions "terminal emulator" "kitty" "kitty.desktop";

View file

@ -1,7 +1,7 @@
{lib, ...}: { lib, ... }: with lib; let
with lib; let
inherit (lib) mkEnableOption mkOption types; inherit (lib) mkEnableOption mkOption types;
in { in
{
imports = [ imports = [
./iamb.nix ./iamb.nix
]; ];

View file

@ -6,7 +6,8 @@
inherit (lib) mkEnableOption mkOption types mkIf; inherit (lib) mkEnableOption mkOption types mkIf;
cfg = config.myOptions.home-manager.programs.applications.iamb; cfg = config.myOptions.home-manager.programs.applications.iamb;
in { in
{
options.myOptions.home-manager.programs.applications.iamb = { options.myOptions.home-manager.programs.applications.iamb = {
enable = mkEnableOption "iamb (vim-inspired terminal Matrix client)"; enable = mkEnableOption "iamb (vim-inspired terminal Matrix client)";
defaultProfile = mkOption { defaultProfile = mkOption {
@ -47,3 +48,4 @@ in {
]; ];
}; };
} }

View file

@ -1,7 +1,7 @@
{lib, ...}: { lib, ... }: with lib; let
with lib; let
inherit (lib) mkEnableOption mkOption types; inherit (lib) mkEnableOption mkOption types;
in { in
{
options.myOptions.home-manager.services = { options.myOptions.home-manager.services = {
dunst.enable = mkEnableOption "Dunst (lightweight notification daemon)"; dunst.enable = mkEnableOption "Dunst (lightweight notification daemon)";
hyprpaper = { hyprpaper = {
@ -14,3 +14,4 @@ in {
}; };
}; };
} }

View file

@ -1,10 +1,7 @@
{ { lib, pkgs, ... }: let
lib,
pkgs,
...
}: let
inherit (lib) mkEnableOption mkOption types; inherit (lib) mkEnableOption mkOption types;
in { in
{
options.myOptions.home-manager.theme = { options.myOptions.home-manager.theme = {
gtk = { gtk = {
enable = mkEnableOption "GTK theming optionss"; enable = mkEnableOption "GTK theming optionss";
@ -51,7 +48,7 @@ in {
size = mkOption { size = mkOption {
type = types.int; type = types.int;
description = "The size of the font"; description = "The size of the font";
default = 10; # 10 default = 10; # 10
}; };
}; };
}; };
@ -144,5 +141,6 @@ in {
description = "The size of the cursor"; description = "The size of the cursor";
}; };
}; };
}; };
} }

View file

@ -11,6 +11,7 @@ in {
Hyprland wayland compositor. Hyprland wayland compositor.
''; '';
monitor = mkOption { monitor = mkOption {
type = types.listOf types.str; type = types.listOf types.str;
default = []; default = [];

View file

@ -1,11 +1,7 @@
{ { lib, config, ... }: with lib; let
lib,
config,
...
}:
with lib; let
inherit (lib) mkEnableOption mkOption literalExpression types; inherit (lib) mkEnableOption mkOption literalExpression types;
in { in
{
options.myOptions.security.auditd = { options.myOptions.security.auditd = {
enable = mkEnableOption "the audit daemon."; enable = mkEnableOption "the audit daemon.";
autoPrune = { autoPrune = {
@ -62,3 +58,4 @@ in {
}; };
}; };
} }

View file

@ -1,9 +1,4 @@
{ { config, lib, pkgs, ...}: let
config,
lib,
pkgs,
...
}: let
inherit (lib) mkOption mkEnableOption literalExpression; inherit (lib) mkOption mkEnableOption literalExpression;
cfg = config.myOptions.system.boot; cfg = config.myOptions.system.boot;
@ -21,17 +16,17 @@ in {
description = "The kernel to use for the system."; description = "The kernel to use for the system.";
}; };
tmpOnTmpfs = mkEnableOption '' tmpOnTmpfs =
`/tmp` living on tmpfs. false means it will be cleared manually on each reboot
This option defaults to `true` if the host provides patches to the kernel package in
`boot.kernelPatches`
'';
silentBoot =
mkEnableOption '' mkEnableOption ''
almost entirely silent boot process through `quiet` kernel parameter `/tmp` living on tmpfs. false means it will be cleared manually on each reboot
''
// {default = cfg.plymouth.enable;}; This option defaults to `true` if the host provides patches to the kernel package in
`boot.kernelPatches`
'';
silentBoot = mkEnableOption ''
almost entirely silent boot process through `quiet` kernel parameter
''
// { default = cfg.plymouth.enable; };
}; };
} }

View file

@ -1,7 +1,7 @@
{lib, ...}: { lib, ... }: with lib; let
with lib; let
inherit (lib) mkEnableOption mkOption types; inherit (lib) mkEnableOption mkOption types;
in { in
{
options.myOptions.system.boot.plymouth = { options.myOptions.system.boot.plymouth = {
enable = mkEnableOption '' enable = mkEnableOption ''
Plymouth boot splash. Plymouth boot splash.

View file

@ -1,9 +1,9 @@
{lib, ...}: { lib, ... }: with lib; let
with lib; let
inherit (lib) mkEnableOption; inherit (lib) mkEnableOption;
in { in
{
options.myOptions.system.boot.secure-boot = { options.myOptions.system.boot.secure-boot = {
enable = mkEnableOption '' enable = mkEnableOption ''
secure-boot using lanzaboote. secure-boot using lanzaboote.
Note that you will need to have UEFI firmware, and the rebuild Note that you will need to have UEFI firmware, and the rebuild
@ -18,6 +18,6 @@ in {
sudo sbctl enroll-keys -m sudo sbctl enroll-keys -m
``` ```
Then reboot, and secure-boot should be enabled. Then reboot, and secure-boot should be enabled.
''; '';
}; };
} }

Some files were not shown because too many files have changed in this diff Show more