Merge pull request #1 from zackartz/flake-rewrite

move to snowfall
This commit is contained in:
Zachary Myers 2024-05-23 16:51:51 -04:00 committed by GitHub
commit 042ee74dbd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
192 changed files with 2420 additions and 3279 deletions

View file

@ -1,19 +1,30 @@
{
config,
pkgs,
inputs,
lib,
...
}: {
}: let
spicePkgs = inputs.spicetify-nix.packages.${pkgs.system}.default;
in {
imports = [
./swayidle.nix
./vim/default.nix
./firefox.nix
../rice/ags
../rice/hyprland
# ../rice/sway
../rice/gtk.nix
../rice/kitty.nix
# ../rice/waybar
# ../rice/dunst.nix
../rice/anyrun
../rice/rio.nix
../rice/wofi.nix
../shell
# inputs.catppuccin.homeManagerModules.catppuccin
inputs.spicetify-nix.homeManagerModule
inputs.catppuccin.homeManagerModules.catppuccin
];
nixpkgs = {
@ -26,7 +37,15 @@
];
};
# catppuccin.flavour = "mocha";
gtk.catppuccin.cursor.enable = false;
nix.gc = {
automatic = true;
frequency = "weekly";
options = "--delete-older-than 30d";
};
catppuccin.flavor = "mocha";
# This value determines the Home Manager release that your configuration is
# compatible with. This helps avoid breakage when a new Home Manager release
@ -38,26 +57,26 @@
home.stateVersion = "23.11"; # Please read the comment before changing it.
home.packages = [
pkgs.wofi
pkgs.dconf
pkgs.wl-clipboard
pkgs.swaybg
pkgs.pavucontrol
pkgs.wlogout
pkgs.sway-audio-idle-inhibit
pkgs.grim
pkgs.slurp
pkgs.xfce.thunar
pkgs.feh
pkgs.nitch
pkgs.nix-output-monitor
pkgs.fastfetch
inputs.nixpkgs.legacyPackages.${pkgs.system}.nh
pkgs.nh
pkgs.dwl
pkgs.killall
(pkgs.writeShellScriptBin "rebuild" ''
#!${pkgs.bash}/bin/bash
set -e
pushd ~/nixos/
alejandra . &>/dev/null
git add .
echo "[REBUILD]: rebuilding nixos"
nh os switch
gen=$(nixos-rebuild list-generations | grep current)
git commit -am "$gen"
git push origin main
popd
'')
];
home.sessionVariables = {
@ -65,27 +84,7 @@
};
xdg.enable = true;
programs.zoxide = {
enable = true;
enableZshIntegration = true;
options = ["--cmd cd"];
};
programs.btop = {
enable = true;
# catppuccin.enable = true;
};
programs.lazygit = {
enable = true;
# catppuccin.enable = true;
};
programs.fzf = {
enable = true;
# catppuccin.enable = true;
};
# programs.nixvim = ./vim.nix;
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;

46
env/common/fonts.nix vendored
View file

@ -1,46 +0,0 @@
{
pkgs,
nixpkgs,
...
}: {
fonts = {
packages = with pkgs; [
material-icons
material-design-icons
roboto
work-sans
comic-neue
source-sans
twemoji-color-font
comfortaa
inter
lato
lexend
jost
dejavu_fonts
iosevka-bin
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
jetbrains-mono
(nerdfonts.override {fonts = ["Iosevka" "JetBrainsMono"];})
];
enableDefaultPackages = false;
# this fixes emoji stuff
fontconfig = {
defaultFonts = {
monospace = [
"Iosevka"
"Iosevka Nerd Font Complete Mono"
"Iosevka Nerd Font"
"Noto Color Emoji"
];
sansSerif = ["Inter" "Noto Color Emoji"];
serif = ["Noto Serif" "Noto Color Emoji"];
emoji = ["Noto Color Emoji"];
};
};
};
}

View file

@ -1,74 +0,0 @@
{
pkgs,
inputs,
...
}: {
imports = [../common/fonts.nix];
environment.etc."greetd/environments".text = ''
bspwm
Hyprland
'';
services = {
greetd = {
enable = true;
settings = rec {
initial_session = {
command = "Hyprland";
user = "zack";
};
default_session = initial_session;
};
};
};
environment = {
variables = {
NIXOS_OZONE_WL = "1";
__GL_GSYNC_ALLOWED = "0";
__GL_VRR_ALLOWED = "0";
_JAVA_AWT_WM_NONEREPARENTING = "1";
SSH_AUTH_SOCK = "/run/user/1000/keyring/ssh";
DISABLE_QT5_COMPAT = "0";
GDK_BACKEND = "wayland,x11";
ANKI_WAYLAND = "1";
DIRENV_LOG_FORMAT = "";
QT_AUTO_SCREEN_SCALE_FACTOR = "1";
QT_QPA_PLATFORM = "wayland;xcb";
DISABLE_QT_COMPAT = "0";
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
MOZ_ENABLE_WAYLAND = "1";
WLR_BACKEND = "wayland";
WLR_RENDERER = "wayland";
XDG_SESSION_TYPE = "wayland";
SDL_VIDEODRIVER = "wayland";
XDG_CACHE_HOME = "/home/zack/.cache";
CLUTTER_BACKEND = "wayland";
};
loginShellInit = ''
dbus-update-activation-environment --systemd DISPLAY
eval $(gnome-keyring-daemon --start --components=ssh,secrets)
eval $(ssh-agent)
'';
};
hardware.pulseaudio.support32Bit = true;
xdg.portal = {
enable = true;
config.common.default = "*";
wlr.enable = true;
extraPortals = [
pkgs.xdg-desktop-portal-gtk
pkgs.xdg-desktop-portal-wlr
inputs.hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland
pkgs.xwaylandvideobridge
];
};
sound = {
enable = true;
mediaKeys.enable = true;
};
}

19
env/x11/default.nix vendored
View file

@ -1,19 +0,0 @@
{pkgs, ...}: {
environment.etc."greetd/environments".text = ''
bspwm
Hyprland
'';
services = {
greetd = {
enable = true;
settings = rec {
initial_session = {
command = "bspwm";
user = "zack";
};
default_session = initial_session;
};
};
};
}

141
flake.lock generated
View file

