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"
|
"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": {
|
"home-manager": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
@ -61,6 +99,7 @@
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"atau-nixpkgs": "atau-nixpkgs",
|
"atau-nixpkgs": "atau-nixpkgs",
|
||||||
|
"firefox-addons": "firefox-addons",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
}
|
}
|
||||||
|
|
50
flake.nix
50
flake.nix
|
@ -1,28 +1,31 @@
|
||||||
{
|
{
|
||||||
description = "Alex's super mega awesome nixos config";
|
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 = {
|
inputs = {
|
||||||
nixpkgs.url = github:NixOS/nixpkgs/nixos-unstable;
|
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";
|
home-manager = {
|
||||||
atau-nixpkgs.inputs.nixpkgs.follows = "nixpkgs";
|
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!
|
||||||
home-manager.url = "github:nix-community/home-manager";
|
|
||||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, home-manager, ... }@attrs:
|
firefox-addons = {
|
||||||
# let
|
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
|
||||||
# # system = "x86_64-linux";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
# # pkgs = import nixpkgs {
|
};
|
||||||
# # # inherit system;
|
|
||||||
# # config.allowUnfree = true;
|
atau-nixpkgs = {
|
||||||
# # overlays = [ atau-nixpkgs.overlays.default ];
|
url = "git+https://git.atauno.com/atau/atau-nixpkgs?ref=main&rev=1e72f4b1e9b7a2991e3ccdebbe75d312f016da3b";
|
||||||
# # };
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
# in
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
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";
|
system = "x86_64-linux";
|
||||||
modules = [
|
modules = [
|
||||||
./nixos76/system/configuration.nix
|
./nixos76/system/configuration.nix
|
||||||
|
@ -37,7 +40,7 @@
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
nixosConfigurations.thelio76 = nixpkgs.lib.nixosSystem {
|
thelio76 = nixpkgs.lib.nixosSystem rec {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = [
|
modules = [
|
||||||
./thelio76/configuration.nix
|
./thelio76/configuration.nix
|
||||||
|
@ -47,29 +50,30 @@
|
||||||
home-manager.useUserPackages = true;
|
home-manager.useUserPackages = true;
|
||||||
home-manager.backupFileExtension = "backup";
|
home-manager.backupFileExtension = "backup";
|
||||||
home-manager.users.alex = import ./nixos76/alex/home.nix;
|
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";
|
system = "aarch64-linux";
|
||||||
modules = [
|
modules = [
|
||||||
./ursa-minor/configuration.nix
|
./ursa-minor/configuration.nix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
nixosConfigurations.ursa-major = nixpkgs.lib.nixosSystem
|
ursa-major = nixpkgs.lib.nixosSystem {
|
||||||
{
|
|
||||||
system = "aarch64-linux";
|
system = "aarch64-linux";
|
||||||
modules = [
|
modules = [
|
||||||
./ursa-major/configuration.nix
|
./ursa-major/configuration.nix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
nixosConfigurations.atauno = nixpkgs.lib.nixosSystem
|
atauno = nixpkgs.lib.nixosSystem {
|
||||||
{
|
|
||||||
system = "aarch64-linux";
|
system = "aarch64-linux";
|
||||||
modules = [
|
modules = [
|
||||||
./atauno/configuration.nix
|
./atauno/configuration.nix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ff, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
# Home Manager needs a bit of information about you and the
|
# Home Manager needs a bit of information about you and the
|
||||||
|
@ -67,38 +67,19 @@
|
||||||
};
|
};
|
||||||
firefox = {
|
firefox = {
|
||||||
enable = true;
|
enable = true;
|
||||||
# policies = {
|
profiles.default = {
|
||||||
# ExtensionSettings = with builtins;
|
settings = {
|
||||||
# let
|
"extensions.autoDisableScopes" = 0;
|
||||||
# extension = shortId: uuid: {
|
};
|
||||||
# name = uuid;
|
extensions = with ff; [
|
||||||
# value = {
|
darkreader
|
||||||
# install_url = "https://addons.mozilla.org/en-US/firefox/downloads/latest/${shortId}/latest.xpi";
|
multi-account-containers
|
||||||
# installation_mode = "normal_installed";
|
ublock-origin
|
||||||
# };
|
umatrix
|
||||||
# };
|
];
|
||||||
# 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;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
git = {
|
git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
userEmail = "alexmat2on@protonmail.com";
|
userEmail = "alexmat2on@protonmail.com";
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||||
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
||||||
|
|
||||||
|
# What was this for? maybe wireguard?
|
||||||
networking.firewall = {
|
networking.firewall = {
|
||||||
allowedUDPPorts = [ 51820 22000 ]; # Clients and peers can use the same port, see listenport
|
allowedUDPPorts = [ 51820 22000 ]; # Clients and peers can use the same port, see listenport
|
||||||
allowedTCPPorts = [ 22000 48412 62109 ];
|
allowedTCPPorts = [ 22000 48412 62109 ];
|
||||||
|
|
|
@ -1,14 +1,34 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
if [ -z "$(git status --porcelain)" ]
|
function yes_or_no {
|
||||||
then
|
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
|
git push --force-with-lease
|
||||||
rev=$(git rev-parse HEAD)
|
rev=$(git rev-parse HEAD)
|
||||||
sudo nixos-rebuild switch \
|
sudo nixos-rebuild switch \
|
||||||
--flake "git+https://git.atauno.com/atau/nixos-config.git?ref=main&rev=$rev"
|
--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
|
else
|
||||||
echo "Git working directory is unclean, please commit changes"
|
yes_or_no "Git working directory is unclean, would you like to commit changes?" && commit_and_apply
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue