reformatted with alejandra

This commit is contained in:
Aly Raffauf 2024-04-07 22:16:33 -04:00
parent c4f1643ee6
commit 0ecde61760
84 changed files with 780 additions and 520 deletions

124
flake.nix
View file

@ -33,76 +33,80 @@
}; };
nixConfig = { nixConfig = {
extra-substituters = extra-substituters = ["https://nixcache.raffauflabs.com" "https://hyprland.cachix.org"];
[ "https://nixcache.raffauflabs.com" "https://hyprland.cachix.org" ];
extra-trusted-public-keys = [ extra-trusted-public-keys = [
"nixcache.raffauflabs.com:yFIuJde/izA4aUDI3MZmBLzynEsqVCT1OfCUghOLlt8=" "nixcache.raffauflabs.com:yFIuJde/izA4aUDI3MZmBLzynEsqVCT1OfCUghOLlt8="
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
]; ];
}; };
outputs = inputs@{ nixpkgs, nixpkgs-unstable, home-manager outputs = inputs @ {
, home-manager-unstable, nixos-hardware, impermanence, disko, disko-unstable nixpkgs,
, ... }: { nixpkgs-unstable,
home-manager,
home-manager-unstable,
nixos-hardware,
impermanence,
disko,
disko-unstable,
...
}: {
homeConfigurations.aly = home-manager-unstable.lib.homeManagerConfiguration {
pkgs = import nixpkgs-unstable {system = "x86_64-linux";};
modules = [./home.nix];
};
homeConfigurations.aly = nixosConfigurations = {
home-manager-unstable.lib.homeManagerConfiguration { # Framework 13 with AMD Ryzen 7640U and 32GB RAM.
pkgs = import nixpkgs-unstable { system = "x86_64-linux"; }; lavaridge = nixpkgs-unstable.lib.nixosSystem {
modules = [ ./home.nix ]; system = "x86_64-linux";
}; specialArgs = {inherit inputs;};
modules = [
nixos-hardware.nixosModules.framework-13-7040-amd
home-manager-unstable.nixosModules.home-manager
./hosts/lavaridge
./nixosModules
];
};
nixosConfigurations = { # Home Lab. Ryzen 5 2600 with 16GB RAM, RX 6700.
mauville = nixpkgs-unstable.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {inherit inputs;};
modules = [
home-manager-unstable.nixosModules.home-manager
./hosts/mauville
./nixosModules
];
};
# Framework 13 with AMD Ryzen 7640U and 32GB RAM. # Lenovo Yoga 9i with i7-1360P and 16GB RAM.
lavaridge = nixpkgs-unstable.lib.nixosSystem { petalburg = nixpkgs-unstable.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
specialArgs = { inherit inputs; }; specialArgs = {inherit inputs;};
modules = [ modules = [
nixos-hardware.nixosModules.framework-13-7040-amd disko-unstable.nixosModules.disko
home-manager-unstable.nixosModules.home-manager nixos-hardware.nixosModules.common-pc-laptop-ssd
./hosts/lavaridge nixos-hardware.nixosModules.common-cpu-intel
./nixosModules home-manager-unstable.nixosModules.home-manager
]; ./hosts/petalburg
}; ./nixosModules
];
};
# Home Lab. Ryzen 5 2600 with 16GB RAM, RX 6700. # T440p with i5-4210M and 16GB RAM.
mauville = nixpkgs-unstable.lib.nixosSystem { rustboro = nixpkgs-unstable.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
specialArgs = { inherit inputs; }; specialArgs = {inherit inputs;};
modules = [ modules = [
home-manager-unstable.nixosModules.home-manager disko-unstable.nixosModules.disko
./hosts/mauville impermanence.nixosModules.impermanence
./nixosModules nixos-hardware.nixosModules.lenovo-thinkpad-t440p
]; home-manager-unstable.nixosModules.home-manager
}; ./hosts/rustboro
./nixosModules
# Lenovo Yoga 9i with i7-1360P and 16GB RAM. ];
petalburg = nixpkgs-unstable.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
modules = [
disko-unstable.nixosModules.disko
nixos-hardware.nixosModules.common-pc-laptop-ssd
nixos-hardware.nixosModules.common-cpu-intel
home-manager-unstable.nixosModules.home-manager
./hosts/petalburg
./nixosModules
];
};
# T440p with i5-4210M and 16GB RAM.
rustboro = nixpkgs-unstable.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
modules = [
disko-unstable.nixosModules.disko
impermanence.nixosModules.impermanence
nixos-hardware.nixosModules.lenovo-thinkpad-t440p
home-manager-unstable.nixosModules.home-manager
./hosts/rustboro
./nixosModules
];
};
}; };
}; };
};
} }

View file

