format stuff

This commit is contained in:
Adithya 2023-03-25 22:10:09 +05:30
parent a2345bb55d
commit 9ff2bd4e96
Signed by: adtya
GPG key ID: 48FC9915FFD326D0
42 changed files with 387 additions and 317 deletions

View file

@ -1,8 +1,10 @@
{ impermanence, pkgs, ... }:
let
user = import ../users/user.nix;
in
{ {
impermanence,
pkgs,
...
}: let
user = import ../users/user.nix;
in {
programs.fuse.userAllowOther = true; programs.fuse.userAllowOther = true;
fileSystems."/home/${user.primary.userName}" = { fileSystems."/home/${user.primary.userName}" = {
@ -14,7 +16,6 @@ in
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.users.${user.primary.userName} = {pkgs, ...}: { home-manager.users.${user.primary.userName} = {pkgs, ...}: {
imports = [ imports = [
impermanence.nixosModules.home-manager.impermanence impermanence.nixosModules.home-manager.impermanence
@ -36,7 +37,7 @@ in
home.packages = with pkgs; [ home.packages = with pkgs; [
_1password-gui _1password-gui
brightnessctl brightnessctl
(discord.override { withOpenASAR = true; }) discord
evince evince
gnome.eog gnome.eog
gnome.gnome-system-monitor gnome.gnome-system-monitor

View file

@ -1,8 +1,6 @@
{ pkgs, ... }: {pkgs, ...}: let
let
user = import ../users/user.nix; user = import ../users/user.nix;
in in {
{
imports = [ imports = [
./nvim.nix ./nvim.nix
]; ];
@ -10,7 +8,6 @@ in
home.packages = with pkgs; [ home.packages = with pkgs; [
git-crypt git-crypt
lazydocker lazydocker
nixpkgs-fmt
ripgrep ripgrep
]; ];
programs = { programs = {

View file

@ -1,10 +1,12 @@
{ pkgs, osConfig, ... }:
{ {
pkgs,
osConfig,
...
}: {
programs = { programs = {
firefox = { firefox = {
enable = true; enable = true;
package = package = pkgs.firefox.override {
(pkgs.firefox.override {
extraPolicies = { extraPolicies = {
DontCheckDefaultBrowser = true; DontCheckDefaultBrowser = true;
DisablePocket = true; DisablePocket = true;
@ -56,20 +58,53 @@
}; };
}; };
Preferences = { Preferences = {
"browser.crashReports.unsubmittedCheck.autoSubmit2" = { Value = false; Status = "locked"; }; "browser.crashReports.unsubmittedCheck.autoSubmit2" = {
"browser.selfsupport.url" = { Value = ""; Status = "locked"; }; Value = false;
"browser.aboutConfig.showWarning" = { Value = false; Status = "locked"; }; Status = "locked";
"browser.aboutHomeSnippets.updateUrl" = { Value = ""; Status = "locked"; }; };
"browser.startup.homepage_override.mstone" = { Value = "ignore"; Status = "locked"; }; "browser.selfsupport.url" = {
"browser.startup.homepage_override.buildID" = { Value = ""; Status = "locked"; }; Value = "";
"browser.tabs.firefox-view" = { Value = false; Status = "locked"; }; Status = "locked";
"dom.security.https_only_mode" = { Value = true; Status = "locked"; }; };
"extensions.htmlaboutaddons.recommendations.enabled" = { Value = false; Status = "locked"; }; "browser.aboutConfig.showWarning" = {
"extensions.recommendations.themeRecommendationUrl" = { Value = ""; Status = "locked"; }; Value = false;
"network.IDN_show_punycode" = { Value = true; Status = "locked"; }; Status = "locked";
};
"browser.aboutHomeSnippets.updateUrl" = {
Value = "";
Status = "locked";
};
"browser.startup.homepage_override.mstone" = {
Value = "ignore";
Status = "locked";
};
"browser.startup.homepage_override.buildID" = {
Value = "";
Status = "locked";
};
"browser.tabs.firefox-view" = {
Value = false;
Status = "locked";
};
"dom.security.https_only_mode" = {
Value = true;
Status = "locked";
};
"extensions.htmlaboutaddons.recommendations.enabled" = {
Value = false;
Status = "locked";
};
"extensions.recommendations.themeRecommendationUrl" = {
Value = "";
Status = "locked";
};
"network.IDN_show_punycode" = {
Value = true;
Status = "locked";
};
};
}; };
}; };
});
profiles.default = { profiles.default = {
id = 0; id = 0;
name = "Default"; name = "Default";

View file

@ -1,16 +1,14 @@
{ pkgs, ... }: {pkgs, ...}: let
let
dracula = pkgs.fetchFromGitHub { dracula = 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,6 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
xdg.desktopEntries."mpv".name = "mpv Media Player"; xdg.desktopEntries."mpv".name = "mpv Media Player";
xdg.desktopEntries."mpv".exec = "mpv --player-operation-mode=pseudo-gui -- %U"; xdg.desktopEntries."mpv".exec = "mpv --player-operation-mode=pseudo-gui -- %U";
xdg.desktopEntries."mpv".noDisplay = true; xdg.desktopEntries."mpv".noDisplay = true;
@ -27,7 +25,10 @@
services = { services = {
spotifyd = { spotifyd = {
enable = true; enable = true;
package = (pkgs.spotifyd.override { withKeyring = true; withMpris = true; }); package = pkgs.spotifyd.override {
withKeyring = true;
withMpris = true;
};
settings = { settings = {
global = { global = {
use_keyring = true; use_keyring = true;

View file

@ -1,6 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
xdg.desktopEntries."nvim".name = "Neovim wrapper"; xdg.desktopEntries."nvim".name = "Neovim wrapper";
xdg.desktopEntries."nvim".exec = "nvim %F"; xdg.desktopEntries."nvim".exec = "nvim %F";
xdg.desktopEntries."nvim".noDisplay = true; xdg.desktopEntries."nvim".noDisplay = true;

View file

@ -1,9 +1,11 @@
{ osConfig, pkgs, ... }: {
let osConfig,
pkgs,
...
}: let
notify-send = "${pkgs.libnotify}/bin/notify-send"; notify-send = "${pkgs.libnotify}/bin/notify-send";
dmenu = "${pkgs.rofi-wayland}/bin/rofi -dmenu"; dmenu = "${pkgs.rofi-wayland}/bin/rofi -dmenu";
in in {
{
xdg.configFile = { xdg.configFile = {
"scripts/power_menu.sh" = { "scripts/power_menu.sh" = {
executable = true; executable = true;
@ -40,11 +42,9 @@ in
''; '';
}; };
"scripts/volume_up.sh" = "scripts/volume_up.sh" = let
let
wpctl = "${pkgs.wireplumber}/bin/wpctl"; wpctl = "${pkgs.wireplumber}/bin/wpctl";
in in {
{
executable = true; executable = true;
text = '' text = ''
#!/bin/sh #!/bin/sh
@ -56,12 +56,10 @@ in
''; '';
}; };
"scripts/tmux_sessions.sh" = "scripts/tmux_sessions.sh" = let
let
kitty = "${pkgs.kitty}/bin/kitty"; kitty = "${pkgs.kitty}/bin/kitty";
tmux = "${pkgs.tmux}/bin/tmux"; tmux = "${pkgs.tmux}/bin/tmux";
in in {
{
executable = true; executable = true;
text = '' text = ''
#!/bin/sh #!/bin/sh
@ -77,13 +75,11 @@ in
;; ;;
esac''; esac'';
}; };
"scripts/power_profile.sh" = "scripts/power_profile.sh" = let
let
sudo = "/run/wrappers/bin/sudo"; sudo = "/run/wrappers/bin/sudo";
cpupower = "${osConfig.boot.kernelPackages.cpupower}/bin/cpupower"; cpupower = "${osConfig.boot.kernelPackages.cpupower}/bin/cpupower";
powerprofilesctl = "${pkgs.power-profiles-daemon}/bin/powerprofilesctl"; powerprofilesctl = "${pkgs.power-profiles-daemon}/bin/powerprofilesctl";
in in {
{
executable = true; executable = true;
text = '' text = ''
#!/bin/sh #!/bin/sh

View file

@ -1,6 +1,9 @@
{ config, lib, pkgs, ... }:
{ {
config,
lib,
pkgs,
...
}: {
imports = [ imports = [
./gnome-keyring.nix ./gnome-keyring.nix
./gtk.nix ./gtk.nix
@ -82,8 +85,7 @@
}; };
}; };
wayland.windowManager.sway.config.keybindings = wayland.windowManager.sway.config.keybindings = let
let
modifier = config.wayland.windowManager.sway.config.modifier; modifier = config.wayland.windowManager.sway.config.modifier;
in in
lib.mkOptionDefault { lib.mkOptionDefault {
@ -113,9 +115,18 @@
wayland.windowManager.sway.config.startup = [ wayland.windowManager.sway.config.startup = [
{command = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";} {command = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";}
{ command = "~/.config/scripts/chpaper.sh"; always = true; } {
{ command = "systemctl --user restart waybar.service"; always = true; } command = "~/.config/scripts/chpaper.sh";
{ command = "systemctl --user restart kanshi.service"; always = true; } always = true;
}
{
command = "systemctl --user restart waybar.service";
always = true;
}
{
command = "systemctl --user restart kanshi.service";
always = true;
}
]; ];
wayland.windowManager.sway.config.window.commands = [ wayland.windowManager.sway.config.window.commands = [
@ -216,4 +227,3 @@
wayland.windowManager.sway.config.window.titlebar = false; wayland.windowManager.sway.config.window.titlebar = false;
wayland.windowManager.sway.config.floating.titlebar = false; wayland.windowManager.sway.config.floating.titlebar = false;
} }

View file

@ -1,9 +1,11 @@
{ config, pkgs, ... }: {
let config,
pkgs,
...
}: 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,5 +1,3 @@
{ pkgs, ... }: {pkgs, ...}: {
{
services.gnome-keyring.enable = true; services.gnome-keyring.enable = true;
} }

View file

@ -1,5 +1,8 @@
{ lib, pkgs, ... }: {
let lib,
pkgs,
...
}: let
gtkTheme = { gtkTheme = {
name = "Dracula"; name = "Dracula";
package = pkgs.dracula-gtk; package = pkgs.dracula-gtk;
@ -7,15 +10,17 @@ let
iconTheme = { iconTheme = {
name = "Newaita-dark"; name = "Newaita-dark";
package = pkgs.newaita-icon-theme.override { panel = "dark"; folder = "bluegray"; }; package = pkgs.newaita-icon-theme.override {
panel = "dark";
folder = "bluegray";
};
}; };
cursorTheme = { cursorTheme = {
name = "Bibata-Modern-Classic"; name = "Bibata-Modern-Classic";
package = pkgs.bibata-cursors; package = pkgs.bibata-cursors;
}; };
in in {
{
gtk.enable = true; gtk.enable = true;
gtk.theme = gtkTheme; gtk.theme = gtkTheme;
home.sessionVariables.GTK_THEME = gtkTheme.name; home.sessionVariables.GTK_THEME = gtkTheme.name;

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
services.kanshi.enable = true; services.kanshi.enable = true;
services.kanshi.profiles = { services.kanshi.profiles = {
undocked = { undocked = {

View file

@ -1,6 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
xdg.desktopEntries."rofi".name = "Rofi"; xdg.desktopEntries."rofi".name = "Rofi";
xdg.desktopEntries."rofi".exec = "rofi -show"; xdg.desktopEntries."rofi".exec = "rofi -show";
xdg.desktopEntries."rofi".noDisplay = true; xdg.desktopEntries."rofi".noDisplay = true;

View file

@ -1,11 +1,15 @@
{ pkgs, ... }: {pkgs, ...}: {
{
services.swayidle.enable = true; services.swayidle.enable = true;
services.swayidle.events = [ services.swayidle.events = [
{ event = "before-sleep"; command = "${pkgs.swaylock}/bin/swaylock -f -i /tmp/lockpaper.jpg"; } {
event = "before-sleep";
command = "${pkgs.swaylock}/bin/swaylock -f -i /tmp/lockpaper.jpg";
}
]; ];
services.swayidle.timeouts = [ services.swayidle.timeouts = [
{ timeout = 600; command = "${pkgs.swaylock}/bin/swaylock -f -i /tmp/lockpaper.jpg"; } {
timeout = 600;
command = "${pkgs.swaylock}/bin/swaylock -f -i /tmp/lockpaper.jpg";
}
]; ];
} }

View file

@ -1,6 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
xdg.dataFile."wallpapers/catppuccin".source = "${pkgs.catppuccin-wallpapers}/share/wallpapers"; xdg.dataFile."wallpapers/catppuccin".source = "${pkgs.catppuccin-wallpapers}/share/wallpapers";
xdg.configFile."scripts/chpaper.sh" = { xdg.configFile."scripts/chpaper.sh" = {
text = '' text = ''

View file

@ -1,6 +1,8 @@
{ config, pkgs, ... }:
{ {
config,
pkgs,
...
}: {
programs.waybar.enable = true; programs.waybar.enable = true;
programs.waybar.systemd.enable = true; programs.waybar.systemd.enable = true;
programs.waybar.style = ./style.css; programs.waybar.style = ./style.css;
@ -88,11 +90,9 @@
"tray" = { "tray" = {
"spacing" = 4; "spacing" = 4;
}; };
"custom/power_profile" = "custom/power_profile" = let
let
script = "${config.xdg.configHome}/scripts/power_profile.sh"; script = "${config.xdg.configHome}/scripts/power_profile.sh";
in in {
{
exec = "${script} icon"; exec = "${script} icon";
on-click = "${script} toggle"; on-click = "${script} toggle";
format = "{}"; format = "{}";

View file

@ -1,12 +1,13 @@
{ config, pkgs, ... }:
{ {
config,
pkgs,
...
}: {
imports = [ imports = [
./kitty.nix ./kitty.nix
./tmux.nix ./tmux.nix
]; ];
xdg.desktopEntries."btop".name = "btop++"; xdg.desktopEntries."btop".name = "btop++";
xdg.desktopEntries."btop".exec = "btop"; xdg.desktopEntries."btop".exec = "btop";
xdg.desktopEntries."btop".noDisplay = true; xdg.desktopEntries."btop".noDisplay = true;

View file

@ -1,6 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
programs.tmux = { programs.tmux = {
enable = true; enable = true;
shell = "${pkgs.zsh}/bin/zsh"; shell = "${pkgs.zsh}/bin/zsh";

View file

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

View file

@ -1,5 +1,8 @@
{ lib, stdenvNoCC, fetchFromGitHub }: {
lib,
stdenvNoCC,
fetchFromGitHub,
}:
stdenvNoCC.mkDerivation { stdenvNoCC.mkDerivation {
pname = "catppuccin-wallpapers"; pname = "catppuccin-wallpapers";
version = "latest"; version = "latest";

View file

@ -1,5 +1,11 @@
{ lib, stdenvNoCC, fetchFromGitHub, gtk3, gnome-themes-extra, gtk-engine-murrine }: {
lib,
stdenvNoCC,
fetchFromGitHub,
gtk3,
gnome-themes-extra,
gtk-engine-murrine,
}:
stdenvNoCC.mkDerivation { stdenvNoCC.mkDerivation {
pname = "dracula-gtk"; pname = "dracula-gtk";
version = "4.0"; version = "4.0";

View file

@ -1,5 +1,14 @@
{ 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 { stdenvNoCC.mkDerivation {
pname = "newaita-icon-theme"; pname = "newaita-icon-theme";
version = "latest"; version = "latest";

View file

@ -1,5 +1,9 @@
{ config, lib, pkgs, ... }: { {
config,
lib,
pkgs,
...
}: {
imports = [ imports = [
./filesystem.nix ./filesystem.nix
./gnome-keyring.nix ./gnome-keyring.nix

View file

@ -1,5 +1,4 @@
{ ... }: {...}: {
{
programs.seahorse.enable = true; programs.seahorse.enable = true;
services.gnome.gnome-keyring.enable = true; services.gnome.gnome-keyring.enable = true;
security.pam.services.passwd.enableGnomeKeyring = true; security.pam.services.passwd.enableGnomeKeyring = true;

View file

@ -1,4 +1,3 @@
{ ... }: {...}: {
{
programs.dconf.enable = true; programs.dconf.enable = true;
} }

View file

@ -1,5 +1,9 @@
{ lib, pkgs, config, ... }: { {
lib,
pkgs,
config,
...
}: {
imports = [./disk.nix ./kernel.nix]; imports = [./disk.nix ./kernel.nix];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";

View file

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

View file

@ -1,5 +1,4 @@
{pkgs, ...}: { {pkgs, ...}: {
fonts = { fonts = {
enableDefaultFonts = true; enableDefaultFonts = true;
fontDir.enable = true; fontDir.enable = true;

View file

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

View file

@ -1,10 +1,14 @@
{pkgs, ...}: { {pkgs, ...}: {
boot.consoleLogLevel = 3; boot.consoleLogLevel = 3;
boot.kernelParams = ["quiet"]; boot.kernelParams = ["quiet"];
boot.plymouth = { boot.plymouth = {
enable = true; enable = true;
themePackages = [ (pkgs.adi1090x-plymouth.override { pack = "pack_3"; theme = "owl"; }) ]; themePackages = [
(pkgs.adi1090x-plymouth.override {
pack = "pack_3";
theme = "owl";
})
];
theme = "adi1090x"; theme = "adi1090x";
}; };
} }

View file

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

View file

@ -1,5 +1,3 @@
{ ... }: {...}: {
{
security.pam.services.swaylock = {}; security.pam.services.swaylock = {};
} }

View file

@ -1,9 +1,6 @@
{ pkgs, ... }: {pkgs, ...}: let
let
user = import ./user.nix; user = import ./user.nix;
in in {
{
users.mutableUsers = false; users.mutableUsers = false;
users.users = { users.users = {
root.hashedPassword = user.root.hashedPassword; root.hashedPassword = user.root.hashedPassword;