@ -163,6 +163,22 @@
}
},
"flake-compat_3": {
"flake": false,
"locked": {
"lastModified": 1650374568,
"narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "b4a34015c698c7793d592d66adbab377907a2be8",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_4": {
"flake": false,
"locked": {
"lastModified": 1696426674,
@ -298,6 +314,25 @@
"type": "github"
}
},
"flake-utils-plus": {
"inputs": {
"flake-utils": "flake-utils_6"
},
"locked": {
"lastModified": 1715533576,
"narHash": "sha256-fT4ppWeCJ0uR300EH3i7kmgRZnAVxrH+XtK09jQWihk=",
"owner": "gytis-ivaskevicius",
"repo": "flake-utils-plus",
"rev": "3542fe9126dc492e53ddd252bb0260fe035f2c0f",
"type": "github"
},
"original": {
"owner": "gytis-ivaskevicius",
"repo": "flake-utils-plus",
"rev": "3542fe9126dc492e53ddd252bb0260fe035f2c0f",
"type": "github"
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems_7"
@ -374,6 +409,24 @@
"inputs": {
"systems": "systems_13"
},
"locked": {
"lastModified": 1694529238,
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_7": {
"inputs": {
"systems": "systems_14"
},
"locked": {
"lastModified": 1685518550,
"narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=",
@ -460,11 +513,11 @@
]
},
"locked": {
"lastModified": 1715930644,
"narHash": "sha256-W9pyM3/vePxrffHtzlJI6lDS3seANQ+Nqp+i58O46LI=",
"lastModified": 1716457508,
"narHash": "sha256-ZxzffLuWRyuMrkVVq7wastNUqeO0HJL9xqfY1QsYaqo=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "e3ad5108f54177e6520535768ddbf1e6af54b59d",
"rev": "850cb322046ef1a268449cf1ceda5fd24d930b05",
"type": "github"
},
"original": {
@ -510,11 +563,11 @@
]
},
"locked": {
"lastModified": 1715791817,
"narHash": "sha256-J069Uhv/gCMFLX1dSh2f+9ZTM09r1Nv3oUfocCnWKow=",
"lastModified": 1716327911,
"narHash": "sha256-PI+wygItS/TKzi4gEAROvKTUzTx9GT+PGBttS/IOA/Q=",
"owner": "hyprwm",
"repo": "hyprcursor",
"rev": "7c3aa03dffb53921e583ade3d4ae3f487e390e7e",
"rev": "27ca640abeef2d425b5dbecf804f5eb622cef56d",
"type": "github"
},
"original": {
@ -555,11 +608,11 @@
"xdph": "xdph"
},
"locked": {
"lastModified": 1716365376,
"narHash": "sha256-941FKboG8Wc/hb1wvrEEKnC4DwDlSLgrjRL+whgWwUU=",
"lastModified": 1716480279,
"narHash": "sha256-iZmMWUnWMY+bn+kGKdsXL4y1zs9hViSRwMii01j7Wok=",
"ref": "refs/heads/main",
"rev": "93fea890433ec11d7a915f5e0466b2e8b513e895",
"revCount": 4724,
"rev": "255272ea18a1bd899168b2d2063b6f153edda919",
"revCount": 4731,
"submodules": true,
"type": "git",
"url": "https://github.com/hyprwm/Hyprland"
@ -882,11 +935,11 @@
},
"nixpkgs_4": {
"locked": {
"lastModified": 1716137900,
"narHash": "sha256-sowPU+tLQv8GlqtVtsXioTKeaQvlMz/pefcdwg8MvfM=",
"lastModified": 1716330097,
"narHash": "sha256-8BO3B7e3BiyIDsaKA0tY8O88rClYRTjvAp66y+VBUeU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "6c0b7a92c30122196a761b440ac0d46d3d9954f1",
"rev": "5710852ba686cc1fd0d3b8e22b3117d43ba374c2",
"type": "github"
},
"original": {
@ -930,11 +983,11 @@
},
"nixpkgs_7": {
"locked": {
"lastModified": 1716395399,
"narHash": "sha256-X+99WjSwbxQ7X+CTyqZQZqeqGe8nbfAFz+tgK2r3O/g=",
"lastModified": 1716438273,
"narHash": "sha256-qgmg3oXm+PYWnO06g2aetPOAKvQkgC63NjNh0m9ZHNI=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "bc5dc89513caa16788f6379962e50383cf3f70b0",
"rev": "3efa0a2a30e551229188707569e85495e73090f3",
"type": "github"
},
"original": {
@ -978,11 +1031,11 @@
},
"nixpkgs_stable": {
"locked": {
"lastModified": 1716218643,
"narHash": "sha256-i/E7gzQybvcGAYDRGDl39WL6yVk30Je/NXypBz6/nmM=",
"lastModified": 1716361217,
"narHash": "sha256-mzZDr00WUiUXVm1ujBVv6A0qRd8okaITyUp4ezYRgc4=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "a8695cbd09a7ecf3376bd62c798b9864d20f86ee",
"rev": "46397778ef1f73414b03ed553a3368f0e7e33c2f",
"type": "github"
},
"original": {
@ -1071,11 +1124,11 @@
"systems": "systems_12"
},
"locked": {
"lastModified": 1716284227,
"narHash": "sha256-Orl4jFK7ibvJeEecnINmYOOwCOL5s96YZkkAZ47Aix0=",
"lastModified": 1716476872,
"narHash": "sha256-tImPGwMbeiKOL3G0KlquxJUFK2lmAfEJRUkgmPaiDp0=",
"owner": "raphamorim",
"repo": "rio",
"rev": "dbf5bb85507ee57933b9dc2a5a95bb14f3d0d60b",
"rev": "d8c8cf8ce83b4e88f4928aed12b2aa17a7c3dc61",
"type": "github"
},
"original": {
@ -1103,8 +1156,9 @@
"nixpkgs_stable": "nixpkgs_stable",
"resume": "resume",
"rio-term": "rio-term",
"snowfall-lib": "snowfall-lib",
"spicetify-nix": "spicetify-nix",
"systems": "systems_14",
"systems": "systems_15",
"waybar": "waybar"
}
},
@ -1171,9 +1225,31 @@
"type": "github"
}
},
"snowfall-lib": {
"inputs": {
"flake-compat": "flake-compat_3",
"flake-utils-plus": "flake-utils-plus",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1716456697,
"narHash": "sha256-05gmA4Kc0nISkRGpWRvVWk+rgukNosnHdEfwObPsRJM=",
"owner": "snowfallorg",
"repo": "lib",
"rev": "34c1697a5346b6e8d6cd123295ae07399f47634d",
"type": "github"
},
"original": {
"owner": "snowfallorg",
"repo": "lib",
"type": "github"
}
},
"spicetify-nix": {
"inputs": {
"flake-utils": "flake-utils_6",
"flake-utils": "flake-utils_7",
"nixpkgs": [
"nixpkgs"
]
@ -1283,6 +1359,21 @@
"type": "github"
}
},
"systems_15": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
@ -1405,7 +1496,7 @@
},
"waybar": {
"inputs": {
"flake-compat": "flake-compat_3",
"flake-compat": "flake-compat_4",
"nixpkgs": [
"nixpkgs"
]

144
flake.nix
View file

@ -67,6 +67,11 @@
inputs.nixpkgs.follows = "nixpkgs";
};
snowfall-lib = {
url = "github:snowfallorg/lib";
inputs.nixpkgs.follows = "nixpkgs";
};
neovim-nightly-overlay = {
url = "github:nix-community/neovim-nightly-overlay";
# inputs.nixpkgs.follows = "nixpkgs";
@ -84,60 +89,91 @@
};
};
outputs = {
self,
nixpkgs,
nixpkgs_stable,
systems,
...
} @ inputs: let
eachSystem = f:
nixpkgs.lib.genAttrs (import systems) (
system:
f nixpkgs.legacyPackages.${system}
);
in {
nixosConfigurations.pluto = nixpkgs_stable.lib.nixosSystem {
specialArgs = {inherit inputs;};
modules = [
./hosts/pluto/configuration.nix
inputs.home-manager_stable.nixosModules.default
inputs.blog.nixosModule
inputs.agenix.nixosModules.default
];
};
outputs = inputs:
inputs.snowfall-lib.mkFlake {
inherit inputs;
src = ./.;
nixosConfigurations.earth = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs;};
modules = [
./hosts/earth/configuration.nix
inputs.lanzaboote.nixosModules.lanzaboote
inputs.home-manager.nixosModules.default
inputs.catppuccin.nixosModules.catppuccin
inputs.agenix.nixosModules.default
];
};
nixosConfigurations.live = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {inherit inputs;};
modules = [
"${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-graphical-plasma5.nix"
"${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix"
# ./hosts/live/configuration.nix
];
};
devShells = eachSystem (pkgs: {
default = pkgs.mkShell {
buildInputs = [
pkgs.nixd
pkgs.alejandra
pkgs.stylua
pkgs.lua-language-server
pkgs.luajitPackages.lua-lsp
];
snowfall = {
namespace = "custom";
};
});
};
channels-config = {
allowUnfree = true;
};
templates = import ./templates {};
homes.modules = with inputs; [
spicetify-nix.homeManagerModule
catppuccin.homeManagerModules.catppuccin
anyrun.homeManagerModules.default
ags.homeManagerModules.default
];
systems.modules.nixos = with inputs; [
lanzaboote.nixosModules.lanzaboote
home-manager.nixosModules.home-manager
catppuccin.nixosModules.catppuccin
blog.nixosModule
agenix.nixosModules.default
];
};
# outputs = {
# self,
# nixpkgs,
# nixpkgs_stable,
# systems,
# ...
# } @ inputs: let
# eachSystem = f:
# nixpkgs.lib.genAttrs (import systems) (
# system:
# f nixpkgs.legacyPackages.${system}
# );
# in {
# nixosConfigurations.pluto = nixpkgs_stable.lib.nixosSystem {
# specialArgs = {inherit inputs;};
# modules = [
# ./hosts/pluto/configuration.nix
# inputs.home-manager_stable.nixosModules.default
# inputs.blog.nixosModule
# inputs.agenix.nixosModules.default
# ];
# };
#
# nixosConfigurations.earth = nixpkgs.lib.nixosSystem {
# specialArgs = {inherit inputs;};
# modules = [
# ./hosts/earth/configuration.nix
# inputs.lanzaboote.nixosModules.lanzaboote
# inputs.home-manager.nixosModules.default
# inputs.catppuccin.nixosModules.catppuccin
# inputs.agenix.nixosModules.default
# ];
# };
#
# nixosConfigurations.live = nixpkgs.lib.nixosSystem {
# system = "x86_64-linux";
# specialArgs = {inherit inputs;};
# modules = [
# "${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-graphical-plasma5.nix"
# "${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix"
# # ./hosts/live/configuration.nix
# ];
# };
#
# devShells = eachSystem (pkgs: {
# default = pkgs.mkShell {
# buildInputs = [
# pkgs.nixd
# pkgs.alejandra
# pkgs.stylua
# pkgs.lua-language-server
# pkgs.luajitPackages.lua-lsp
# ];
# };
# });
# };
}

