Run alejandra

This commit is contained in:
ItsDrike 2024-07-27 01:07:07 +02:00
parent 286920def4
commit c00134da1c
Signed by: ItsDrike
GPG key ID: FA2745890B7048C0
152 changed files with 827 additions and 721 deletions

View file

@ -1,9 +1,13 @@
{ config, lib, inputs, self, ... }: {
let config,
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;

View file

@ -11,14 +11,17 @@ in {
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,
@ -27,13 +30,15 @@ in {
}; };
home.persistence."${cfg.persistentDataMountPoint}" = { home.persistence."${cfg.persistentDataMountPoint}" = {
directories = [ directories =
[
]
++ cfg.extraDataDirectories;
] ++ cfg.extraDataDirectories; files =
[
files = [ ]
++ cfg.extraDataFiles;
] ++ cfg.extraDataFiles;
# See comment for this above # See comment for this above
allowOther = true; allowOther = true;

View file

@ -1,9 +1,5 @@
{ {pkgs, ...}: let
pkgs, scriptPkgs = import ./packages {inherit pkgs;};
...
}: let
scriptPkgs = (import ./packages {inherit pkgs;});
in { in {
home.packages = with scriptPkgs; [ home.packages = with scriptPkgs; [
bitcoin bitcoin

View file

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

View file

@ -1,5 +1,4 @@
{pkgs, ...}: {pkgs, ...}: (pkgs.writeShellApplication {
(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,9 +1,7 @@
{pkgs, ...}: {pkgs, ...}: (pkgs.writeShellApplication {
(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,7 +1,4 @@
{ {pkgs, ...}: let
pkgs,
...
}: let
packages = { packages = {
bitcoin = pkgs.callPackage ./bitcoin.nix {}; bitcoin = pkgs.callPackage ./bitcoin.nix {};
cheatsh = pkgs.callPackage ./cheatsh {}; cheatsh = pkgs.callPackage ./cheatsh {};
@ -11,4 +8,3 @@
}; };
in in
packages packages

View file

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

View file

@ -1,10 +1,7 @@
{pkgs, ...}: {pkgs, ...}: (pkgs.writeShellApplication {
(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,7 +7,6 @@
... ...
}: 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];

View file

@ -5,11 +5,8 @@
... ...
}: 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,6 +16,3 @@ in {
]; ];
}; };
} }

View file

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

View file

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

View file

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

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 {

View file

@ -14,7 +14,8 @@ 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"
@ -60,7 +61,8 @@ 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"
]; ];
@ -68,4 +70,3 @@ in {
}; };
}; };
} }

View file

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

View file

@ -143,9 +143,9 @@ 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 extraExtensions; in
extraExtensions;
}; };
}; };
}; };
} }

View file

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

View file

@ -1,7 +1,4 @@
{ {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 = {
@ -29,4 +26,3 @@ in {
monitor = cfg.monitor; monitor = cfg.monitor;
}; };
} }

View file

@ -1,4 +1,8 @@
{ 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 = {
@ -191,7 +195,6 @@ 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,10 +1,5 @@
{ {config, ...}: {
config,
...
}:
{
wayland.windowManager.hyprland.settings = { wayland.windowManager.hyprland.settings = {
# #
# Window gaps # Window gaps
# #
@ -81,7 +76,6 @@
"col.shadow_inactive" = "rgba(0F0F0F99)"; "col.shadow_inactive" = "rgba(0F0F0F99)";
}; };
# #
# Window Blur # Window Blur
# #
@ -92,7 +86,6 @@
passes = 1; passes = 1;
}; };
# #
# Dim inactive windows # Dim inactive windows
# #
@ -124,4 +117,3 @@
misc.animate_manual_resizes = true; misc.animate_manual_resizes = true;
}; };
} }

View file

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

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;

View file

