Compare commits

..

No commits in common. "5fed94ef27c48fd5c15da00c021af68cd1426c8d" and "b17ff565c366ec12445714bb447665b9f2ccb49c" have entirely different histories.

7 changed files with 124 additions and 86 deletions

View File

@ -96,11 +96,11 @@
]
},
"locked": {
"lastModified": 1727999297,
"narHash": "sha256-LTJuQPCsSItZ/8TieFeP30iY+uaLoD0mT0tAj1gLeyQ=",
"lastModified": 1725975477,
"narHash": "sha256-sBnXxmYBb0S85Vkny97z2TFLd5SJW5o0k6KQNwpSLb0=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "8c8388ade72e58efdeae71b4cbb79e872c23a56b",
"rev": "5b2d8e9a47c3e17514650d1ce7d5e907114db82b",
"type": "github"
},
"original": {
@ -173,22 +173,6 @@
"type": "github"
}
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1728018373,
"narHash": "sha256-NOiTvBbRLIOe5F6RbHaAh6++BNjsb149fGZd1T4+KBg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "bc947f541ae55e999ffdb4013441347d83b00feb",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1698318101,
@ -230,8 +214,8 @@
"nix-minecraft": "nix-minecraft",
"nixpkgs": "nixpkgs_3",
"nixpkgs-2211": "nixpkgs-2211",
"nixpkgs-unstable": "nixpkgs-unstable",
"sops-nix": "sops-nix"
"sops-nix": "sops-nix",
"unstable": "unstable"
}
},
"sops-nix": {
@ -269,6 +253,22 @@
"repo": "default",
"type": "github"
}
},
"unstable": {
"locked": {
"lastModified": 1726755586,
"narHash": "sha256-PmUr/2GQGvFTIJ6/Tvsins7Q43KTMvMFhvG6oaYK+Wk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "c04d5652cfa9742b1d519688f65d1bbccea9eb7e",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
}
},
"root": "root",

126
flake.nix
View File

@ -3,7 +3,7 @@
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
nixpkgs-2211.url = "https://github.com/NixOS/nixpkgs/archive/34bfa9403e42eece93d1a3740e9d8a02fceafbca.tar.gz"; # old nixpgks for e.g. remmina
nix-darwin.url = "github:lnl7/nix-darwin/master";
@ -29,76 +29,132 @@
, nix-darwin
, nixpkgs
, nixpkgs-2211
, nixpkgs-unstable
, sops-nix
, unstable
, extra-config
, ... }@inputs:
let
pkgs-overlay = final: prev: {
unstable = import nixpkgs-unstable {
system = prev.system;
config.allowUnfree = true;
unstable = unstable.legacyPackages.${prev.system};
nixpkgs-2211 = nixpkgs-2211.legacyPackages.${prev.system};
python311 = prev.python311.override {
packageOverrides = self: super: {
# k5test is broken on darwin, as of 24.05
gssapi = super.gssapi.overrideAttrs (old: {
doInstallCheck = false;
});
};
};
nixpkgs-2211 = import nixpkgs-2211 {
system = prev.system;
config.allowUnfree = true;
};
tlclient = final.unstable.tlclient.overrideAttrs (finalAttrs: previousAttrs: {
# nixpkgs.config.allowUnfreePredicate doesn't work for the unstable overlay, as it is a different "nixpkgs"
meta.license.free = true;
});
};
in
{
nixosConfigurations = let
normalSys = name: config: nixpkgs.lib.nixosSystem {
nixosConfigurations = {
# Networking / VPN Gateway
burnham = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {
inherit inputs;
};
modules = [
({ config, pkgs, ... }: {
# Make "pkgs.unstable" etc. available
nixpkgs.overlays = [ pkgs-overlay ] ++ config.overlays or [ ];
})
# Overlays-module makes "pkgs.unstable" available in configuration.nix
({ config, pkgs, ... }: { nixpkgs.overlays = [ pkgs-overlay ]; })
./hosts/${name}/configuration.nix
./hosts/burnham/configuration.nix
./common/domeneshop-dyndns.nix
sops-nix.nixosModules.sops
home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users."felixalb" = import ./hosts/${name}/home.nix;
home-manager.users."felixalb" = import ./hosts/burnham/home.nix;
}
] ++ config.modules or [ ];
};
in {
# Networking / VPN Gateway
burnham = normalSys "burnham" {
modules = [
./common/domeneshop-dyndns.nix
];
};
# Media / storage server
challenger = normalSys "challenger" {
challenger = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {
inherit inputs;
};
modules = [
# Overlays-module makes "pkgs.unstable" available in configuration.nix
({ config, pkgs, ... }: { nixpkgs.overlays = [ pkgs-overlay ]; })
./hosts/challenger/configuration.nix
extra-config.nixosModules.default
sops-nix.nixosModules.sops
home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users."felixalb" = import ./hosts/challenger/home.nix;
}
];
};
# General application server
defiant = normalSys "defiant" {
defiant = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {
inherit inputs;
};
modules = [
# Overlays-module makes "pkgs.unstable" available in configuration.nix
({ config, pkgs, ... }: { nixpkgs.overlays = [ pkgs-overlay ]; })
./hosts/defiant/configuration.nix
./common/domeneshop-dyndns.nix
sops-nix.nixosModules.sops
matrix-synapse-next.nixosModules.default
home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users."felixalb" = import ./hosts/defiant/home.nix;
}
];
};
# Work desktop
felixalbpc = normalSys "felixalbpc" { };
felixalbpc = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {
inherit inputs;
};
modules = [
# Overlays-module makes "pkgs.unstable" available in configuration.nix
({ config, pkgs, ... }: { nixpkgs.overlays = [ pkgs-overlay ]; })
./hosts/felixalbpc/configuration.nix
sops-nix.nixosModules.sops
home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users."felixalb" = import ./hosts/felixalbpc/home.nix;
}
];
};
# Web host
malcolm = normalSys "malcolm" { };
};
malcolm = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {
inherit inputs;
};
modules = [
# Overlays-module makes "pkgs.unstable" available in configuration.nix
({ config, pkgs, ... }: { nixpkgs.overlays = [ pkgs-overlay ]; })
./hosts/malcolm/configuration.nix
sops-nix.nixosModules.sops
home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users."felixalb" = import ./hosts/malcolm/home.nix;
}
];
};
};
# Daily driver macbook
darwinConfigurations.worf = nix-darwin.lib.darwinSystem {
system = "aarch64-darwin";
@ -106,14 +162,14 @@
inherit inputs;
};
modules = [
({ config, pkgs, ... }: { nixpkgs.overlays = [ pkgs-overlay ]; })
./hosts/worf/configuration.nix
({ config, pkgs, ... }: { nixpkgs.overlays = [ pkgs-overlay ]; })
home-manager.darwinModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users."felixalb" = import ./hosts/worf/home.nix;
}
# sops-nix.nixosModules.sops
];
};