View file

@ -0,0 +1,163 @@
{
inputs,
pkgs,
system,
lib,
...
}: {
wms.hyprland.enable = true;
apps = {
web.firefox.enable = true;
tools.git.enable = true;
tools.tmux.enable = true;
tools.neovim.enable = true;
tools.starship.enable = true;
tools.skim.enable = true;
tools.direnv.enable = true;
tools.tealdeer.enable = true;
tools.bat.enable = true;
term.kitty.enable = true;
music.spotify.enable = true;
helpers = {
anyrun.enable = true;
ags.enable = true;
};
};
shells.zsh.enable = true;
rice.gtk.enable = true;
services.lock.enable = true;
xdg.enable = true;
programs = {
gpg.enable = true;
man.enable = true;
eza.enable = true;
dircolors = {
enable = true;
enableZshIntegration = true;
};
};
# catppuccin.enable = true;
home.packages = [
pkgs.gimp
pkgs.slack
pkgs.zoom-us
pkgs.elisa
pkgs.prismlauncher
pkgs.obs-studio
pkgs.jetbrains.idea-community
pkgs.jetbrains.datagrip
pkgs.ungoogled-chromium
pkgs.thunderbird
pkgs.mongodb-compass
pkgs.postman
pkgs.mosh
pkgs.dconf
pkgs.wl-clipboard
pkgs.pavucontrol
pkgs.wlogout
pkgs.sway-audio-idle-inhibit
pkgs.grim
pkgs.slurp
pkgs.xfce.thunar
pkgs.feh
pkgs.nitch
pkgs.nix-output-monitor
pkgs.fastfetch
pkgs.nh
pkgs.dwl
pkgs.killall
pkgs.parsec-bin
pkgs.filezilla
pkgs.ghidra
pkgs.zed-editor
pkgs.openvpn
pkgs.telegram-desktop
];
programs.zoxide = {
enable = true;
enableZshIntegration = true;
options = ["--cmd cd"];
};
programs.cava = {
enable = true;
catppuccin.enable = true;
};
programs.btop = {
enable = true;
catppuccin.enable = true;
extraConfig = ''
update_ms = 100
vim_keys = true
'';
};
programs.lazygit = {
enable = true;
catppuccin.enable = true;
};
programs.fzf = {
enable = true;
catppuccin.enable = true;
};
systemd.user.services.xwaylandvideobridge = {
Unit = {
Description = "Tool to make it easy to stream wayland windows and screens to exisiting applications running under Xwayland";
};
Service = {
Type = "simple";
ExecStart = lib.getExe pkgs.xwaylandvideobridge;
Restart = "on-failure";
};
Install = {
WantedBy = ["default.target"];
};
};
services = {
udiskie.enable = true;
gpg-agent = {
enable = true;
pinentryPackage = lib.mkForce pkgs.pinentry-gnome3;
enableSshSupport = true;
enableZshIntegration = true;
};
};
systemd.user.services.kb-gui = {
Unit = {
Description = "KB Time/Date thing";
};
Install = {
WantedBy = ["default.target"];
};
Service = {
ExecStart = "${inputs.kb-gui.packages.${pkgs.system}.kb}/bin/kb";
};
};
}

View file

@ -1,157 +0,0 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{
config,
pkgs,
inputs,
lib,
...
}: {
imports = [
# Include the results of the hardware scan.
({
options,
lib,
...
}:
lib.mkIf (options ? virtualisation.memorySize) {
users.users.zack.password = "foo";
})
../../env/wayland
];
networking.nameservers = ["1.1.1.1" "1.0.0.1"];
boot.kernel.sysctl = {
"fs.inotify.max_user_watches" = 1048576;
"fs.inotify.max_queued_events" = 1048576;
};
virtualisation.vmVariant = {
# following configuration is added only when building VM with build-vm
virtualisation = {
memorySize = 2048; # Use 2048MiB memory.
cores = 4;
};
};
# specialisation = {
# bspwm.configuration = {
# imports = [
# ../../env/x11
# ];
# environment.etc."specialisation".text = "bspwm";
# };
# hyprland.configuration = {
# imports = [
# ../../env/wayland
# ];
# environment.etc."specialisation".text = "hyprland";
# };
# };
nix.gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 30d";
};
nix.settings = {
trusted-users = ["root" "zack"];
substituters = ["https://hyprland.cachix.org" "https://zackartz.cachix.org" "https://cache.nixos.org"];
trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" "zackartz.cachix.org-1:nrEfVZF8MVX0Lnt73KwYzH2kwDzFuAoR5VPjuUd4R30="];
};
services.udev.extraRules = ''KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0660", GROUP="plugdev"'';
# Enable networking
services.gnome.gnome-keyring.enable = true;
security.polkit.enable = true;
security.pam.services.swaylock = {};
# Set your time zone.
time.timeZone = "America/New_York";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
# Enable the X11 windowing system.
services.xserver.enable = true;
# Configure keymap in X11
services.xserver.xkb = {
layout = "us";
variant = "";
};
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable OpenGL
hardware.opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
};
environment.variables = {
WLR_RENDERER_ALLOW_SOFTWARE = "1";
};
environment.sessionVariables = {
FLAKE = "/home/zack/nixos/";
};
environment.sessionVariables.DEFAULT_BROWSER = "${pkgs.firefox}/bin/firefox";
nix.settings.experimental-features = ["nix-command" "flakes"];
# Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true;
users.groups.plugdev = {};
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
# programs.gnupg.agent = {
# enable = true;
# enableSSHSupport = true;
# };
# List services that you want to enable:
# Enable the OpenSSH daemon.
# services.openssh.enable = true;
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "23.11"; # Did you read the comment?
}