@ -1,7 +1,4 @@
{ {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

@ -2,4 +2,3 @@
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,4 +13,3 @@ pkgs.writeShellApplication {
${builtins.readFile ./quick-record.sh} ${builtins.readFile ./quick-record.sh}
''; '';
} }

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,8 +1,11 @@
{ config, pkgs, lib, ... }:
let
nr = "${pkgs.nixos-rebuild}/bin/nixos-rebuild";
in
{ {
config,
pkgs,
lib,
...
}: let
nr = "${pkgs.nixos-rebuild}/bin/nixos-rebuild";
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,4 +1,8 @@
{ config, pkgs, ... }: { {
config,
pkgs,
...
}: {
imports = [ imports = [
./plugins.nix ./plugins.nix
./aliases.nix ./aliases.nix

View file

@ -1,9 +1,6 @@
_: _: 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,8 +1,10 @@
{ config, pkgs, ... }:
let
inherit (pkgs) fetchFromGitHub;
in
{ {
config,
pkgs,
...
}: let
inherit (pkgs) fetchFromGitHub;
in {
programs.zsh.plugins = [ programs.zsh.plugins = [
{ {
name = "zsh-nix-shell"; name = "zsh-nix-shell";

View file

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

View file

@ -1,9 +1,5 @@
{ {pkgs, ...}: let
pkgs, scriptPkgs = import ./bin {inherit pkgs;};
...
}: let
scriptPkgs = (import ./bin {inherit pkgs;});
in { in {
programs.git = { programs.git = {
aliases = { aliases = {
@ -70,6 +66,8 @@ 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,7 +1,4 @@
{ {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,8 +1,10 @@
{ osConfig, pkgs, ... }:
let
myGitConf = osConfig.myOptions.home-manager.git;
in
{ {
osConfig,
pkgs,
...
}: let
myGitConf = osConfig.myOptions.home-manager.git;
in {
imports = [ imports = [
./gh.nix ./gh.nix
./ignores.nix ./ignores.nix

View file

@ -33,10 +33,12 @@ in {
}; };
default_profile = cfg.defaultProfile; default_profile = cfg.defaultProfile;
profiles = lib.mapAttrs (name: profile: { profiles =
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,5 +1,9 @@
# 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}";

View file

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

View file

@ -1,7 +1,6 @@
{ {
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

@ -7,7 +7,6 @@
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,4 +1,8 @@
{config, pkgs, ...}: { {
config,
pkgs,
...
}: {
imports = [ imports = [
./mime-apps.nix ./mime-apps.nix
./user-dirs.nix ./user-dirs.nix

View file

@ -1,8 +1,5 @@
# 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

@ -31,4 +31,3 @@ in {
''; '';
}; };
} }

View file

@ -1,7 +1,4 @@
{ {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,7 +18,11 @@ 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 (if cfg.usePortal then 1 else 0)}"; GTK_USE_PORTAL = "${toString (
if cfg.usePortal
then 1
else 0
)}";
}; };
}; };

View file

@ -80,7 +80,6 @@ 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,5 +1,4 @@
{ inputs, ... }: {inputs, ...}: let
let
inherit (inputs) self; inherit (inputs) self;
inherit (inputs.nixpkgs) lib; inherit (inputs.nixpkgs) lib;
@ -9,27 +8,30 @@ let
../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,5 +1,8 @@
{ lib, pkgs, ... }:
{ {
lib,
pkgs,
...
}: {
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
]; ];

View file

@ -1,11 +1,15 @@
# 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, ... }:
{ {
imports = config,
[ (modulesPath + "/installer/scan/not-detected.nix") lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usb_storage" "sd_mod"]; boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usb_storage" "sd_mod"];
@ -15,45 +19,45 @@
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

View file

@ -1,12 +1,14 @@
# 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 = config,
[ # Include the results of the hardware scan. lib,
pkgs,
...
}: {
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
]; ];

View file

@ -1,11 +1,15 @@
# 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, ... }:
{ {
imports = config,
[ (modulesPath + "/installer/scan/not-detected.nix") lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "usb_storage" "sd_mod"]; boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "usb_storage" "sd_mod"];
@ -15,45 +19,45 @@
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

View file

@ -1,7 +1,6 @@
{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"]);

View file

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

View file

@ -1,7 +1,7 @@
{ lib, ... }: with lib; let {lib, ...}:
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,13 +1,15 @@
{lib, ...}: let {lib, ...}: let
inherit (lib) mkOption types; inherit (lib) mkOption types;
mkPreferenceCmdOption = name: commandDefault: mkOption { mkPreferenceCmdOption = name: commandDefault:
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: mkOption { mkPreferenceDesktopOption = name: desktopDefault:
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;
@ -17,8 +19,7 @@
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, ... }: with lib; let {lib, ...}:
with lib; let
inherit (lib) mkEnableOption mkOption types; inherit (lib) mkEnableOption mkOption types;
in in {
{
imports = [ imports = [
./iamb.nix ./iamb.nix
]; ];

View file

@ -6,8 +6,7 @@
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 {
@ -48,4 +47,3 @@ in
]; ];
}; };
} }

View file

@ -1,7 +1,7 @@
{ lib, ... }: with lib; let {lib, ...}:
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,4 +14,3 @@ in
}; };
}; };
} }

View file

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

View file

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

View file

@ -1,4 +1,9 @@
{ 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;
@ -16,15 +21,15 @@ in {
description = "The kernel to use for the system."; description = "The kernel to use for the system.";
}; };
tmpOnTmpfs = tmpOnTmpfs = mkEnableOption ''
mkEnableOption ''
`/tmp` living on tmpfs. false means it will be cleared manually on each reboot `/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 This option defaults to `true` if the host provides patches to the kernel package in
`boot.kernelPatches` `boot.kernelPatches`
''; '';
silentBoot = mkEnableOption '' silentBoot =
mkEnableOption ''
almost entirely silent boot process through `quiet` kernel parameter almost entirely silent boot process through `quiet` kernel parameter
'' ''
// {default = cfg.plymouth.enable;}; // {default = cfg.plymouth.enable;};

View file

@ -1,7 +1,7 @@
{ lib, ... }: with lib; let {lib, ...}:
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,7 +1,7 @@
{ lib, ... }: with lib; let {lib, ...}:
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.

View file

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

View file

@ -1,9 +1,13 @@
{ lib, config, ... }: with lib; let {
lib,
config,
...
}:
with lib; let
inherit (lib) mkEnableOption mkOption literalExpression types; inherit (lib) mkEnableOption mkOption literalExpression types;
cfg = config.myOptions.system.impermanence; cfg = config.myOptions.system.impermanence;
in in {
{
options.myOptions.system.impermanence = { options.myOptions.system.impermanence = {
root = { root = {
enable = mkEnableOption '' enable = mkEnableOption ''

View file

@ -1,9 +1,13 @@
{ lib, config, ... }: with lib; let {
lib,
config,
...
}:
with lib; let
inherit (lib) mkEnableOption mkOption literalExpression types; inherit (lib) mkEnableOption mkOption literalExpression types;
cfg = config.myOptions.workstation; cfg = config.myOptions.workstation;
in in {
{
options.myOptions.workstation = { options.myOptions.workstation = {
printing = { printing = {
enable = mkEnableOption '' enable = mkEnableOption ''

View file

@ -1,4 +1,9 @@
{ pkgs, lib, config, ...}: let {
pkgs,
lib,
config,
...
}: let
inherit (lib) mkIf; inherit (lib) mkIf;
deviceType = config.myOptions.device.roles.type; deviceType = config.myOptions.device.roles.type;
acceptedTypes = ["laptop"]; acceptedTypes = ["laptop"];
@ -20,4 +25,3 @@ in {
}; };
}; };
} }

View file

@ -1,4 +1,9 @@
{ pkgs, lib, config, ...}: let {
pkgs,
lib,
config,
...
}: let
inherit (lib) mkIf; inherit (lib) mkIf;
deviceType = config.myOptions.device.roles.type; deviceType = config.myOptions.device.roles.type;
acceptedTypes = ["laptop"]; acceptedTypes = ["laptop"];

View file

@ -1,4 +1,9 @@
{ pkgs, lib, config, ...}: let {
pkgs,
lib,
config,
...
}: let
inherit (lib) mkIf; inherit (lib) mkIf;
inherit (lib.modules) mkForce; inherit (lib.modules) mkForce;
inherit (lib.strings) makeBinPath; inherit (lib.strings) makeBinPath;

View file

@ -1,4 +1,9 @@
{ pkgs, lib, config, ...}: let {
pkgs,
lib,
config,
...
}: let
inherit (lib) mkIf; inherit (lib) mkIf;
deviceType = config.myOptions.device.roles.type; deviceType = config.myOptions.device.roles.type;
acceptedTypes = ["laptop"]; acceptedTypes = ["laptop"];
@ -16,4 +21,3 @@ in {
}; };
}; };
} }

View file

@ -1,4 +1,8 @@
{ lib, config, ...}: let {
lib,
config,
...
}: let
inherit (lib) mkIf; inherit (lib) mkIf;
deviceType = config.myOptions.device.roles.type; deviceType = config.myOptions.device.roles.type;
acceptedTypes = ["laptop"]; acceptedTypes = ["laptop"];

View file

@ -7,7 +7,6 @@
inherit (lib) mkIf getExe; inherit (lib) mkIf getExe;
inherit (lib.strings) concatStringsSep; inherit (lib.strings) concatStringsSep;
deviceType = config.myOptions.device.roles.type; deviceType = config.myOptions.device.roles.type;
acceptedTypes = ["laptop" "desktop"]; acceptedTypes = ["laptop" "desktop"];

View file

@ -1,4 +1,8 @@
{lib, config, ...}: let {
lib,
config,
...
}: let
inherit (lib) mkIf; inherit (lib) mkIf;
deviceType = config.myOptions.device.roles.type; deviceType = config.myOptions.device.roles.type;
acceptedTypes = ["laptop" "desktop"]; acceptedTypes = ["laptop" "desktop"];

View file

@ -23,7 +23,10 @@ in {
# Note: this assumes a wlroots based compositor if it's not hyprland # Note: this assumes a wlroots based compositor if it's not hyprland
# which may not always actually be the case, however, I can't be bothered to handle # which may not always actually be the case, however, I can't be bothered to handle
# everything here and I don't plan on moving WMs any time soon. # everything here and I don't plan on moving WMs any time soon.
portal = if cfgHyprlandEnabled then "hyprland" else "wlr"; portal =
if cfgHyprlandEnabled
then "hyprland"
else "wlr";
in { in {
# Use this portal for every interface, unless a specific override is present # Use this portal for every interface, unless a specific override is present
default = ["gtk"]; default = ["gtk"];

View file

@ -1,4 +1,9 @@
{pkgs, lib, config, ...}: let {
pkgs,
lib,
config,
...
}: let
inherit (lib) mkIf; inherit (lib) mkIf;
deviceType = config.myOptions.device.roles.type; deviceType = config.myOptions.device.roles.type;
acceptedTypes = ["laptop" "desktop"]; acceptedTypes = ["laptop" "desktop"];
@ -15,26 +20,30 @@ in {
"Noto Color Emoji" "Noto Color Emoji"
]; ];
in { in {
monospace = [ monospace =
[
"Monaspace Krypton" "Monaspace Krypton"
"Source Code Pro Medium" "Source Code Pro Medium"
"Source Han Mono" "Source Han Mono"
] ]
++ common; ++ common;
sansSerif = [ sansSerif =
[
"Noto Sans" "Noto Sans"
"Jost" "Jost"
"Lexend" "Lexend"
] ]
++ common; ++ common;
serif = [ serif =
[
"Noto Serif" "Noto Serif"
] ]
++ common; ++ common;
emoji = [ emoji =
[
"Noto Color Emoji" "Noto Color Emoji"
] ]
++ common; ++ common;

View file

@ -1,4 +1,8 @@
{ lib, config, ...}: let {
lib,
config,
...
}: let
inherit (lib) mkIf; inherit (lib) mkIf;
deviceType = config.myOptions.device.roles.type; deviceType = config.myOptions.device.roles.type;
acceptedTypes = ["laptop" "desktop"]; acceptedTypes = ["laptop" "desktop"];

View file

@ -1,4 +1,8 @@
{ lib, config, ...}: let {
lib,
config,
...
}: let
inherit (lib) mkIf; inherit (lib) mkIf;
deviceType = config.myOptions.device.roles.type; deviceType = config.myOptions.device.roles.type;
acceptedTypes = ["laptop" "desktop"]; acceptedTypes = ["laptop" "desktop"];

View file

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

View file

@ -34,4 +34,3 @@ in {
services.tumbler.enable = true; services.tumbler.enable = true;
}; };
} }

View file

@ -8,4 +8,3 @@
./gnome-keyring.nix ./gnome-keyring.nix
]; ];
} }

View file

@ -1,4 +1,9 @@
{pkgs, lib, config, ...}: let {
pkgs,
lib,
config,
...
}: let
inherit (lib) mkIf; inherit (lib) mkIf;
deviceType = config.myOptions.device.roles.type; deviceType = config.myOptions.device.roles.type;
acceptedTypes = ["laptop" "desktop"]; acceptedTypes = ["laptop" "desktop"];

View file

@ -1,4 +1,9 @@
{pkgs, lib, config, ...}: let {
pkgs,
lib,
config,
...
}: let
inherit (lib) mkIf; inherit (lib) mkIf;
deviceType = config.myOptions.device.roles.type; deviceType = config.myOptions.device.roles.type;
acceptedTypes = ["laptop" "desktop"]; acceptedTypes = ["laptop" "desktop"];

View file

@ -1,4 +1,8 @@
{lib, config, ...}: let {
lib,
config,
...
}: let
inherit (lib) mkIf; inherit (lib) mkIf;
deviceType = config.myOptions.device.roles.type; deviceType = config.myOptions.device.roles.type;
acceptedTypes = ["laptop" "desktop"]; acceptedTypes = ["laptop" "desktop"];

View file

@ -1,4 +1,8 @@
{ lib, config, ...}: let {
lib,
config,
...
}: let
inherit (lib) mkIf; inherit (lib) mkIf;
deviceType = config.myOptions.device.roles.type; deviceType = config.myOptions.device.roles.type;
acceptedTypes = ["laptop" "desktop"]; acceptedTypes = ["laptop" "desktop"];

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