View File

@ -18,26 +18,11 @@
timerConfig.OnCalendar = "05:15"; # 2h after postgresqlBackup
};
# Transmission _metadata_
transmission = localJob "transmission" [ "/var/lib/transmission" ];
# Calibre metadata and books
calibre = localJob "calibre" [
"/var/lib/calibre-web"
"/var/lib/calibre-server"
"/tank/media/books"
] // {
pruneOpts = [ "--keep-daily 1" ];
};
# Nextcloud data
nextcloud = localJob "nextcloud" [ "/tank/nextcloud" ];
# TODO: timemachine, komga
# TODO: timemachine, nextcloud, komga, calibre
};
sops.secrets."restic/calibre" = { };
sops.secrets."restic/nextcloud" = { };
sops.secrets."restic/postgres" = { };
sops.secrets."restic/transmission" = { };

View File

@ -8,7 +8,7 @@
../../base.nix
../../common/metrics-exporters.nix
./backup.nix
# ./exports.nix
./exports.nix
./filesystems.nix
./services/calibre.nix
@ -39,7 +39,6 @@
environment.variables = { EDITOR = "vim"; };
environment.systemPackages = with pkgs; [
zfs
unstable.ncdu
];
virtualisation.docker.enable = true;
@ -50,12 +49,12 @@
"nvidia-settings"
];
# hardware.nvidia = {
# modesetting.enable = true;
# };
hardware.nvidia = {
modesetting.enable = true;
};
hardware.opengl.enable = true;
# services.xserver.videoDrivers = ["nvidia"];
services.xserver.videoDrivers = ["nvidia"];
system.stateVersion = "24.05";
}

View File

@ -11,13 +11,13 @@
# Infrastructure
./backup.nix
./libvirt.nix
./services/dyndns.nix
./services/nginx.nix
./services/pihole.nix
./services/postgresql.nix
./services/wireguard.nix
# Services
./services/dyndns.nix
./services/flame.nix
./services/gitea.nix
./services/hedgedoc.nix

View File