View file

@ -1,211 +0,0 @@
{
config,
pkgs,
inputs,
lib,
...
}: {
imports = [
../common/default.nix
# Include the results of the hardware scan.
./hardware-configuration.nix
./nvidia.nix
({
options,
lib,
...
}:
lib.mkIf (options ? virtualisation.memorySize) {
users.users.zack.password = "foo";
})
];
programs.steam.enable = true;
programs.steam.gamescopeSession.enable = true;
programs.gamemode.enable = true;
# Enable sound with pipewire.
sound.enable = true;
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
# If you want to use JACK applications, uncomment this
jack.enable = true;
# use the example session manager (no others are packaged yet so this is enabled by default,
# no need to redefine it in your config for now)
wireplumber.enable = true;
};
services.fstrim.enable = true;
services.mullvad-vpn.enable = true;
services.openvpn.servers = {
work = {
config = ''config /home/zack/Downloads/zachary_myers.ovpn'';
updateResolvConf = true;
};
};
# disable autoconnect for now
# systemd.services."mullvad-daemon".postStart = let
# mullvad = config.services.mullvad-vpn.package;
# in ''
# while ! ${mullvad}/bin/mullvad status >/dev/null; do sleep 1; done
# ${mullvad}/bin/mullvad auto-connect set on
# ${mullvad}/bin/mullvad tunnel set ipv6 on
# ${mullvad}/bin/mullvad connect
# '';
services.transmission = {
enable = true;
package = pkgs.transmission_4;
settings = {
download-dir = "/home/zack/dl";
};
};
# Bootloader.
boot.loader.systemd-boot.enable = lib.mkForce false;
boot.lanzaboote = {
enable = true;
pkiBundle = "/etc/secureboot";
};
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "earth"; # Define your hostname.
networking.networkmanager = {
enable = true;
unmanaged = ["enp6s0"];
# insertNameservers = ["1.1.1.1" "1.0.0.1"];
};
# networking.firewall.enable = false;
boot.kernelPackages = pkgs.linuxPackages_zen;
boot.supportedFilesystems = ["ntfs"];
services.minidlna = {
enable = true;
openFirewall = true;
settings = {
notify_interval = 60;
friendly_name = "ZACKPC";
media_dir = ["A,/home/zack/Music"];
inotify = "yes";
};
};
users.users.minidlna = {
extraGroups = ["users"];
};
# services.openssh = {
# enable = true;
# PasswordAuthentication = true;
# };
environment.systemPackages = with pkgs; [
alvr
BeatSaberModManager
sbctl
vesktop
mangohud
transmission_4
inputs.agenix.packages.${pkgs.system}.agenix
];
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.mkDriver {
version = "555.42.02";
sha256_64bit = "sha256-k7cI3ZDlKp4mT46jMkLaIrc2YUx1lh1wj/J4SVSHWyk=";
sha256_aarch64 = lib.fakeSha256;
openSha256 = "sha256-rtDxQjClJ+gyrCLvdZlT56YyHQ4sbaL+d5tL4L4VfkA=";
settingsSha256 = "sha256-rtDxQjClJ+gyrCLvdZlT56YyHQ4sbaL+d5tL4L4VfkA=";
persistencedSha256 = lib.fakeSha256;
};
hardware.nvidia = {
# Modesetting is required.
modesetting.enable = true;
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
# Enable this if you have graphical corruption issues or application crashes after waking
# up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead
# of just the bare essentials.
powerManagement.enable = false;
# Fine-grained power management. Turns off GPU when not in use.
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
powerManagement.finegrained = false;
# Use the NVidia open source kernel module (not to be confused with the
# independent third-party "nouveau" open source driver).
# Support is limited to the Turing and later architectures. Full list of
# supported GPUs is at:
# https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
# Only available from driver 515.43.04+
# Currently alpha-quality/buggy, so false is currently the recommended setting.
open = false;
# Enable the Nvidia settings menu,
# accessible via `nvidia-settings`.
nvidiaSettings = true;
# Optionally, you may need to select the appropriate driver version for your specific GPU.
# package = config.boot.kernelPackages.nvidiaPackages.beta;
};
# specialisation = {
# nvidiaProduction.configuration = {
# hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.production;
# environment.etc."specialisation".text = "nvidiaProduction";
# };
# nvidiaStable.configuration = {
# hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable;
# environment.etc."specialisation".text = "nvidiaStable";
# };
# nvidiaVulkanBeta.configuration = {
# hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.vulkan_beta;
# environment.etc."specialisation".text = "nvidiaVulkanBeta";
# };
# };
programs.zsh.enable = true;
# Define a user account. Don't forget to set a password with passwd.
users.users.zack = {
isNormalUser = true;
description = "zack";
extraGroups = ["networkmanager" "wheel" "docker" "libvirtd" "plugdev"];
shell = pkgs.zsh;
packages = with pkgs; [
firefox
kate
rio
telegram-desktop
kitty
];
};
catppuccin.enable = true;
home-manager = {
extraSpecialArgs = {inherit inputs;};
users = {
"zack" = {
imports = [../../modules/home-manager/zack.nix];
_module.args.theme = import ../../core/theme.nix;
home.username = "zack";
home.homeDirectory = "/home/zack";
};
};
};
programs.virt-manager.enable = true;
virtualisation.docker.enable = true;
virtualisation.libvirtd.enable = true;
}

View file

@ -1,23 +0,0 @@
{pkgs, ...}: {
services.xserver.videoDrivers = ["nvidia"];
environment.variables = {
GBM_BACKEND = "nvidia-drm";
WLR_NO_HARDWARE_CURSORS = "1";
LIBVA_DRIVER_NAME = "nvidia";
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
__NV_PRIME_RENDER_OFFLOAD = "1";
__VK_LAYER_NV_optimus = "NVIDIA_only";
NVD_BACKEND = "direct";
# __GL_GSYNC_ALLOWED = "1";
# __GL_VRR_ALLOWED = "1";
XWAYLAND_NO_GLAMOR = "1";
__GL_MaxFramesAllowed = "1";
};
environment.systemPackages = with pkgs; [
vulkan-loader
vulkan-validation-layers
vulkan-tools
];
}

View file

@ -1,70 +0,0 @@
{
config,
pkgs,
lib,
inputs,
...
}: {
imports = [
../common/default.nix
];
nixpkgs = {
hostPlatform = lib.mkDefault "x86_64-linux";
};
services = {
# qemuGuest.enable = true;
openssh.settings.PermitRootLogin = lib.mkForce "yes";
};
boot = {
supportedFilesystems = lib.mkForce ["btrfs" "reiserfs" "vfat" "f2fs" "xfs" "ntfs" "cifs"];
kernelPackages = pkgs.linuxPackages;
extraModulePackages = with config.boot.kernelPackages; [rtl8812au];
};
networking = {
hostName = "live";
};
# gnome power settings do not turn off screen
systemd = {
services.sshd.wantedBy = pkgs.lib.mkForce ["multi-user.target"];
targets = {
sleep.enable = false;
suspend.enable = false;
hibernate.enable = false;
hybrid-sleep.enable = false;
};
};
# Define a user account. Don't forget to set a password with passwd.
users.users.nixos = {
isNormalUser = true;
description = "nixos";
extraGroups = ["networkmanager" "wheel" "docker" "libvirtd" "plugdev"];
shell = pkgs.zsh;
packages = with pkgs; [
firefox
kate
rio
telegram-desktop
kitty
mailspring
# thunderbird
];
};
# home-manager.extraSpecialArgs = {inherit inputs;};
# home-manager.users.nixos = {
# imports = [../../modules/home-manager/default.nix];
# _module.args.theme = import ../../core/theme.nix;
#
# home.stateVersion = "23.11"; # Please read the comment before changing it.
#
# home.username = "nixos";
# home.homeDirectory = "/home/nixos";
# };
users.extraUsers.root.password = "nixos";
}

