gitea->forgejo
This commit is contained in:
parent
b2db1e0c88
commit
265563968f
3 changed files with 214 additions and 202 deletions
42
flake.lock
42
flake.lock
|
@ -304,11 +304,11 @@
|
|||
"rust-overlay": "rust-overlay_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1674113703,
|
||||
"narHash": "sha256-au1KKVBZTyWulPxmy3CtNzJQrQWPZtTjwcfD/bDftgo=",
|
||||
"lastModified": 1674573236,
|
||||
"narHash": "sha256-VN1KG1Sh9s5IpLzVhCYAQcBITh4jmG8gl0F4wBX8lVk=",
|
||||
"owner": "oxalica",
|
||||
"repo": "nil",
|
||||
"rev": "3f84b783d36d564c4380631ab48d771e2558cb81",
|
||||
"rev": "6e5321582ca7595455edf2a9643f83ce390d0a71",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -320,11 +320,11 @@
|
|||
},
|
||||
"nixos-hardware": {
|
||||
"locked": {
|
||||
"lastModified": 1673803274,
|
||||
"narHash": "sha256-zaJDlHFXewT4KUsidMpRcPE+REymGH1Y3Eoc3Pjv4Xs=",
|
||||
"lastModified": 1674550793,
|
||||
"narHash": "sha256-ljJlIFQZwtBbzWqWTmmw2O5BFmQf1A/DspwMOQtGXHk=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixos-hardware",
|
||||
"rev": "7bd6b87b3712e68007823e8dd5c37ee9b114fee3",
|
||||
"rev": "b7ac0a56029e4f9e6743b9993037a5aaafd57103",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -336,11 +336,11 @@
|
|||
},
|
||||
"nixpkgs-master": {
|
||||
"locked": {
|
||||
"lastModified": 1674290375,
|
||||
"narHash": "sha256-yRD5bQWzu6UpDC6cybXwFizWHJCHcJTw35Ms7Q/nzU4=",
|
||||
"lastModified": 1674591591,
|
||||
"narHash": "sha256-zvzEwg6lfz7F0sBGKBt4IkY31XPPLktPGE8AIscFeAU=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "68403fe04f6c85853ddd389c9e58dd9b9c8b0a36",
|
||||
"rev": "73d098535c74d1d323d58a23e9bb28ffb16a673e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -352,11 +352,11 @@
|
|||
},
|
||||
"nixpkgs-nixos-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1674120619,
|
||||
"narHash": "sha256-xLT1FQl7/jNPOEq5q/vmc3AExt1V9LtcjM+QY2+MUpA=",
|
||||
"lastModified": 1674459583,
|
||||
"narHash": "sha256-L0UZl/u2H3HGsrhN+by42c5kNYeKtdmJiPzIRvEVeiM=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "d7705c01ef0a39c8ef532d1033bace8845a07d35",
|
||||
"rev": "1b1f50645af2a70dc93eae18bfd88d330bfbcf7f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -368,11 +368,11 @@
|
|||
},
|
||||
"nixpkgs-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1673957332,
|
||||
"narHash": "sha256-njH7Szk1BLVWGMw7IRibgGejSlxXHj9saZHfH20gHdk=",
|
||||
"lastModified": 1674407282,
|
||||
"narHash": "sha256-2qwc8mrPINSFdWffPK+ji6nQ9aGnnZyHSItVcYDZDlk=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "b83e7f5a04a3acc8e92228b0c4bae68933d504eb",
|
||||
"rev": "ab1254087f4cdf4af74b552d7fc95175d9bdbb49",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -384,11 +384,11 @@
|
|||
},
|
||||
"nur": {
|
||||
"locked": {
|
||||
"lastModified": 1674290152,
|
||||
"narHash": "sha256-2FPfuRPknBrg2ZBBa3latWxbbComAXLizS1ShsJHuLc=",
|
||||
"lastModified": 1674589600,
|
||||
"narHash": "sha256-MYscPro58Jc+zaNekjwEYpWqgGmMYEhUTejvI1X2RHE=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"rev": "0eb18ae5ae3a5ff8cdef5a0c956d11cc414d757f",
|
||||
"rev": "67b24d408dca0b07e5281d39cabe734a0b34b5e6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -489,11 +489,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1673752321,
|
||||
"narHash": "sha256-EFfXY1ZHJq4FNaNQA9x0djtu/jiOhBbT0Xi+BT06cJw=",
|
||||
"lastModified": 1674546403,
|
||||
"narHash": "sha256-vkyNv0xzXuEnu9v52TUtRugNmQWIti8c2RhYnbLG71w=",
|
||||
"owner": "Mic92",
|
||||
"repo": "sops-nix",
|
||||
"rev": "e18eefd2b133a58309475298052c341c08470717",
|
||||
"rev": "b6ab3c61e2ca5e07d1f4eb1b67304e2670ea230c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
370
flake.nix
370
flake.nix
|
@ -1,194 +1,204 @@
|
|||
{
|
||||
description = "NixOS configuration with flakes";
|
||||
outputs = { self, flake-utils, flake-compat, home-manager
|
||||
, nixpkgs-nixos-unstable, nixpkgs-master, nixpkgs-stable, darwin
|
||||
, nixos-hardware, nur, sops, nil, helix, alejandra, }@inputs:
|
||||
let
|
||||
mkServer = pkgs: system: hostname:
|
||||
pkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
modules = [
|
||||
(./. + "/nixos/boxes/${hostname}")
|
||||
(import ./nixos/server-common.nix)
|
||||
sops.nixosModules.sops
|
||||
];
|
||||
specialArgs = { inherit inputs; };
|
||||
};
|
||||
mkRaspi = pkgs: hostname:
|
||||
pkgs.lib.nixosSystem {
|
||||
system = "aarch64-linux";
|
||||
modules = [ (./. + "/nixos/boxes/${hostname}") ];
|
||||
specialArgs = { inherit inputs; };
|
||||
};
|
||||
mkKiosk = pkgs: system: hostname:
|
||||
pkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
modules = [
|
||||
(./. + "/nixos/boxes/${hostname}")
|
||||
(import ./nixos/common.nix)
|
||||
sops.nixosModules.sops
|
||||
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.cyryl = {
|
||||
imports =
|
||||
[ ./nixos/home-manager ./nixos/home-manager/linux.nix ];
|
||||
_module.args.inputs = inputs;
|
||||
_module.args.system = system;
|
||||
};
|
||||
}
|
||||
];
|
||||
specialArgs = {
|
||||
inherit inputs system;
|
||||
nixpkgs-nixos-stable-and-unfree = import nixpkgs-stable {
|
||||
inherit system;
|
||||
config = { allowUnfree = true; };
|
||||
};
|
||||
nixpkgs-nixos-unstable-and-unfree = import nixpkgs-nixos-unstable {
|
||||
inherit system;
|
||||
config = { allowUnfree = true; };
|
||||
};
|
||||
};
|
||||
};
|
||||
mkWorkstation = pkgs: system: hostname:
|
||||
pkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
modules = [
|
||||
(./. + "/nixos/boxes/${hostname}")
|
||||
(import ./nixos/email-accounts.nix)
|
||||
(import ./nixos/common.nix)
|
||||
sops.nixosModules.sops
|
||||
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.cyryl = {
|
||||
imports =
|
||||
[ ./nixos/home-manager ./nixos/home-manager/linux.nix ];
|
||||
_module.args.inputs = inputs;
|
||||
_module.args.system = system;
|
||||
};
|
||||
}
|
||||
];
|
||||
specialArgs = {
|
||||
inherit inputs system;
|
||||
nixpkgs-nixos-stable-and-unfree = import nixpkgs-stable {
|
||||
inherit system;
|
||||
config = { allowUnfree = true; };
|
||||
};
|
||||
nixpkgs-nixos-unstable-and-unfree = import nixpkgs-nixos-unstable {
|
||||
inherit system;
|
||||
config = { allowUnfree = true; };
|
||||
};
|
||||
};
|
||||
};
|
||||
mkShell = packageSet: system:
|
||||
let pkgs = packageSet.legacyPackages.${system};
|
||||
in pkgs.mkShell {
|
||||
packages = with pkgs; [
|
||||
cacert
|
||||
git
|
||||
git-lfs
|
||||
nixpkgs-fmt
|
||||
openssh
|
||||
openssl
|
||||
pkg-config
|
||||
statix
|
||||
];
|
||||
};
|
||||
in {
|
||||
devShells = {
|
||||
"x86_64-darwin".default = mkShell nixpkgs-stable "x86_64-darwin";
|
||||
"x86_64-linux".default = mkShell nixpkgs-stable "x86_64-linux";
|
||||
outputs = {
|
||||
self,
|
||||
flake-utils,
|
||||
flake-compat,
|
||||
home-manager,
|
||||
nixpkgs-nixos-unstable,
|
||||
nixpkgs-master,
|
||||
nixpkgs-stable,
|
||||
darwin,
|
||||
nixos-hardware,
|
||||
nur,
|
||||
sops,
|
||||
nil,
|
||||
helix,
|
||||
alejandra,
|
||||
} @ inputs: let
|
||||
mkServer = pkgs: system: hostname:
|
||||
pkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
modules = [
|
||||
(./. + "/nixos/boxes/${hostname}")
|
||||
(import ./nixos/server-common.nix)
|
||||
sops.nixosModules.sops
|
||||
];
|
||||
specialArgs = {inherit inputs system;};
|
||||
};
|
||||
darwinConfigurations = {
|
||||
"FORM3-CYRYLPLOTN" = darwin.lib.darwinSystem rec {
|
||||
system = "x86_64-darwin";
|
||||
modules = [
|
||||
(./. + "/nixos/boxes/form3")
|
||||
home-manager.darwinModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.cyryl = {
|
||||
imports = [ ./nixos/home-manager ];
|
||||
_module.args.inputs = inputs;
|
||||
_module.args.system = system;
|
||||
};
|
||||
}
|
||||
];
|
||||
mkRaspi = pkgs: hostname:
|
||||
pkgs.lib.nixosSystem {
|
||||
system = "aarch64-linux";
|
||||
modules = [(./. + "/nixos/boxes/${hostname}")];
|
||||
specialArgs = {inherit inputs;};
|
||||
};
|
||||
mkKiosk = pkgs: system: hostname:
|
||||
pkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
modules = [
|
||||
(./. + "/nixos/boxes/${hostname}")
|
||||
(import ./nixos/common.nix)
|
||||
sops.nixosModules.sops
|
||||
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.cyryl = {
|
||||
imports = [./nixos/home-manager ./nixos/home-manager/linux.nix];
|
||||
_module.args.inputs = inputs;
|
||||
_module.args.system = system;
|
||||
};
|
||||
}
|
||||
];
|
||||
specialArgs = {
|
||||
inherit inputs system;
|
||||
nixpkgs-nixos-stable-and-unfree = import nixpkgs-stable {
|
||||
inherit system;
|
||||
config = {allowUnfree = true;};
|
||||
};
|
||||
nixpkgs-nixos-unstable-and-unfree = import nixpkgs-nixos-unstable {
|
||||
inherit system;
|
||||
config = {allowUnfree = true;};
|
||||
};
|
||||
};
|
||||
};
|
||||
mkWorkstation = pkgs: system: hostname:
|
||||
pkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
modules = [
|
||||
(./. + "/nixos/boxes/${hostname}")
|
||||
(import ./nixos/email-accounts.nix)
|
||||
(import ./nixos/common.nix)
|
||||
sops.nixosModules.sops
|
||||
|
||||
nixosConfigurations = {
|
||||
foureighty = mkWorkstation nixpkgs-stable "x86_64-linux" "foureighty";
|
||||
skinnyv = mkWorkstation nixpkgs-stable "x86_64-linux" "skinnyv";
|
||||
thinky = mkWorkstation nixpkgs-stable "x86_64-linux" "thinky";
|
||||
bolty = mkServer nixpkgs-stable "x86_64-linux" "bolty";
|
||||
vpsfree1 = mkServer nixpkgs-stable "x86_64-linux" "vpsfree1";
|
||||
yoga = mkKiosk nixpkgs-stable "x86_64-linux" "yoga";
|
||||
homescreen = mkRaspi nixpkgs-stable "homescreen";
|
||||
|
||||
bootstrap = nixpkgs-stable.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
modules = [ (./. + "/nixos/boxes/bootstrap") sops.nixosModules.sops ];
|
||||
specialArgs = {
|
||||
inherit inputs system;
|
||||
nixpkgs-nixos-unstable-and-unfree = import nixpkgs-nixos-unstable {
|
||||
inherit system;
|
||||
config = { allowUnfree = true; };
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.cyryl = {
|
||||
imports = [./nixos/home-manager ./nixos/home-manager/linux.nix];
|
||||
_module.args.inputs = inputs;
|
||||
_module.args.system = system;
|
||||
};
|
||||
}
|
||||
];
|
||||
specialArgs = {
|
||||
inherit inputs system;
|
||||
nixpkgs-nixos-stable-and-unfree = import nixpkgs-stable {
|
||||
inherit system;
|
||||
config = {allowUnfree = true;};
|
||||
};
|
||||
nixpkgs-nixos-unstable-and-unfree = import nixpkgs-nixos-unstable {
|
||||
inherit system;
|
||||
config = {allowUnfree = true;};
|
||||
};
|
||||
};
|
||||
# nix build .#nixosConfigurations.raspiimage.config.system.build.sdImage
|
||||
# sudo dd if=result/sd-image/nixos-sd-image-21.11.20211201.a640d83-aarch64-linux.img of=/dev/sda bs=4M conv=fsync status=progress
|
||||
# make sure to update eeprom https://nixos.wiki/wiki/NixOS_on_ARM/Raspberry_Pi_4#Board-specific_installation_notes
|
||||
raspiimage = nixpkgs-stable.lib.nixosSystem {
|
||||
system = "aarch64-linux";
|
||||
modules = [
|
||||
(import
|
||||
"${inputs.nixpkgs-nixos-unstable}/nixos/modules/installer/sd-card/sd-image-aarch64-installer.nix")
|
||||
{
|
||||
environment.systemPackages =
|
||||
with nixpkgs-nixos-unstable.legacyPackages."aarch64-linux"; [
|
||||
neovim
|
||||
htop
|
||||
btop
|
||||
atop
|
||||
];
|
||||
|
||||
networking.networkmanager.enable = false;
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
networking.wireless.enable = true;
|
||||
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
permitRootLogin =
|
||||
nixpkgs-stable.lib.mkForce "prohibit-password";
|
||||
passwordAuthentication = false;
|
||||
};
|
||||
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
displayManager.lightdm.enable = true;
|
||||
desktopManager.gnome.enable = true;
|
||||
libinput.enable = true;
|
||||
};
|
||||
|
||||
users.extraUsers.root.openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEo4R+6J3h6Ix3xWpOMdU7Es1/YxFchHw0c+kcCOJxFb cyryl@foureighty"
|
||||
];
|
||||
sdImage.compressImage = false;
|
||||
console.earlySetup = true;
|
||||
}
|
||||
];
|
||||
specialArgs = { inherit inputs; };
|
||||
};
|
||||
};
|
||||
mkShell = packageSet: system: let
|
||||
pkgs = packageSet.legacyPackages.${system};
|
||||
in
|
||||
pkgs.mkShell {
|
||||
packages = with pkgs; [
|
||||
cacert
|
||||
git
|
||||
git-lfs
|
||||
nixpkgs-fmt
|
||||
openssh
|
||||
openssl
|
||||
pkg-config
|
||||
statix
|
||||
];
|
||||
};
|
||||
in {
|
||||
devShells = {
|
||||
"x86_64-darwin".default = mkShell nixpkgs-stable "x86_64-darwin";
|
||||
"x86_64-linux".default = mkShell nixpkgs-stable "x86_64-linux";
|
||||
};
|
||||
darwinConfigurations = {
|
||||
"FORM3-CYRYLPLOTN" = darwin.lib.darwinSystem rec {
|
||||
system = "x86_64-darwin";
|
||||
modules = [
|
||||
(./. + "/nixos/boxes/form3")
|
||||
home-manager.darwinModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.cyryl = {
|
||||
imports = [./nixos/home-manager];
|
||||
_module.args.inputs = inputs;
|
||||
_module.args.system = system;
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
nixosConfigurations = {
|
||||
foureighty = mkWorkstation nixpkgs-stable "x86_64-linux" "foureighty";
|
||||
skinnyv = mkWorkstation nixpkgs-stable "x86_64-linux" "skinnyv";
|
||||
thinky = mkWorkstation nixpkgs-stable "x86_64-linux" "thinky";
|
||||
bolty = mkServer nixpkgs-stable "x86_64-linux" "bolty";
|
||||
vpsfree1 = mkServer nixpkgs-stable "x86_64-linux" "vpsfree1";
|
||||
yoga = mkKiosk nixpkgs-stable "x86_64-linux" "yoga";
|
||||
homescreen = mkRaspi nixpkgs-stable "homescreen";
|
||||
|
||||
bootstrap = nixpkgs-stable.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
modules = [(./. + "/nixos/boxes/bootstrap") sops.nixosModules.sops];
|
||||
specialArgs = {
|
||||
inherit inputs system;
|
||||
nixpkgs-nixos-unstable-and-unfree = import nixpkgs-nixos-unstable {
|
||||
inherit system;
|
||||
config = {allowUnfree = true;};
|
||||
};
|
||||
};
|
||||
};
|
||||
# nix build .#nixosConfigurations.raspiimage.config.system.build.sdImage
|
||||
# sudo dd if=result/sd-image/nixos-sd-image-21.11.20211201.a640d83-aarch64-linux.img of=/dev/sda bs=4M conv=fsync status=progress
|
||||
# make sure to update eeprom https://nixos.wiki/wiki/NixOS_on_ARM/Raspberry_Pi_4#Board-specific_installation_notes
|
||||
raspiimage = nixpkgs-stable.lib.nixosSystem {
|
||||
system = "aarch64-linux";
|
||||
modules = [
|
||||
(import
|
||||
"${inputs.nixpkgs-nixos-unstable}/nixos/modules/installer/sd-card/sd-image-aarch64-installer.nix")
|
||||
{
|
||||
environment.systemPackages = with nixpkgs-nixos-unstable.legacyPackages."aarch64-linux"; [
|
||||
neovim
|
||||
htop
|
||||
btop
|
||||
atop
|
||||
];
|
||||
|
||||
networking.networkmanager.enable = false;
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
networking.wireless.enable = true;
|
||||
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
permitRootLogin =
|
||||
nixpkgs-stable.lib.mkForce "prohibit-password";
|
||||
passwordAuthentication = false;
|
||||
};
|
||||
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
displayManager.lightdm.enable = true;
|
||||
desktopManager.gnome.enable = true;
|
||||
libinput.enable = true;
|
||||
};
|
||||
|
||||
users.extraUsers.root.openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEo4R+6J3h6Ix3xWpOMdU7Es1/YxFchHw0c+kcCOJxFb cyryl@foureighty"
|
||||
];
|
||||
sdImage.compressImage = false;
|
||||
console.earlySetup = true;
|
||||
}
|
||||
];
|
||||
specialArgs = {inherit inputs;};
|
||||
};
|
||||
};
|
||||
};
|
||||
inputs = {
|
||||
nixpkgs-master = {
|
||||
type = "github";
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
pkgs,
|
||||
inputs,
|
||||
lib,
|
||||
system,
|
||||
...
|
||||
}: let
|
||||
httpPort = 8083;
|
||||
|
@ -85,7 +86,7 @@ in {
|
|||
lib,
|
||||
...
|
||||
}: {
|
||||
system.stateVersion = "22.05";
|
||||
system.stateVersion = "22.11";
|
||||
users =
|
||||
users
|
||||
// {
|
||||
|
@ -99,6 +100,7 @@ in {
|
|||
stateDir = path;
|
||||
user = systemUserName;
|
||||
mailerPasswordFile = mailgunSmtpPasswordPath;
|
||||
package = inputs.nixpkgs-master.legacyPackages.${system}.forgejo;
|
||||
settings = {
|
||||
service.DISABLE_REGISTRATION = true;
|
||||
server = {
|
||||
|
|
Loading…
Reference in a new issue