reformat with nixpkgs-fmt

This commit is contained in:
Adithya 2023-11-04 16:12:45 +05:30
parent 26a9022f4b
commit 24ae3a3bc1
Signed by: adtya
GPG key ID: 48FC9915FFD326D0
79 changed files with 344 additions and 333 deletions

View file

@ -1,3 +1,3 @@
{...}: { { ... }: {
imports = [./nix.nix ./users]; imports = [ ./nix.nix ./users ];
} }

View file

@ -1,16 +1,15 @@
{ { nixpkgs
nixpkgs, , pkgs
pkgs, , ...
...
}: { }: {
environment.etc."nix/inputs/nixpkgs".source = nixpkgs.outPath; environment.etc."nix/inputs/nixpkgs".source = nixpkgs.outPath;
nix = { nix = {
package = pkgs.nixFlakes; package = pkgs.nixFlakes;
nixPath = ["nixpkgs=/etc/nix/inputs/nixpkgs"]; nixPath = [ "nixpkgs=/etc/nix/inputs/nixpkgs" ];
registry.nixpkgs.flake = nixpkgs; registry.nixpkgs.flake = nixpkgs;
settings = { settings = {
auto-optimise-store = true; auto-optimise-store = true;
experimental-features = ["nix-command" "flakes" "auto-allocate-uids" "cgroups" "ca-derivations"]; experimental-features = [ "nix-command" "flakes" "auto-allocate-uids" "cgroups" "ca-derivations" ];
auto-allocate-uids = true; auto-allocate-uids = true;
sandbox = true; sandbox = true;
trusted-substituters = [ trusted-substituters = [

View file

@ -1,10 +1,11 @@
{ { pkgs
pkgs, , secrets
secrets, , ...
... }:
}: let let
user = secrets.users; user = secrets.users;
in { in
{
users.mutableUsers = false; users.mutableUsers = false;
users.users = { users.users = {
root = { root = {
@ -15,7 +16,7 @@ in {
inherit (user.primary) hashedPassword; inherit (user.primary) hashedPassword;
description = user.primary.realName; description = user.primary.realName;
isNormalUser = true; isNormalUser = true;
extraGroups = ["docker" "libvirtd" "networkmanager" "tss" "wheel"]; extraGroups = [ "docker" "libvirtd" "networkmanager" "tss" "wheel" ];
shell = pkgs.zsh; shell = pkgs.zsh;
openssh.authorizedKeys.keys = [ openssh.authorizedKeys.keys = [
user.primary.sshPublicKey user.primary.sshPublicKey

View file

@ -60,23 +60,25 @@
}; };
}; };
outputs = { outputs =
self, { self
nixpkgs, , nixpkgs
flake-utils, , flake-utils
home-manager, , home-manager
impermanence, , impermanence
lanzaboote, , lanzaboote
nixvim, , nixvim
www, , www
wiki, , wiki
if3, , if3
} @ inputs: let ,
secrets = import ./secrets.nix; } @ inputs:
nixpkgs-config = { let
allowUnfree = true; secrets = import ./secrets.nix;
}; nixpkgs-config = {
in allowUnfree = true;
};
in
{ {
nixosConfigurations = { nixosConfigurations = {
Skipper = nixpkgs.lib.nixosSystem rec { Skipper = nixpkgs.lib.nixosSystem rec {
@ -84,9 +86,9 @@
pkgs = import nixpkgs { pkgs = import nixpkgs {
inherit system; inherit system;
config = nixpkgs-config; config = nixpkgs-config;
overlays = [(import ./packages)]; overlays = [ (import ./packages) ];
}; };
specialArgs = inputs // {inherit secrets;}; specialArgs = inputs // { inherit secrets; };
modules = [ modules = [
{ {
system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev; system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev;
@ -103,8 +105,8 @@
home-manager = { home-manager = {
useUserPackages = true; useUserPackages = true;
useGlobalPkgs = true; useGlobalPkgs = true;
extraSpecialArgs = {inherit secrets;}; extraSpecialArgs = { inherit secrets; };
users.${secrets.users.primary.userName} = {pkgs, ...}: { users.${secrets.users.primary.userName} = { pkgs, ... }: {
imports = [ imports = [
impermanence.nixosModules.home-manager.impermanence impermanence.nixosModules.home-manager.impermanence
nixvim.homeManagerModules.nixvim nixvim.homeManagerModules.nixvim
@ -121,7 +123,7 @@
inherit system; inherit system;
config = nixpkgs-config; config = nixpkgs-config;
}; };
specialArgs = inputs // {inherit secrets;}; specialArgs = inputs // { inherit secrets; };
modules = [ modules = [
{ {
system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev; system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev;
@ -137,7 +139,7 @@
inherit system; inherit system;
config = nixpkgs-config; config = nixpkgs-config;
}; };
specialArgs = inputs // {inherit secrets;}; specialArgs = inputs // { inherit secrets; };
modules = [ modules = [
{ {
system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev; system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev;
@ -150,20 +152,21 @@
}; };
} }
// flake-utils.lib.eachDefaultSystem ( // flake-utils.lib.eachDefaultSystem (
system: let system:
let
pkgs = import nixpkgs { pkgs = import nixpkgs {
inherit system; inherit system;
}; };
in in
with pkgs; { with pkgs; {
formatter = pkgs.alejandra; formatter = nixpkgs-fmt;
devShells.default = mkShell { devShells.default = mkShell {
buildInputs = [ buildInputs = [
git git
git-crypt git-crypt
statix statix
]; ];
}; };
} }
); );
} }

View file

@ -1,5 +1,5 @@
_: { _: {
imports = [./programs ./services ./wm ./gtk.nix ./persistence.nix]; imports = [ ./programs ./services ./wm ./gtk.nix ./persistence.nix ];
home.stateVersion = "23.11"; home.stateVersion = "23.11";
@ -9,12 +9,12 @@ _: {
mimeApps = { mimeApps = {
enable = true; enable = true;
defaultApplications = { defaultApplications = {
"application/pdf" = ["org.gnome.Evince.desktop"]; "application/pdf" = [ "org.gnome.Evince.desktop" ];
"image/gif" = ["org.gnome.eog.desktop"]; "image/gif" = [ "org.gnome.eog.desktop" ];
"image/jpeg" = ["org.gnome.eog.desktop"]; "image/jpeg" = [ "org.gnome.eog.desktop" ];
"image/png" = ["org.gnome.eog.desktop"]; "image/png" = [ "org.gnome.eog.desktop" ];
"image/webp" = ["org.gnome.eog.desktop"]; "image/webp" = [ "org.gnome.eog.desktop" ];
"x-scheme-handler/tg" = ["org.telegram.desktop.desktop"]; "x-scheme-handler/tg" = [ "org.telegram.desktop.desktop" ];
}; };
}; };
userDirs.enable = true; userDirs.enable = true;

View file

@ -1,8 +1,8 @@
{ { lib
lib, , pkgs
pkgs, , ...
... }:
}: let let
gtkTheme = { gtkTheme = {
name = "Dracula"; name = "Dracula";
package = pkgs.dracula-gtk; package = pkgs.dracula-gtk;
@ -10,14 +10,15 @@
iconTheme = { iconTheme = {
name = "Papirus-Dark"; name = "Papirus-Dark";
package = pkgs.papirus-icon-theme.override {color = "black";}; package = pkgs.papirus-icon-theme.override { color = "black"; };
}; };
cursorTheme = { cursorTheme = {
name = "Bibata-Modern-Classic"; name = "Bibata-Modern-Classic";
package = pkgs.bibata-cursors; package = pkgs.bibata-cursors;
}; };
in { in
{
gtk = { gtk = {
enable = true; enable = true;
theme = gtkTheme; theme = gtkTheme;

View file

@ -1,4 +1,4 @@
{pkgs, ...}: { { pkgs, ... }: {
imports = [ imports = [
./aria2.nix ./aria2.nix
./bat.nix ./bat.nix

View file

@ -2,7 +2,7 @@ _: {
programs.eza = { programs.eza = {
enable = true; enable = true;
enableAliases = true; enableAliases = true;
extraOptions = ["--group-directories-first" "--group"]; extraOptions = [ "--group-directories-first" "--group" ];
git = true; git = true;
icons = true; icons = true;
}; };

View file

@ -1,5 +1,5 @@
{pkgs, ...}: { { pkgs, ... }: {
home.packages = [pkgs.gnome.nautilus]; home.packages = [ pkgs.gnome.nautilus ];
dconf.settings = { dconf.settings = {
"io/elementary/files/preferences" = { "io/elementary/files/preferences" = {
singleclick-select = true; singleclick-select = true;

View file

@ -1,7 +1,6 @@
{ { pkgs
pkgs, , osConfig
osConfig, , ...
...
}: { }: {
programs = { programs = {
firefox = { firefox = {

View file

@ -1,6 +1,8 @@
{secrets, ...}: let { secrets, ... }:
let
user = secrets.users; user = secrets.users;
in { in
{
programs.git = { programs.git = {
enable = true; enable = true;
delta = { delta = {
@ -27,6 +29,6 @@ in {
push.autoSetupRemote = true; push.autoSetupRemote = true;
pull.rebase = true; pull.rebase = true;
}; };
ignores = ["/.nix" "/.direnv"]; ignores = [ "/.nix" "/.direnv" ];
}; };
} }

View file

@ -1,7 +1,7 @@
{pkgs, ...}: { { pkgs, ... }: {
programs.gh = { programs.gh = {
enable = true; enable = true;
settings.git_protocol = "ssh"; settings.git_protocol = "ssh";
extensions = [pkgs.gh-dash]; extensions = [ pkgs.gh-dash ];
}; };
} }

View file

@ -1,14 +1,16 @@
{pkgs, ...}: let { pkgs, ... }:
let
dracula-kitty = pkgs.fetchFromGitHub { dracula-kitty = pkgs.fetchFromGitHub {
owner = "dracula"; owner = "dracula";
repo = "kitty"; repo = "kitty";
rev = "87717a3f00e3dff0fc10c93f5ff535ea4092de70"; rev = "87717a3f00e3dff0fc10c93f5ff535ea4092de70";
hash = "sha256-78PTH9wE6ktuxeIxrPp0ZgRI8ST+eZ3Ok2vW6BCIZkc="; hash = "sha256-78PTH9wE6ktuxeIxrPp0ZgRI8ST+eZ3Ok2vW6BCIZkc=";
}; };
in { in
{
programs.kitty = { programs.kitty = {
enable = true; enable = true;
font.package = pkgs.nerdfonts.override {fonts = ["FiraCode"];}; font.package = pkgs.nerdfonts.override { fonts = [ "FiraCode" ]; };
font.name = "FiraCode Nerd Font"; font.name = "FiraCode Nerd Font";
extraConfig = '' extraConfig = ''
font_size 14 font_size 14

View file

@ -1,15 +1,15 @@
{pkgs, ...}: { { pkgs, ... }: {
programs.mpv = { programs.mpv = {
enable = true; enable = true;
package = pkgs.mpv.override {youtubeSupport = true;}; package = pkgs.mpv.override { youtubeSupport = true; };
config = { config = {
cache = "yes"; cache = "yes";
cache-secs = "120"; cache-secs = "120";
hwdec = "auto-safe"; hwdec = "auto-safe";
gpu-context = "wayland"; gpu-context = "wayland";
}; };
defaultProfiles = ["gpu-hq"]; defaultProfiles = [ "gpu-hq" ];
scripts = with pkgs.mpvScripts; [mpris]; scripts = with pkgs.mpvScripts; [ mpris ];
}; };
xdg.desktopEntries = { xdg.desktopEntries = {

View file

@ -1,4 +1,4 @@
{pkgs, ...}: { { pkgs, ... }: {
xdg.desktopEntries = { xdg.desktopEntries = {
"nvim".name = "Neovim wrapper"; "nvim".name = "Neovim wrapper";
"nvim".exec = "nvim %F"; "nvim".exec = "nvim %F";
@ -154,10 +154,10 @@
enable = true; enable = true;
snippet.expand = "luasnip"; snippet.expand = "luasnip";
sources = [ sources = [
{name = "nvim_lsp";} { name = "nvim_lsp"; }
{name = "luasnip";} { name = "luasnip"; }
{name = "buffers";} { name = "buffers"; }
{name = "treesitter";} { name = "treesitter"; }
]; ];
}; };
telescope = { telescope = {

View file

@ -1,4 +1,4 @@
{pkgs, ...}: { { pkgs, ... }: {
programs.tmux = { programs.tmux = {
enable = true; enable = true;
escapeTime = 0; escapeTime = 0;

View file

@ -1,18 +1,18 @@
{pkgs, ...}: { { pkgs, ... }: {
home.packages = [pkgs.virt-manager]; home.packages = [ pkgs.virt-manager ];
dconf.settings = { dconf.settings = {
"org/virt-manager/virt-manager/confirm" = { "org/virt-manager/virt-manager/confirm" = {
forcepoweroff = false; forcepoweroff = false;
}; };
"org/virt-manager/virt-manager/connections" = { "org/virt-manager/virt-manager/connections" = {
autoconnect = ["qemu:///system"]; autoconnect = [ "qemu:///system" ];
uris = ["qemu:///system"]; uris = [ "qemu:///system" ];
}; };
"org/virt-manager/virt-manager/new-vm" = {firmware = "uefi";}; "org/virt-manager/virt-manager/new-vm" = { firmware = "uefi"; };
"org/virt-manager/virt-manager/stats" = { "org/virt-manager/virt-manager/stats" = {
enable-disk-poll = true; enable-disk-poll = true;
enable-net-poll = true; enable-net-poll = true;
}; };
"org/virt-manager/virt-manager/vmlist-fields" = {network-traffic = true;}; "org/virt-manager/virt-manager/vmlist-fields" = { network-traffic = true; };
}; };
} }

View file

@ -1,7 +1,6 @@
{ { config
config, , pkgs
pkgs, , ...
...
}: { }: {
programs.zsh = { programs.zsh = {
enable = true; enable = true;

View file

@ -1,17 +1,16 @@
{ { config
config, , pkgs
pkgs, , secrets
secrets, , ...
...
}: { }: {
systemd.user.services = { systemd.user.services = {
ariang = { ariang = {
Unit = { Unit = {
Description = "AriaNg: Web frontend for aria2c"; Description = "AriaNg: Web frontend for aria2c";
After = ["network.target" "aria2c.service"]; After = [ "network.target" "aria2c.service" ];
}; };
Install = { Install = {
WantedBy = ["default.target"]; WantedBy = [ "default.target" ];
}; };
Service = { Service = {
Type = "simple"; Type = "simple";
@ -23,11 +22,11 @@
aria2c = { aria2c = {
Unit = { Unit = {
Description = "Aria2c Download Manager"; Description = "Aria2c Download Manager";
Documentation = ["man:aria2c(1)"]; Documentation = [ "man:aria2c(1)" ];
After = ["network.target"]; After = [ "network.target" ];
}; };
Install = { Install = {
WantedBy = ["default.target" "ariang.service"]; WantedBy = [ "default.target" "ariang.service" ];
}; };
Service = { Service = {
Type = "simple"; Type = "simple";

View file

@ -1,7 +1,6 @@
{ { pkgs
pkgs, , secrets
secrets, , ...
...
}: { }: {
services = { services = {
spotifyd = { spotifyd = {

View file

@ -1,4 +1,4 @@
{...}: { { ... }: {
imports = [ imports = [
./rofi ./rofi
./waybar ./waybar

View file

@ -1,11 +1,12 @@
{ { config
config, , pkgs
pkgs, , ...
... }:
}: let let
dmenu = "${config.programs.rofi.package}/bin/rofi -dmenu"; dmenu = "${config.programs.rofi.package}/bin/rofi -dmenu";
firefox = "${config.programs.firefox.package}/bin/firefox"; firefox = "${config.programs.firefox.package}/bin/firefox";
in { in
{
services.dunst = { services.dunst = {
enable = true; enable = true;
iconTheme.name = config.gtk.iconTheme.name; iconTheme.name = config.gtk.iconTheme.name;

View file

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

View file

@ -1,7 +1,9 @@
{pkgs, ...}: let { pkgs, ... }:
let
swaylock = "${pkgs.swaylock}/bin/swaylock"; swaylock = "${pkgs.swaylock}/bin/swaylock";
hyprctl = "${pkgs.hyprland}/bin/hyprctl"; hyprctl = "${pkgs.hyprland}/bin/hyprctl";
in { in
{
services.swayidle = { services.swayidle = {
enable = true; enable = true;
systemdTarget = "graphical-session.target"; systemdTarget = "graphical-session.target";

View file

@ -1,4 +1,4 @@
{pkgs, ...}: { { pkgs, ... }: {
programs.waybar = { programs.waybar = {
enable = true; enable = true;
package = pkgs.waybar.override { package = pkgs.waybar.override {
@ -12,9 +12,9 @@
layer = "top"; layer = "top";
position = "top"; position = "top";
height = 28; height = 28;
modules-left = ["hyprland/workspaces" "hyprland/window" "hyprland/submap"]; modules-left = [ "hyprland/workspaces" "hyprland/window" "hyprland/submap" ];
modules-center = []; modules-center = [ ];
modules-right = ["tray" "idle_inhibitor" "network" "bluetooth" "wireplumber" "backlight" "battery" "clock"]; modules-right = [ "tray" "idle_inhibitor" "network" "bluetooth" "wireplumber" "backlight" "battery" "clock" ];
idle_inhibitor = { idle_inhibitor = {
format = "{icon}"; format = "{icon}";
format-icons = { format-icons = {
@ -31,7 +31,7 @@
}; };
backlight = { backlight = {
format = "{icon}"; format = "{icon}";
format-icons = ["󰃚" "󰃛" "󰃜" "󰃝" "󰃞" "󰃟" "󰃠"]; format-icons = [ "󰃚" "󰃛" "󰃜" "󰃝" "󰃞" "󰃟" "󰃠" ];
tooltip = false; tooltip = false;
}; };
battery = { battery = {
@ -44,7 +44,7 @@
format-alt = "{icon} {capacity}% ({time})"; format-alt = "{icon} {capacity}% ({time})";
format-charging = "󰂄 {capacity}%"; format-charging = "󰂄 {capacity}%";
format-plugged = "󰚥 {capacity}%"; format-plugged = "󰚥 {capacity}%";
format-icons = ["󰂃" "󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹"]; format-icons = [ "󰂃" "󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹" ];
tooltip = false; tooltip = false;
}; };
network = { network = {
@ -59,7 +59,7 @@
format = "{icon}"; format = "{icon}";
format-muted = "󰝟"; format-muted = "󰝟";
on-click = "${pkgs.pavucontrol}/bin/pavucontrol"; on-click = "${pkgs.pavucontrol}/bin/pavucontrol";
format-icons = ["󰕿" "󰖀" "󰕾"]; format-icons = [ "󰕿" "󰖀" "󰕾" ];
tooltip = false; tooltip = false;
}; };
bluetooth = { bluetooth = {

View file

@ -1,4 +1,4 @@
{...}: { { ... }: {
imports = [ imports = [
./hyprland ./hyprland
./addon ./addon

View file

@ -1,8 +1,8 @@
{ { config
config, , pkgs
pkgs, , ...
... }:
}: let let
dbus-update-activation-environment = "${pkgs.dbus}/bin/dbus-update-activation-environment"; dbus-update-activation-environment = "${pkgs.dbus}/bin/dbus-update-activation-environment";
brightnessctl = "${pkgs.brightnessctl}/bin/brightnessctl"; brightnessctl = "${pkgs.brightnessctl}/bin/brightnessctl";
grim = "${pkgs.grim}/bin/grim"; grim = "${pkgs.grim}/bin/grim";
@ -17,7 +17,8 @@
xdg-user-dir = "${pkgs.xdg-user-dirs}/bin/xdg-user-dir"; xdg-user-dir = "${pkgs.xdg-user-dirs}/bin/xdg-user-dir";
change-wallpaper = "${pkgs.scripts}/bin/chpaper ${config.xdg.userDirs.pictures}/Wallpapers"; change-wallpaper = "${pkgs.scripts}/bin/chpaper ${config.xdg.userDirs.pictures}/Wallpapers";
wallhaven-wallpaper = "${pkgs.scripts}/bin/chpaper \$(${pkgs.scripts}/bin/wallhaven ${config.xdg.userDirs.pictures}/Wallpapers)"; wallhaven-wallpaper = "${pkgs.scripts}/bin/chpaper \$(${pkgs.scripts}/bin/wallhaven ${config.xdg.userDirs.pictures}/Wallpapers)";
in { in
{
home.packages = with pkgs; [ home.packages = with pkgs; [
hyprland hyprland
]; ];
@ -25,11 +26,11 @@ in {
systemd.user.targets = { systemd.user.targets = {
hyprland-session = { hyprland-session = {
Unit = { Unit = {
After = ["graphical-session-pre.target"]; After = [ "graphical-session-pre.target" ];
BindsTo = ["graphical-session.target"]; BindsTo = [ "graphical-session.target" ];
Description = "Hyprland session"; Description = "Hyprland session";
Documentation = ["man:systemd.special(7)"]; Documentation = [ "man:systemd.special(7)" ];
Wants = ["graphical-session-pre.target"]; Wants = [ "graphical-session-pre.target" ];
}; };
}; };
}; };

View file

@ -1,5 +1,5 @@
_: { _: {
imports = []; imports = [ ];
virtualisation.oci-containers = { virtualisation.oci-containers = {
backend = "podman"; backend = "podman";

View file

@ -1,4 +1,4 @@
{...}: { { ... }: {
imports = [ imports = [
./hardware ./hardware
./programs ./programs
@ -25,7 +25,7 @@
LC_TIME = "en_US.UTF-8"; LC_TIME = "en_US.UTF-8";
LC_ALL = "en_US.UTF-8"; LC_ALL = "en_US.UTF-8";
}; };
supportedLocales = ["en_US.UTF-8/UTF-8"]; supportedLocales = [ "en_US.UTF-8/UTF-8" ];
}; };
time.timeZone = "Asia/Kolkata"; time.timeZone = "Asia/Kolkata";

View file

@ -1,3 +1,3 @@
{...}: { { ... }: {
imports = [./filesystem.nix ./kernel.nix]; imports = [ ./filesystem.nix ./kernel.nix ];
} }

View file

@ -2,7 +2,7 @@ _: {
fileSystems."/" = { fileSystems."/" = {
device = "/dev/disk/by-partlabel/NIXOS_ROOT"; device = "/dev/disk/by-partlabel/NIXOS_ROOT";
fsType = "btrfs"; fsType = "btrfs";
options = ["noatime" "compress=zstd"]; options = [ "noatime" "compress=zstd" ];
}; };
fileSystems."/boot" = { fileSystems."/boot" = {
device = "/dev/disk/by-partlabel/ESP"; device = "/dev/disk/by-partlabel/ESP";

View file

@ -1,7 +1,6 @@
{ { lib
lib, , pkgs
pkgs, , ...
...
}: { }: {
boot = { boot = {
initrd = { initrd = {

View file

@ -1,5 +1,5 @@
{lib, ...}: { { lib, ... }: {
imports = [./wireguard.nix]; imports = [ ./wireguard.nix ];
networking = { networking = {
hostName = "Rico1"; hostName = "Rico1";
useDHCP = lib.mkDefault false; useDHCP = lib.mkDefault false;

View file

@ -1,4 +1,4 @@
{pkgs, ...}: { { pkgs, ... }: {
imports = [ imports = [
./neovim.nix ./neovim.nix
./starship.nix ./starship.nix

View file

@ -6,5 +6,5 @@ _: {
syntaxHighlighting.enable = true; syntaxHighlighting.enable = true;
}; };
}; };
environment.pathsToLink = ["/share/zsh"]; environment.pathsToLink = [ "/share/zsh" ];
} }

View file

@ -1,4 +1,4 @@
{secrets, ...}: { { secrets, ... }: {
services.caddy = { services.caddy = {
enable = true; enable = true;
inherit (secrets.caddy_config) email; inherit (secrets.caddy_config) email;

View file

@ -1,4 +1,4 @@
{...}: { { ... }: {
imports = [ imports = [
./caddy.nix ./caddy.nix
./dendrite ./dendrite

View file

@ -1,4 +1,4 @@
{pkgs, ...}: { { pkgs, ... }: {
services = { services = {
caddy.virtualHosts."matrix.adtya.xyz" = { caddy.virtualHosts."matrix.adtya.xyz" = {
extraConfig = '' extraConfig = ''
@ -9,8 +9,8 @@
}; };
systemd.services.dendrite = { systemd.services.dendrite = {
description = "Dendrite Matrix homeserver"; description = "Dendrite Matrix homeserver";
after = ["network.target"]; after = [ "network.target" ];
wantedBy = ["multi-user.target"]; wantedBy = [ "multi-user.target" ];
serviceConfig = { serviceConfig = {
Type = "simple"; Type = "simple";
DynamicUser = true; DynamicUser = true;

View file

@ -1,10 +1,11 @@
{ { pkgs
pkgs, , secrets
secrets, , ...
... }:
}: let let
inherit (secrets) frp_config; inherit (secrets) frp_config;
in { in
{
services.frp = { services.frp = {
enable = true; enable = true;
role = "client"; role = "client";

View file

@ -1,4 +1,4 @@
{pkgs, ...}: { { pkgs, ... }: {
services.postgresql = { services.postgresql = {
enable = true; enable = true;
authentication = pkgs.lib.mkOverride 10 '' authentication = pkgs.lib.mkOverride 10 ''
@ -6,7 +6,7 @@
host all all 127.0.0.1/32 trust host all all 127.0.0.1/32 trust
host all all ::1/128 trust host all all ::1/128 trust
''; '';
ensureDatabases = ["dendrite"]; ensureDatabases = [ "dendrite" ];
ensureUsers = [ ensureUsers = [
{ {
name = "dendrite"; name = "dendrite";

View file

@ -1,11 +1,12 @@
{ { config
config, , secrets
secrets, , ...
... }:
}: let let
inherit (secrets.wireguard_config) peers; inherit (secrets.wireguard_config) peers;
in { in
networking.firewall.trustedInterfaces = ["wg0"]; {
networking.firewall.trustedInterfaces = [ "wg0" ];
networking.wireguard = { networking.wireguard = {
enable = true; enable = true;
interfaces = { interfaces = {

View file

@ -1,5 +1,5 @@
{...}: { { ... }: {
imports = []; imports = [ ];
virtualisation.oci-containers = { virtualisation.oci-containers = {
backend = "podman"; backend = "podman";

View file

@ -1,4 +1,4 @@
{...}: { { ... }: {
imports = [ imports = [
./hardware ./hardware
./programs ./programs
@ -25,7 +25,7 @@
LC_TIME = "en_US.UTF-8"; LC_TIME = "en_US.UTF-8";
LC_ALL = "en_US.UTF-8"; LC_ALL = "en_US.UTF-8";
}; };
supportedLocales = ["en_US.UTF-8/UTF-8"]; supportedLocales = [ "en_US.UTF-8/UTF-8" ];
}; };
time.timeZone = "Asia/Kolkata"; time.timeZone = "Asia/Kolkata";

View file

@ -1,3 +1,3 @@
{...}: { { ... }: {
imports = [./filesystem.nix ./kernel.nix]; imports = [ ./filesystem.nix ./kernel.nix ];
} }

View file

@ -2,7 +2,7 @@ _: {
fileSystems."/" = { fileSystems."/" = {
device = "/dev/disk/by-partlabel/NIXOS_ROOT"; device = "/dev/disk/by-partlabel/NIXOS_ROOT";
fsType = "btrfs"; fsType = "btrfs";
options = ["noatime" "compress=zstd"]; options = [ "noatime" "compress=zstd" ];
}; };
fileSystems."/boot" = { fileSystems."/boot" = {
device = "/dev/disk/by-partlabel/ESP"; device = "/dev/disk/by-partlabel/ESP";

View file

@ -1,7 +1,6 @@
{ { lib
lib, , pkgs
pkgs, , ...
...
}: { }: {
boot = { boot = {
initrd = { initrd = {

View file

@ -1,5 +1,5 @@
{lib, ...}: { { lib, ... }: {
imports = [./wireguard.nix]; imports = [ ./wireguard.nix ];
networking = { networking = {
hostName = "Rico2"; hostName = "Rico2";
useDHCP = lib.mkDefault false; useDHCP = lib.mkDefault false;

View file

@ -1,4 +1,4 @@
{pkgs, ...}: { { pkgs, ... }: {
imports = [ imports = [
./neovim.nix ./neovim.nix
./starship.nix ./starship.nix

View file

@ -6,5 +6,5 @@ _: {
syntaxHighlighting.enable = true; syntaxHighlighting.enable = true;
}; };
}; };
environment.pathsToLink = ["/share/zsh"]; environment.pathsToLink = [ "/share/zsh" ];
} }

View file

@ -1,14 +1,15 @@
{ { pkgs
pkgs, , www
www, , secrets
secrets, , ...
... }:
}: let let
system = pkgs.system; system = pkgs.system;
in { in
{
services = { services = {
caddy.virtualHosts."adtya.xyz" = { caddy.virtualHosts."adtya.xyz" = {
serverAliases = ["www.adtya.xyz"]; serverAliases = [ "www.adtya.xyz" ];
extraConfig = '' extraConfig = ''
handle /.well-known/matrix/server { handle /.well-known/matrix/server {
header Content-Type application/json header Content-Type application/json

View file

@ -1,7 +1,6 @@
{ { config
config, , secrets
secrets, , ...
...
}: { }: {
services.caddy = { services.caddy = {
enable = true; enable = true;

View file

@ -1,3 +1,3 @@
_: { _: {
imports = [./adtya.xyz.nix ./caddy.nix ./frpc.nix ./if3.nix ./proofs.nix ./ssh.nix ./wiki.nix]; imports = [ ./adtya.xyz.nix ./caddy.nix ./frpc.nix ./if3.nix ./proofs.nix ./ssh.nix ./wiki.nix ];
} }

View file

@ -1,10 +1,11 @@
{ { pkgs
pkgs, , secrets
secrets, , ...
... }:
}: let let
inherit (secrets) frp_config; inherit (secrets) frp_config;
in { in
{
services.frp = { services.frp = {
enable = true; enable = true;
role = "client"; role = "client";

View file

@ -1,10 +1,11 @@
{ { pkgs
pkgs, , if3
if3, , ...
... }:
}: let let
system = pkgs.system; system = pkgs.system;
in { in
{
services = { services = {
caddy.virtualHosts = { caddy.virtualHosts = {
"if3.adtya.xyz" = { "if3.adtya.xyz" = {

View file

@ -1,7 +1,6 @@
{ { config
config, , secrets
secrets, , ...
...
}: { }: {
services = { services = {
caddy.virtualHosts = { caddy.virtualHosts = {

View file

@ -1,10 +1,11 @@
{ { pkgs
pkgs, , wiki
wiki, , ...
... }:
}: let let
system = pkgs.system; system = pkgs.system;
in { in
{
services = { services = {
caddy.virtualHosts = { caddy.virtualHosts = {
"wiki.adtya.xyz" = { "wiki.adtya.xyz" = {

View file

@ -1,11 +1,12 @@
{ { config
config, , secrets
secrets, , ...
... }:
}: let let
inherit (secrets.wireguard_config) peers; inherit (secrets.wireguard_config) peers;
in { in
networking.firewall.trustedInterfaces = ["wg0"]; {
networking.firewall.trustedInterfaces = [ "wg0" ];
networking.wireguard = { networking.wireguard = {
enable = true; enable = true;
interfaces = { interfaces = {

View file

@ -1,4 +1,4 @@
{pkgs, ...}: { { pkgs, ... }: {
imports = [ imports = [
./hardware ./hardware
./programs ./programs
@ -24,7 +24,7 @@
packages = with pkgs; [ packages = with pkgs; [
cantarell-fonts cantarell-fonts
liberation_ttf liberation_ttf
(nerdfonts.override {fonts = ["FiraCode"];}) (nerdfonts.override { fonts = [ "FiraCode" ]; })
noto-fonts noto-fonts
noto-fonts-cjk noto-fonts-cjk
noto-fonts-emoji noto-fonts-emoji
@ -47,7 +47,7 @@
LC_TIME = "en_US.UTF-8"; LC_TIME = "en_US.UTF-8";
LC_ALL = "en_US.UTF-8"; LC_ALL = "en_US.UTF-8";
}; };
supportedLocales = ["en_US.UTF-8/UTF-8"]; supportedLocales = [ "en_US.UTF-8/UTF-8" ];
}; };
location.provider = "geoclue2"; location.provider = "geoclue2";
@ -57,7 +57,7 @@
xdg.portal = { xdg.portal = {
enable = true; enable = true;
extraPortals = with pkgs; [xdg-desktop-portal-gtk xdg-desktop-portal-hyprland]; extraPortals = with pkgs; [ xdg-desktop-portal-gtk xdg-desktop-portal-hyprland ];
}; };
system.stateVersion = "23.11"; system.stateVersion = "23.11";

View file

@ -1,9 +1,8 @@
{ { lib
lib, , pkgs
pkgs, , ...
...
}: { }: {
imports = [./kernel.nix ./filesystem.nix]; imports = [ ./kernel.nix ./filesystem.nix ];
boot = { boot = {
initrd.luks.devices = { initrd.luks.devices = {
@ -16,10 +15,10 @@
}; };
loader.efi.canTouchEfiVariables = true; loader.efi.canTouchEfiVariables = true;
resumeDevice = "/dev/vg0/swap"; resumeDevice = "/dev/vg0/swap";
supportedFilesystems = ["btrfs"]; supportedFilesystems = [ "btrfs" ];
}; };
swapDevices = [{device = "/dev/vg0/swap";}]; swapDevices = [{ device = "/dev/vg0/swap"; }];
hardware = { hardware = {
bluetooth = { bluetooth = {
@ -30,20 +29,20 @@
KernelExperimental = true; KernelExperimental = true;
}; };
}; };
package = pkgs.bluez.override {withExperimental = true;}; package = pkgs.bluez.override { withExperimental = true; };
}; };
cpu.intel.updateMicrocode = lib.mkDefault true; cpu.intel.updateMicrocode = lib.mkDefault true;
enableRedistributableFirmware = true; enableRedistributableFirmware = true;
gpgSmartcards.enable = true; gpgSmartcards.enable = true;
opengl = { opengl = {
enable = true; enable = true;
extraPackages = [pkgs.intel-media-driver]; extraPackages = [ pkgs.intel-media-driver ];
driSupport = true; driSupport = true;
driSupport32Bit = true; driSupport32Bit = true;
}; };
sensor.hddtemp = { sensor.hddtemp = {
enable = true; enable = true;
drives = ["/dev/disk/by-path/pci-0000:01:00.0-nvme-1"]; drives = [ "/dev/disk/by-path/pci-0000:01:00.0-nvme-1" ];
}; };
xone.enable = true; xone.enable = true;
}; };

View file

@ -3,30 +3,30 @@ _: {
"/" = { "/" = {
device = "/dev/vg0/system"; device = "/dev/vg0/system";
fsType = "btrfs"; fsType = "btrfs";
options = ["subvol=@root" "compress-force=zstd" "noatime"]; options = [ "subvol=@root" "compress-force=zstd" "noatime" ];
neededForBoot = true; neededForBoot = true;
}; };
"/home" = { "/home" = {
device = "/dev/vg0/system"; device = "/dev/vg0/system";
fsType = "btrfs"; fsType = "btrfs";
options = ["subvol=@home" "compress-force=zstd" "noatime"]; options = [ "subvol=@home" "compress-force=zstd" "noatime" ];
}; };
"/nix" = { "/nix" = {
device = "/dev/vg0/system"; device = "/dev/vg0/system";
fsType = "btrfs"; fsType = "btrfs";
options = ["subvol=/@nix" "compress-force=zstd" "noatime"]; options = [ "subvol=/@nix" "compress-force=zstd" "noatime" ];
neededForBoot = true; neededForBoot = true;
}; };
"/persist" = { "/persist" = {
device = "/dev/vg0/system"; device = "/dev/vg0/system";
fsType = "btrfs"; fsType = "btrfs";
options = ["subvol=/@persist" "compress-force=zstd" "noatime"]; options = [ "subvol=/@persist" "compress-force=zstd" "noatime" ];
neededForBoot = true; neededForBoot = true;
}; };
"/mnt/system" = { "/mnt/system" = {
device = "/dev/vg0/system"; device = "/dev/vg0/system";
fsType = "btrfs"; fsType = "btrfs";
options = ["subvol=/" "compress-force=zstd" "noatime"]; options = [ "subvol=/" "compress-force=zstd" "noatime" ];
}; };
"/boot" = { "/boot" = {
device = "/dev/disk/by-partlabel/ESP"; device = "/dev/disk/by-partlabel/ESP";

View file

@ -1,7 +1,6 @@
{ { lib
lib, , pkgs
pkgs, , ...
...
}: { }: {
boot = { boot = {
consoleLogLevel = 3; consoleLogLevel = 3;
@ -15,12 +14,12 @@
"sd_mod" "sd_mod"
"rtsx_pci_sdmmc" "rtsx_pci_sdmmc"
]; ];
kernelModules = ["i915"]; kernelModules = [ "i915" ];
systemd.enable = true; systemd.enable = true;
}; };
kernelModules = ["kvm-intel"]; kernelModules = [ "kvm-intel" ];
kernelPackages = lib.mkDefault pkgs.linuxPackages_latest; kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
kernelParams = ["quiet"]; kernelParams = [ "quiet" ];
kernel.sysctl = { kernel.sysctl = {
"vm.swappiness" = 0; "vm.swappiness" = 0;
}; };

View file

@ -1,5 +1,5 @@
{lib, ...}: { { lib, ... }: {
imports = [./wireguard.nix]; imports = [ ./wireguard.nix ];
networking = { networking = {
hostName = "Skipper"; hostName = "Skipper";
networkmanager = { networkmanager = {

View file

@ -1,4 +1,4 @@
{pkgs, ...}: { { pkgs, ... }: {
boot.plymouth = { boot.plymouth = {
enable = true; enable = true;
themePackages = [ themePackages = [

View file

@ -12,5 +12,5 @@ _: {
xwayland.enable = true; xwayland.enable = true;
zsh.enable = true; zsh.enable = true;
}; };
environment.pathsToLink = ["/share/zsh"]; environment.pathsToLink = [ "/share/zsh" ];
} }

View file

@ -1,9 +1,9 @@
_: { _: {
boot.initrd.systemd.services.rollback = { boot.initrd.systemd.services.rollback = {
description = "Rollback root subvolume to blank state"; description = "Rollback root subvolume to blank state";
wantedBy = ["initrd.target"]; wantedBy = [ "initrd.target" ];
after = ["dev-vg0-system.device"]; after = [ "dev-vg0-system.device" ];
before = ["sysroot.mount"]; before = [ "sysroot.mount" ];
unitConfig.DefaultDependencies = "no"; unitConfig.DefaultDependencies = "no";
serviceConfig.Type = "oneshot"; serviceConfig.Type = "oneshot";
script = '' script = ''

View file

@ -1,7 +1,6 @@
{ { lib
lib, , pkgs
pkgs, , ...
...
}: { }: {
boot = { boot = {
bootspec.enable = true; bootspec.enable = true;

View file

@ -1,4 +1,4 @@
{pkgs, ...}: { { pkgs, ... }: {
security = { security = {
apparmor = { apparmor = {
enable = true; enable = true;
@ -10,7 +10,7 @@
services = { services = {
passwd.enableGnomeKeyring = true; passwd.enableGnomeKeyring = true;
login.enableGnomeKeyring = true; login.enableGnomeKeyring = true;
swaylock = {}; swaylock = { };
}; };
u2f = { u2f = {
enable = true; enable = true;
@ -21,7 +21,7 @@
polkit.enable = true; polkit.enable = true;
rtkit.enable = true; rtkit.enable = true;
sudo = { sudo = {
package = pkgs.sudo.override {withInsults = true;}; package = pkgs.sudo.override { withInsults = true; };
extraConfig = '' extraConfig = ''
Defaults lecture="never" Defaults lecture="never"
''; '';

View file

@ -1,7 +1,7 @@
{pkgs, ...}: { { pkgs, ... }: {
services.dbus = { services.dbus = {
enable = true; enable = true;
apparmor = "enabled"; apparmor = "enabled";
packages = with pkgs; [gcr gcr_4]; packages = with pkgs; [ gcr gcr_4 ];
}; };
} }

View file

@ -1,6 +1,8 @@
{secrets, ...}: let { secrets, ... }:
let
user = secrets.users; user = secrets.users;
in { in
{
imports = [ imports = [
./dbus.nix ./dbus.nix
./keyd.nix ./keyd.nix

View file

@ -3,7 +3,7 @@ _: {
enable = true; enable = true;
keyboards = { keyboards = {
builtin = { builtin = {
ids = ["0001:0001"]; ids = [ "0001:0001" ];
settings = { settings = {
main = { main = {
pageup = "noop"; pageup = "noop";

View file

@ -1,6 +1,6 @@
{pkgs, ...}: { { pkgs, ... }: {
services.udev = { services.udev = {
enable = true; enable = true;
packages = [pkgs.yubikey-personalization]; packages = [ pkgs.yubikey-personalization ];
}; };
} }

View file

@ -1,4 +1,4 @@
{pkgs, ...}: { { pkgs, ... }: {
specialisation = { specialisation = {
linux_lts = { linux_lts = {
configuration = { configuration = {

View file

@ -1,4 +1,4 @@
{pkgs, ...}: { { pkgs, ... }: {
virtualisation = { virtualisation = {
docker = { docker = {
enable = true; enable = true;
@ -9,7 +9,7 @@
enable = true; enable = true;
qemu.ovmf = { qemu.ovmf = {
enable = true; enable = true;
packages = [pkgs.OVMFFull.fd]; packages = [ pkgs.OVMFFull.fd ];
}; };
}; };
}; };

View file

@ -1,11 +1,12 @@
{ { config
config, , secrets
secrets, , ...
... }:
}: let let
inherit (secrets.wireguard_config) peers; inherit (secrets.wireguard_config) peers;
in { in
networking.firewall.trustedInterfaces = ["wg0"]; {
networking.firewall.trustedInterfaces = [ "wg0" ];
networking.wireguard = { networking.wireguard = {
enable = true; enable = true;
interfaces = { interfaces = {

View file

@ -1,9 +1,9 @@
{ { lib
lib, , stdenvNoCC
stdenvNoCC, , fetchFromGitHub
fetchFromGitHub, , pack ? "pack_1"
pack ? "pack_1", , theme ? "cuts"
theme ? "cuts", ,
}: }:
stdenvNoCC.mkDerivation { stdenvNoCC.mkDerivation {
pname = "adi1090x-plymouth"; pname = "adi1090x-plymouth";

View file

@ -1,6 +1,6 @@
self: super: { self: super: {
adi1090x-plymouth = super.callPackage ./adi1090x-plymouth {}; adi1090x-plymouth = super.callPackage ./adi1090x-plymouth { };
dracula-gtk = super.callPackage ./dracula-gtk {}; dracula-gtk = super.callPackage ./dracula-gtk { };
scripts = super.callPackage ./scripts {}; scripts = super.callPackage ./scripts { };
rofi-bluetooth = super.callPackage ./rofi-bluetooth {}; rofi-bluetooth = super.callPackage ./rofi-bluetooth { };
} }

View file

@ -1,10 +1,10 @@
{ { lib
lib, , stdenvNoCC
stdenvNoCC, , fetchFromGitHub
fetchFromGitHub, , gtk3
gtk3, , gnome-themes-extra
gnome-themes-extra, , gtk-engine-murrine
gtk-engine-murrine, ,
}: }:
stdenvNoCC.mkDerivation { stdenvNoCC.mkDerivation {
pname = "dracula-gtk"; pname = "dracula-gtk";
@ -16,13 +16,13 @@ stdenvNoCC.mkDerivation {
rev = "a0b0ab451447d374600a74519abaa0588f2fa536"; rev = "a0b0ab451447d374600a74519abaa0588f2fa536";
hash = "sha256-0Ndk9Mh58KU2eoG1Z/CzZPiLNxy2bdloq9p4gzMDu2M="; hash = "sha256-0Ndk9Mh58KU2eoG1Z/CzZPiLNxy2bdloq9p4gzMDu2M=";
}; };
nativeBuildInputs = [gtk3]; nativeBuildInputs = [ gtk3 ];
buildInputs = [ buildInputs = [
gnome-themes-extra gnome-themes-extra
]; ];
propagatedUserEnvPkgs = [gtk-engine-murrine]; propagatedUserEnvPkgs = [ gtk-engine-murrine ];
installPhase = '' installPhase = ''
runHook preInstall runHook preInstall
@ -37,7 +37,7 @@ stdenvNoCC.mkDerivation {
downloadPage = "https://github.com/dracula/gtk"; downloadPage = "https://github.com/dracula/gtk";
homepage = "https://draculatheme.com/gtk"; homepage = "https://draculatheme.com/gtk";
license = licenses.gpl3; license = licenses.gpl3;
maintainers = with maintainers; [adtya]; maintainers = with maintainers; [ adtya ];
platforms = platforms.linux; platforms = platforms.linux;
}; };
} }

View file

@ -1,10 +1,10 @@
{ { lib
lib, , fetchFromGitHub
fetchFromGitHub, , makeWrapper
makeWrapper, , stdenvNoCC
stdenvNoCC, , bluez
bluez, , rofi-wayland
rofi-wayland, ,
}: }:
stdenvNoCC.mkDerivation { stdenvNoCC.mkDerivation {
pname = "rofi-bluetooth"; pname = "rofi-bluetooth";
@ -16,7 +16,7 @@ stdenvNoCC.mkDerivation {
hash = "sha256-1Xe3QFThIvJDCUznDP5ZBzwZEMuqmxpDIV+BcVvQDG8="; hash = "sha256-1Xe3QFThIvJDCUznDP5ZBzwZEMuqmxpDIV+BcVvQDG8=";
}; };
nativeBuildInputs = [makeWrapper]; nativeBuildInputs = [ makeWrapper ];
installPhase = '' installPhase = ''
mkdir -p $out/bin mkdir -p $out/bin

View file

@ -1,25 +1,25 @@
{ { lib
lib, , stdenvNoCC
stdenvNoCC, , makeWrapper
makeWrapper, , libnotify
libnotify, , rofi-wayland
rofi-wayland, , tmux
tmux, , kitty
kitty, , imagemagick
imagemagick, , hyprland
hyprland, , swww
swww, , jq
jq, , curl
curl, , ytfzf
ytfzf, , libsecret
libsecret, ,
}: }:
stdenvNoCC.mkDerivation { stdenvNoCC.mkDerivation {
pname = "scripts"; pname = "scripts";
version = "1.0"; version = "1.0";
src = ./.; src = ./.;
nativeBuildInputs = [makeWrapper]; nativeBuildInputs = [ makeWrapper ];
installPhase = '' installPhase = ''
mkdir -p $out/bin mkdir -p $out/bin