17
lib/module/default.nix Normal file
View file

@ -0,0 +1,17 @@
{lib, ...}:
with lib; rec {
mkOpt = type: default: description:
mkOption {inherit type default description;};
mkOpt' = type: default: mkOpt type default null;
mkBoolOpt = mkOpt types.bool;
mkStringOpt = mkOpt types.string;
mkBoolOpt' = mkOpt' types.bool;
enabled = {enable = true;};
disabled = {enable = false;};
}

View file

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 1.1 MiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 2.2 MiB

After

Width:  |  Height:  |  Size: 2.2 MiB

Before After
Before After

View file

@ -1,33 +0,0 @@
{
pkgs,
inputs,
...
}: {
home.packages = [
pkgs.gimp
pkgs.slack
pkgs.zoom-us
pkgs.elisa
pkgs.prismlauncher
pkgs.obs-studio
inputs.kb-gui.packages.${pkgs.system}.kb
pkgs.jetbrains.idea-community
pkgs.jetbrains.datagrip
pkgs.ungoogled-chromium
pkgs.thunderbird
pkgs.mongodb-compass
pkgs.postman
pkgs.mosh
pkgs.parsec-bin
pkgs.filezilla
pkgs.ghidra
pkgs.zed-editor
pkgs.openvpn
];
}

View file

@ -1,178 +0,0 @@
{
pkgs,
inputs,
lib,
...
}: let
spicePkgs = inputs.spicetify-nix.packages.${pkgs.system}.default;
in {
imports = [
./swayidle.nix
./vim/default.nix
./firefox.nix
../rice/ags
../rice/hyprland
# ../rice/sway
../rice/gtk.nix
../rice/kitty.nix
# ../rice/waybar
# ../rice/dunst.nix
../rice/anyrun
../rice/rio.nix
../rice/wofi.nix
../shell
inputs.spicetify-nix.homeManagerModule
inputs.catppuccin.homeManagerModules.catppuccin
];
nixpkgs = {
config = {
allowUnfree = true;
allowUnfreePredicate = _: true;
};
overlays = [
inputs.neovim-nightly-overlay.overlay
];
};
gtk.catppuccin.cursor.enable = false;
nix.gc = {
automatic = true;
frequency = "weekly";
options = "--delete-older-than 30d";
};
catppuccin.flavor = "mocha";
programs.spicetify = {
enable = true;
theme = spicePkgs.themes.catppuccin;
colorScheme = "mocha";
enabledExtensions = with spicePkgs.extensions; [
fullAppDisplay
shuffle # shuffle+ (special characters are sanitized out of ext names)
hidePodcasts
];
};
xdg.mimeApps.defaultApplications = {
"text/html" = "firefox.desktop";
"x-scheme-handler/http" = "firefox.desktop";
"x-scheme-handler/https" = "firefox.desktop";
"image/png" = "feh.desktop";
};
# This value determines the Home Manager release that your configuration is
# compatible with. This helps avoid breakage when a new Home Manager release
# introduces backwards incompatible changes.
#
# You should not change this value, even if you update Home Manager. If you do
# want to update the value, then make sure to first check the Home Manager
# release notes.
home.stateVersion = "23.11"; # Please read the comment before changing it.
home.packages = [
pkgs.wofi
pkgs.dconf
pkgs.wl-clipboard
pkgs.swaybg
pkgs.pavucontrol
pkgs.wlogout
pkgs.sway-audio-idle-inhibit
pkgs.grim
pkgs.slurp
pkgs.xfce.thunar
pkgs.feh
pkgs.nitch
pkgs.nix-output-monitor
pkgs.fastfetch
pkgs.nh
pkgs.dwl
pkgs.killall
(pkgs.writeShellScriptBin "rebuild" ''
#!${pkgs.bash}/bin/bash
set -e
pushd ~/nixos/
alejandra . &>/dev/null
git add .
echo "[REBUILD]: rebuilding nixos"
nh os switch
gen=$(nixos-rebuild list-generations | grep current)
git commit -am "$gen"
git push origin main
popd
'')
(pkgs.writeShellScriptBin "powermenu" ''
chosen=$(printf " Power Off\n Restart\n Suspend\n Lock\n󰍃 Log Out" | anyrun --plugins libstdin.so --show-results-immediately true)
case "$chosen" in
" Power Off") systemctl poweroff;;
" Restart") systemctl reboot;;
" Lock") swaylock;;
"󰍃 Log Out") hyprctl dispatch exit;;
*) exit 1 ;;
esac
'')
];
home.sessionVariables = {
EDITOR = "nvim";
};
xdg.enable = true;
programs.zoxide = {
enable = true;
enableZshIntegration = true;
options = ["--cmd cd"];
};
programs.cava = {
enable = true;
catppuccin.enable = true;
};
programs.btop = {
enable = true;
catppuccin.enable = true;
extraConfig = ''
update_ms = 100
vim_keys = true
'';
};
programs.lazygit = {
enable = true;
catppuccin.enable = true;
};
programs.fzf = {
enable = true;
catppuccin.enable = true;
};
systemd.user.services.xwaylandvideobridge = {
Unit = {
Description = "Tool to make it easy to stream wayland windows and screens to exisiting applications running under Xwayland";
};
Service = {
Type = "simple";
ExecStart = lib.getExe pkgs.xwaylandvideobridge;
Restart = "on-failure";
};
Install = {
WantedBy = ["default.target"];
};
};
# programs.nixvim = ./vim.nix;
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
}

View file