@ -26,7 +26,7 @@ in {
openstackclient
pwgen
rofi-rbw-x11
unstable.tlclient
tlclient
traceroute
w3m

View File

@ -4,10 +4,8 @@ nextcloud:
adminpass: ENC[AES256_GCM,data:DL5SnyPPUxiVjfIHZ/ZYJi2pNu6x,iv:/bThFVYgHsN3Yr2EJf0+YWhAVIei9ENaHfAH1ADC5Ws=,tag:bNp+2trtwFNYOqruvqPRGw==,type:str]
secretsjson: ENC[AES256_GCM,data:xmdwWBe8LWsSEI64KhSeXbA1B0ahfoGwNmgl33JWteF4AakdI73zfbdIhUBqqlqfbL0uCGlqCiOyRA02h8197mk=,iv:ncKz9ObwoFoVjT0qMzBJ0BqVBNx0ScdMRl82ZNQp4FI=,tag:6S8fqHhvE/gaknxsb+q3Jg==,type:str]
restic:
transmission: ENC[AES256_GCM,data:UUf8/WV7Q7vbs05lEeqflcSj0uH9abilFF1daATyrwU=,iv:WQZ7hGRQ3/3t34aO7K5Az1AOZtR6qG4p1CqZTdsEqZA=,tag:2ELh2bYVi1sgW66FbSnVHg==,type:str]
postgres: ENC[AES256_GCM,data:AZv28LIbGC2oAKjbU1H4gaCZF28utJJFXlKNO/BkL0U=,iv:xOJCIoFGtnEqV80rmiBBMa3dMZnPjaDIce+MAZkGZdo=,tag:dLTwE004KGfP3z9EoMVCCw==,type:str]
nextcloud: ENC[AES256_GCM,data:O7qT07ns9FodnZu63cPwBqHGslfMIafFvyPPrTrYEdk=,iv:fJ7A5gLThuVumnteL1P82Gq1EtiSAPGXoCZgzJKqVQs=,tag:Hp/kI3TeZQCaM+gP1W1i7w==,type:str]
calibre: ENC[AES256_GCM,data:wAvhB303cUm0rJKwQ31pd8lYHJSlOzBW8BiCygF3JC8=,iv:kUFEiP8sTcaiAIW4QZ7ZfA4aqjJsIIA5mq+gVzgryaU=,tag:STHLWF+T4XeQIDSt4F63Lw==,type:str]
transmission: ENC[AES256_GCM,data:RrnlOXT6sNoUh8MF8JXFTygN+cBV+CS0xdvE9SMTAVV0,iv:0Irhejn2TQSI7h9e4G8a65EpIKmwco9ue93lgo4jC6I=,tag:RAd2pvtL++C8rdlqch4g6Q==,type:str]
postgres: ENC[AES256_GCM,data:MaKQs6f2sp1e42u4DRx/PUsSFnJN0Ks+BtUrMJkUwD28,iv:Wz/MtaC/hg5zVxcdZWKEHeQb5KGio653mgHf4IrE7mk=,tag:7kaYJ1DnxNGbcr31bHb0zA==,type:str]
sops:
kms: []
gcp_kms: []
@ -32,8 +30,8 @@ sops:
bVhLUVBWL3QyMmVjVEswZmtDRXRRUGMKizaESv67KWTOnUkZg1R0c3BkpJrDUxJR
heau8QcBXtNS6Ct1RsJQD3oTmBPAP1NHJ2BD11kEEtpo8FhCOjcqVQ==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2024-10-04T22:55:35Z"
mac: ENC[AES256_GCM,data:KQHfywMQ3WkmIW7UaLjAKkM5v4+1yagJik+63G2pSKCtbsCq1uFWSheeRIPObVfnsu3qUHoxq943jVR17krjnsIZIzXjr6f5SNMyNo0RCcnhvlWy/cKzVU0/7ut0TMd6ZJsCZyOBgJOSxc8i0G/wgRreMEGicwifI5m8KWSpBU0=,iv:1+98COoItw2PAlJtGBA4Qx7TmNRB++FqeKJnsF1/j6w=,tag:iHzWy5AnXBXxtGnqiTfNnA==,type:str]
lastmodified: "2024-10-04T19:11:52Z"
mac: ENC[AES256_GCM,data:sTsTQOCO6ggoz6hXKU/Nnfuvs2UjYwuYLhMZ/P+jHLV2Jn3gBnUUTsn3lEtG7fi9MOfILuTA93wdRciahAElY9me86j+TVa/9PdbW9Earh5rH7M91LyRRS74C99LedXco05gjxqc2s27ea0n25A8UF7eCgvAlD+4DP0WNUiDUcE=,iv:wn9ahsWE2RYy9pSi30Uy2/vStQCHNiwk6ZJU/OdNDuk=,tag:SZe/b9+2PuoBNZcwuS8Ong==,type:str]
pgp: []
unencrypted_suffix: _unencrypted
version: 3.8.1