@ -1,7 +1,11 @@
{ inputs, config, pkgs, lib, ... }:
{ {
imports = [ ./homeManagerModules ]; inputs,
config,
pkgs,
lib,
...
}: {
imports = [./homeManagerModules];
home.username = "aly"; home.username = "aly";
home.homeDirectory = "/home/aly"; home.homeDirectory = "/home/aly";

View file

@ -1,6 +1,10 @@
{ pkgs, lib, config, ... }: { {
pkgs,
options = { cliApps.bash.enable = lib.mkEnableOption "Enables bash."; }; lib,
config,
...
}: {
options = {cliApps.bash.enable = lib.mkEnableOption "Enables bash.";};
config = lib.mkIf config.cliApps.bash.enable { config = lib.mkIf config.cliApps.bash.enable {
programs.bash = { programs.bash = {

View file

@ -1,7 +1,10 @@
{ config, lib, pkgs, ... }:
{ {
imports = [ ./bash ./emacs ./eza ./fzf ./neovim ./tmux ./neofetch ]; config,
lib,
pkgs,
...
}: {
imports = [./bash ./emacs ./eza ./fzf ./neovim ./tmux ./neofetch];
home.packages = with pkgs; [ home.packages = with pkgs; [
# backblaze-b2 # backblaze-b2

View file

@ -1,32 +1,35 @@
{ pkgs, lib, config, ... }: { {
pkgs,
options = { cliApps.emacs.enable = lib.mkEnableOption "Enables emacs."; }; lib,
config,
...
}: {
options = {cliApps.emacs.enable = lib.mkEnableOption "Enables emacs.";};
config = lib.mkIf config.cliApps.emacs.enable { config = lib.mkIf config.cliApps.emacs.enable {
home.packages = with pkgs; [ nixfmt python3 ]; home.packages = with pkgs; [nixfmt python3];
programs.emacs = { programs.emacs = {
enable = true; enable = true;
extraPackages = (epkgs: extraPackages = epkgs: (with epkgs; [
(with epkgs; [ better-defaults
better-defaults catppuccin-theme
catppuccin-theme markdown-mode
markdown-mode nix-mode
nix-mode org
org org-bullets
org-bullets org-journal
org-journal org-roam
org-roam ox-pandoc
ox-pandoc projectile
projectile python
python treemacs
treemacs treemacs-projectile
treemacs-projectile treemacs-tab-bar
treemacs-tab-bar use-package
use-package yaml
yaml yaml-mode
yaml-mode ]);
]));
package = pkgs.emacs-nox; package = pkgs.emacs-nox;
extraConfig = builtins.readFile ./emacs.el; extraConfig = builtins.readFile ./emacs.el;
}; };

View file

@ -1,13 +1,17 @@
{ pkgs, lib, config, ... }: { {
pkgs,
options = { cliApps.eza.enable = lib.mkEnableOption "Enables eza."; }; lib,
config,
...
}: {
options = {cliApps.eza.enable = lib.mkEnableOption "Enables eza.";};
config = lib.mkIf config.cliApps.eza.enable { config = lib.mkIf config.cliApps.eza.enable {
programs.eza = { programs.eza = {
enable = true; enable = true;
git = true; git = true;
icons = true; icons = true;
extraOptions = [ "--group-directories-first" "--header" ]; extraOptions = ["--group-directories-first" "--header"];
}; };
}; };
} }

View file

@ -1,6 +1,10 @@
{ pkgs, lib, config, ... }: { {
pkgs,
options = { cliApps.fzf.enable = lib.mkEnableOption "Enables fzf."; }; lib,
config,
...
}: {
options = {cliApps.fzf.enable = lib.mkEnableOption "Enables fzf.";};
config = lib.mkIf config.cliApps.fzf.enable { config = lib.mkIf config.cliApps.fzf.enable {
programs.fzf = { programs.fzf = {

View file

@ -1,13 +1,15 @@
{ pkgs, lib, config, ... }: { {
pkgs,
lib,
config,
...
}: {
options = { options = {
cliApps.neofetch.enable = lib.mkEnableOption "Enable neofetch."; cliApps.neofetch.enable = lib.mkEnableOption "Enable neofetch.";
}; };
config = lib.mkIf config.cliApps.neofetch.enable { config = lib.mkIf config.cliApps.neofetch.enable {
home.packages = [pkgs.neofetch];
home.packages = [ pkgs.neofetch ];
xdg.configFile."neofetch/config.conf".source = ./config.conf; xdg.configFile."neofetch/config.conf".source = ./config.conf;
}; };
} }

View file

@ -1,6 +1,10 @@
{ pkgs, lib, config, ... }: { {
pkgs,
options = { cliApps.neovim.enable = lib.mkEnableOption "Enables neovim."; }; lib,
config,
...
}: {
options = {cliApps.neovim.enable = lib.mkEnableOption "Enables neovim.";};
config = lib.mkIf config.cliApps.neovim.enable { config = lib.mkIf config.cliApps.neovim.enable {
programs.neovim = { programs.neovim = {

View file

@ -1,6 +1,10 @@
{ pkgs, lib, config, ... }: { {
pkgs,
options = { cliApps.tmux.enable = lib.mkEnableOption "Enables tmux."; }; lib,
config,
...
}: {
options = {cliApps.tmux.enable = lib.mkEnableOption "Enables tmux.";};
config = lib.mkIf config.cliApps.tmux.enable { config = lib.mkIf config.cliApps.tmux.enable {
programs.tmux = { programs.tmux = {

View file

@ -1,7 +1,10 @@
{ config, pkgs, lib, ... }:
{ {
imports = [ ./cliApps ./guiApps ./desktopEnv ./userServices ]; config,
pkgs,
lib,
...
}: {
imports = [./cliApps ./guiApps ./desktopEnv ./userServices];
nixpkgs = { nixpkgs = {
# Configure nixpkgs instance # Configure nixpkgs instance
@ -22,6 +25,6 @@
pictures = lib.mkDefault "${config.home.homeDirectory}/pics"; pictures = lib.mkDefault "${config.home.homeDirectory}/pics";
publicShare = lib.mkDefault "${config.home.homeDirectory}/pub"; publicShare = lib.mkDefault "${config.home.homeDirectory}/pub";
templates = lib.mkDefault "${config.home.homeDirectory}/tmplts"; templates = lib.mkDefault "${config.home.homeDirectory}/tmplts";
extraConfig = { XDG_SRC_DIR = "${config.home.homeDirectory}/src"; }; extraConfig = {XDG_SRC_DIR = "${config.home.homeDirectory}/src";};
}; };
} }

View file

@ -1,7 +1,10 @@
{ config, lib, pkgs, ... }:
{ {
imports = [ ./gnome ./hypr ./sway ]; config,
lib,
pkgs,
...
}: {
imports = [./gnome ./hypr ./sway];
desktopEnv.hyprland.enable = lib.mkDefault true; desktopEnv.hyprland.enable = lib.mkDefault true;
} }

View file

@ -1,5 +1,9 @@
{ pkgs, lib, config, ... }: { {
pkgs,
lib,
config,
...
}: {
options = { options = {
desktopEnv.gnome.enable = desktopEnv.gnome.enable =
lib.mkEnableOption "Enables GNOME with basic settings configuration."; lib.mkEnableOption "Enables GNOME with basic settings configuration.";
@ -12,8 +16,7 @@
"org/gnome/desktop/interface".clock-format = "12h"; "org/gnome/desktop/interface".clock-format = "12h";
"org/gnome/desktop/interface".enable-hot-corners = true; "org/gnome/desktop/interface".enable-hot-corners = true;
"org/gnome/desktop/peripherals/touchpad".tap-to-click = true; "org/gnome/desktop/peripherals/touchpad".tap-to-click = true;
"org/gnome/desktop/search-providers".enabled = "org/gnome/desktop/search-providers".enabled = "['org.gnome.Calendar.desktop', 'org.gnome.Weather.desktop', 'org.gnome.Contacts.desktop', 'org.gnome.Calculator.desktop', 'org.gnome.Characters.desktop', 'org.gnome.clocks.desktop']";
"['org.gnome.Calendar.desktop', 'org.gnome.Weather.desktop', 'org.gnome.Contacts.desktop', 'org.gnome.Calculator.desktop', 'org.gnome.Characters.desktop', 'org.gnome.clocks.desktop']";
"org/gnome/desktop/wm/preferences".auto-raise = true; "org/gnome/desktop/wm/preferences".auto-raise = true;
"org/gnome/mutter".dynamic-workspaces = true; "org/gnome/mutter".dynamic-workspaces = true;
"org/gnome/mutter".edge-tiling = true; "org/gnome/mutter".edge-tiling = true;
@ -42,8 +45,8 @@
"drive-menu@gnome-shell-extensions.gcampax.github.com" "drive-menu@gnome-shell-extensions.gcampax.github.com"
]; ];
"org/virt-manager/virt-manager/connections" = { "org/virt-manager/virt-manager/connections" = {
autoconnect = [ "qemu:///system" ]; autoconnect = ["qemu:///system"];
uris = [ "qemu:///system" ]; uris = ["qemu:///system"];
}; };
}; };
}; };

View file

@ -1,6 +1,10 @@
{ pkgs, lib, config, ... }: { {
pkgs,
imports = [ ./hypridle ./hyprlock ./hyprpaper ./hyprshade ./theme.nix ]; lib,
config,
...
}: {
imports = [./hypridle ./hyprlock ./hyprpaper ./hyprshade ./theme.nix];
options = { options = {
desktopEnv.hyprland.enable = desktopEnv.hyprland.enable =
@ -8,7 +12,6 @@
}; };
config = lib.mkIf config.desktopEnv.hyprland.enable { config = lib.mkIf config.desktopEnv.hyprland.enable {
# Hypr* modules, plguins, and tools. # Hypr* modules, plguins, and tools.
desktopEnv.hyprland.hypridle.enable = lib.mkDefault true; desktopEnv.hyprland.hypridle.enable = lib.mkDefault true;
desktopEnv.hyprland.hyprlock.enable = lib.mkDefault true; desktopEnv.hyprland.hyprlock.enable = lib.mkDefault true;
@ -58,8 +61,8 @@
xdg.portal = { xdg.portal = {
enable = true; enable = true;
configPackages = [ pkgs.xdg-desktop-portal-hyprland ]; configPackages = [pkgs.xdg-desktop-portal-hyprland];
extraPortals = [ pkgs.xdg-desktop-portal-hyprland ]; extraPortals = [pkgs.xdg-desktop-portal-hyprland];
}; };
wayland.windowManager.hyprland.enable = true; wayland.windowManager.hyprland.enable = true;
@ -109,7 +112,6 @@
cursor_size = "24"; cursor_size = "24";
qt_platform_theme = "gtk2"; qt_platform_theme = "gtk2";
gdk_scale = "1.5"; gdk_scale = "1.5";
in '' in ''
monitor = desc:BOE 0x0BCA,preferred,auto,1.566667 # lavaridge fw13 matte display monitor = desc:BOE 0x0BCA,preferred,auto,1.566667 # lavaridge fw13 matte display
monitor = desc:BOE 0x095F,preferred,auto,1.566667# lavaridge fw13 glossy display monitor = desc:BOE 0x095F,preferred,auto,1.566667# lavaridge fw13 glossy display
@ -322,6 +324,5 @@
# Show/hide waybar. # Show/hide waybar.
bind = ${modifier}, F11, exec, pkill -SIGUSR1 waybar bind = ${modifier}, F11, exec, pkill -SIGUSR1 waybar
''; '';
}; };
} }

View file

@ -1,14 +1,17 @@
{ pkgs, lib, config, ... }: { {
pkgs,
lib,
config,
...
}: {
options = { options = {
desktopEnv.hyprland.hypridle.enable = desktopEnv.hyprland.hypridle.enable =
lib.mkEnableOption "Enables hypridle."; lib.mkEnableOption "Enables hypridle.";
}; };
config = lib.mkIf config.desktopEnv.hyprland.hypridle.enable { config = lib.mkIf config.desktopEnv.hyprland.hypridle.enable {
# Packages that should be installed to the user profile. # Packages that should be installed to the user profile.
home.packages = with pkgs; [ hypridle brightnessctl ]; home.packages = with pkgs; [hypridle brightnessctl];
xdg.configFile."hypr/hypridle.conf".text = '' xdg.configFile."hypr/hypridle.conf".text = ''
general { general {

View file

@ -1,14 +1,17 @@
{ pkgs, lib, config, ... }: { {
pkgs,
lib,
config,
...
}: {
options = { options = {
desktopEnv.hyprland.hyprlock.enable = desktopEnv.hyprland.hyprlock.enable =
lib.mkEnableOption "Enables hyprlock."; lib.mkEnableOption "Enables hyprlock.";
}; };
config = lib.mkIf config.desktopEnv.hyprland.hyprlock.enable { config = lib.mkIf config.desktopEnv.hyprland.hyprlock.enable {
# Packages that should be installed to the user profile. # Packages that should be installed to the user profile.
home.packages = with pkgs; [ hyprlock ]; home.packages = with pkgs; [hyprlock];
xdg.configFile."hypr/hyprlock.conf".source = ./hyprlock.conf; xdg.configFile."hypr/hyprlock.conf".source = ./hyprlock.conf;
}; };

View file

@ -1,6 +1,10 @@
{ pkgs, lib, config, ... }: { {
pkgs,
imports = [ ./hyprpaper-random.nix ]; lib,
config,
...
}: {
imports = [./hyprpaper-random.nix];
options = { options = {
desktopEnv.hyprland.hyprpaper.enable = desktopEnv.hyprland.hyprpaper.enable =
@ -8,9 +12,8 @@
}; };
config = lib.mkIf config.desktopEnv.hyprland.hyprpaper.enable { config = lib.mkIf config.desktopEnv.hyprland.hyprpaper.enable {
# Packages that should be installed to the user profile. # Packages that should be installed to the user profile.
home.packages = with pkgs; [ hyprpaper ]; home.packages = with pkgs; [hyprpaper];
desktopEnv.hyprland.hyprpaper.randomWallpaper.enable = lib.mkDefault true; desktopEnv.hyprland.hyprpaper.randomWallpaper.enable = lib.mkDefault true;

View file

@ -1,6 +1,9 @@
{ pkgs, lib, config, ... }: {
pkgs,
let lib,
config,
...
}: let
hyprpaper-random = pkgs.writeShellScriptBin "hyprpaper-random" '' hyprpaper-random = pkgs.writeShellScriptBin "hyprpaper-random" ''
directory=${config.home.homeDirectory}/.config/hypr/wallpapers directory=${config.home.homeDirectory}/.config/hypr/wallpapers
monitor=`hyprctl monitors | grep Monitor | awk '{print $2}'` monitor=`hyprctl monitors | grep Monitor | awk '{print $2}'`
@ -24,13 +27,10 @@ in {
lib.mkEnableOption "Enables hyprpaper random wallpaper script."; lib.mkEnableOption "Enables hyprpaper random wallpaper script.";
}; };
config = config = lib.mkIf config.desktopEnv.hyprland.hyprpaper.randomWallpaper.enable {
lib.mkIf config.desktopEnv.hyprland.hyprpaper.randomWallpaper.enable { # Packages that should be installed to the user profile.
home.packages = with pkgs; [hyprpaper-random];
# Packages that should be installed to the user profile. wayland.windowManager.hyprland.extraConfig = "exec-once = ${hyprpaper-random}/bin/hyprpaper-random";
home.packages = with pkgs; [ hyprpaper-random ]; };
wayland.windowManager.hyprland.extraConfig =
"exec-once = ${hyprpaper-random}/bin/hyprpaper-random";
};
} }

View file

@ -1,14 +1,17 @@
{ pkgs, lib, config, ... }: { {
pkgs,
lib,
config,
...
}: {
options = { options = {
desktopEnv.hyprland.hyprshade.enable = desktopEnv.hyprland.hyprshade.enable =
lib.mkEnableOption "Enables hyprshade with blue light filter."; lib.mkEnableOption "Enables hyprshade with blue light filter.";
}; };
config = lib.mkIf config.desktopEnv.hyprland.hyprshade.enable { config = lib.mkIf config.desktopEnv.hyprland.hyprshade.enable {
# Packages that should be installed to the user profile. # Packages that should be installed to the user profile.
home.packages = with pkgs; [ hyprshade ]; home.packages = with pkgs; [hyprshade];
xdg.configFile."hypr/shaders/custom-blue-light-filter.glsl".text = '' xdg.configFile."hypr/shaders/custom-blue-light-filter.glsl".text = ''
// from https://github.com/hyprwm/Hyprland/issues/1140#issuecomment-1335128437 // from https://github.com/hyprwm/Hyprland/issues/1140#issuecomment-1335128437

View file

@ -1,12 +1,15 @@
{ pkgs, lib, config, ... }: { {
pkgs,
lib,
config,
...
}: {
options = { options = {
desktopEnv.hyprland.theme.enable = desktopEnv.hyprland.theme.enable =
lib.mkEnableOption "Hyprland GTK and Qt themes."; lib.mkEnableOption "Hyprland GTK and Qt themes.";
}; };
config = lib.mkIf config.desktopEnv.hyprland.theme.enable { config = lib.mkIf config.desktopEnv.hyprland.theme.enable {
home.pointerCursor = { home.pointerCursor = {
gtk.enable = true; gtk.enable = true;
x11.enable = true; x11.enable = true;
@ -26,10 +29,10 @@
theme = { theme = {
package = pkgs.catppuccin-gtk.override { package = pkgs.catppuccin-gtk.override {
accents = [ "mauve" ]; accents = ["mauve"];
size = "compact"; size = "compact";
variant = "frappe"; variant = "frappe";
tweaks = [ "normal" ]; tweaks = ["normal"];
}; };
name = "Catppuccin-Frappe-Compact-Mauve-Dark"; name = "Catppuccin-Frappe-Compact-Mauve-Dark";
}; };
@ -44,14 +47,13 @@
font = { font = {
name = "NotoSans Nerd Font Regular"; name = "NotoSans Nerd Font Regular";
package = pkgs.nerdfonts.override { fonts = [ "Noto" ]; }; package = pkgs.nerdfonts.override {fonts = ["Noto"];};
size = 11; size = 11;
}; };
gtk3.extraConfig = { gtk-application-prefer-dark-theme = 1; }; gtk3.extraConfig = {gtk-application-prefer-dark-theme = 1;};
gtk4.extraConfig = { gtk-application-prefer-dark-theme = 1; };
gtk4.extraConfig = {gtk-application-prefer-dark-theme = 1;};
}; };
dconf.settings = { dconf.settings = {

View file

@ -1,11 +1,14 @@
{ pkgs, lib, config, ... }: { {
pkgs,
lib,
config,
...
}: {
options = { options = {
desktopEnv.sway.enable = lib.mkEnableOption "Sway with extra apps."; desktopEnv.sway.enable = lib.mkEnableOption "Sway with extra apps.";
}; };
config = lib.mkIf config.desktopEnv.sway.enable { config = lib.mkIf config.desktopEnv.sway.enable {
# Basic apps needed to run a hyprland desktop. # Basic apps needed to run a hyprland desktop.
guiApps.waybar.enable = lib.mkDefault true; guiApps.waybar.enable = lib.mkDefault true;
guiApps.mako.enable = lib.mkDefault true; guiApps.mako.enable = lib.mkDefault true;
@ -46,8 +49,8 @@
xdg.portal = { xdg.portal = {
enable = true; enable = true;
configPackages = [ pkgs.xdg-desktop-portal-wlr ]; configPackages = [pkgs.xdg-desktop-portal-wlr];
extraPortals = [ pkgs.xdg-desktop-portal-wlr ]; extraPortals = [pkgs.xdg-desktop-portal-wlr];
}; };
home.pointerCursor = { home.pointerCursor = {
@ -69,10 +72,10 @@
theme = { theme = {
package = pkgs.catppuccin-gtk.override { package = pkgs.catppuccin-gtk.override {
accents = [ "mauve" ]; accents = ["mauve"];
size = "compact"; size = "compact";
variant = "frappe"; variant = "frappe";
tweaks = [ "normal" ]; tweaks = ["normal"];
}; };
name = "Catppuccin-Frappe-Compact-Mauve-Dark"; name = "Catppuccin-Frappe-Compact-Mauve-Dark";
}; };
@ -87,7 +90,7 @@
font = { font = {
name = "NotoSans Nerd Font Regular"; name = "NotoSans Nerd Font Regular";
package = pkgs.nerdfonts.override { fonts = [ "Noto" ]; }; package = pkgs.nerdfonts.override {fonts = ["Noto"];};
size = 11; size = 11;
}; };
}; };

View file

@ -1,5 +1,9 @@
{ pkgs, lib, config, ... }: { {
pkgs,
lib,
config,
...
}: {
options = { options = {
guiApps.alacritty.enable = lib.mkEnableOption "Enables alacritty."; guiApps.alacritty.enable = lib.mkEnableOption "Enables alacritty.";
}; };
@ -34,4 +38,3 @@
}; };
}; };
} }

View file

@ -1,5 +1,9 @@
{ pkgs, lib, config, ... }: { {
pkgs,
lib,
config,
...
}: {
options = { options = {
guiApps.chromium.enable = lib.mkEnableOption "Enables Chromium."; guiApps.chromium.enable = lib.mkEnableOption "Enables Chromium.";
}; };
@ -8,15 +12,15 @@
programs.chromium = { programs.chromium = {
enable = true; enable = true;
extensions = [ extensions = [
{ id = "nngceckbapebfimnlniiiahkandclblb"; } # Bitwarden {id = "nngceckbapebfimnlniiiahkandclblb";} # Bitwarden
{ id = "bfogiafebfohielmmehodmfbbebbbpei"; } # Keeper {id = "bfogiafebfohielmmehodmfbbebbbpei";} # Keeper
{ id = "aomidfkchockcldhbkggjokdkkebmdll"; } # Redirect Path {id = "aomidfkchockcldhbkggjokdkkebmdll";} # Redirect Path
{ id = "occjjkgifpmdgodlplnacmkejpdionan"; } # Autoscroll {id = "occjjkgifpmdgodlplnacmkejpdionan";} # Autoscroll
{ id = "ioalpmibngobedobkmbhgmadaphocjdn"; } # OneLogin {id = "ioalpmibngobedobkmbhgmadaphocjdn";} # OneLogin
{ id = "jldhpllghnbhlbpcmnajkpdmadaolakh"; } # Todoist {id = "jldhpllghnbhlbpcmnajkpdmadaolakh";} # Todoist
{ id = "cjpalhdlnbpafiamejdnhcphjbkeiagm"; } # uBlock Origin {id = "cjpalhdlnbpafiamejdnhcphjbkeiagm";} # uBlock Origin
{ id = "lcbjdhceifofjlpecfpeimnnphbcjgnc"; } # xBrowserSync {id = "lcbjdhceifofjlpecfpeimnnphbcjgnc";} # xBrowserSync
{ id = "olhelnoplefjdmncknfphenjclimckaf"; } # catppuccin frappe {id = "olhelnoplefjdmncknfphenjclimckaf";} # catppuccin frappe
]; ];
}; };
}; };

View file

@ -1,6 +1,9 @@
{ config, lib, pkgs, ... }:
{ {
config,
lib,
pkgs,
...
}: {
imports = [ imports = [
./alacritty ./alacritty
./chromium ./chromium

View file

@ -1,8 +1,12 @@
{ pkgs, lib, config, ... }: { {
pkgs,
options = { guiApps.firefox.enable = lib.mkEnableOption "Enables Firefox."; }; lib,
config,
...
}: {
options = {guiApps.firefox.enable = lib.mkEnableOption "Enables Firefox.";};
config = lib.mkIf config.guiApps.firefox.enable { config = lib.mkIf config.guiApps.firefox.enable {
programs.firefox = { enable = true; }; programs.firefox = {enable = true;};
}; };
} }

View file

@ -1,11 +1,15 @@
{ pkgs, lib, config, ... }: { {
pkgs,
lib,
config,
...
}: {
options = { options = {
guiApps.fractal.enable = guiApps.fractal.enable =
lib.mkEnableOption "Enables Fractal Matrix client."; lib.mkEnableOption "Enables Fractal Matrix client.";
}; };
config = lib.mkIf config.guiApps.fractal.enable { config = lib.mkIf config.guiApps.fractal.enable {
home.packages = with pkgs; [ fractal ]; home.packages = with pkgs; [fractal];
}; };
} }

View file

@ -1,11 +1,14 @@
{ pkgs, lib, config, ... }: { {
pkgs,
options = { guiApps.fuzzel.enable = lib.mkEnableOption "Enables fuzzel."; }; lib,
config,
...
}: {
options = {guiApps.fuzzel.enable = lib.mkEnableOption "Enables fuzzel.";};
config = lib.mkIf config.guiApps.fuzzel.enable { config = lib.mkIf config.guiApps.fuzzel.enable {
home.packages = with pkgs; [ home.packages = with pkgs; [
(nerdfonts.override { fonts = [ "Noto" ]; }) (nerdfonts.override {fonts = ["Noto"];})
(catppuccin-papirus-folders.override { (catppuccin-papirus-folders.override {
flavor = "frappe"; flavor = "frappe";
accent = "mauve"; accent = "mauve";
@ -21,7 +24,7 @@
layer = "overlay"; layer = "overlay";
terminal = "${pkgs.alacritty}/bin/alacritty -e"; terminal = "${pkgs.alacritty}/bin/alacritty -e";
}; };
border = { width = 2; }; border = {width = 2;};
colors = { colors = {
background = "#232634CC"; background = "#232634CC";
selection = "#232634FF"; selection = "#232634FF";

View file

@ -1,5 +1,9 @@
{ pkgs, lib, config, ... }: { {
pkgs,
lib,
config,
...
}: {
options = { options = {
guiApps.librewolf.enable = lib.mkEnableOption "Enables librewolf."; guiApps.librewolf.enable = lib.mkEnableOption "Enables librewolf.";
}; };
@ -12,17 +16,13 @@
"browser.safebrowsing.phishing.enabled" = true; "browser.safebrowsing.phishing.enabled" = true;
"browser.safebrowsing.blockedURIs.enabled" = true; "browser.safebrowsing.blockedURIs.enabled" = true;
"browser.safebrowsing.provider.google4.gethashURL" = "browser.safebrowsing.provider.google4.gethashURL" = "https://safebrowsing.googleapis.com/v4/fullHashes:find?$ct=application/x-protobuf&key=%GOOGLE_SAFEBROWSING_API_KEY%&$httpMethod=POST";
"https://safebrowsing.googleapis.com/v4/fullHashes:find?$ct=application/x-protobuf&key=%GOOGLE_SAFEBROWSING_API_KEY%&$httpMethod=POST";
"browser.safebrowsing.provider.google4.updateURL" = "browser.safebrowsing.provider.google4.updateURL" = "https://safebrowsing.googleapis.com/v4/threatListUpdates:fetch?$ct=application/x-protobuf&key=%GOOGLE_SAFEBROWSING_API_KEY%&$httpMethod=POST";
"https://safebrowsing.googleapis.com/v4/threatListUpdates:fetch?$ct=application/x-protobuf&key=%GOOGLE_SAFEBROWSING_API_KEY%&$httpMethod=POST";
"browser.safebrowsing.provider.google.gethashURL" = "browser.safebrowsing.provider.google.gethashURL" = "https://safebrowsing.google.com/safebrowsing/gethash?client=SAFEBROWSING_ID&appver=%MAJOR_VERSION%&pver=2.2";
"https://safebrowsing.google.com/safebrowsing/gethash?client=SAFEBROWSING_ID&appver=%MAJOR_VERSION%&pver=2.2";
"browser.safebrowsing.provider.google.updateURL" = "browser.safebrowsing.provider.google.updateURL" = "https://safebrowsing.google.com/safebrowsing/downloads?client=SAFEBROWSING_ID&appver=%MAJOR_VERSION%&pver=2.2&key=%GOOGLE_SAFEBROWSING_API_KEY%";
"https://safebrowsing.google.com/safebrowsing/downloads?client=SAFEBROWSING_ID&appver=%MAJOR_VERSION%&pver=2.2&key=%GOOGLE_SAFEBROWSING_API_KEY%";
"browser.safebrowsing.downloads.enabled" = true; "browser.safebrowsing.downloads.enabled" = true;
"identity.fxaccounts.enabled" = true; "identity.fxaccounts.enabled" = true;

View file

@ -1,10 +1,13 @@
{ pkgs, lib, config, ... }: { {
pkgs,
options = { guiApps.mako.enable = lib.mkEnableOption "Enables mako."; }; lib,
config,
...
}: {
options = {guiApps.mako.enable = lib.mkEnableOption "Enables mako.";};
config = lib.mkIf config.guiApps.mako.enable { config = lib.mkIf config.guiApps.mako.enable {
home.packages = with pkgs; [(nerdfonts.override {fonts = ["Noto"];})];
home.packages = with pkgs; [ (nerdfonts.override { fonts = [ "Noto" ]; }) ];
services.mako = { services.mako = {
enable = true; enable = true;

View file

@ -1,10 +1,14 @@
{ pkgs, lib, config, ... }: { {
pkgs,
lib,
config,
...
}: {
options = { options = {
guiApps.obsidian.enable = lib.mkEnableOption "Enables Obsidian."; guiApps.obsidian.enable = lib.mkEnableOption "Enables Obsidian.";
}; };
config = lib.mkIf config.guiApps.obsidian.enable { config = lib.mkIf config.guiApps.obsidian.enable {
home.packages = with pkgs; [ obsidian ]; home.packages = with pkgs; [obsidian];
}; };
} }

View file

@ -1,8 +1,12 @@
{ pkgs, lib, config, ... }: { {
pkgs,
options = { guiApps.tauon.enable = lib.mkEnableOption "Enables Tauon."; }; lib,
config,
...
}: {
options = {guiApps.tauon.enable = lib.mkEnableOption "Enables Tauon.";};
config = lib.mkIf config.guiApps.tauon.enable { config = lib.mkIf config.guiApps.tauon.enable {
home.packages = with pkgs; [ tauon ]; home.packages = with pkgs; [tauon];
}; };
} }

View file

@ -1,13 +1,17 @@
{ pkgs, lib, config, ... }: { {
pkgs,
options = { guiApps.waybar.enable = lib.mkEnableOption "Enables waybar."; }; lib,
config,
...
}: {
options = {guiApps.waybar.enable = lib.mkEnableOption "Enables waybar.";};
config = lib.mkIf config.guiApps.waybar.enable { config = lib.mkIf config.guiApps.waybar.enable {
# Packages that should be installed to the user profile. # Packages that should be installed to the user profile.
home.packages = with pkgs; [ home.packages = with pkgs; [
blueberry blueberry
pavucontrol pavucontrol
(nerdfonts.override { fonts = [ "Noto" ]; }) (nerdfonts.override {fonts = ["Noto"];})
]; ];
xdg.configFile."waybar/style.css".source = ./waybar.css; xdg.configFile."waybar/style.css".source = ./waybar.css;
@ -17,11 +21,11 @@
mainBar = { mainBar = {
height = 36; height = 36;
layer = "top"; layer = "top";
output = [ "*" ]; output = ["*"];
position = "top"; position = "top";
reload_style_on_change = true; reload_style_on_change = true;
modules-left = [ "hyprland/workspaces" "hyprland/submap" ]; modules-left = ["hyprland/workspaces" "hyprland/submap"];
modules-center = [ "hyprland/window" ]; modules-center = ["hyprland/window"];
modules-right = [ modules-right = [
"tray" "tray"
"bluetooth" "bluetooth"
@ -39,18 +43,18 @@
"default" = "󰝥"; "default" = "󰝥";
"active" = "󰪥"; "active" = "󰪥";
}; };
"persistent-workspaces" = { "*" = 4; }; "persistent-workspaces" = {"*" = 4;};
}; };
"hyprland/window" = { "max-length" = 100; }; "hyprland/window" = {"max-length" = 100;};
"clock" = { "clock" = {
"tooltip-format" = "{:%Y-%m-%d | %H:%M}"; "tooltip-format" = "{:%Y-%m-%d | %H:%M}";
"interval" = 60; "interval" = 60;
"format" = "{:%I:%M%p}"; "format" = "{:%I:%M%p}";
}; };
"battery" = { "battery" = {
"states" = { "critical" = 20; }; "states" = {"critical" = 20;};
"format" = "{icon}"; "format" = "{icon}";
"format-icons" = [ "󰁺" "󰁼" "󰁿" "󰂁" "󰁹" ]; "format-icons" = ["󰁺" "󰁼" "󰁿" "󰂁" "󰁹"];
"tooltip-format" = '' "tooltip-format" = ''
{capacity}%: {timeTo}. {capacity}%: {timeTo}.
Using {power} watts.''; Using {power} watts.'';
@ -64,8 +68,7 @@
{controller_alias} {controller_address} {controller_alias} {controller_address}
{device_enumerate}''; {device_enumerate}'';
"tooltip-format-enumerate-connected" = "tooltip-format-enumerate-connected" = "{device_alias} {device_address}";
"{device_alias} {device_address}";
"on-click" = "${pkgs.blueberry}/bin/blueberry"; "on-click" = "${pkgs.blueberry}/bin/blueberry";
}; };
"pulseaudio" = { "pulseaudio" = {
@ -77,7 +80,7 @@
"handsfree" = "󰋎"; "handsfree" = "󰋎";
"headset" = "󰋎"; "headset" = "󰋎";
}; };
"ignored-sinks" = [ "Easy Effects Sink" ]; "ignored-sinks" = ["Easy Effects Sink"];
"on-click" = "${pkgs.pavucontrol}/bin/pavucontrol -t 3"; "on-click" = "${pkgs.pavucontrol}/bin/pavucontrol -t 3";
}; };
"network" = { "network" = {
@ -88,10 +91,9 @@
"tooltip-format-wifi" = "{essid} ({signalStrength}%) 󰣾"; "tooltip-format-wifi" = "{essid} ({signalStrength}%) 󰣾";
"tooltip-format-ethernet" = "{ifname} "; "tooltip-format-ethernet" = "{ifname} ";
"tooltip-format-disconnected" = "Disconnected"; "tooltip-format-disconnected" = "Disconnected";
"on-click" = "on-click" = "${pkgs.alacritty}/bin/alacritty --class nmtui -e ${pkgs.networkmanager}/bin/nmtui";
"${pkgs.alacritty}/bin/alacritty --class nmtui -e ${pkgs.networkmanager}/bin/nmtui";
}; };
"tray" = { "spacing" = 10; }; "tray" = {"spacing" = 10;};
"power-profiles-daemon" = { "power-profiles-daemon" = {
"format" = "{icon}"; "format" = "{icon}";
"tooltip-format" = '' "tooltip-format" = ''

View file

@ -1,8 +1,12 @@
{ pkgs, lib, config, ... }: { {
pkgs,
options = { guiApps.webCord.enable = lib.mkEnableOption "Enables WebCord."; }; lib,
config,
...
}: {
options = {guiApps.webCord.enable = lib.mkEnableOption "Enables WebCord.";};
config = lib.mkIf config.guiApps.webCord.enable { config = lib.mkIf config.guiApps.webCord.enable {
home.packages = with pkgs; [ webcord ]; home.packages = with pkgs; [webcord];
}; };
} }

View file

@ -1,6 +1,10 @@
{ pkgs, lib, config, ... }: { {
pkgs,
options = { guiApps.wlogout.enable = lib.mkEnableOption "Enables wlogout."; }; lib,
config,
...
}: {
options = {guiApps.wlogout.enable = lib.mkEnableOption "Enables wlogout.";};
config = lib.mkIf config.guiApps.wlogout.enable { config = lib.mkIf config.guiApps.wlogout.enable {
programs.wlogout = { programs.wlogout = {

View file

@ -1,8 +1,12 @@
{ pkgs, lib, config, ... }: { {
pkgs,
options = { guiApps.zoom.enable = lib.mkEnableOption "Enables Zoom."; }; lib,
config,
...
}: {
options = {guiApps.zoom.enable = lib.mkEnableOption "Enables Zoom.";};
config = lib.mkIf config.guiApps.zoom.enable { config = lib.mkIf config.guiApps.zoom.enable {
home.packages = with pkgs; [ zoom-us ]; home.packages = with pkgs; [zoom-us];
}; };
} }

View file

@ -1,7 +1,10 @@
{ config, lib, pkgs, ... }:
{ {
imports = [ ./syncthing ./easyeffects ]; config,
lib,
pkgs,
...
}: {
imports = [./syncthing ./easyeffects];
userServices.syncthing.enable = lib.mkDefault true; userServices.syncthing.enable = lib.mkDefault true;
} }

View file

@ -1,5 +1,9 @@
{ pkgs, lib, config, ... }: { {
pkgs,
lib,
config,
...
}: {
options = { options = {
userServices.easyeffects.enable = userServices.easyeffects.enable =
lib.mkEnableOption "EasyEffects user service."; lib.mkEnableOption "EasyEffects user service.";
@ -11,7 +15,6 @@
}; };
config = lib.mkIf config.userServices.easyeffects.enable { config = lib.mkIf config.userServices.easyeffects.enable {
xdg.configFile."easyeffects/output/framework13.json".source = xdg.configFile."easyeffects/output/framework13.json".source =
./framework13.json; ./framework13.json;

View file

@ -1,5 +1,9 @@
{ pkgs, lib, config, ... }: { {
pkgs,
lib,
config,
...
}: {
options = { options = {
userServices.syncthing.enable = userServices.syncthing.enable =
lib.mkEnableOption "Enables syncthing as user."; lib.mkEnableOption "Enables syncthing as user.";

View file

@ -1,8 +1,11 @@
# Framework Laptop 13 with AMD Ryzen 7640U, 32GB RAM, 1TB SSD. # Framework Laptop 13 with AMD Ryzen 7640U, 32GB RAM, 1TB SSD.
{ inputs, config, pkgs, lib, ... }:
{ {
inputs,
config,
pkgs,
lib,
...
}: {
imports = [ imports = [
./hardware-configuration.nix # Include the results of the hardware scan. ./hardware-configuration.nix # Include the results of the hardware scan.
./home.nix ./home.nix
@ -22,13 +25,13 @@
services = { services = {
fwupd.enable = true; fwupd.enable = true;
fprintd.package = pkgs.fprintd.overrideAttrs { fprintd.package = pkgs.fprintd.overrideAttrs {
mesonCheckFlags = [ "--no-suite" "fprintd:TestPamFprintd" ]; mesonCheckFlags = ["--no-suite" "fprintd:TestPamFprintd"];
}; };
}; };
systemConfig = { systemConfig = {
plymouth.enable = true; plymouth.enable = true;
zramSwap = { enable = true; }; zramSwap = {enable = true;};
}; };
desktopConfig = { desktopConfig = {
@ -43,8 +46,7 @@
virt-manager.enable = true; virt-manager.enable = true;
}; };
users.users.aly.hashedPassword = users.users.aly.hashedPassword = "$y$j9T$O9NgTk6iRfh3mxiRDvfdm1$BjvsAKYEMB3C28652FF15cj/i.3TgQAObQvR0rN1E6C";
"$y$j9T$O9NgTk6iRfh3mxiRDvfdm1$BjvsAKYEMB3C28652FF15cj/i.3TgQAObQvR0rN1E6C";
system.stateVersion = "23.11"; # Did you read the comment? system.stateVersion = "23.11"; # Did you read the comment?
} }

View file

@ -23,25 +23,25 @@
size = "100%"; size = "100%";
content = { content = {
type = "btrfs"; type = "btrfs";
extraArgs = [ "-f" ]; # Override existing partition extraArgs = ["-f"]; # Override existing partition
# Subvolumes must set a mountpoint in order to be mounted, # Subvolumes must set a mountpoint in order to be mounted,
# unless their parent is mounted # unless their parent is mounted
subvolumes = { subvolumes = {
# Subvolume name is different from mountpoint # Subvolume name is different from mountpoint
"rootfs" = { mountpoint = "/"; }; "rootfs" = {mountpoint = "/";};
# For use with future impermanence setups # For use with future impermanence setups
"persist" = { "persist" = {
mountpoint = "/persist"; mountpoint = "/persist";
mountOptions = [ "compress=zstd" "noatime" ]; mountOptions = ["compress=zstd" "noatime"];
}; };
# Subvolume name is the same as the mountpoint # Subvolume name is the same as the mountpoint
"home" = { "home" = {
mountOptions = [ "compress=zstd" ]; mountOptions = ["compress=zstd"];
mountpoint = "/home"; mountpoint = "/home";
}; };
# Parent is not mounted so the mountpoint must be set # Parent is not mounted so the mountpoint must be set
"nix" = { "nix" = {
mountOptions = [ "compress=zstd" "noatime" ]; mountOptions = ["compress=zstd" "noatime"];
mountpoint = "/nix"; mountpoint = "/nix";
}; };
}; };

View file

@ -1,16 +1,19 @@
# 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 = [ (modulesPath + "/installer/scan/not-detected.nix") ]; config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
boot.initrd.availableKernelModules = boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "thunderbolt" "usb_storage" "sd_mod"];
[ "nvme" "xhci_pci" "thunderbolt" "usb_storage" "sd_mod" ]; boot.initrd.kernelModules = [];
boot.initrd.kernelModules = [ ]; boot.kernelModules = ["kvm-amd" "amd-gpu"];
boot.kernelModules = [ "kvm-amd" "amd-gpu" ]; boot.extraModulePackages = [];
boot.extraModulePackages = [ ];
fileSystems."/" = { fileSystems."/" = {
device = "/dev/disk/by-uuid/2a76d315-37f9-406d-b1b2-01fee209139a"; device = "/dev/disk/by-uuid/2a76d315-37f9-406d-b1b2-01fee209139a";
@ -22,7 +25,7 @@
fsType = "vfat"; fsType = "vfat";
}; };
swapDevices = [ ]; swapDevices = [];
hardware.opengl = { hardware.opengl = {
## radv: an open-source Vulkan driver from freedesktop ## radv: an open-source Vulkan driver from freedesktop
@ -30,11 +33,11 @@
driSupport32Bit = true; driSupport32Bit = true;
## amdvlk: an open-source Vulkan driver from AMD ## amdvlk: an open-source Vulkan driver from AMD
extraPackages = [ pkgs.rocmPackages.clr.icd pkgs.amdvlk ]; extraPackages = [pkgs.rocmPackages.clr.icd pkgs.amdvlk];
extraPackages32 = [ pkgs.driversi686Linux.amdvlk ]; extraPackages32 = [pkgs.driversi686Linux.amdvlk];
}; };
services.xserver.videoDrivers = [ "amdgpu" ]; services.xserver.videoDrivers = ["amdgpu"];
# 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,8 +1,12 @@
{ inputs, config, pkgs, lib, ... }:
{ {
inputs,
config,
pkgs,
lib,
...
}: {
home-manager.users.aly = { home-manager.users.aly = {
imports = [ ../../homeManagerModules ]; imports = [../../homeManagerModules];
home.username = "aly"; home.username = "aly";
home.homeDirectory = "/home/aly"; home.homeDirectory = "/home/aly";

View file

@ -1,9 +1,11 @@
# Custom desktop with AMD Ryzen 5 2600, 16GB RAM, AMD Rx 6700, and 1TB SSD + 2TB HDD. # Custom desktop with AMD Ryzen 5 2600, 16GB RAM, AMD Rx 6700, and 1TB SSD + 2TB HDD.
{ config, pkgs, lib, ... }:
{ {
imports = [ ./hardware-configuration.nix ./home.nix ]; config,
pkgs,
lib,
...
}: {
imports = [./hardware-configuration.nix ./home.nix];
# Bootloader. # Bootloader.
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;

View file

@ -1,26 +1,29 @@
{ config, lib, pkgs, modulesPath, ... }:
{ {
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
boot.initrd.availableKernelModules = boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "sd_mod"];
[ "xhci_pci" "ahci" "nvme" "usbhid" "sd_mod" ]; boot.initrd.kernelModules = [];
boot.initrd.kernelModules = [ ]; boot.kernelModules = ["kvm-amd" "amdgpu"];
boot.kernelModules = [ "kvm-amd" "amdgpu"]; boot.extraModulePackages = [];
boot.extraModulePackages = [ ];
services.xserver = { services.xserver = {
# Add AMDGPU driver. # Add AMDGPU driver.
videoDrivers = [ "amdgpu" ]; videoDrivers = ["amdgpu"];
}; };
hardware.opengl = { hardware.opengl = {
enable = true; enable = true;
# Add ROCM annd AMD Vulkan driver. # Add ROCM annd AMD Vulkan driver.
extraPackages = with pkgs; [ rocmPackages.clr.icd amdvlk ]; extraPackages = with pkgs; [rocmPackages.clr.icd amdvlk];
# Add support for 32bit apps. # Add support for 32bit apps.
driSupport32Bit = true; driSupport32Bit = true;
extraPackages32 = with pkgs; [ driversi686Linux.amdvlk ]; extraPackages32 = with pkgs; [driversi686Linux.amdvlk];
}; };
fileSystems."/" = { fileSystems."/" = {
@ -43,10 +46,12 @@
fsType = "ext4"; fsType = "ext4";
}; };
swapDevices = [{ swapDevices = [
device = "/dev/disk/by-uuid/26094ada-7ba4-4437-bacb-b3cdf6c3397b"; {
priority = 1; device = "/dev/disk/by-uuid/26094ada-7ba4-4437-bacb-b3cdf6c3397b";
}]; priority = 1;
}
];
# 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,8 +1,12 @@
{ inputs, config, pkgs, lib, ... }:
{ {
inputs,
config,
pkgs,
lib,
...
}: {
home-manager.users.aly = { home-manager.users.aly = {
imports = [ ../../homeManagerModules ]; imports = [../../homeManagerModules];
home.username = "aly"; home.username = "aly";
home.homeDirectory = "/home/aly"; home.homeDirectory = "/home/aly";

View file

@ -1,8 +1,9 @@
# Lenovo Yoga 9i Convertible with Intel Core i7-1360P, 15GB RAM, 512GB SSD. # Lenovo Yoga 9i Convertible with Intel Core i7-1360P, 15GB RAM, 512GB SSD.
{
{ config, pkgs, ... }: config,
pkgs,
let ...
}: let
cs-adjuster = pkgs.writeShellScriptBin "cs-adjuster" '' cs-adjuster = pkgs.writeShellScriptBin "cs-adjuster" ''
# Get current color scheme # Get current color scheme
color_scheme=$(gsettings get org.gnome.desktop.interface color-scheme) color_scheme=$(gsettings get org.gnome.desktop.interface color-scheme)
@ -33,7 +34,7 @@ let
pp-adjuster = pkgs.writeShellApplication { pp-adjuster = pkgs.writeShellApplication {
name = "pp-adjuster"; name = "pp-adjuster";
runtimeInputs = [ pkgs.libnotify pkgs.power-profiles-daemon ]; runtimeInputs = [pkgs.libnotify pkgs.power-profiles-daemon];
text = '' text = ''
current_profile=$(powerprofilesctl get | tr -d '[:space:]') current_profile=$(powerprofilesctl get | tr -d '[:space:]')
@ -50,7 +51,6 @@ let
notify-send "Power profile set to $new_profile." notify-send "Power profile set to $new_profile."
''; '';
}; };
in { in {
imports = [ imports = [
./disko.nix ./disko.nix
@ -69,7 +69,7 @@ in {
networking.hostName = "petalburg"; # Define your hostname. networking.hostName = "petalburg"; # Define your hostname.
environment.systemPackages = [ cs-adjuster cs-adjuster-plasma pp-adjuster ]; environment.systemPackages = [cs-adjuster cs-adjuster-plasma pp-adjuster];
desktopConfig = { desktopConfig = {
enable = true; enable = true;
@ -78,7 +78,7 @@ in {
systemConfig = { systemConfig = {
plymouth.enable = true; plymouth.enable = true;
zramSwap = { enable = true; }; zramSwap = {enable = true;};
}; };
apps = { apps = {

View file

@ -23,25 +23,25 @@
size = "100%"; size = "100%";
content = { content = {
type = "btrfs"; type = "btrfs";
extraArgs = [ "-f" ]; # Override existing partition extraArgs = ["-f"]; # Override existing partition
# Subvolumes must set a mountpoint in order to be mounted, # Subvolumes must set a mountpoint in order to be mounted,
# unless their parent is mounted # unless their parent is mounted
subvolumes = { subvolumes = {
# Subvolume name is different from mountpoint # Subvolume name is different from mountpoint
"rootfs" = { mountpoint = "/"; }; "rootfs" = {mountpoint = "/";};
# For use with future impermanence setups # For use with future impermanence setups
"persist" = { "persist" = {
mountpoint = "/persist"; mountpoint = "/persist";
mountOptions = [ "compress=zstd" "noatime" ]; mountOptions = ["compress=zstd" "noatime"];
}; };
# Subvolume name is the same as the mountpoint # Subvolume name is the same as the mountpoint
"home" = { "home" = {
mountOptions = [ "compress=zstd" ]; mountOptions = ["compress=zstd"];
mountpoint = "/home"; mountpoint = "/home";
}; };
# Parent is not mounted so the mountpoint must be set # Parent is not mounted so the mountpoint must be set
"nix" = { "nix" = {
mountOptions = [ "compress=zstd" "noatime" ]; mountOptions = ["compress=zstd" "noatime"];
mountpoint = "/nix"; mountpoint = "/nix";
}; };
}; };

View file

@ -1,19 +1,21 @@
{ config, lib, pkgs, modulesPath, ... }:
{ {
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; config,
lib,
boot.initrd.availableKernelModules = pkgs,
[ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" ]; modulesPath,
boot.initrd.kernelModules = [ ]; ...
boot.kernelModules = [ "kvm-intel" ]; }: {
boot.extraModulePackages = [ ]; imports = [(modulesPath + "/installer/scan/not-detected.nix")];
boot.initrd.availableKernelModules = ["xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod"];
boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-intel"];
boot.extraModulePackages = [];
# Intel drivers with accelerated video playback support. # Intel drivers with accelerated video playback support.
nixpkgs.config.packageOverrides = pkgs: { nixpkgs.config.packageOverrides = pkgs: {
intel-vaapi-driver = intel-vaapi-driver =
pkgs.intel-vaapi-driver.override { enableHybridCodec = true; }; pkgs.intel-vaapi-driver.override {enableHybridCodec = true;};
}; };
hardware.opengl = { hardware.opengl = {

View file

@ -1,10 +1,13 @@
{ inputs, config, pkgs, lib, ... }:
{ {
users.users.aly.hashedPassword = inputs,
"$y$j9T$Ug0ZLHQQuRciFJDgOI6r00$eHc.KyQY0oU4k0LKRiZiGWJ19jkKNWHpOoyCJbtJif8"; config,
pkgs,
lib,
...
}: {
users.users.aly.hashedPassword = "$y$j9T$Ug0ZLHQQuRciFJDgOI6r00$eHc.KyQY0oU4k0LKRiZiGWJ19jkKNWHpOoyCJbtJif8";
home-manager.users.aly = { home-manager.users.aly = {
imports = [ ../../homeManagerModules ]; imports = [../../homeManagerModules];
home.username = "aly"; home.username = "aly";
home.homeDirectory = "/home/aly"; home.homeDirectory = "/home/aly";
@ -16,5 +19,4 @@
preset = "LoudnessEqualizer.json"; preset = "LoudnessEqualizer.json";
}; };
}; };
} }

View file

@ -1,8 +1,10 @@
# Lenovo Thinkpad T440p with a Core i5 4210M, 16GB RAM, 512GB SSD. # Lenovo Thinkpad T440p with a Core i5 4210M, 16GB RAM, 512GB SSD.
{ config, lib, pkgs, ... }:
{ {
config,
lib,
pkgs,
...
}: {
imports = [ imports = [
./hardware-configuration.nix # Include the results of the hardware scan. ./hardware-configuration.nix # Include the results of the hardware scan.
./home.nix ./home.nix

View file

@ -23,25 +23,25 @@
size = "100%"; size = "100%";
content = { content = {
type = "btrfs"; type = "btrfs";
extraArgs = [ "-f" ]; # Override existing partition extraArgs = ["-f"]; # Override existing partition
# Subvolumes must set a mountpoint in order to be mounted, # Subvolumes must set a mountpoint in order to be mounted,
# unless their parent is mounted # unless their parent is mounted
subvolumes = { subvolumes = {
# Subvolume name is different from mountpoint # Subvolume name is different from mountpoint
"rootfs" = { mountpoint = "/"; }; "rootfs" = {mountpoint = "/";};
# For use with future impermanence setups # For use with future impermanence setups
"persist" = { "persist" = {
mountpoint = "/persist"; mountpoint = "/persist";
mountOptions = [ "compress=zstd" "noatime" ]; mountOptions = ["compress=zstd" "noatime"];
}; };
# Subvolume name is the same as the mountpoint # Subvolume name is the same as the mountpoint
"home" = { "home" = {
mountOptions = [ "compress=zstd" ]; mountOptions = ["compress=zstd"];
mountpoint = "/home"; mountpoint = "/home";
}; };
# Parent is not mounted so the mountpoint must be set # Parent is not mounted so the mountpoint must be set
"nix" = { "nix" = {
mountOptions = [ "compress=zstd" "noatime" ]; mountOptions = ["compress=zstd" "noatime"];
mountpoint = "/nix"; mountpoint = "/nix";
}; };
}; };

View file

@ -1,7 +1,11 @@
{ config, lib, pkgs, modulesPath, ... }:
{ {
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
boot.initrd.availableKernelModules = [ boot.initrd.availableKernelModules = [
"xhci_pci" "xhci_pci"
@ -12,11 +16,11 @@
"sr_mod" "sr_mod"
"rtsx_pci_sdmmc" "rtsx_pci_sdmmc"
]; ];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = ["kvm-intel"];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [];
fileSystems."/persist" = { neededForBoot = true; }; fileSystems."/persist" = {neededForBoot = true;};
# Otherwise, CPU doesn't automatically clock down. # Otherwise, CPU doesn't automatically clock down.
powerManagement.cpuFreqGovernor = "ondemand"; powerManagement.cpuFreqGovernor = "ondemand";
@ -24,7 +28,7 @@
# Intel drivers with accelerated video playback support. # Intel drivers with accelerated video playback support.
nixpkgs.config.packageOverrides = pkgs: { nixpkgs.config.packageOverrides = pkgs: {
intel-vaapi-driver = intel-vaapi-driver =
pkgs.intel-vaapi-driver.override { enableHybridCodec = true; }; pkgs.intel-vaapi-driver.override {enableHybridCodec = true;};
}; };
hardware.opengl = { hardware.opengl = {

View file

@ -1,13 +1,16 @@
{ inputs, config, pkgs, lib, ... }:
{ {
inputs,
config,
pkgs,
lib,
...
}: {
userConfig.dustin.enable = true; userConfig.dustin.enable = true;
users.users.dustin.hashedPassword = users.users.dustin.hashedPassword = "$y$j9T$OXQYhj4IWjRJWWYsSwcqf.$lCcdq9S7m0EAdej9KMHWj9flH8K2pUb2gitNhLTlLG/";
"$y$j9T$OXQYhj4IWjRJWWYsSwcqf.$lCcdq9S7m0EAdej9KMHWj9flH8K2pUb2gitNhLTlLG/";
home-manager.users.dustin = { home-manager.users.dustin = {
imports = [ ../../homeManagerModules ]; imports = [../../homeManagerModules];
home.username = "dustin"; home.username = "dustin";
home.homeDirectory = "/home/dustin"; home.homeDirectory = "/home/dustin";
@ -22,11 +25,10 @@
}; };
}; };
users.users.aly.hashedPassword = users.users.aly.hashedPassword = "$y$j9T$VdtiEyMOegHpcUwgmCVFD0$K8Ne6.zk//VJNq2zxVQ0xE0Wg3LohvAQd3Xm9aXdM15";
"$y$j9T$VdtiEyMOegHpcUwgmCVFD0$K8Ne6.zk//VJNq2zxVQ0xE0Wg3LohvAQd3Xm9aXdM15";
home-manager.users.aly = { home-manager.users.aly = {
imports = [ ../../homeManagerModules ]; imports = [../../homeManagerModules];
home.username = "aly"; home.username = "aly";
home.homeDirectory = "/home/aly"; home.homeDirectory = "/home/aly";

View file

@ -1,5 +1,8 @@
{ pkgs, lib, config, ... }: { {
pkgs,
imports = [ ./flatpak ./steam ./podman ./virt-manager ]; lib,
config,
...
}: {
imports = [./flatpak ./steam ./podman ./virt-manager];
} }

View file

@ -1,5 +1,9 @@
{ pkgs, lib, config, ... }: { {
pkgs,
lib,
config,
...
}: {
options = { options = {
apps.flatpak.enable = apps.flatpak.enable =
lib.mkEnableOption "Enables flatpak support with GUI."; lib.mkEnableOption "Enables flatpak support with GUI.";
@ -12,23 +16,23 @@
fonts.fontDir.enable = true; fonts.fontDir.enable = true;
# Allow access to system fonts. # Allow access to system fonts.
system.fsPackages = [ pkgs.bindfs ]; system.fsPackages = [pkgs.bindfs];
fileSystems = let fileSystems = let
mkRoSymBind = path: { mkRoSymBind = path: {
device = path; device = path;
fsType = "fuse.bindfs"; fsType = "fuse.bindfs";
options = [ "ro" "resolve-symlinks" "x-gvfs-hide" ]; options = ["ro" "resolve-symlinks" "x-gvfs-hide"];
}; };
aggregatedFonts = pkgs.buildEnv { aggregatedFonts = pkgs.buildEnv {
name = "system-fonts"; name = "system-fonts";
paths = config.fonts.packages; paths = config.fonts.packages;
pathsToLink = [ "/share/fonts" ]; pathsToLink = ["/share/fonts"];
}; };
in { in {
# Create an FHS mount to support flatpak host icons/fonts # Create an FHS mount to support flatpak host icons/fonts
"/usr/share/icons" = mkRoSymBind (config.system.path + "/share/icons"); "/usr/share/icons" = mkRoSymBind (config.system.path + "/share/icons");
"/usr/share/fonts" = mkRoSymBind (aggregatedFonts + "/share/fonts"); "/usr/share/fonts" = mkRoSymBind (aggregatedFonts + "/share/fonts");
}; };
environment.systemPackages = with pkgs; [ gnome.gnome-software ]; environment.systemPackages = with pkgs; [gnome.gnome-software];
}; };
} }

View file

@ -1,20 +1,22 @@
{ pkgs, lib, config, ... }: { {
pkgs,
lib,
config,
...
}: {
options = { options = {
apps.podman.enable = apps.podman.enable =
lib.mkEnableOption "Enables Podman for OCI container support."; lib.mkEnableOption "Enables Podman for OCI container support.";
}; };
config = lib.mkIf config.apps.podman.enable { config = lib.mkIf config.apps.podman.enable {
virtualisation = { virtualisation = {
oci-containers = { backend = "podman"; }; oci-containers = {backend = "podman";};
podman = { podman = {
# Required for containers under podman-compose to be able to talk to each other. # Required for containers under podman-compose to be able to talk to each other.
defaultNetwork.settings.dns_enabled = true; defaultNetwork.settings.dns_enabled = true;
enable = true; enable = true;
}; };
}; };
}; };
} }

View file

@ -1,5 +1,9 @@
{ pkgs, lib, config, ... }: { {
pkgs,
lib,
config,
...
}: {
options = { options = {
apps.steam.enable = lib.mkEnableOption "Enables Steam for video games."; apps.steam.enable = lib.mkEnableOption "Enables Steam for video games.";
}; };

View file

@ -1,15 +1,17 @@
{ pkgs, lib, config, ... }: { {
pkgs,
lib,
config,
...
}: {
options = { options = {
apps.virt-manager.enable = apps.virt-manager.enable =
lib.mkEnableOption "Enables virt-manager with TPM and EFI support."; lib.mkEnableOption "Enables virt-manager with TPM and EFI support.";
}; };
config = lib.mkIf config.apps.virt-manager.enable { config = lib.mkIf config.apps.virt-manager.enable {
programs.virt-manager.enable = true; programs.virt-manager.enable = true;
virtualisation = { libvirtd.enable = true; }; virtualisation = {libvirtd.enable = true;};
}; };
} }

View file

@ -1,6 +1,7 @@
{ config, pkgs, ... }:
{ {
imports = [ ./desktopConfig ./homeLab ./apps ./systemConfig ./userConfig ]; config,
pkgs,
...
}: {
imports = [./desktopConfig ./homeLab ./apps ./systemConfig ./userConfig];
} }

View file

@ -1,7 +1,10 @@
{ pkgs, lib, config, ... }: { {
pkgs,
imports = lib,
[ ./displayManagers/lightdm ./desktopEnvironments ./windowManagers ]; config,
...
}: {
imports = [./displayManagers/lightdm ./desktopEnvironments ./windowManagers];
options = { options = {
desktopConfig.enable = desktopConfig.enable =
@ -9,7 +12,6 @@
}; };
config = lib.mkIf config.desktopConfig.enable { config = lib.mkIf config.desktopConfig.enable {
services = { services = {
gnome.gnome-keyring.enable = true; gnome.gnome-keyring.enable = true;
gvfs.enable = true; # Mount, trash, etc. gvfs.enable = true; # Mount, trash, etc.
@ -18,7 +20,7 @@
enable = true; enable = true;
xkb.layout = "us"; xkb.layout = "us";
xkb.variant = ""; xkb.variant = "";
excludePackages = with pkgs; [ xterm ]; excludePackages = with pkgs; [xterm];
}; };
}; };
@ -26,7 +28,7 @@
fonts.packages = with pkgs; [ fonts.packages = with pkgs; [
liberation_ttf liberation_ttf
(nerdfonts.override { (nerdfonts.override {
fonts = [ "DroidSansMono" "FiraCode" "FiraMono" "Hack" "Noto" ]; fonts = ["DroidSansMono" "FiraCode" "FiraMono" "Hack" "Noto"];
}) })
]; ];

View file

@ -1,4 +1,8 @@
{ pkgs, lib, config, ... }: { {
pkgs,
imports = [ ./gnome ./plasma ]; lib,
config,
...
}: {
imports = [./gnome ./plasma];
} }

View file

@ -1,6 +1,11 @@
{ pkgs, lib, config, ... }: { {
pkgs,
imports = [ # Include X settings. lib,
config,
...
}: {
imports = [
# Include X settings.
./fprintdFix.nix ./fprintdFix.nix
./tripleBuffering.nix ./tripleBuffering.nix
]; ];
@ -11,7 +16,6 @@
}; };
config = lib.mkIf config.desktopConfig.desktopEnvironments.gnome.enable { config = lib.mkIf config.desktopConfig.desktopEnvironments.gnome.enable {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
gnomeExtensions.appindicator gnomeExtensions.appindicator
gnomeExtensions.blur-my-shell gnomeExtensions.blur-my-shell
@ -29,7 +33,7 @@
# Enable GNOME and GDM. # Enable GNOME and GDM.
services = { services = {
gnome.tracker-miners.enable = true; gnome.tracker-miners.enable = true;
udev.packages = with pkgs; [ gnome.gnome-settings-daemon ]; udev.packages = with pkgs; [gnome.gnome-settings-daemon];
xserver = { xserver = {
desktopManager.gnome.enable = true; desktopManager.gnome.enable = true;
displayManager.gdm.enable = true; displayManager.gdm.enable = true;

View file

@ -1,35 +1,37 @@
{ pkgs, lib, config, ... }: { {
pkgs,
lib,
config,
...
}: {
options = { options = {
desktopConfig.desktopEnvironments.gnome.fprintdFix.enable = desktopConfig.desktopEnvironments.gnome.fprintdFix.enable =
lib.mkEnableOption lib.mkEnableOption
"Fixes fprintd and pam issues with GNOME Display Manager."; "Fixes fprintd and pam issues with GNOME Display Manager.";
}; };
config = config = lib.mkIf config.desktopConfig.desktopEnvironments.gnome.fprintdFix.enable {
lib.mkIf config.desktopConfig.desktopEnvironments.gnome.fprintdFix.enable { # Need to change the order pam loads its modules
# Need to change the order pam loads its modules # to get proper fingerprint behavior on GDM and the lockscreen.
# to get proper fingerprint behavior on GDM and the lockscreen. security.pam.services.login.fprintAuth = false;
security.pam.services.login.fprintAuth = false; security.pam.services.gdm-fingerprint = lib.mkIf (config.services.fprintd.enable) {
security.pam.services.gdm-fingerprint = text = ''
lib.mkIf (config.services.fprintd.enable) { auth required pam_shells.so
text = '' auth requisite pam_nologin.so
auth required pam_shells.so auth requisite pam_faillock.so preauth
auth requisite pam_nologin.so auth required ${pkgs.fprintd}/lib/security/pam_fprintd.so
auth requisite pam_faillock.so preauth auth optional pam_permit.so
auth required ${pkgs.fprintd}/lib/security/pam_fprintd.so auth required pam_env.so
auth optional pam_permit.so auth [success=ok default=1] ${pkgs.gnome.gdm}/lib/security/pam_gdm.so
auth required pam_env.so auth optional ${pkgs.gnome.gnome-keyring}/lib/security/pam_gnome_keyring.so
auth [success=ok default=1] ${pkgs.gnome.gdm}/lib/security/pam_gdm.so
auth optional ${pkgs.gnome.gnome-keyring}/lib/security/pam_gnome_keyring.so
account include login account include login
password required pam_deny.so password required pam_deny.so
session include login session include login
session optional ${pkgs.gnome.gnome-keyring}/lib/security/pam_gnome_keyring.so auto_start session optional ${pkgs.gnome.gnome-keyring}/lib/security/pam_gnome_keyring.so auto_start
''; '';
};
}; };
};
} }

View file

@ -1,11 +1,16 @@
{ pkgs, lib, config, ... }: { {
pkgs,
lib,
config,
...
}: {
options = { options = {
desktopConfig.desktopEnvironments.gnome.tripleBuffering.enable = desktopConfig.desktopEnvironments.gnome.tripleBuffering.enable =
lib.mkEnableOption "Enables dynamic triple buffering for GNOME."; lib.mkEnableOption "Enables dynamic triple buffering for GNOME.";
}; };
config = lib.mkIf config =
lib.mkIf
config.desktopConfig.desktopEnvironments.gnome.tripleBuffering.enable { config.desktopConfig.desktopEnvironments.gnome.tripleBuffering.enable {
nixpkgs.overlays = [ nixpkgs.overlays = [
(final: prev: { (final: prev: {

View file

@ -1,12 +1,15 @@
{ pkgs, lib, config, ... }: { {
pkgs,
lib,
config,
...
}: {
options = { options = {
desktopConfig.plasma.enable = desktopConfig.plasma.enable =
lib.mkEnableOption "Enables plasma desktop session."; lib.mkEnableOption "Enables plasma desktop session.";
}; };
config = lib.mkIf config.desktopConfig.plasma.enable { config = lib.mkIf config.desktopConfig.plasma.enable {
# Enable SDDM + Plasma Desktop. # Enable SDDM + Plasma Desktop.
services = { services = {
desktopManager.plasma6.enable = true; desktopManager.plasma6.enable = true;

View file

@ -1,4 +1,8 @@
{ pkgs, lib, config, ... }: { {
pkgs,
imports = [ ./lightdm ]; lib,
config,
...
}: {
imports = [./lightdm];
} }

View file

@ -1,12 +1,16 @@
{ pkgs, lib, config, ... }: { {
pkgs,
lib,
config,
...
}: {
options = { options = {
desktopConfig.displayManagers.lightdm.enable = lib.mkEnableOption desktopConfig.displayManagers.lightdm.enable =
lib.mkEnableOption
"Enables lightdm and slick greeter with Catppuccin theme."; "Enables lightdm and slick greeter with Catppuccin theme.";
}; };
config = lib.mkIf config.desktopConfig.displayManagers.lightdm.enable { config = lib.mkIf config.desktopConfig.displayManagers.lightdm.enable {
security.pam.services.lightdm.enableKwallet = true; security.pam.services.lightdm.enableKwallet = true;
security.pam.services.lightdm.enableGnomeKeyring = true; security.pam.services.lightdm.enableGnomeKeyring = true;
@ -16,10 +20,10 @@
enable = true; enable = true;
theme.name = "Catppuccin-Frappe-Compact-Mauve-Dark"; theme.name = "Catppuccin-Frappe-Compact-Mauve-Dark";
theme.package = pkgs.catppuccin-gtk.override { theme.package = pkgs.catppuccin-gtk.override {
accents = [ "mauve" ]; accents = ["mauve"];
size = "compact"; size = "compact";
variant = "frappe"; variant = "frappe";
tweaks = [ "normal" ]; tweaks = ["normal"];
}; };
iconTheme.name = "Papirus-Dark"; iconTheme.name = "Papirus-Dark";
@ -29,7 +33,7 @@
}; };
font.name = "NotoSans Nerd Font Regular"; font.name = "NotoSans Nerd Font Regular";
font.package = pkgs.nerdfonts.override { fonts = [ "Noto" ]; }; font.package = pkgs.nerdfonts.override {fonts = ["Noto"];};
cursorTheme.package = pkgs.catppuccin-cursors.frappeDark; cursorTheme.package = pkgs.catppuccin-cursors.frappeDark;
cursorTheme.name = "Catppuccin-Frappe-Dark-Cursors"; cursorTheme.name = "Catppuccin-Frappe-Dark-Cursors";

View file

@ -1,4 +1,8 @@
{ pkgs, lib, config, ... }: { {
pkgs,
imports = [ ./hyprland ]; lib,
config,
...
}: {
imports = [./hyprland];
} }

View file

@ -1,20 +1,23 @@
{ inputs, pkgs, lib, config, ... }: { {
inputs,
pkgs,
lib,
config,
...
}: {
options = { options = {
desktopConfig.windowManagers.hyprland.enable = desktopConfig.windowManagers.hyprland.enable =
lib.mkEnableOption "Enables hyprland window manager session."; lib.mkEnableOption "Enables hyprland window manager session.";
}; };
config = lib.mkIf config.desktopConfig.windowManagers.hyprland.enable { config = lib.mkIf config.desktopConfig.windowManagers.hyprland.enable {
desktopConfig.displayManagers.lightdm.enable = lib.mkDefault false; desktopConfig.displayManagers.lightdm.enable = lib.mkDefault false;
services.greetd = { services.greetd = {
enable = true; enable = true;
settings = rec { settings = rec {
default_session = { default_session = {
command = command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --remember --cmd Hyprland";
"${pkgs.greetd.tuigreet}/bin/tuigreet --time --remember --cmd Hyprland";
}; };
}; };
}; };
@ -26,13 +29,13 @@
programs.gnupg.agent.pinentryPackage = pkgs.pinentry-gnome3; programs.gnupg.agent.pinentryPackage = pkgs.pinentry-gnome3;
nix.settings = { nix.settings = {
substituters = [ "https://hyprland.cachix.org" ]; substituters = ["https://hyprland.cachix.org"];
trusted-public-keys = [ trusted-public-keys = [
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
]; ];
}; };
services.dbus.packages = [ pkgs.gcr ]; services.dbus.packages = [pkgs.gcr];
environment.sessionVariables.NIXOS_OZONE_WL = "1"; environment.sessionVariables.NIXOS_OZONE_WL = "1";
}; };

View file

@ -1,17 +1,20 @@
{ pkgs, lib, config, ... }: { {
pkgs,
lib,
config,
...
}: {
options = { options = {
desktopConfig.windowManagers.sway.enable = desktopConfig.windowManagers.sway.enable =
lib.mkEnableOption "Sway window manager session."; lib.mkEnableOption "Sway window manager session.";
}; };
config = lib.mkIf config.desktopConfig.windowManagers.sway.enable { config = lib.mkIf config.desktopConfig.windowManagers.sway.enable {
desktopConfig.displayManagers.lightdm.enable = lib.mkDefault true; desktopConfig.displayManagers.lightdm.enable = lib.mkDefault true;
programs.sway.enable = true; programs.sway.enable = true;
services.dbus.packages = [ pkgs.gcr ]; services.dbus.packages = [pkgs.gcr];
environment.sessionVariables.NIXOS_OZONE_WL = "1"; environment.sessionVariables.NIXOS_OZONE_WL = "1";
}; };

View file

@ -1,5 +1,9 @@
{ pkgs, lib, config, ... }: { {
pkgs,
lib,
config,
...
}: {
options = { options = {
homeLab.binaryCache.enable = lib.mkEnableOption "Enables nixpkgs cache."; homeLab.binaryCache.enable = lib.mkEnableOption "Enables nixpkgs cache.";
}; };

View file

@ -1,7 +1,10 @@
{ pkgs, lib, config, ... }: { {
pkgs,
imports = lib,
[ ./binaryCache ./reverseProxy ./nixContainers ./ociContainers ./samba ]; config,
...
}: {
imports = [./binaryCache ./reverseProxy ./nixContainers ./ociContainers ./samba];
options = { options = {
homeLab.enable = lib.mkEnableOption "Enables fully functional Home Lab."; homeLab.enable = lib.mkEnableOption "Enables fully functional Home Lab.";

View file

@ -1,16 +1,24 @@
{ pkgs, lib, config, ... }: { {
pkgs,
lib,
config,
...
}: {
options = { options = {
homeLab.nixContainers.enable = homeLab.nixContainers.enable =
lib.mkEnableOption "Enables select nix containers."; lib.mkEnableOption "Enables select nix containers.";
}; };
config = lib.mkIf config.homeLab.nixContainers.enable { config = lib.mkIf config.homeLab.nixContainers.enable {
containers.navidrome = { containers.navidrome = {
autoStart = true; autoStart = true;
bindMounts."/Music".hostPath = "/mnt/Media/Music"; bindMounts."/Music".hostPath = "/mnt/Media/Music";
config = { config, pkgs, lib, ... }: { config = {
config,
pkgs,
lib,
...
}: {
system.stateVersion = "24.05"; system.stateVersion = "24.05";
services.navidrome = { services.navidrome = {
enable = true; enable = true;

View file

@ -1,26 +1,28 @@
{ pkgs, lib, config, ... }: { {
pkgs,
lib,
config,
...
}: {
options = { options = {
homeLab.ociContainers.enable = homeLab.ociContainers.enable =
lib.mkEnableOption "Enables select OCI containers."; lib.mkEnableOption "Enables select OCI containers.";
}; };
config = lib.mkIf config.homeLab.ociContainers.enable { config = lib.mkIf config.homeLab.ociContainers.enable {
apps.podman.enable = lib.mkDefault true; apps.podman.enable = lib.mkDefault true;
virtualisation.oci-containers.containers = { virtualisation.oci-containers.containers = {
audiobookshelf = { audiobookshelf = {
ports = [ "0.0.0.0:13378:80" ]; ports = ["0.0.0.0:13378:80"];
image = "ghcr.io/advplyr/audiobookshelf:latest"; image = "ghcr.io/advplyr/audiobookshelf:latest";
environment = { TZ = "America/New_York"; }; environment = {TZ = "America/New_York";};
volumes = volumes = ["abs_config:/config" "abs_metadata:/metadata" "/mnt/Media:/Media"];
[ "abs_config:/config" "abs_metadata:/metadata" "/mnt/Media:/Media" ];
}; };
plex-server = { plex-server = {
ports = [ "0.0.0.0:32400:32400" ]; ports = ["0.0.0.0:32400:32400"];
image = "plexinc/pms-docker:public"; image = "plexinc/pms-docker:public";
environment = { TZ = "America/New_York"; }; environment = {TZ = "America/New_York";};
volumes = [ volumes = [
"plex_config:/config" "plex_config:/config"
"plex_transcode:/transcode" "plex_transcode:/transcode"
@ -29,7 +31,7 @@
]; ];
}; };
transmission-server = { transmission-server = {
ports = [ "0.0.0.0:9091:9091" "0.0.0.0:51413:51413" ]; ports = ["0.0.0.0:9091:9091" "0.0.0.0:51413:51413"];
image = "linuxserver/transmission:latest"; image = "linuxserver/transmission:latest";
environment = { environment = {
PGID = "1000"; PGID = "1000";
@ -43,9 +45,9 @@
]; ];
}; };
jellyfin = { jellyfin = {
ports = [ "0.0.0.0:8096:8096" ]; ports = ["0.0.0.0:8096:8096"];
image = "jellyfin/jellyfin"; image = "jellyfin/jellyfin";
environment = { TZ = "America/New_York"; }; environment = {TZ = "America/New_York";};
volumes = [ volumes = [
"jellyfin_config:/config" "jellyfin_config:/config"
"jellyfin_cache:/cache" "jellyfin_cache:/cache"
@ -54,7 +56,7 @@
]; ];
}; };
freshrss = { freshrss = {
ports = [ "0.0.0.0:8080:80" ]; ports = ["0.0.0.0:8080:80"];
image = "freshrss/freshrss:latest"; image = "freshrss/freshrss:latest";
environment = { environment = {
TZ = "America/New_York"; TZ = "America/New_York";

View file

@ -1,5 +1,9 @@
{ pkgs, lib, config, ... }: { {
pkgs,
lib,
config,
...
}: {
options = { options = {
homeLab.reverseProxy.enable = homeLab.reverseProxy.enable =
lib.mkEnableOption "Enables nginx reverse proxy."; lib.mkEnableOption "Enables nginx reverse proxy.";
@ -12,8 +16,8 @@
# Open TCP ports for audiobookshelf, plex-server, and transmission-server. # Open TCP ports for audiobookshelf, plex-server, and transmission-server.
networking = { networking = {
firewall = { firewall = {
allowedTCPPorts = [ 80 443 51413 9091 ]; allowedTCPPorts = [80 443 51413 9091];
allowedUDPPorts = [ 51413 ]; allowedUDPPorts = [51413];
}; };
# My router doesn't expose settings for NAT loopback # My router doesn't expose settings for NAT loopback
# So we have to use this workaround. # So we have to use this workaround.
@ -67,10 +71,9 @@
virtualHosts."nixcache.raffauflabs.com" = { virtualHosts."nixcache.raffauflabs.com" = {
enableACME = true; enableACME = true;
forceSSL = true; forceSSL = true;
locations."/".proxyPass = locations."/".proxyPass = "http://${config.services.nix-serve.bindAddress}:${
"http://${config.services.nix-serve.bindAddress}:${ toString config.services.nix-serve.port
toString config.services.nix-serve.port }";
}";
}; };
virtualHosts."plex.raffauflabs.com" = { virtualHosts."plex.raffauflabs.com" = {

View file

@ -1,5 +1,9 @@
{ pkgs, lib, config, ... }: { {
pkgs,
lib,
config,
...
}: {
options = { options = {
homeLab.samba.enable = homeLab.samba.enable =
lib.mkEnableOption "Enables /Archive and /Media samba shares."; lib.mkEnableOption "Enables /Archive and /Media samba shares.";

View file

@ -1,7 +1,10 @@
{ config, pkgs, lib, ... }:
{ {
imports = [ ./network.nix ./plymouth ./power-profiles-daemon ./zramSwap ]; config,
pkgs,
lib,
...
}: {
imports = [./network.nix ./plymouth ./power-profiles-daemon ./zramSwap];
systemConfig.power-profiles-daemon.enable = lib.mkDefault true; systemConfig.power-profiles-daemon.enable = lib.mkDefault true;
@ -102,7 +105,7 @@
# Automatically optimize the Nix store during every build. # Automatically optimize the Nix store during every build.
auto-optimise-store = false; auto-optimise-store = false;
# Enable experimental `nix` command and flakes. # Enable experimental `nix` command and flakes.
experimental-features = [ "nix-command" "flakes" ]; experimental-features = ["nix-command" "flakes"];
substituters = [ substituters = [
"https://nixcache.raffauflabs.com" "https://nixcache.raffauflabs.com"
"https://cache.nixos.org/" "https://cache.nixos.org/"

View file

@ -1,6 +1,8 @@
{ config, pkgs, ... }:
{ {
config,
pkgs,
...
}: {
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
networking = { networking = {
networkmanager.enable = true; networkmanager.enable = true;

View file

@ -1,7 +1,12 @@
{ pkgs, lib, config, ... }: { {
pkgs,
lib,
config,
...
}: {
options = { options = {
systemConfig.plymouth.enable = lib.mkEnableOption systemConfig.plymouth.enable =
lib.mkEnableOption
"Enables plymouth boot screen with reduced text verbosity."; "Enables plymouth boot screen with reduced text verbosity.";
}; };

View file

@ -1,5 +1,9 @@
{ pkgs, lib, config, ... }: { {
pkgs,
lib,
config,
...
}: {
options = { options = {
systemConfig.power-profiles-daemon.enable = systemConfig.power-profiles-daemon.enable =
lib.mkEnableOption "Enables power-profiles-daemon."; lib.mkEnableOption "Enables power-profiles-daemon.";

View file

@ -1,5 +1,9 @@
{ pkgs, lib, config, ... }: { {
pkgs,
lib,
config,
...
}: {
options = { options = {
systemConfig.zramSwap.enable = lib.mkEnableOption "Enables zram swap."; systemConfig.zramSwap.enable = lib.mkEnableOption "Enables zram swap.";
systemConfig.zramSwap.size = lib.mkOption { systemConfig.zramSwap.size = lib.mkOption {

View file

@ -1,5 +1,10 @@
{ inputs, pkgs, lib, config, ... }: { {
inputs,
pkgs,
lib,
config,
...
}: {
options = { options = {
userConfig.aly.enable = lib.mkEnableOption "Enables Aly's user."; userConfig.aly.enable = lib.mkEnableOption "Enables Aly's user.";
}; };
@ -9,7 +14,7 @@
users.users.aly = { users.users.aly = {
isNormalUser = true; isNormalUser = true;
description = "Aly Raffauf"; description = "Aly Raffauf";
extraGroups = [ "networkmanager" "wheel" "docker" "libvirtd" "video" ]; extraGroups = ["networkmanager" "wheel" "docker" "libvirtd" "video"];
}; };
}; };
} }

View file

@ -1,6 +1,10 @@
{ pkgs, lib, config, ... }: { {
pkgs,
imports = [ ./aly ./dustin ]; lib,
config,
...
}: {
imports = [./aly ./dustin];
userConfig.aly.enable = lib.mkDefault true; userConfig.aly.enable = lib.mkDefault true;

View file

@ -1,5 +1,9 @@
{ pkgs, lib, config, ... }: { {
pkgs,
lib,
config,
...
}: {
options = { options = {
userConfig.dustin.enable = lib.mkEnableOption "Enables Dustin's user."; userConfig.dustin.enable = lib.mkEnableOption "Enables Dustin's user.";
}; };
@ -9,7 +13,7 @@
users.users.dustin = { users.users.dustin = {
isNormalUser = true; isNormalUser = true;
description = "Dustin Raffauf"; description = "Dustin Raffauf";
extraGroups = [ "networkmanager" "wheel" "docker" "libvirtd" "video" ]; extraGroups = ["networkmanager" "wheel" "docker" "libvirtd" "video"];
}; };
}; };
} }