@ -1,234 +0,0 @@
{pkgs, ...}: let
lock-false = {
Value = false;
Status = "locked";
};
lock-true = {
Value = true;
Status = "locked";
};
in {
programs.firefox = {
enable = true;
package = pkgs.wrapFirefox pkgs.firefox-unwrapped {
extraPolicies = {
DisableTelemetry = true;
Preferences = {
"app.normandy.api_url" = {
Value = "";
Status = "locked";
};
"app.normandy.enabled" = lock-false;
"app.shield.optoutstudies.enabled" = lock-false;
"app.update.auto" = lock-false;
"beacon.enabled" = lock-false;
"breakpad.reportURL" = {
Value = "";
Status = "locked";
};
"browser.aboutConfig.showWarning" = lock-false;
"browser.cache.offline.enable" = lock-false;
"browser.crashReports.unsubmittedCheck.autoSubmit" = lock-false;
"browser.crashReports.unsubmittedCheck.autoSubmit2" = lock-false;
"browser.crashReports.unsubmittedCheck.enabled" = lock-false;
"browser.disableResetPrompt" = lock-true;
"browser.newtab.preload" = lock-false;
"browser.newtabpage.activity-stream.section.highlights.includePocket" = lock-false;
"browser.newtabpage.enhanced" = lock-false;
"browser.newtabpage.introShown" = lock-true;
"browser.newtabpage.activity-stream.showSponsoredTopSites" = lock-false;
"browser.newtabpage.activity-stream.showSponsored" = lock-false;
"browser.newtabpage.activity-stream.system.showSponsored" = lock-false;
"browser.safebrowsing.appRepURL" = {
Value = "";
Status = "locked";
};
"browser.safebrowsing.blockedURIs.enabled" = lock-false;
"browser.safebrowsing.downloads.enabled" = lock-false;
"browser.safebrowsing.downloads.remote.enabled" = lock-false;
"browser.safebrowsing.downloads.remote.url" = {
Value = "";
Status = "locked";
};
"browser.safebrowsing.enabled" = lock-false;
"browser.safebrowsing.malware.enabled" = lock-false;
"browser.safebrowsing.phishing.enabled" = lock-false;
"browser.selfsupport.url" = {
Value = "";
Status = "locked";
};
"browser.send_pings" = lock-false;
"browser.sessionstore.privacy_level" = {
Value = 0;
Status = "locked";
};
"browser.shell.checkDefaultBrowser" = lock-false;
"browser.startup.homepage_override.mstone" = {
Value = "ignore";
Status = "locked";
};
"browser.tabs.crashReporting.sendReport" = lock-false;
"browser.urlbar.groupLabels.enabled" = lock-false;
"browser.urlbar.quicksuggest.enabled" = lock-false;
"browser.urlbar.speculativeConnect.enabled" = lock-false;
"browser.urlbar.trimURLs" = lock-false;
"browser.urlbar.suggest.quicksuggest.sponsored" = lock-false;
"datareporting.healthreport.service.enabled" = lock-false;
"datareporting.healthreport.uploadEnabled" = lock-false;
"datareporting.policy.dataSubmissionEnabled" = lock-false;
"device.sensors.ambientLight.enabled" = lock-false;
"device.sensors.enabled" = lock-false;
"device.sensors.motion.enabled" = lock-false;
"device.sensors.orientation.enabled" = lock-false;
"device.sensors.proximity.enabled" = lock-false;
"dom.battery.enabled" = lock-false;
"dom.event.clipboardevents.enabled" = lock-false;
"dom.webaudio.enabled" = lock-false;
"experiments.activeExperiment" = lock-false;
"experiments.enabled" = lock-false;
"experiments.manifest.uri" = {
Value = "";
Status = "locked";
};
"experiments.supported" = lock-false;
"extensions.ClearURLs@kevinr.whiteList" = {
Value = "";
Status = "locked";
};
"extensions.Decentraleyes@ThomasRientjes.whiteList" = {
Value = "";
Status = "locked";
};
"extensions.FirefoxMulti-AccountContainers@mozilla.whiteList" = {
Value = "";
Status = "locked";
};
"extensions.TemporaryContainers@stoically.whiteList" = {
Value = "";
Status = "locked";
};
"extensions.autoDisableScopes" = 14;
"extensions.getAddons.cache.enabled" = lock-false;
"extensions.getAddons.showPane" = lock-false;
"extensions.greasemonkey.stats.optedin" = lock-false;
"extensions.greasemonkey.stats.url" = {
Value = "";
Status = "locked";
};
"extensions.pocket.enabled" = lock-false;
"extensions.shield-recipe-client.api_url" = {
Value = "";
Status = "locked";
};
"extensions.shield-recipe-client.enabled" = lock-false;
"extensions.webservice.discoverURL" = {
Value = "";
Status = "locked";
};
"media.autoplay.default" = {
Value = 0;
Status = "locked";
};
"media.autoplay.enabled" = lock-true;
"media.eme.enabled" = lock-false;
"media.gmp-widevinecdm.enabled" = lock-false;
"media.navigator.enabled" = lock-false;
"media.peerconnection.enabled" = lock-false;
"media.video_stats.enabled" = lock-false;
"network.IDN_show_punycode" = lock-true;
"network.allow-experiments" = lock-false;
"network.captive-portal-service.enabled" = lock-false;
"network.cookie.cookieBehavior" = {
Value = 1;
Status = "locked";
};
"network.dns.disablePrefetch" = lock-true;
"network.dns.disablePrefetchFromHTTPS" = lock-true;
"network.http.referer.spoofSource" = lock-true;
"network.http.speculative-parallel-limit" = {
Value = 0;
Status = "locked";
};
"network.predictor.enable-prefetch" = lock-false;
"network.predictor.enabled" = lock-false;
"network.prefetch-next" = lock-false;
"network.trr.mode" = {
Value = 5;
Status = "locked";
};
"privacy.donottrackheader.enabled" = lock-true;
"privacy.donottrackheader.value" = {
Value = 1;
Status = "locked";
};
"privacy.firstparty.isolate" = lock-true;
"privacy.query_stripping" = lock-true;
"privacy.trackingprotection.cryptomining.enabled" = lock-true;
"privacy.trackingprotection.enabled" = lock-true;
"privacy.trackingprotection.fingerprinting.enabled" = lock-true;
"privacy.trackingprotection.pbmode.enabled" = lock-true;
"privacy.usercontext.about_newtab_segregation.enabled" = lock-true;
"security.ssl.disable_session_identifiers" = lock-true;
"services.sync.prefs.sync.browser.newtabpage.activity-stream.showSponsoredTopSite" = lock-false;
"signon.autofillForms" = lock-false;
"toolkit.telemetry.archive.enabled" = lock-false;
"toolkit.telemetry.bhrPing.enabled" = lock-false;
"toolkit.telemetry.cachedClientID" = {
Value = "";
Status = "locked";
};
"toolkit.telemetry.enabled" = lock-false;
"toolkit.telemetry.firstShutdownPing.enabled" = lock-false;
"toolkit.telemetry.hybridContent.enabled" = lock-false;
"toolkit.telemetry.newProfilePing.enabled" = lock-false;
"toolkit.telemetry.prompted" = {
Value = 2;
Status = "locked";
};
"toolkit.telemetry.rejected" = lock-true;
"toolkit.telemetry.reportingpolicy.firstRun" = lock-false;
"toolkit.telemetry.server" = {
Value = "";
Status = "locked";
};
"toolkit.telemetry.shutdownPingSender.enabled" = lock-false;
"toolkit.telemetry.unified" = lock-false;
"toolkit.telemetry.unifiedIsOptIn" = lock-false;
"toolkit.telemetry.updatePing.enabled" = lock-false;
"webgl.renderer-string-override" = {
Value = " ";
Status = "locked";
};
"webgl.vendor-string-override" = {
Value = " ";
Status = "locked";
};
};
ExtensionSettings = with builtins; let
extension = shortId: uuid: {
name = uuid;
value = {
install_url = "https://addons.mozilla.org/en-US/firefox/downloads/latest/${shortId}/latest.xpi";
installation_mode = "normal_installed";
};
};
in
listToAttrs [
(extension "ublock-origin" "uBlock0@raymondhill.net")
(extension "privacy-badger17" "jid1-MnnxcxisBPnSXQ@jetpack")
(extension "1password-x-password-manager" "{d634138d-c276-4fc8-924b-40a0ea21d284}")
(extension "firefox-color" "FirefoxColor@mozilla.com")
(extension "multi-account-containers" "@testpilot-containers")
(extension "temporary-containers" "{c607c8df-14a7-4f28-894f-29e8722976af}")
(extension "styl-us" "{7a7a4a92-a2a0-41d1-9fd7-1e92480d612d}")
(extension "betterttv" "firefox@betterttv.net")
(extension "decentraleyes" "jid1-BoFifL9Vbdl2zQ@jetpack")
(extension "canvasblocker" "CanvasBlocker@kkapsner.de")
(extension "clearurls" "{74145f27-f039-47ce-a470-a662b129930a}")
];
};
};
};
}

