reformat with alejandra

This commit is contained in:
Adithya 2023-05-18 16:11:26 +05:30
parent 5a385fcedc
commit ccabc0d28a
Signed by: adtya
GPG key ID: 48FC9915FFD326D0
76 changed files with 348 additions and 256 deletions

View file

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

View file

@ -1,4 +1,4 @@
{ ... }: {
{...}: {
nix.settings = {
trusted-substituters = [
"https://nix-community.cachix.org/"
@ -7,7 +7,7 @@
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
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;
use-cgroups = true;
};

View file

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

View file

@ -26,16 +26,24 @@
};
};
outputs = { self, nixpkgs, home-manager, impermanence, lanzaboote, nixvim }@inputs: {
formatter."x86_64-linux" = nixpkgs.legacyPackages."x86_64-linux".nixpkgs-fmt;
nixosConfigurations = let user = (import ./secrets.nix).users; in {
outputs = {
self,
nixpkgs,
home-manager,
impermanence,
lanzaboote,
nixvim,
} @ inputs: {
formatter."x86_64-linux" = nixpkgs.legacyPackages."x86_64-linux".alejandra;
nixosConfigurations = let
user = (import ./secrets.nix).users;
in {
Skipper = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = inputs;
modules = [
{
nixpkgs.overlays = [ (import ./packages) ];
nixpkgs.overlays = [(import ./packages)];
nixpkgs.hostPlatform = nixpkgs.lib.mkDefault "x86_64-linux";
system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev;
}
@ -51,7 +59,7 @@
home-manager = {
useUserPackages = true;
useGlobalPkgs = true;
users.${user.primary.userName} = { pkgs, ... }: {
users.${user.primary.userName} = {pkgs, ...}: {
imports = [
impermanence.nixosModules.home-manager.impermanence
nixvim.homeManagerModules.nixvim
@ -81,7 +89,7 @@
home-manager = {
useUserPackages = true;
useGlobalPkgs = true;
users.${user.primary.userName} = { pkgs, ... }: {
users.${user.primary.userName} = {pkgs, ...}: {
imports = [
./home/common
./home/server

View file

@ -1,4 +1,4 @@
{ ... }: {
imports = [ ./programs ./services ];
{...}: {
imports = [./programs ./services];
home.stateVersion = "23.05";
}

View file

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

View file

@ -1,5 +1,4 @@
{ ... }: {
{...}: {
xdg.desktopEntries."btop" = {
name = "btop++";
exec = "btop";

View file

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

View file

@ -1,4 +1,4 @@
{ ... }: {
{...}: {
programs.direnv = {
enable = true;
nix-direnv.enable = true;

View file

@ -1,8 +1,8 @@
{ ... }: {
{...}: {
programs.exa = {
enable = true;
enableAliases = true;
extraOptions = [ "--group-directories-first" "--group" ];
extraOptions = ["--group-directories-first" "--group"];
git = true;
icons = true;
};

View file

@ -1,8 +1,6 @@
{ ... }:
let
{...}: let
user = (import ../../../secrets.nix).users;
in
{
in {
programs.git = {
enable = true;
diff-so-fancy = {
@ -18,6 +16,6 @@ in
init.defaultBranch = "main";
push.autoSetupRemote = true;
};
ignores = [ "/.nix" "/.direnv" ];
ignores = ["/.nix" "/.direnv"];
};
}

View file

@ -1,5 +1,4 @@
{ ... }: {
{...}: {
programs.starship = {
enable = true;
settings = {

View file

@ -1,4 +1,8 @@
{ config, pkgs, ... }: {
{
config,
pkgs,
...
}: {
programs.zsh = {
enable = true;
defaultKeymap = "viins";

View file

@ -1 +1 @@
{ ... }: { }
{...}: {}

View file

@ -1,5 +1,5 @@
{ ... }: {
imports = [ ./programs ./services ./wm ./gtk.nix ./persistence.nix ];
{...}: {
imports = [./programs ./services ./wm ./gtk.nix ./persistence.nix];
xdg.enable = true;
xdg.mime.enable = true;

View file

@ -1,5 +1,8 @@
{ lib, pkgs, ... }:
let
{
lib,
pkgs,
...
}: let
gtkTheme = {
name = "Dracula";
package = pkgs.dracula-gtk;
@ -17,8 +20,7 @@ let
name = "Bibata-Modern-Classic";
package = pkgs.bibata-cursors;
};
in
{
in {
gtk.enable = true;
gtk.theme = gtkTheme;
home.sessionVariables.GTK_THEME = gtkTheme.name;

View file

@ -1,4 +1,4 @@
{ ... }: {
{...}: {
home.persistence."/persist/home" = {
allowOther = true;
directories = [
@ -20,15 +20,42 @@
".mozilla"
".nixos-config"
".ssh"
{ directory = "Documents"; method = "symlink"; }
{ directory = "Downloads"; method = "symlink"; }
{ directory = "Music"; method = "symlink"; }
{ directory = "Others"; method = "symlink"; }
{ directory = "Pictures"; method = "symlink"; }
{ directory = "Projects"; method = "symlink"; }
{ directory = "Public"; method = "symlink"; }
{ directory = "Templates"; method = "symlink"; }
{ directory = "Videos"; method = "symlink"; }
{
directory = "Documents";
method = "symlink";
}
{
directory = "Downloads";
method = "symlink";
}
{
directory = "Music";
method = "symlink";
}
{
directory = "Others";
method = "symlink";
}
{
directory = "Pictures";
method = "symlink";
}
{
directory = "Projects";
method = "symlink";
}
{
directory = "Public";
method = "symlink";
}
{
directory = "Templates";
method = "symlink";
}
{
directory = "Videos";
method = "symlink";
}
];
files = [

View file

@ -1,4 +1,4 @@
{ ... }: {
{...}: {
programs.aria2 = {
enable = true;
settings = {

View file

@ -1,4 +1,4 @@
{ pkgs, ... }: {
{pkgs, ...}: {
imports = [
./aria2.nix
./files.nix
@ -25,7 +25,7 @@
spotify-tui
wl-clipboard
xdg-utils
# yubioath-flutter
# yubioath-flutter
yubikey-manager
yubikey-manager-qt
yubikey-personalization

View file

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

View file

@ -1,4 +1,8 @@
{ pkgs, osConfig, ... }: {
{
pkgs,
osConfig,
...
}: {
programs = {
firefox = {
enable = true;

View file

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

View file

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

View file

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

View file

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

View file

@ -1,4 +1,8 @@
{ config, pkgs, ... }: {
{
config,
pkgs,
...
}: {
programs.nixvim = {
enable = true;
vimAlias = true;
@ -62,7 +66,7 @@
};
};
};
extraPlugins = with pkgs.vimPlugins; [ dracula-nvim git-blame-nvim ];
extraPlugins = with pkgs.vimPlugins; [dracula-nvim git-blame-nvim];
colorscheme = "dracula";
plugins = {
comment-nvim.enable = true;
@ -73,12 +77,12 @@
enable = true;
snippet.expand = "luasnip";
sources = [
{ name = "buffer"; }
{ name = "nvim_lsp"; }
{ name = "nvim_lsp_document_symbol"; }
{ name = "nvim_lsp_signature_help"; }
{ name = "treesitter"; }
{ name = "luasnip"; }
{name = "buffer";}
{name = "nvim_lsp";}
{name = "nvim_lsp_document_symbol";}
{name = "nvim_lsp_signature_help";}
{name = "treesitter";}
{name = "luasnip";}
];
};
cmp-buffer.enable = true;
@ -165,15 +169,15 @@
servers = {
gopls = {
enable = true;
filetypes = [ "go" ];
filetypes = ["go"];
};
nil_ls = {
enable = true;
filetypes = [ "nix" ];
filetypes = ["nix"];
};
rust-analyzer = {
enable = true;
filetypes = [ "rs" ];
filetypes = ["rs"];
};
};
};

View file

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

View file

@ -1,18 +1,18 @@
{ pkgs, ... }: {
home.packages = [ pkgs.virt-manager ];
{pkgs, ...}: {
home.packages = [pkgs.virt-manager];
dconf.settings = {
"org/virt-manager/virt-manager/confirm" = {
forcepoweroff = false;
};
"org/virt-manager/virt-manager/connections" = {
autoconnect = [ "qemu:///system" ];
uris = [ "qemu:///system" ];
autoconnect = ["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" = {
enable-disk-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,4 +1,4 @@
{ ... }: {
{...}: {
programs.yt-dlp = {
enable = true;
settings = {

View file

@ -1,12 +1,16 @@
{ config, pkgs, ... }: {
{
config,
pkgs,
...
}: {
systemd.user.services.aria2c = {
Unit = {
Description = "Aria2c Download Manager";
Documentation = [ "man:aria2c(1)" ];
After = [ "network.target" ];
Documentation = ["man:aria2c(1)"];
After = ["network.target"];
};
Install = {
WantedBy = [ "default.target" ];
WantedBy = ["default.target"];
};
Service = {
Type = "simple";

View file

@ -1,4 +1,4 @@
{ ... }: {
{...}: {
imports = [
./aria2c.nix
./gpg-agent.nix

View file

@ -1,4 +1,4 @@
{ ... }: {
{...}: {
services = {
gpg-agent = {
enable = true;

View file

@ -1,4 +1,4 @@
{ pkgs, ... }: {
{pkgs, ...}: {
services = {
spotifyd = {
enable = true;

View file

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

View file

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

View file

@ -1,4 +1,4 @@
{ ... }: {
{...}: {
services.kanshi = {
enable = true;
systemdTarget = "graphical-session.target";

View file

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

View file

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

View file

@ -1,8 +1,12 @@
{ config, pkgs, ... }: {
{
config,
pkgs,
...
}: {
programs.waybar = {
enable = true;
package = pkgs.waybar.overrideAttrs (oldAttrs: {
mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ];
mesonFlags = oldAttrs.mesonFlags ++ ["-Dexperimental=true"];
});
systemd.enable = true;
style = ./style.css;
@ -11,9 +15,9 @@
layer = "top";
position = "top";
height = 28;
modules-left = [ "sway/workspaces" "wlr/workspaces" "sway/window" "hyprland/window" "sway/mode" "hyprland/submap" ];
modules-center = [ ];
modules-right = [ "tray" "idle_inhibitor" "network" "bluetooth" "pulseaudio" "backlight" "battery" "clock" ];
modules-left = ["sway/workspaces" "wlr/workspaces" "sway/window" "hyprland/window" "sway/mode" "hyprland/submap"];
modules-center = [];
modules-right = ["tray" "idle_inhibitor" "network" "bluetooth" "pulseaudio" "backlight" "battery" "clock"];
"sway/mode" = {
"format" = "{}";
};
@ -36,7 +40,7 @@
};
"backlight" = {
"format" = "{icon}";
"format-icons" = [ "󰃚" "󰃛" "󰃜" "󰃝" "󰃞" "󰃟" "󰃠" ];
"format-icons" = ["󰃚" "󰃛" "󰃜" "󰃝" "󰃞" "󰃟" "󰃠"];
};
"battery" = {
"states" = {
@ -48,7 +52,7 @@
"format-alt" = "{icon} {capacity}% ({time})";
"format-charging" = "󰂄 {capacity}%";
"format-plugged" = "󰚥 {capacity}%";
"format-icons" = [ "󰂃" "󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹" ];
"format-icons" = ["󰂃" "󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹"];
"tooltip" = false;
};
"network" = {
@ -71,7 +75,7 @@
"headphones" = "󰋋";
"headset" = "󰋎";
"car" = "󰄋";
"default" = [ "󰕿" "󰖀" "󰕾" ];
"default" = ["󰕿" "󰖀" "󰕾"];
};
"on-click" = "${pkgs.pavucontrol}/bin/pavucontrol";
};

View file

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

View file

@ -1,5 +1,8 @@
{ config, pkgs, ... }:
let
{
config,
pkgs,
...
}: let
dbus-update-activation-environment = "${pkgs.dbus}/bin/dbus-update-activation-environment";
brightnessctl = "${pkgs.brightnessctl}/bin/brightnessctl";
grim = "${pkgs.grim}/bin/grim";
@ -14,8 +17,7 @@ let
xdg-user-dir = "${pkgs.xdg-user-dirs}/bin/xdg-user-dir";
change-wallpaper = "${pkgs.scripts}/bin/chpaper \${HOME}/Pictures/Wallpapers";
wallhaven-wallpaper = "${pkgs.scripts}/bin/wallhaven";
in
{
in {
home.packages = with pkgs; [
hyprland
];
@ -23,11 +25,11 @@ in
systemd.user.targets = {
hyprland-session = {
Unit = {
After = [ "graphical-session-pre.target" ];
BindsTo = [ "graphical-session.target" ];
After = ["graphical-session-pre.target"];
BindsTo = ["graphical-session.target"];
Description = "Hyprland session";
Documentation = [ "man:systemd.special(7)" ];
Wants = [ "graphical-session-pre.target" ];
Documentation = ["man:systemd.special(7)"];
Wants = ["graphical-session-pre.target"];
};
};
};
@ -160,14 +162,14 @@ in
bind = SUPER,Return, exec, ${kitty} ${tmux} new
bind = SUPER_SHIFT,Return, exec, ${kitty}
bind = SUPER,d, exec, ${rofi} -show drun
bind = SUPER,escape, exec, ${swaylock} -f -i /tmp/lockpaper.jpg
bind = SUPER,escape, exec, ${swaylock} -f -i /tmp/lockpaper.jpg
bind = SUPER_SHIFT,W, exec, ${change-wallpaper}
bind = SUPER_ALT,W, exec, ${wallhaven-wallpaper}
bind = SUPER_SHIFT,escape, exec, ${pkgs.scripts}/bin/power-menu
bind = SUPER,f11, exec, ${pkgs.scripts}/bin/tmux-sessions
bindr = ,print, exec, ${grim} "''$(${xdg-user-dir} PICTURES)/Screenshots/screenshot-''$(date +%Y-%m-%d-%H-%M-%S).png"
bindr = SHIFT,print, exec, ${grim} -g "''$(${slurp})" "''$(${xdg-user-dir} PICTURES)/Screenshots/screenshot-''$(date +%Y-%m-%d-%H-%M-%S).png"
bindr = ,print, exec, ${grim} "''$(${xdg-user-dir} PICTURES)/Screenshots/screenshot-''$(date +%Y-%m-%d-%H-%M-%S).png"
bindr = SHIFT,print, exec, ${grim} -g "''$(${slurp})" "''$(${xdg-user-dir} PICTURES)/Screenshots/screenshot-''$(date +%Y-%m-%d-%H-%M-%S).png"
bind = SUPER,1, workspace, 1
bind = SUPER,2, workspace, 2

View file

@ -1,5 +1,9 @@
{ config, lib, pkgs, ... }: {
{
config,
lib,
pkgs,
...
}: {
wayland.windowManager.sway = {
enable = true;
systemdIntegration = true;
@ -8,7 +12,7 @@
config = {
modifier = "Mod4";
fonts = {
names = [ "FiraCode Nerd Font" ];
names = ["FiraCode Nerd Font"];
size = 11.0;
};
input = {
@ -19,7 +23,7 @@
middle_emulation = "enabled";
};
};
bars = [ ];
bars = [];
gaps = {
outer = 2;
inner = 2;
@ -71,22 +75,21 @@
};
};
keybindings =
let
modifier = config.wayland.windowManager.sway.config.modifier;
keybindings = let
modifier = config.wayland.windowManager.sway.config.modifier;
brightnessctl = "${pkgs.brightnessctl}/bin/brightnessctl";
grim = "${pkgs.grim}/bin/grim";
kitty = "${config.programs.kitty.package}/bin/kitty";
playerctl = "${pkgs.playerctl}/bin/playerctl";
rofi = "${config.programs.rofi.package}/bin/rofi";
tmux = "${config.programs.tmux.package}/bin/tmux";
slurp = "${pkgs.slurp}/bin/slurp";
swaylock = "${pkgs.swaylock}/bin/swaylock";
wpctl = "${pkgs.wireplumber}/bin/wpctl";
xdg-user-dir = "${pkgs.xdg-user-dirs}/bin/xdg-user-dir";
change-wallpaper = "${pkgs.scripts}/bin/chpaper \${HOME}/Pictures/Wallpapers";
in
brightnessctl = "${pkgs.brightnessctl}/bin/brightnessctl";
grim = "${pkgs.grim}/bin/grim";
kitty = "${config.programs.kitty.package}/bin/kitty";
playerctl = "${pkgs.playerctl}/bin/playerctl";
rofi = "${config.programs.rofi.package}/bin/rofi";
tmux = "${config.programs.tmux.package}/bin/tmux";
slurp = "${pkgs.slurp}/bin/slurp";
swaylock = "${pkgs.swaylock}/bin/swaylock";
wpctl = "${pkgs.wireplumber}/bin/wpctl";
xdg-user-dir = "${pkgs.xdg-user-dirs}/bin/xdg-user-dir";
change-wallpaper = "${pkgs.scripts}/bin/chpaper \${HOME}/Pictures/Wallpapers";
in
lib.mkOptionDefault {
"${modifier}+Return" = "exec ${kitty} ${tmux} new";
"${modifier}+Shift+Return" = "exec ${kitty}";
@ -113,7 +116,7 @@
};
startup = [
{ command = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"; }
{command = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";}
{
command = "${pkgs.scripts}/bin/chpaper \${HOME}/Pictures/Wallpapers";
always = true;

View file

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

View file

@ -1 +1 @@
{ ... }: { }
{...}: {}

View file

@ -1 +1 @@
{ ... }: { }
{...}: {}

View file

@ -1,5 +1,4 @@
{ ... }: {
{...}: {
imports = [
./hardware
./programs
@ -25,7 +24,7 @@
LC_TIME = "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";

View file

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

View file

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

View file

@ -1,4 +1,8 @@
{ lib, pkgs, ... }: {
{
lib,
pkgs,
...
}: {
boot = {
initrd = {
availableKernelModules = [

View file

@ -1,4 +1,4 @@
{ ... }: {
{...}: {
imports = [
./neovim.nix
];
@ -6,5 +6,5 @@
programs = {
zsh.enable = true;
};
environment.pathsToLink = [ "/share/zsh" ];
environment.pathsToLink = ["/share/zsh"];
}

View file

@ -1,4 +1,4 @@
{ ... }: {
{...}: {
programs.neovim = {
enable = true;
defaultEditor = true;

View file

@ -1,4 +1,4 @@
{ ... }: {
{...}: {
security = {
apparmor = {
enable = true;

View file

@ -1,3 +1,3 @@
{ ... }: {
{...}: {
services.openssh.enable = true;
}

View file

@ -1,4 +1,9 @@
{ config, lib, pkgs, ... }: {
{
config,
lib,
pkgs,
...
}: {
imports = [
./hardware
./programs
@ -11,7 +16,7 @@
./virtualisation.nix
];
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
boot.binfmt.emulatedSystems = ["aarch64-linux"];
console.useXkbConfig = true;
environment.sessionVariables = {
@ -24,7 +29,7 @@
fonts = with pkgs; [
cantarell-fonts
liberation_ttf
(nerdfonts.override { fonts = [ "FiraCode" ]; })
(nerdfonts.override {fonts = ["FiraCode"];})
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
@ -47,7 +52,7 @@
LC_TIME = "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";
@ -70,13 +75,12 @@
wireless.iwd.enable = true;
};
sound.enable = true;
time.timeZone = "Asia/Kolkata";
xdg.portal = {
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.05";

View file

@ -1,5 +1,10 @@
{ lib, pkgs, config, ... }: {
imports = [ ./kernel.nix ./filesystem.nix ];
{
lib,
pkgs,
config,
...
}: {
imports = [./kernel.nix ./filesystem.nix];
boot = {
initrd.luks.devices = {
@ -12,10 +17,10 @@
};
loader.efi.canTouchEfiVariables = true;
resumeDevice = "/dev/vg0/swap";
supportedFilesystems = [ "btrfs" ];
supportedFilesystems = ["btrfs"];
};
swapDevices = [{ device = "/dev/vg0/swap"; }];
swapDevices = [{device = "/dev/vg0/swap";}];
hardware = {
bluetooth = {
@ -26,20 +31,20 @@
KernelExperimental = true;
};
};
package = (pkgs.bluez.override { withExperimental = true; });
package = pkgs.bluez.override {withExperimental = true;};
};
cpu.intel.updateMicrocode = lib.mkDefault true;
enableRedistributableFirmware = true;
gpgSmartcards.enable = true;
opengl = {
enable = true;
extraPackages = [ pkgs.intel-media-driver ];
extraPackages = [pkgs.intel-media-driver];
driSupport = true;
driSupport32Bit = true;
};
sensor.hddtemp = {
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"];
};
};
}

View file

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

View file

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

View file

@ -1,4 +1,4 @@
{ ... }: {
{...}: {
environment.persistence."/persist/system" = {
hideMounts = true;
directories = [

View file

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

View file

@ -1,5 +1,4 @@
{ ... }: {
{...}: {
imports = [
./gnupg.nix
./neovim.nix
@ -13,5 +12,5 @@
xwayland.enable = true;
zsh.enable = true;
};
environment.pathsToLink = [ "/share/zsh" ];
environment.pathsToLink = ["/share/zsh"];
}

View file

@ -1,9 +1,8 @@
{ ... }: {
{...}: {
programs.gnupg.agent = {
enable = true;
enableExtraSocket = true;
enableSSHSupport = true;
pinentryFlavor = "gnome3";
};
}

View file

@ -1,5 +1,4 @@
{ ... }: {
{...}: {
programs.neovim = {
enable = true;
defaultEditor = true;

View file

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

View file

@ -1,4 +1,8 @@
{ lib, pkgs, ... }: {
{
lib,
pkgs,
...
}: {
boot.bootspec.enable = true;
boot.loader.systemd-boot.enable = lib.mkForce false;
boot.lanzaboote = {

View file

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

View file

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

View file

@ -1,8 +1,10 @@
{ pkgs, secrets, ... }:
let
user = (import ../../../secrets.nix).users;
in
{
pkgs,
secrets,
...
}: let
user = (import ../../../secrets.nix).users;
in {
imports = [
./dbus.nix
./pipewire.nix

View file

@ -1,4 +1,4 @@
{ ... }: {
{...}: {
services.pipewire = {
enable = true;
alsa.enable = true;

View file

@ -1,4 +1,4 @@
{ ... }: {
{...}: {
services.tlp = {
enable = true;
settings = {

View file

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

View file

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

View file

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

View file

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

View file

@ -1,10 +1,10 @@
{ lib
, stdenvNoCC
, fetchFromGitHub
, gtk3
, gnome-themes-extra
, gtk-engine-murrine
,
{
lib,
stdenvNoCC,
fetchFromGitHub,
gtk3,
gnome-themes-extra,
gtk-engine-murrine,
}:
stdenvNoCC.mkDerivation {
pname = "dracula-gtk";
@ -17,13 +17,13 @@ stdenvNoCC.mkDerivation {
hash = "sha256-p9zu40o7gP08juBiDV3OzwGV6Qjgg/I0GDzV9qOlEgk=";
};
nativeBuildInputs = [ gtk3 ];
nativeBuildInputs = [gtk3];
buildInputs = [
gnome-themes-extra
];
propagatedUserEnvPkgs = [ gtk-engine-murrine ];
propagatedUserEnvPkgs = [gtk-engine-murrine];
installPhase = ''
runHook preInstall

View file

@ -1,13 +1,13 @@
{ lib
, stdenvNoCC
, fetchFromGitHub
, gtk3
, gnome
, gnome-icon-theme
, hicolor-icon-theme
, panel ? "dark"
, folder ? "default"
,
{
lib,
stdenvNoCC,
fetchFromGitHub,
gtk3,
gnome,
gnome-icon-theme,
hicolor-icon-theme,
panel ? "dark",
folder ? "default",
}:
stdenvNoCC.mkDerivation {
pname = "newaita-icon-theme";
@ -20,7 +20,7 @@ stdenvNoCC.mkDerivation {
hash = "sha256-tqtjUy8RjvOu0NaK+iE0R1g7/eqCpmhbdxuNGd/YfSI=";
};
nativeBuildInputs = [ gtk3 ];
nativeBuildInputs = [gtk3];
propagatedBuildInputs = [
gnome.adwaita-icon-theme

View file

@ -1,29 +1,42 @@
{ lib, stdenvNoCC, makeWrapper, libnotify, rofi-wayland, tmux, kitty, imagemagick, sway, hyprland, swww, jq, curl }:
{
lib,
stdenvNoCC,
makeWrapper,
libnotify,
rofi-wayland,
tmux,
kitty,
imagemagick,
sway,
hyprland,
swww,
jq,
curl,
}:
stdenvNoCC.mkDerivation {
pname = "scripts";
version = "0.1";
src = ./.;
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ libnotify rofi-wayland tmux kitty ];
nativeBuildInputs = [makeWrapper];
buildInputs = [libnotify rofi-wayland tmux kitty];
installPhase = ''
mkdir -p $out/bin
cp power-menu.sh $out/bin/power-menu
chmod +x $out/bin/power-menu
wrapProgram $out/bin/power-menu --prefix PATH : ${lib.makeBinPath [ libnotify rofi-wayland sway hyprland ]}
wrapProgram $out/bin/power-menu --prefix PATH : ${lib.makeBinPath [libnotify rofi-wayland sway hyprland]}
cp tmux-sessions.sh $out/bin/tmux-sessions
chmod +x $out/bin/tmux-sessions
wrapProgram $out/bin/tmux-sessions --prefix PATH : ${lib.makeBinPath [ tmux kitty rofi-wayland ]}
wrapProgram $out/bin/tmux-sessions --prefix PATH : ${lib.makeBinPath [tmux kitty rofi-wayland]}
cp chpaper.sh $out/bin/chpaper
chmod +x $out/bin/chpaper
wrapProgram $out/bin/chpaper --prefix PATH : ${lib.makeBinPath [ imagemagick libnotify swww ]}
wrapProgram $out/bin/chpaper --prefix PATH : ${lib.makeBinPath [imagemagick libnotify swww]}
cp wallhaven.sh $out/bin/wallhaven
chmod +x $out/bin/wallhaven
wrapProgram $out/bin/wallhaven --prefix PATH : ${lib.makeBinPath [ imagemagick libnotify swww jq curl ]}
wrapProgram $out/bin/wallhaven --prefix PATH : ${lib.makeBinPath [imagemagick libnotify swww jq curl]}
'';
}