treewide: more refactor changes

This commit is contained in:
notohh 2024-04-17 14:53:48 -04:00
parent 48d8c3eb87
commit 253dd58346
Signed by: notohh
GPG key ID: BD47506D475EE86D
44 changed files with 257 additions and 214 deletions

View file

@ -1,5 +1,5 @@
{
"yaml.schemas": {
"https://raw.githubusercontent.com/woodpecker-ci/woodpecker/main/pipeline/frontend/yaml/linter/schema/schema.json": "file:///home/notoh/snowflake/.woodpecker"
}
}
"yaml.schemas": {
"https://raw.githubusercontent.com/woodpecker-ci/woodpecker/main/pipeline/frontend/yaml/linter/schema/schema.json": "file:///home/notoh/snowflake/.woodpecker"
}
}

View file

@ -1,51 +1,6 @@
{
description = "snowflake";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
hyprland.url = "github:hyprwm/Hyprland";
ags.url = "github:Aylur/ags";
nix-gaming.url = "github:fufexan/nix-gaming";
attic.url = "github:zhaofengli/attic";
nur.url = "github:nix-community/NUR";
yazi.url = "github:sxyazi/yazi";
helix.url = "github:helix-editor/helix";
pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix";
wezterm.url = "github:notohh/wezterm?dir=nix&ref=nix-add-overlay";
hypridle.url = "github:hyprwm/hypridle";
hyprlock.url = "github:hyprwm/hyprlock";
hyprpicker.url = "github:hyprwm/hyprpicker";
hyprcursor.url = "github:hyprwm/hyprcursor";
xdg-portal-hyprland.url = "github:hyprwm/xdg-desktop-portal-hyprland";
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
atuin.url = "github:atuinsh/atuin";
flake-parts.url = "github:hercules-ci/flake-parts";
hyprland-plugins = {
url = "github:hyprwm/hyprland-plugins";
inputs.hyprland.follows = "hyprland";
};
deploy-rs = {
url = "github:serokell/deploy-rs";
inputs.nixpkgs.follows = "nixpkgs";
};
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-index-database = {
url = "github:Mic92/nix-index-database";
inputs.nixpkgs.follows = "nixpkgs";
};
anyrun = {
url = "github:Kirottu/anyrun";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs:
inputs.flake-parts.lib.mkFlake {inherit inputs;} {
imports = [
@ -66,7 +21,6 @@
excludes = ["flake.lock"];
hooks = {
stylua.enable = true;
eslint.enable = true;
statix.enable = true;
alejandra.enable = true;
deadnix = {
@ -76,6 +30,9 @@
prettier = {
enable = true;
files = "\\.(js|ts|md|json)$";
settings = {
trailing-comma = "none";
};
};
};
};
@ -94,4 +51,51 @@
formatter = pkgs.alejandra;
};
};
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
hyprland.url = "github:hyprwm/Hyprland";
hypridle.url = "github:hyprwm/hypridle";
hyprlock.url = "github:hyprwm/hyprlock";
hyprpicker.url = "github:hyprwm/hyprpicker";
hyprcursor.url = "github:hyprwm/hyprcursor";
xdg-portal-hyprland.url = "github:hyprwm/xdg-desktop-portal-hyprland";
hyprland-plugins = {
url = "github:hyprwm/hyprland-plugins";
inputs.hyprland.follows = "hyprland";
};
ags.url = "github:Aylur/ags";
nix-gaming.url = "github:fufexan/nix-gaming";
attic.url = "github:zhaofengli/attic";
nur.url = "github:nix-community/NUR";
yazi.url = "github:sxyazi/yazi";
helix.url = "github:helix-editor/helix";
pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix";
wezterm.url = "github:notohh/wezterm?dir=nix&ref=nix-add-overlay";
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
atuin.url = "github:atuinsh/atuin";
flake-parts.url = "github:hercules-ci/flake-parts";
deploy-rs = {
url = "github:serokell/deploy-rs";
inputs.nixpkgs.follows = "nixpkgs";
};
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-index-database = {
url = "github:Mic92/nix-index-database";
inputs.nixpkgs.follows = "nixpkgs";
};
anyrun = {
url = "github:Kirottu/anyrun";
inputs.nixpkgs.follows = "nixpkgs";
};
};
}

View file