View file

@ -1,86 +0,0 @@
{
pkgs,
lib,
config,
theme,
inputs,
...
}: let
suspendScript = pkgs.writeShellScript "suspend-script" ''
${pkgs.pipewire}/bin/pw-cli i all | ${pkgs.ripgrep}/bin/rg running
# only suspend if audio isn't running
if [ $? == 1 ]; then
${pkgs.systemd}/bin/systemctl suspend
fi
'';
in {
programs.swaylock = {
enable = true;
package = pkgs.swaylock-effects;
settings = with theme.colors; {
clock = true;
color = base;
font = "Work Sans";
image = "${theme.wallpaper}";
show-failed-attempts = false;
indicator = true;
indicator-radius = 200;
indicator-thickness = 20;
line-color = "00000000";
ring-color = "00000000";
inside-color = "00000000";
key-hl-color = "f2cdcd";
separator-color = "00000000";
text-color = text;
text-caps-lock-color = "";
line-ver-color = love;
ring-ver-color = rose;
inside-ver-color = base;
text-ver-color = text;
ring-wrong-color = foam;
text-wrong-color = foam;
inside-wrong-color = base;
inside-clear-color = base;
text-clear-color = text;
ring-clear-color = iris;
line-clear-color = base;
line-wrong-color = base;
bs-hl-color = foam;
line-uses-ring = false;
grace = 2;
grace-no-mouse = true;
grace-no-touch = true;
datestr = "%d.%m";
fade-in = "0.1";
ignore-empty-password = true;
};
};
systemd.user.services.hypridle = {
Unit = {
Description = "Idle Daemon for Hyprland";
};
Service = {
Type = "simple";
ExecStart = lib.getExe inputs.hypridle.packages.${pkgs.system}.hypridle;
Restart = "on-failure";
};
Install = {
WantedBy = ["hyprland-session.target"];
};
};
xdg.configFile."hypr/hypridle.conf".text = ''
general {
lock_cmd = ${pkgs.swaylock-effects}/bin/swaylock -fF
before_sleep_cmd = ${pkgs.swaylock-effects}/bin/swaylock -fF # command ran before sleep
ignore_dbus_inhibit = false # whether to ignore dbus-sent idle-inhibit requests (used by e.g. firefox or steam)
}
listener {
timeout = 300 # in seconds
on-timeout = ${config.wayland.windowManager.hyprland.package}/bin/hyprctl dispatch dpms off
on-resume = ${config.wayland.windowManager.hyprland.package}/bin/hyprctl dispatch dpms on
}
'';
}

View file

@ -1,7 +0,0 @@
return {
"IogaMaster/neocord",
event = "VeryLazy",
opts = {
-- log_level = "debug",
},
}

View file

@ -1,88 +0,0 @@
{
config,
pkgs,
lib,
inputs,
...
}: let
nvimDir = "/home/${config.home.username}/nixos/modules/home-manager/vim";
in {
programs.neovim = {
enable = true;
defaultEditor = true;
extraPackages = with pkgs; [
# Formatters
alejandra # Nix
black # Python
prettierd # Multi-language
shfmt
isort
stylua
# LSP
lua-language-server
nixd
rust-analyzer
nodePackages.bash-language-server
vscode-langservers-extracted
nodePackages.vscode-json-languageserver
nodePackages.typescript-language-server
tailwindcss-language-server
# Tools
git
html-tidy
cmake
fzf
charm-freeze
gcc
gnumake
nodejs
fswatch # File watcher utility, replacing libuv.fs_event for neovim 10.0
sqlite
postgresql
mongosh
gerbera
vscode-extensions.vadimcn.vscode-lldb.adapter
];
plugins = [
pkgs.vimPlugins.lazy-nvim # All other plugins are managed by lazy-nvim
];
extraLuaPackages = with pkgs; [
lua51Packages.lua-curl
lua51Packages.nvim-nio
lua51Packages.xml2lua
lua51Packages.mimetypes
];
};
xdg.configFile = {
# Raw symlink to the plugin manager lock file, so that it stays writeable
"nvim/lazy-lock.json".source = config.lib.file.mkOutOfStoreSymlink "${nvimDir}/lazy-lock.json";
"nvim" = {
source = ./config;
recursive = true;
};
};
home.activation.neovim = lib.hm.dag.entryAfter ["linkGeneration"] ''
#! /bin/bash
NVIM_WRAPPER=~/.nix-profile/bin/nvim
STATE_DIR=~/.local/state/nix/
STATE_FILE=$STATE_DIR/lazy-lock-checksum
LOCK_FILE=~/.config/nvim/lazy-lock.json
HASH=$(nix-hash --flat $LOCK_FILE)
CURL_DIR=${pkgs.curl}
[ ! -d $STATE_DIR ] && mkdir -p $STATE_DIR
[ ! -f $STATE_FILE ] && touch $STATE_FILE
if [ "$(cat $STATE_FILE)" != "$HASH" ]; then
echo "Syncing neovim plugins"
PATH="$PATH:${pkgs.git}/bin" $DRY_RUN_CMD $NVIM_WRAPPER --headless "+Lazy! restore" +qa
$DRY_RUN_CMD echo $HASH >$STATE_FILE
else
$VERBOSE_ECHO "Neovim plugins already synced, skipping"
fi
'';
}

View file

@ -1,30 +0,0 @@
{
inputs,
pkgs,
lib,
...
}: {
imports = [./default.nix ./applications.nix];
services = {
udiskie.enable = true;
gpg-agent = {
enable = true;
pinentryPackage = lib.mkForce pkgs.pinentry-gnome3;
enableSshSupport = true;
enableZshIntegration = true;
};
};
systemd.user.services.kb-gui = {
Unit = {
Description = "KB Time/Date thing";
};
Install = {
WantedBy = ["default.target"];
};
Service = {
ExecStart = "${inputs.kb-gui.packages.${pkgs.system}.kb}/bin/kb";
};
};
}

View file

@ -0,0 +1,73 @@
{
options,
config,
lib,
inputs,
pkgs,
...
}:
with lib;
with lib.custom; let
cfg = config.apps.helpers.ags;
requiredDeps = with pkgs; [
config.wayland.windowManager.hyprland.package
bash
coreutils
gawk
sassc
imagemagick
procps
ripgrep
util-linux
gtksourceview
webkitgtk
brightnessctl
gvfs
accountsservice
swww
gnome.gnome-control-center
gnome.nautilus
gnome.totem
loupe
];
guiDeps = with pkgs; [
gnome.gnome-control-center
mission-center
overskride
wlogout
];
dependencies = requiredDeps ++ guiDeps;
in {
options.apps.helpers.ags = with types; {
enable = mkBoolOpt false "Enable AGS";
};
config = mkIf cfg.enable {
programs.ags = {
enable = true;
configDir = ./cfg;
extraPackages = dependencies;
};
systemd.user.services.ags = {
Unit = {
Description = "Aylur's Gtk Shell";
PartOf = [
"tray.target"
"graphical-session.target"
];
};
Service = {
Environment = "PATH=/run/wrappers/bin:${lib.makeBinPath dependencies}";
ExecStart = "${config.programs.ags.package}/bin/ags";
Restart = "on-failure";
};
Install.WantedBy = ["graphical-session.target"];
};
};
}

View file

