summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2025-01-22 10:06:45 -0500
committerFreya Murphy <freya@freyacat.org>2025-01-22 10:07:01 -0500
commit2e32697e99e76977a93aa5b665e5316ebb93b0c9 (patch)
tree4e2217ba7b550575c636d1f55c8d2db45142b4ba
parentadd unity (diff)
downloaddotfiles-nix-2e32697e99e76977a93aa5b665e5316ebb93b0c9.tar.gz
dotfiles-nix-2e32697e99e76977a93aa5b665e5316ebb93b0c9.tar.bz2
dotfiles-nix-2e32697e99e76977a93aa5b665e5316ebb93b0c9.zip
secure boot
-rw-r--r--flake.lock165
-rw-r--r--flake.nix3
-rw-r--r--hosts/shinji.nix14
-rw-r--r--modules/system.nix1
4 files changed, 180 insertions, 3 deletions
diff --git a/flake.lock b/flake.lock
index 32a630f..1451e60 100644
--- a/flake.lock
+++ b/flake.lock
@@ -33,6 +33,21 @@
"type": "github"
}
},
+ "crane": {
+ "locked": {
+ "lastModified": 1731098351,
+ "narHash": "sha256-HQkYvKvaLQqNa10KEFGgWHfMAbWBfFp+4cAgkut+NNE=",
+ "owner": "ipetkov",
+ "repo": "crane",
+ "rev": "ef80ead953c1b28316cc3f8613904edc2eb90c28",
+ "type": "github"
+ },
+ "original": {
+ "owner": "ipetkov",
+ "repo": "crane",
+ "type": "github"
+ }
+ },
"flake-compat": {
"flake": false,
"locked": {
@@ -49,6 +64,43 @@
"type": "github"
}
},
+ "flake-compat_2": {
+ "flake": false,
+ "locked": {
+ "lastModified": 1696426674,
+ "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
+ "owner": "edolstra",
+ "repo": "flake-compat",
+ "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
+ "type": "github"
+ },
+ "original": {
+ "owner": "edolstra",
+ "repo": "flake-compat",
+ "type": "github"
+ }
+ },
+ "flake-parts": {
+ "inputs": {
+ "nixpkgs-lib": [
+ "lanzaboote",
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1730504689,
+ "narHash": "sha256-hgmguH29K2fvs9szpq2r3pz2/8cJd2LPS+b4tfNFCwE=",
+ "owner": "hercules-ci",
+ "repo": "flake-parts",
+ "rev": "506278e768c2a08bec68eb62932193e341f55c90",
+ "type": "github"
+ },
+ "original": {
+ "owner": "hercules-ci",
+ "repo": "flake-parts",
+ "type": "github"
+ }
+ },
"gitignore": {
"inputs": {
"nixpkgs": [
@@ -71,6 +123,28 @@
"type": "github"
}
},
+ "gitignore_2": {
+ "inputs": {
+ "nixpkgs": [
+ "lanzaboote",
+ "pre-commit-hooks-nix",
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1709087332,
+ "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
+ "owner": "hercules-ci",
+ "repo": "gitignore.nix",
+ "rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
+ "type": "github"
+ },
+ "original": {
+ "owner": "hercules-ci",
+ "repo": "gitignore.nix",
+ "type": "github"
+ }
+ },
"home-manager": {
"inputs": {
"nixpkgs": [
@@ -362,6 +436,32 @@
"type": "github"
}
},
+ "lanzaboote": {
+ "inputs": {
+ "crane": "crane",
+ "flake-compat": "flake-compat_2",
+ "flake-parts": "flake-parts",
+ "nixpkgs": [
+ "nixpkgs"
+ ],
+ "pre-commit-hooks-nix": "pre-commit-hooks-nix",
+ "rust-overlay": "rust-overlay"
+ },
+ "locked": {
+ "lastModified": 1737299073,
+ "narHash": "sha256-hOydnO9trHDo3qURqLSDdmE/pHNWDzlhkmyZ/gcBX2s=",
+ "owner": "nix-community",
+ "repo": "lanzaboote",
+ "rev": "64d20cb2afaad8b73f4e38de41d27fb30a782bb5",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-community",
+ "ref": "master",
+ "repo": "lanzaboote",
+ "type": "github"
+ }
+ },
"nixpkgs": {
"locked": {
"lastModified": 1736012469,
@@ -378,6 +478,22 @@
"type": "github"
}
},
+ "nixpkgs-stable": {
+ "locked": {
+ "lastModified": 1730741070,
+ "narHash": "sha256-edm8WG19kWozJ/GqyYx2VjW99EdhjKwbY3ZwdlPAAlo=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "d063c1dd113c91ab27959ba540c0d9753409edf3",
+ "type": "github"
+ },
+ "original": {
+ "owner": "NixOS",
+ "ref": "nixos-24.05",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
"nixpkgs_2": {
"locked": {
"lastModified": 1737062831,
@@ -417,15 +533,64 @@
"type": "github"
}
},
+ "pre-commit-hooks-nix": {
+ "inputs": {
+ "flake-compat": [
+ "lanzaboote",
+ "flake-compat"
+ ],
+ "gitignore": "gitignore_2",
+ "nixpkgs": [
+ "lanzaboote",
+ "nixpkgs"
+ ],
+ "nixpkgs-stable": "nixpkgs-stable"
+ },
+ "locked": {
+ "lastModified": 1731363552,
+ "narHash": "sha256-vFta1uHnD29VUY4HJOO/D6p6rxyObnf+InnSMT4jlMU=",
+ "owner": "cachix",
+ "repo": "pre-commit-hooks.nix",
+ "rev": "cd1af27aa85026ac759d5d3fccf650abe7e1bbf0",
+ "type": "github"
+ },
+ "original": {
+ "owner": "cachix",
+ "repo": "pre-commit-hooks.nix",
+ "type": "github"
+ }
+ },
"root": {
"inputs": {
"home-manager": "home-manager",
"hy3": "hy3",
"hyprland": "hyprland",
"hyprland-plugins": "hyprland-plugins",
+ "lanzaboote": "lanzaboote",
"nixpkgs": "nixpkgs_2"
}
},
+ "rust-overlay": {
+ "inputs": {
+ "nixpkgs": [
+ "lanzaboote",
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1731897198,
+ "narHash": "sha256-Ou7vLETSKwmE/HRQz4cImXXJBr/k9gp4J4z/PF8LzTE=",
+ "owner": "oxalica",
+ "repo": "rust-overlay",
+ "rev": "0be641045af6d8666c11c2c40e45ffc9667839b5",
+ "type": "github"
+ },
+ "original": {
+ "owner": "oxalica",
+ "repo": "rust-overlay",
+ "type": "github"
+ }
+ },
"systems": {
"locked": {
"lastModified": 1689347949,
diff --git a/flake.nix b/flake.nix
index 8daae83..4a7af47 100644
--- a/flake.nix
+++ b/flake.nix
@@ -7,6 +7,9 @@
# home manager
home-manager.url = "github:nix-community/home-manager/master";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
+ # lanzaboote
+ lanzaboote.url = "github:nix-community/lanzaboote/master";
+ lanzaboote.inputs.nixpkgs.follows = "nixpkgs";
# hyprland
hyprland.url = "github:hyprwm/Hyprland";
# hyprland plugins
diff --git a/hosts/shinji.nix b/hosts/shinji.nix
index 220d72a..4ba5418 100644
--- a/hosts/shinji.nix
+++ b/hosts/shinji.nix
@@ -6,6 +6,7 @@ inputs.nixpkgs.lib.nixosSystem {
modules = [
options
inputs.home-manager.nixosModules.home-manager
+ inputs.lanzaboote.nixosModules.lanzaboote
../modules
{
# options
@@ -19,10 +20,17 @@ inputs.nixpkgs.lib.nixosSystem {
# hardware
hardware.graphics.enable = true;
hardware.bluetooth.enable = true;
+ security.tpm2.enable = false;
# bootloader
- boot.loader.systemd-boot.enable = true;
- boot.loader.efi.canTouchEfiVariables = true;
+ boot.loader.efi = {
+ canTouchEfiVariables = true;
+ efiSysMountPoint = "/boot/efi";
+ };
+ boot.lanzaboote = {
+ enable = true;
+ pkiBundle = "/var/lib/sbctl";
+ };
# hostname
networking.hostName = "shinji";
@@ -53,7 +61,7 @@ inputs.nixpkgs.lib.nixosSystem {
};
# boot
- fileSystems."/boot" = {
+ fileSystems."/boot/efi" = {
device = "/dev/disk/by-uuid/6F93-6A0B";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
diff --git a/modules/system.nix b/modules/system.nix
index 3009d2f..06806ac 100644
--- a/modules/system.nix
+++ b/modules/system.nix
@@ -19,6 +19,7 @@
openssh
p7zip
ripgrep
+ sbctl
tree
unzip
wget