@ -1,10 +1,45 @@
{inputs, ...}: {
{pkgs, ...}: {
systemd.user.startServices = "sd-switch";
programs.home-manager.enable = true;
imports = [
./programs/editors/helix
./programs/terminal/lazygit
./programs/terminal/neofetch
./programs/terminal/nushell
./programs/terminal/yazi
./programs/terminal/atuin.nix
./programs/terminal/bat.nix
./programs/terminal/starship.nix
./programs/terminal/zoxide.nix
./programs/direnv.nix
./programs/git.nix
];
home = {
username = "notoh";
homeDirectory = "/home/notoh";
packages = with pkgs; [
wget
croc
eza
eva
fd
du-dust
bottom
gnupg
ripgrep
lazydocker
yt-dlp
nfs-utils
dig
tailspin
nitch
unzip
unrar
p7zip
procs
];
stateVersion = "23.05";
};
}

View file

@ -1,10 +1,28 @@
{pkgs, ...}: {
{
inputs,
pkgs,
...
}: {
imports = [
../common.nix
inputs.hyprland.homeManagerModules.default
inputs.anyrun.homeManagerModules.default
inputs.ags.homeManagerModules.default
inputs.nix-index-database.hmModules.nix-index
../../services
../../programs/ags
../../programs/anyrun
../../programs/browsers/firefox
../../programs/browsers/chromium
../../programs/terminal/wezterm
../../programs/terminal/zellij
../../programs/gtk.nix
../../programs/media/cava.nix
../../programs/mako.nix
../../programs/media/spotify-player.nix
../../programs/media/zathura.nix
];
home.packages = with pkgs; [
chromium
discord
pavucontrol
imv
@ -20,7 +38,7 @@
wl-clipboard
swww
hyprpicker
(libsForQt5.callPackage ../../pkgs/chatterino7 {})
(libsForQt5.callPackage ../../../pkgs/chatterino7 {})
];
programs.ssh = {
enable = true;

View file

@ -1,37 +0,0 @@
{pkgs, ...}: {
imports = [
../programs/helix
../programs/lazygit
../programs/neofetch
../programs/nushell
../programs/yazi
../programs/atuin.nix
../programs/bat.nix
../programs/direnv.nix
../programs/git.nix
../programs/starship.nix
../programs/zoxide.nix
];
home.packages = with pkgs; [
wget
croc
eza
eva
fd
du-dust
bottom
gnupg
ripgrep
lazydocker
yt-dlp
nfs-utils
dig
tailspin
nitch
unzip
unrar
p7zip
procs
];
}

View file

@ -1,5 +1,4 @@
{
imports = [
../common.nix
];
}

View file

@ -10,25 +10,24 @@
inputs.hypridle.homeManagerModules.default
inputs.hyprlock.homeManagerModules.default
inputs.nix-index-database.hmModules.nix-index
../common.nix
../../services
../../programs/ags
../../programs/anyrun
../../programs/firefox
../../programs/wezterm
../../programs/zellij
../../programs/browsers/firefox
../../programs/browsers/chromium
../../programs/terminal/wezterm
../../programs/terminal/zellij
../../programs/gtk.nix
../../programs/cava.nix
../../programs/media/cava.nix
../../programs/mako.nix
../../programs/spotify-player.nix
../../programs/zathura.nix
../../programs/media/spotify-player.nix
../../programs/media/zathura.nix
../../wayland/hyprland
../../wayland/services/hypridle.nix
../../wayland/programs/hyprlock.nix
];
home.packages = with pkgs; [
chromium
discord
signal-desktop
thunderbird

View file

@ -19,5 +19,5 @@ export {
SystemTray,
Utils,
Variable,
Widget,
Widget
};

View file

@ -2,8 +2,7 @@ import { Widget } from "../../../import.js";
const nixosLogo = () =>
Widget.Icon({
icon:
"/home/notoh/snowflake/home/ags/config/js/widgets/images/static/nixos.png",
icon: "/home/notoh/snowflake/home/ags/config/js/widgets/images/static/nixos.png"
});
export { nixosLogo };

View file

@ -3,7 +3,7 @@
config,
...
}: let
configDir = "/home/notoh/snowflake/homeo/programs/ags/config";
configDir = "/home/notoh/snowflake/home/programs/ags/config";
in {
programs.ags = {
enable = true;

View file

@ -0,0 +1,5 @@
_: {
programs.chromium = {
enable = true;
};
}

View file

@ -0,0 +1,3 @@
{
"trailingComma": "none"
}

View file

@ -12,11 +12,11 @@
* "Ad meliora" *
* version: 119 *
* url: https://github.com/yokoffing/Betterfox *
****************************************************************************/
****************************************************************************/
/****************************************************************************
* SECTION: FASTFOX *
****************************************************************************/
****************************************************************************/
/** GENERAL ***/
user_pref("content.notify.interval", 100000);
@ -60,11 +60,17 @@ user_pref("dom.security.sanitizer.enabled", true);
/****************************************************************************
* SECTION: SECUREFOX *
****************************************************************************/
****************************************************************************/
/** TRACKING PROTECTION ***/
user_pref("browser.contentblocking.category", "strict");
user_pref("urlclassifier.trackingSkipURLs", "*.reddit.com, *.twitter.com, *.twimg.com, *.tiktok.com");
user_pref("urlclassifier.features.socialtracking.skipURLs", "*.instagram.com, *.twitter.com, *.twimg.com");
user_pref(
"urlclassifier.trackingSkipURLs",
"*.reddit.com, *.twitter.com, *.twimg.com, *.tiktok.com"
);
user_pref(
"urlclassifier.features.socialtracking.skipURLs",
"*.instagram.com, *.twitter.com, *.twimg.com"
);
user_pref("network.cookie.sameSite.noneRequiresSecure", true);
user_pref("browser.download.start_downloads_in_tmp_dir", true);
user_pref("browser.helperApps.deleteTempFileOnExit", true);
@ -137,7 +143,10 @@ user_pref("browser.safebrowsing.downloads.remote.enabled", false);
/** MOZILLA ***/
user_pref("permissions.default.desktop-notification", 2);
user_pref("permissions.default.geo", 2);
user_pref("geo.provider.network.url", "https://location.services.mozilla.com/v1/geolocate?key=%MOZILLA_API_KEY%");
user_pref(
"geo.provider.network.url",
"https://location.services.mozilla.com/v1/geolocate?key=%MOZILLA_API_KEY%"
);
user_pref("permissions.manager.defaultsUrl", "");
user_pref("webchannel.allowObject.urlWhitelist", "");
@ -177,15 +186,21 @@ user_pref("network.connectivity-service.enabled", false);
/****************************************************************************
* SECTION: PESKYFOX *
****************************************************************************/
****************************************************************************/
/** MOZILLA UI ***/
user_pref("browser.privatebrowsing.vpnpromourl", "");
user_pref("extensions.getAddons.showPane", false);
user_pref("extensions.htmlaboutaddons.recommendations.enabled", false);
user_pref("browser.discovery.enabled", false);
user_pref("browser.shell.checkDefaultBrowser", false);
user_pref("browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons", false);
user_pref("browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features", false);
user_pref(
"browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons",
false
);
user_pref(
"browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features",
false
);
user_pref("browser.preferences.moreFromMozilla", false);
user_pref("browser.tabs.tabmanager.enabled", false);
user_pref("browser.aboutConfig.showWarning", false);
@ -239,17 +254,17 @@ user_pref("layout.word_select.eat_space_to_next_word", false);
/****************************************************************************
* START: MY OVERRIDES *
****************************************************************************/
****************************************************************************/
// visit https://github.com/yokoffing/Betterfox/wiki/Common-Overrides
// visit https://github.com/yokoffing/Betterfox/wiki/Optional-Hardening
// Enter your personal overrides below this line:
/****************************************************************************
* SECTION: SMOOTHFOX *
****************************************************************************/
****************************************************************************/
// visit https://github.com/yokoffing/Betterfox/blob/main/Smoothfox.js
// Enter your scrolling overrides below this line:
/****************************************************************************
* END: BETTERFOX *
****************************************************************************/
****************************************************************************/

View file

@ -1,4 +1,4 @@
{pkgs, ...}: {
_: {
programs = {
git = {
enable = true;

View file

@ -32,6 +32,25 @@
}
];
};
ame = nixosSystem {
inherit specialArgs;
modules = [
./ame
sopsModule
hmModule
t480Module
{
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = specialArgs;
users.notoh = {
imports = homeImports."notoh@ame";
};
};
}
];
};
sakura = nixosSystem {
inherit specialArgs;
modules = [
@ -86,25 +105,6 @@
}
];
};
ame = nixosSystem {
inherit specialArgs;
modules = [
./ame
sopsModule
hmModule
t480Module
{
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = specialArgs;
users.notoh = {
imports = homeImports."notoh@ame";
};
};
}
];
};
arashi = nixosSystem {
inherit specialArgs;
modules = [

View file

@ -1,87 +1,85 @@
{inputs, ...}: {
flake = {
deploy = {
nodes = with inputs.deploy-rs.lib.x86_64-linux; {
sakura = {
hostname = "100.121.201.47";
profiles.system = {
user = "root";
path = activate.nixos inputs.self.nixosConfigurations.sakura;
};
sshUser = "root";
sshOpts = ["-t" "-i" "~/.ssh/forgejo"];
magicRollback = true;
flake.deploy = {
nodes = with inputs.deploy-rs.lib.x86_64-linux; {
sakura = {
hostname = "100.121.201.47";
profiles.system = {
user = "root";
path = activate.nixos inputs.self.nixosConfigurations.sakura;
};
kariru = {
hostname = "100.126.229.95";
profiles.system = {
user = "root";
path = activate.nixos inputs.self.nixosConfigurations.kariru;
};
sshUser = "root";
sshOpts = ["-t" "-i" "~/.ssh/forgejo"];
magicRollback = true;
sshUser = "root";
sshOpts = ["-t" "-i" "~/.ssh/forgejo"];
magicRollback = true;
};
kariru = {
hostname = "100.126.229.95";
profiles.system = {
user = "root";
path = activate.nixos inputs.self.nixosConfigurations.kariru;
};
yuki = {
hostname = "100.108.113.89";
profiles.system = {
user = "root";
path = activate.nixos inputs.self.nixosConfigurations.yuki;
};
sshUser = "root";
sshOpts = ["-t" "-i" "~/.ssh/forgejo"];
magicRollback = true;
sshUser = "root";
sshOpts = ["-t" "-i" "~/.ssh/forgejo"];
magicRollback = true;
};
yuki = {
hostname = "100.108.113.89";
profiles.system = {
user = "root";
path = activate.nixos inputs.self.nixosConfigurations.yuki;
};
arashi = {
hostname = "100.94.214.100";
profiles.system = {
user = "root";
path = activate.nixos inputs.self.nixosConfigurations.arashi;
};
sshUser = "root";
sshOpts = ["-t" "-i" "~/.ssh/forgejo"];
magicRollback = true;
sshUser = "root";
sshOpts = ["-t" "-i" "~/.ssh/forgejo"];
magicRollback = true;
};
arashi = {
hostname = "100.94.214.100";
profiles.system = {
user = "root";
path = activate.nixos inputs.self.nixosConfigurations.arashi;
};
sora = {
hostname = "100.104.42.96";
profiles.system = {
user = "root";
path = activate.nixos inputs.self.nixosConfigurations.sora;
};
sshUser = "root";
sshOpts = ["-t" "-i" "~/.ssh/forgejo"];
magicRollback = true;
sshUser = "root";
sshOpts = ["-t" "-i" "~/.ssh/forgejo"];
magicRollback = true;
};
sora = {
hostname = "100.104.42.96";
profiles.system = {
user = "root";
path = activate.nixos inputs.self.nixosConfigurations.sora;
};
tsuru = {
hostname = "100.82.146.40";
profiles.system = {
user = "root";
path = activate.nixos inputs.self.nixosConfigurations.tsuru;
};
sshUser = "root";
sshOpts = ["-t" "-i" "~/.ssh/forgejo"];
magicRollback = true;
sshUser = "root";
sshOpts = ["-t" "-i" "~/.ssh/forgejo"];
magicRollback = true;
};
tsuru = {
hostname = "100.82.146.40";
profiles.system = {
user = "root";
path = activate.nixos inputs.self.nixosConfigurations.tsuru;
};
haru = {
hostname = "100.73.192.45";
profiles.system = {
user = "root";
path = activate.nixos inputs.self.nixosConfigurations.haru;
};
sshUser = "root";
sshOpts = ["-t" "-i" "~/.ssh/forgejo"];
magicRollback = true;
sshUser = "root";
sshOpts = ["-t" "-i" "~/.ssh/forgejo"];
magicRollback = true;
};
haru = {
hostname = "100.73.192.45";
profiles.system = {
user = "root";
path = activate.nixos inputs.self.nixosConfigurations.haru;
};
kaze = {
hostname = "100.69.79.81";
profiles.system = {
user = "root";
path = activate.nixos inputs.self.nixosConfigurations.kaze;
};
sshUser = "root";
sshOpts = ["-t" "-i" "~/.ssh/forgejo"];
magicRollback = true;
sshUser = "root";
sshOpts = ["-t" "-i" "~/.ssh/forgejo"];
magicRollback = true;
};
kaze = {
hostname = "100.69.79.81";
profiles.system = {
user = "root";
path = activate.nixos inputs.self.nixosConfigurations.kaze;
};
sshUser = "root";
sshOpts = ["-t" "-i" "~/.ssh/forgejo"];
magicRollback = true;
};
};
};

View file

@ -1,4 +1,8 @@
{modulesPath, ...}: {
{
modulesPath,
lib,
...
}: {
imports = [(modulesPath + "/profiles/qemu-guest.nix")];
zramSwap.enable = true;
@ -26,4 +30,5 @@
fsType = "vfat";
};
};
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}

View file

@ -1,4 +1,4 @@
{inputs, ...}: {
_: {
imports = [
./prometheus.nix
./security.nix