thelio76: firefox and refactor
This commit is contained in:
parent
d2e3f47366
commit
448bf425c3
39
flake.lock
39
flake.lock
|
@ -22,6 +22,44 @@
|
|||
"url": "https://git.atauno.com/atau/atau-nixpkgs"
|
||||
}
|
||||
},
|
||||
"firefox-addons": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"dir": "pkgs/firefox-addons",
|
||||
"lastModified": 1721859466,
|
||||
"narHash": "sha256-SDLXa2YZiQpsgxPJanbsBETI9LWEHaw+ZgCn0Jb2/HI=",
|
||||
"owner": "rycee",
|
||||
"repo": "nur-expressions",
|
||||
"rev": "e37c395b486aa4fde1dbffd57de6ed5c22eb6495",
|
||||
"type": "gitlab"
|
||||
},
|
||||
"original": {
|
||||
"dir": "pkgs/firefox-addons",
|
||||
"owner": "rycee",
|
||||
"repo": "nur-expressions",
|
||||
"type": "gitlab"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"locked": {
|
||||
"lastModified": 1629284811,
|
||||
"narHash": "sha256-JHgasjPR0/J1J3DRm4KxM4zTyAj4IOJY8vIl75v/kPI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "c5d161cc0af116a2e17f54316f0bf43f0819785c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
@ -61,6 +99,7 @@
|
|||
"root": {
|
||||
"inputs": {
|
||||
"atau-nixpkgs": "atau-nixpkgs",
|
||||
"firefox-addons": "firefox-addons",
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
|
|
50
flake.nix
50
flake.nix
|
@ -1,28 +1,31 @@
|
|||
{
|
||||
description = "Alex's super mega awesome nixos config";
|
||||
|
||||
# A flake's inputs specify the dependencies that get pulled in. Each input is pinned to a specific version (the git commit) of that dependency.
|
||||
inputs = {
|
||||
nixpkgs.url = github:NixOS/nixpkgs/nixos-unstable;
|
||||
# unstable.url = "nixpkgs/nixos-unstable";
|
||||
|
||||
atau-nixpkgs.url = "git+https://git.atauno.com/atau/atau-nixpkgs?ref=main&rev=1e72f4b1e9b7a2991e3ccdebbe75d312f016da3b";
|
||||
atau-nixpkgs.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
home-manager.url = "github:nix-community/home-manager";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs"; # This flake also takes in nixpkgs as its own input, so we can override it here to ensure the same pkgs are used!
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, home-manager, ... }@attrs:
|
||||
# let
|
||||
# # system = "x86_64-linux";
|
||||
# # pkgs = import nixpkgs {
|
||||
# # # inherit system;
|
||||
# # config.allowUnfree = true;
|
||||
# # overlays = [ atau-nixpkgs.overlays.default ];
|
||||
# # };
|
||||
# in
|
||||
firefox-addons = {
|
||||
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
atau-nixpkgs = {
|
||||
url = "git+https://git.atauno.com/atau/atau-nixpkgs?ref=main&rev=1e72f4b1e9b7a2991e3ccdebbe75d312f016da3b";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, home-manager, firefox-addons, ... }@attrs:
|
||||
{
|
||||
nixosConfigurations.nixos76 = nixpkgs.lib.nixosSystem {
|
||||
nixosConfigurations = {
|
||||
## ---- personal computers (linux) ----
|
||||
nixos76 = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./nixos76/system/configuration.nix
|
||||
|
@ -37,7 +40,7 @@
|
|||
}
|
||||
];
|
||||
};
|
||||
nixosConfigurations.thelio76 = nixpkgs.lib.nixosSystem {
|
||||
thelio76 = nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./thelio76/configuration.nix
|
||||
|
@ -47,29 +50,30 @@
|
|||
home-manager.useUserPackages = true;
|
||||
home-manager.backupFileExtension = "backup";
|
||||
home-manager.users.alex = import ./nixos76/alex/home.nix;
|
||||
home-manager.extraSpecialArgs = { ff = firefox-addons.packages.${system}; };
|
||||
}
|
||||
];
|
||||
};
|
||||
nixosConfigurations.ursa-minor = nixpkgs.lib.nixosSystem
|
||||
{
|
||||
|
||||
## ---- servers ----
|
||||
ursa-minor = nixpkgs.lib.nixosSystem {
|
||||
system = "aarch64-linux";
|
||||
modules = [
|
||||
./ursa-minor/configuration.nix
|
||||
];
|
||||
};
|
||||
nixosConfigurations.ursa-major = nixpkgs.lib.nixosSystem
|
||||
{
|
||||
ursa-major = nixpkgs.lib.nixosSystem {
|
||||
system = "aarch64-linux";
|
||||
modules = [
|
||||
./ursa-major/configuration.nix
|
||||
];
|
||||
};
|
||||
nixosConfigurations.atauno = nixpkgs.lib.nixosSystem
|
||||
{
|
||||
atauno = nixpkgs.lib.nixosSystem {
|
||||
system = "aarch64-linux";
|
||||
modules = [
|
||||
./atauno/configuration.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, pkgs, ... }:
|
||||
{ config, pkgs, ff, ... }:
|
||||
|
||||
{
|
||||
# Home Manager needs a bit of information about you and the
|
||||
|
@ -67,38 +67,19 @@
|
|||
};
|
||||
firefox = {
|
||||
enable = true;
|
||||
# policies = {
|
||||
# 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 "tree-style-tab" "treestyletab@piro.sakura.ne.jp")
|
||||
# (extension "ublock-origin" "uBlock0@raymondhill.net")
|
||||
# # (extension "bitwarden-password-manager" "{446900e4-71c2-419f-a6a7-df9c091e268b}")
|
||||
# # (extension "tabliss" "extension@tabliss.io")
|
||||
# (extension "umatrix" "uMatrix@raymondhill.net")
|
||||
# # (extension "libredirect" "7esoorv3@alefvanoon.anonaddy.me")
|
||||
# # (extension "clearurls" "{74145f27-f039-47ce-a470-a662b129930a}")
|
||||
# ];
|
||||
# };
|
||||
profiles = {
|
||||
default = {
|
||||
containers = {
|
||||
google = {
|
||||
color = "green";
|
||||
id = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
profiles.default = {
|
||||
settings = {
|
||||
"extensions.autoDisableScopes" = 0;
|
||||
};
|
||||
extensions = with ff; [
|
||||
darkreader
|
||||
multi-account-containers
|
||||
ublock-origin
|
||||
umatrix
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
git = {
|
||||
enable = true;
|
||||
userEmail = "alexmat2on@protonmail.com";
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
||||
|
||||
# What was this for? maybe wireguard?
|
||||
networking.firewall = {
|
||||
allowedUDPPorts = [ 51820 22000 ]; # Clients and peers can use the same port, see listenport
|
||||
allowedTCPPorts = [ 22000 48412 62109 ];
|
||||
|
|
|
@ -1,14 +1,34 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
if [ -z "$(git status --porcelain)" ]
|
||||
then
|
||||
function yes_or_no {
|
||||
while true; do
|
||||
read -p "$* [y/n]: " yn
|
||||
case $yn in
|
||||
[Yy]*) return 0 ;;
|
||||
[Nn]*) echo "Aborted" ; return 1 ;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
function apply() {
|
||||
git push --force-with-lease
|
||||
rev=$(git rev-parse HEAD)
|
||||
sudo nixos-rebuild switch \
|
||||
--flake "git+https://git.atauno.com/atau/nixos-config.git?ref=main&rev=$rev"
|
||||
}
|
||||
|
||||
function commit_and_apply() {
|
||||
read -p "Enter a commit message: " msg
|
||||
git add .
|
||||
git commit -m "$(hostname): $msg"
|
||||
apply
|
||||
}
|
||||
|
||||
if [ -z "$(git status --porcelain)" ]
|
||||
then
|
||||
apply
|
||||
else
|
||||
echo "Git working directory is unclean, please commit changes"
|
||||
exit 1
|
||||
yes_or_no "Git working directory is unclean, would you like to commit changes?" && commit_and_apply
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in New Issue