unpin veracrypt as the pr landed
Some checks failed
use nix / build (push) Failing after 2s

This commit is contained in:
Cyryl Płotnicki 2024-03-24 11:33:56 +00:00
parent 338c334a81
commit 874febac3d
4 changed files with 196 additions and 248 deletions

View file

@ -421,8 +421,7 @@
"nixpkgs-rust-analyzer": "nixpkgs-rust-analyzer", "nixpkgs-rust-analyzer": "nixpkgs-rust-analyzer",
"nixpkgs-stable": "nixpkgs-stable", "nixpkgs-stable": "nixpkgs-stable",
"nur": "nur", "nur": "nur",
"sops": "sops", "sops": "sops"
"veracrypt": "veracrypt"
} }
}, },
"rust-analyzer-src": { "rust-analyzer-src": {
@ -545,22 +544,6 @@
"repo": "default", "repo": "default",
"type": "github" "type": "github"
} }
},
"veracrypt": {
"locked": {
"lastModified": 1696681798,
"narHash": "sha256-tvga08j8IOHrRbEnqJDc6bzO4la5i7ywf23kLs8W0OY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "2bbbf414fed6ab89cd971f5645da692dad6d9420",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "2bbbf414fed6ab89cd971f5645da692dad6d9420",
"repo": "nixpkgs",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",

400
flake.nix
View file

@ -1,228 +1,206 @@
{ {
description = "NixOS configuration with flakes"; description = "NixOS configuration with flakes";
outputs = { outputs = { alejandra, cryptpad, darwin, disko, endless-sky, flake-compat
alejandra, , flake-utils, helix, home-manager, nil, nix-ld, nixos-hardware
cryptpad, , nixpkgs-master, nixpkgs-nixos-unstable, nixpkgs-rust-analyzer
darwin, , nixpkgs-stable, nur, self, sops, }@inputs:
disko, let
endless-sky, mkServer = pkgs: system: hostname:
flake-compat, pkgs.lib.nixosSystem {
flake-utils, inherit system;
helix, modules = [
home-manager, (./. + "/nixos/boxes/${hostname}")
nil, (import ./nixos/server-common.nix)
nix-ld, sops.nixosModules.sops
nixos-hardware, disko.nixosModules.disko
nixpkgs-master, ({ pkgs, ... }: {
nixpkgs-nixos-unstable, nixpkgs.overlays = [ inputs.cryptpad.overlays.default ];
nixpkgs-rust-analyzer, })
nixpkgs-stable, inputs.cryptpad.nixosModules.cryptpad
nur, ];
self, specialArgs = { inherit inputs system; };
sops, };
veracrypt, mkRaspi = pkgs: hostname:
} @ inputs: let pkgs.lib.nixosSystem {
mkServer = pkgs: system: hostname: system = "aarch64-linux";
pkgs.lib.nixosSystem { modules =
inherit system; [ (./. + "/nixos/boxes/${hostname}") sops.nixosModules.sops ];
modules = [ specialArgs = { inherit inputs; };
(./. + "/nixos/boxes/${hostname}") };
(import ./nixos/server-common.nix) mkKiosk = pkgs: system: hostname:
sops.nixosModules.sops pkgs.lib.nixosSystem {
disko.nixosModules.disko inherit system;
({pkgs, ...}: { modules = [
nixpkgs.overlays = [inputs.cryptpad.overlays.default]; (./. + "/nixos/boxes/${hostname}")
}) (import ./nixos/common.nix)
inputs.cryptpad.nixosModules.cryptpad sops.nixosModules.sops
];
specialArgs = {inherit inputs system;};
};
mkRaspi = pkgs: hostname:
pkgs.lib.nixosSystem {
system = "aarch64-linux";
modules = [
(./. + "/nixos/boxes/${hostname}")
sops.nixosModules.sops
];
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.nixosModules.home-manager
{ {
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
home-manager.users.cyryl = { home-manager.users.cyryl = {
imports = [./nixos/home-manager ./nixos/home-manager/linux.nix]; imports =
_module.args.inputs = inputs; [ ./nixos/home-manager ./nixos/home-manager/linux.nix ];
_module.args.system = system; _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; };
}; };
}
];
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:
mkWorkstation = pkgs: system: hostname: pkgs.lib.nixosSystem {
pkgs.lib.nixosSystem { inherit system;
inherit system; modules = [
modules = [ (./. + "/nixos/boxes/${hostname}")
(./. + "/nixos/boxes/${hostname}") (import ./nixos/email-accounts.nix)
(import ./nixos/email-accounts.nix) (import ./nixos/common.nix)
(import ./nixos/common.nix) sops.nixosModules.sops
sops.nixosModules.sops disko.nixosModules.disko
disko.nixosModules.disko nix-ld.nixosModules.nix-ld
nix-ld.nixosModules.nix-ld { programs.nix-ld.dev.enable = true; }
{programs.nix-ld.dev.enable = true;} home-manager.nixosModules.home-manager
home-manager.nixosModules.home-manager {
{ home-manager.useGlobalPkgs = true;
home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true;
home-manager.useUserPackages = true; home-manager.users.cyryl = {
home-manager.users.cyryl = { imports =
imports = [./nixos/home-manager ./nixos/home-manager/linux.nix]; [ ./nixos/home-manager ./nixos/home-manager/linux.nix ];
_module.args.inputs = inputs; _module.args.inputs = inputs;
_module.args.system = system; _module.args.system = system;
};
}
];
specialArgs = {
inherit inputs system;
nixpkgs-nixos-stable-and-unfree = import nixpkgs-stable {
inherit system;
config = { allowUnfree = true; };
};
nixpkgs-nixos-unstable =
import nixpkgs-nixos-unstable { inherit system; };
nixpkgs-nixos-unstable-and-unfree = import nixpkgs-nixos-unstable {
inherit system;
config = { allowUnfree = true; };
}; };
}
];
specialArgs = {
inherit inputs system;
nixpkgs-nixos-stable-and-unfree = import nixpkgs-stable {
inherit system;
config = {allowUnfree = true;};
};
nixpkgs-nixos-unstable = import nixpkgs-nixos-unstable {
inherit system;
};
nixpkgs-nixos-unstable-and-unfree = import nixpkgs-nixos-unstable {
inherit system;
config = {allowUnfree = true;};
};
nixpkgs-veracrypt = import veracrypt {
inherit system;
config = {allowUnfree = true;};
}; };
}; };
mkShell = packageSet: system:
let pkgs = packageSet.legacyPackages.${system};
in pkgs.mkShell {
packages = with pkgs; [
inputs.alejandra.defaultPackage.${system}
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";
}; };
mkShell = packageSet: system: let darwinConfigurations = {
pkgs = packageSet.legacyPackages.${system}; "FORM3-CYRYLPLOTN" = darwin.lib.darwinSystem rec {
in system = "x86_64-darwin";
pkgs.mkShell { modules = [
packages = with pkgs; [ (./. + "/nixos/boxes/form3")
inputs.alejandra.defaultPackage.${system} home-manager.darwinModules.home-manager
cacert {
git home-manager.useGlobalPkgs = true;
git-lfs home-manager.useUserPackages = true;
nixpkgs-fmt home-manager.users.cyryl = {
openssh imports = [ ./nixos/home-manager ];
openssl _module.args.inputs = inputs;
pkg-config _module.args.system = system;
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 = {
foryog = mkWorkstation nixpkgs-nixos-unstable "x86_64-linux" "foryog";
thinky = mkWorkstation nixpkgs-stable "x86_64-linux" "thinky";
bolty = mkServer nixpkgs-stable "x86_64-linux" "bolty";
vpsfree1 = mkServer nixpkgs-stable "x86_64-linux" "vpsfree1";
cupsnet = mkServer nixpkgs-stable "aarch64-linux" "cupsnet";
mb1 = mkServer nixpkgs-stable "x86_64-linux" "mb1";
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-stable}/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; nixosConfigurations = {
hardware.enableRedistributableFirmware = true; foryog = mkWorkstation nixpkgs-nixos-unstable "x86_64-linux" "foryog";
networking.wireless.enable = true; thinky = mkWorkstation nixpkgs-stable "x86_64-linux" "thinky";
bolty = mkServer nixpkgs-stable "x86_64-linux" "bolty";
vpsfree1 = mkServer nixpkgs-stable "x86_64-linux" "vpsfree1";
cupsnet = mkServer nixpkgs-stable "aarch64-linux" "cupsnet";
mb1 = mkServer nixpkgs-stable "x86_64-linux" "mb1";
homescreen = mkRaspi nixpkgs-stable "homescreen";
services.openssh = { bootstrap = nixpkgs-stable.lib.nixosSystem rec {
enable = true; system = "x86_64-linux";
permitRootLogin = modules = [ (./. + "/nixos/boxes/bootstrap") sops.nixosModules.sops ];
nixpkgs-stable.lib.mkForce "prohibit-password"; specialArgs = {
passwordAuthentication = false; 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-stable}/nixos/modules/installer/sd-card/sd-image-aarch64-installer.nix")
{
environment.systemPackages =
with nixpkgs-nixos-unstable.legacyPackages."aarch64-linux"; [
neovim
htop
btop
atop
];
services.xserver = { networking.networkmanager.enable = false;
enable = true; hardware.enableRedistributableFirmware = true;
displayManager.lightdm.enable = true; networking.wireless.enable = true;
desktopManager.gnome.enable = true;
libinput.enable = true;
};
users.extraUsers.root.openssh.authorizedKeys.keys = [ services.openssh = {
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEo4R+6J3h6Ix3xWpOMdU7Es1/YxFchHw0c+kcCOJxFb cyryl@foureighty" enable = true;
]; permitRootLogin =
sdImage.compressImage = false; nixpkgs-stable.lib.mkForce "prohibit-password";
console.earlySetup = true; passwordAuthentication = false;
} };
];
specialArgs = {inherit inputs;}; 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 = { inputs = {
nixpkgs-master = { nixpkgs-master = {
type = "github"; type = "github";
@ -254,12 +232,6 @@
repo = "nixpkgs"; repo = "nixpkgs";
ref = "2100c4926200b1ebbee032ad22113597195932f2"; ref = "2100c4926200b1ebbee032ad22113597195932f2";
}; };
veracrypt = {
type = "github";
owner = "NixOS";
repo = "nixpkgs";
ref = "2bbbf414fed6ab89cd971f5645da692dad6d9420";
};
nixos-hardware = { nixos-hardware = {
type = "github"; type = "github";
owner = "NixOS"; owner = "NixOS";
@ -329,9 +301,7 @@
}; };
cryptpad = { cryptpad = {
url = "github:michaelshmitty/cryptpad-flake"; url = "github:michaelshmitty/cryptpad-flake";
inputs = { inputs = { nixpkgs.follows = "nixpkgs-stable"; };
nixpkgs.follows = "nixpkgs-stable";
};
}; };
disko = { disko = {
url = "github:nix-community/disko"; url = "github:nix-community/disko";

View file

@ -51,6 +51,7 @@
"vscode-extension-ms-vscode-cpptools" "vscode-extension-ms-vscode-cpptools"
"vscode-with-extensions" "vscode-with-extensions"
"vscode" "vscode"
"veracrypt"
]; ];
home-manager.users.cyryl = { ... }: { home-manager.users.cyryl = { ... }: {

View file

@ -1,12 +1,5 @@
{ { config, pkgs, lib, inputs, nixpkgs-nixos-unstable-and-unfree, ... }:
config, let
pkgs,
lib,
inputs,
nixpkgs-nixos-unstable-and-unfree,
nixpkgs-veracrypt,
...
}: let
stateVersion = "23.11"; stateVersion = "23.11";
username = "cyryl"; username = "cyryl";
in { in {
@ -37,7 +30,7 @@ in {
tmux tmux
usbutils usbutils
wget wget
nixpkgs-veracrypt.veracrypt veracrypt
]; ];
i18n.defaultLocale = "en_GB.UTF-8"; i18n.defaultLocale = "en_GB.UTF-8";
@ -61,9 +54,10 @@ in {
shell = pkgs.zsh; shell = pkgs.zsh;
}; };
networking.nameservers = ["9.9.9.9" "2620:fe::fe" "149.112.112.112" "2620:fe::9"]; networking.nameservers =
[ "9.9.9.9" "2620:fe::fe" "149.112.112.112" "2620:fe::9" ];
networking.hosts = {"10.11.99.1" = ["remarkable"];}; networking.hosts = { "10.11.99.1" = [ "remarkable" ]; };
programs.light.enable = true; programs.light.enable = true;
programs.adb.enable = true; programs.adb.enable = true;
@ -86,13 +80,13 @@ in {
enable = true; enable = true;
autoPrune.enable = true; autoPrune.enable = true;
daemon.settings = { daemon.settings = {
"insecure-registries" = ["vpsfree1.raptor-carp.ts.net:5000"]; "insecure-registries" = [ "vpsfree1.raptor-carp.ts.net:5000" ];
}; };
}; };
fonts.fontconfig = { fonts.fontconfig = {
enable = true; enable = true;
defaultFonts.monospace = ["BerkeleyMono Nerd Font"]; defaultFonts.monospace = [ "BerkeleyMono Nerd Font" ];
}; };
fonts.packages = with pkgs; [ fonts.packages = with pkgs; [
@ -118,7 +112,7 @@ in {
''; '';
}; };
system = {inherit stateVersion;}; system = { inherit stateVersion; };
system.activationScripts.diff = '' system.activationScripts.diff = ''
${pkgs.nvd}/bin/nvd --nix-bin-dir=${pkgs.nix}/bin diff /run/current-system "$systemConfig" ${pkgs.nvd}/bin/nvd --nix-bin-dir=${pkgs.nix}/bin diff /run/current-system "$systemConfig"
''; '';