@ -0,0 +1,113 @@
{
options,
config,
lib,
inputs,
pkgs,
...
}:
with lib;
with lib.custom; let
cfg = config.apps.helpers.anyrun;
in {
options.apps.helpers.anyrun = with types; {
enable = mkBoolOpt false "Enable Anyrun";
};
config = mkIf cfg.enable {
programs.anyrun = {
enable = true;
config = {
plugins = [
inputs.anyrun.packages.${pkgs.system}.applications
inputs.anyrun.packages.${pkgs.system}.shell
inputs.anyrun.packages.${pkgs.system}.websearch
inputs.anyrun.packages.${pkgs.system}.rink
inputs.anyrun.packages.${pkgs.system}.stdin
];
x = {fraction = 0.5;};
y = {absolute = 0;};
hideIcons = false;
ignoreExclusiveZones = false;
layer = "overlay";
hidePluginInfo = true;
closeOnClick = true;
showResultsImmediately = false;
maxEntries = null;
};
extraCss = ''
*{
all: unset;
color: #cdd6f4;
font-family: "JetBrainsMono Nerd Font";
font-weight: bold;
}
#window{
background-color: transparent;
}
#entry{
background-color: #1e1e2e;
border-radius: 15px;
border: 3px solid #11111b;
font-size: 16px;
margin-top: 10px;
padding: 1px 15px;
}
#match {
margin-bottom: 2px;
margin-top: 2px;
padding: 1px 15px;
}
#match-desc{
color: #bac2de;
font-size: 12px;
font-weight: normal;
}
#match:selected {
background: #313244;
border-radius: 15px;
}
#plugin{
background-color: #1e1e2e;
border-radius: 15px;
border: 3px solid #11111b;
margin-top:10px;
padding: 10px 1px;
}
#plugin > *{
all:unset;
}
'';
extraConfigFiles."applications.ron".text = ''
Config(
desktop_actions: false,
max_entries: 5,
terminal: Some("Kitty"),
)
'';
extraConfigFiles."shell.ron".text = ''
Config(
prefix: ">",
)
'';
extraConfigFiles."websearch.ron".text = ''
Config(
prefix: "",
// Options: Google, Ecosia, Bing, DuckDuckGo, Custom
//
// Custom engines can be defined as such:
// Custom(
// name: "Searx",
// url: "searx.be/?q={}",
// )
//
// NOTE: `{}` is replaced by the search query and `https://` is automatically added in front.
engines: [DuckDuckGo]
)
'';
};
};
}

View file

@ -0,0 +1,31 @@
{
options,
config,
lib,
inputs,
system,
...
}:
with lib;
with lib.custom; let
cfg = config.apps.music.spotify;
spicePkgs = inputs.spicetify-nix.packages.${system}.default;
in {
options.apps.music.spotify = with types; {
enable = mkBoolOpt false "Enable Spotify";
};
config = mkIf cfg.enable {
programs.spicetify = {
enable = true;
theme = spicePkgs.themes.catppuccin;
colorScheme = "mocha";
enabledExtensions = with spicePkgs.extensions; [
fullAppDisplay
shuffle # shuffle+ (special characters are sanitized out of ext names)
hidePodcasts
];
};
};
}

View file

@ -0,0 +1,37 @@
{
options,
config,
lib,
...
}:
with lib;
with lib.custom; let
cfg = config.apps.term.kitty;
in {
options.apps.term.kitty = with types; {
enable = mkBoolOpt false "Enable Kitty Term";
};
config = mkIf cfg.enable {
programs.kitty = {
enable = true;
font = {
name = "Iosevka Term SemiBold";
size = 14;
};
extraConfig = ''
bold_font Iosevk Term Heavy
italic_font Iosevka Term SemiBold Italic
bold_italic_font Iosevka Term Heavy Italic
'';
catppuccin.enable = true;
settings = {
window_padding_width = 12;
background_opacity = "0.8";
};
};
};
}

View file

@ -0,0 +1,27 @@
{
options,
config,
lib,
pkgs,
...
}:
with lib;
with lib.custom; let
cfg = config.apps.tools.bat;
in {
options.apps.tools.bat = with types; {
enable = mkBoolOpt false "Enable Bat";
};
config = mkIf cfg.enable {
programs.bat = {
enable = true;
catppuccin.enable = true;
config = {
pager = "less -FR";
};
};
};
}

View file

@ -0,0 +1,27 @@
{
options,
config,
lib,
pkgs,
...
}:
with lib;
with lib.custom; let
cfg = config.apps.tools.direnv;
in {
options.apps.tools.direnv = with types; {
enable = mkBoolOpt false "Enable Direnv";
};
config = mkIf cfg.enable {
programs = {
direnv = {
enable = true;
nix-direnv.enable = true;
};
};
home.sessionVariables = {
DIRENV_LOG_FORMAT = "";
};
};
}

View file

@ -0,0 +1,92 @@
{
options,
config,
lib,
pkgs,
...
}:
with lib;
with lib.custom; let
cfg = config.apps.tools.git;
in {
options.apps.tools.git = with types; {
enable = mkBoolOpt false "Enable Git Integration";
signByDefault = mkBoolOpt true "Sign by default";
signingKey = mkStringOpt "5B53E53A9A514DBA" "The KeyID of your GPG signingKey";
};
config = mkIf cfg.enable {
home.packages = with pkgs; [zsh-forgit gitflow];
programs.git = {
enable = true;
userName = "zack";
userEmail = "zackmyers@lavabit.com";
ignores = [
".cache/"
".DS_Store"
".idea/"
"*.swp"
"*.elc"
"auto-save-list"
".direnv/"
"node_modules"
"result"
"result-*"
];
signing = {
key = cfg.signingKey;
signByDefault = cfg.signByDefault;
};
extraConfig = {
init = {defaultBranch = "main";};
delta = {
options.map-styles = "bold purple => syntax #ca9ee6, bold cyan => syntax #8caaee";
line-numbers = true;
};
branch.autosetupmerge = "true";
push.default = "current";
merge.stat = "true";
core.whitespace = "fix,-indent-with-non-tab,trailing-space,cr-at-eol";
repack.usedeltabaseoffset = "true";
pull.ff = "only";
rebase = {
autoSquash = true;
autoStash = true;
};
rerere = {
autoupdate = true;
enabled = true;
};
};
lfs.enable = true;
delta.enable = true;
aliases = {
essa = "push --force";
co = "checkout";
fuck = "commit --amend -m";
c = "commit -m";
ca = "commit -am";
forgor = "commit --amend --no-edit";
graph = "log --all --decorate --graph --oneline";
oops = "checkout --";
l = "log";
r = "rebase";
s = "status --short";
ss = "status";
d = "diff";
ps = "!git push origin $(git rev-parse --abbrev-ref HEAD)";
pl = "!git pull origin $(git rev-parse --abbrev-ref HEAD)";
af = "!git add $(git ls-files -m -o --exclude-standard | sk -m)";
st = "status";
br = "branch";
df = "!git hist | peco | awk '{print $2}' | xargs -I {} git diff {}^ {}";
hist = ''
log --pretty=format:"%Cgreen%h %Creset%cd %Cblue[%cn] %Creset%s%C(yellow)%d%C(reset)" --graph --date=relative --decorate --all'';
llog = ''
log --graph --name-status --pretty=format:"%C(red)%h %C(reset)(%cd) %C(green)%an %Creset%s %C(yellow)%d%Creset" --date=relative'';
edit-unmerged = "!f() { git ls-files --unmerged | cut -f2 | sort -u ; }; hx `f`";
};
};
};
}

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