Compare commits
2 commits
b2f610b2ce
...
42f0baa4ff
Author | SHA1 | Date | |
---|---|---|---|
42f0baa4ff | |||
6262428dc6 |
4 changed files with 77 additions and 2 deletions
|
@ -13,7 +13,10 @@ in
|
||||||
(mkSystem' {
|
(mkSystem' {
|
||||||
hostname = "marr";
|
hostname = "marr";
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
extraModules = [ inputs.agenix.nixosModules.default ];
|
extraModules = [
|
||||||
|
inputs.disko.nixosModules.disko
|
||||||
|
inputs.agenix.nixosModules.default
|
||||||
|
];
|
||||||
})
|
})
|
||||||
|
|
||||||
(mkSystem' {
|
(mkSystem' {
|
||||||
|
|
42
hosts/marr/disko.nix
Normal file
42
hosts/marr/disko.nix
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
let
|
||||||
|
inherit (lib.my.disko) mkBoot mkSwap mkRoot;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
disko.devices = {
|
||||||
|
disk.builtin = {
|
||||||
|
device = "/dev/nvme0n1";
|
||||||
|
type = "disk";
|
||||||
|
content = {
|
||||||
|
type = "gpt";
|
||||||
|
partitions = {
|
||||||
|
ESP = mkBoot "1G";
|
||||||
|
luks = {
|
||||||
|
size = "100%";
|
||||||
|
content = {
|
||||||
|
type = "luks";
|
||||||
|
name = "crypt";
|
||||||
|
settings = {
|
||||||
|
keyFile = "/tmp/secret.key";
|
||||||
|
allowDiscards = true;
|
||||||
|
};
|
||||||
|
content = {
|
||||||
|
type = "lvm_pv";
|
||||||
|
vg = "pool";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
lvm_vg = {
|
||||||
|
pool = {
|
||||||
|
type = "lvm_vg";
|
||||||
|
lvs = {
|
||||||
|
swap = mkSwap "32G";
|
||||||
|
root = mkRoot "100%" "ext4";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -72,7 +72,6 @@ lib.mkIf config.programs.firefox.enable {
|
||||||
AutofillCreditCardEnabled = false;
|
AutofillCreditCardEnabled = false;
|
||||||
AutofillAddressEnabled = false;
|
AutofillAddressEnabled = false;
|
||||||
# Check about:support for extension/add-on ID strings.
|
# Check about:support for extension/add-on ID strings.
|
||||||
# WARNING: Does not seem to install extension, i.e useless
|
|
||||||
ExtensionSettings =
|
ExtensionSettings =
|
||||||
let
|
let
|
||||||
extension = shortId: uuid: {
|
extension = shortId: uuid: {
|
||||||
|
@ -88,6 +87,7 @@ lib.mkIf config.programs.firefox.enable {
|
||||||
(extension "firefox-translations" "firefox-translations-addon@mozilla.org")
|
(extension "firefox-translations" "firefox-translations-addon@mozilla.org")
|
||||||
(extension "private-relay" "private-relay@firefox.com")
|
(extension "private-relay" "private-relay@firefox.com")
|
||||||
(extension "decentraleyes" "jid1-BoFifL9Vbdl2zQ@jetpack")
|
(extension "decentraleyes" "jid1-BoFifL9Vbdl2zQ@jetpack")
|
||||||
|
(extension "keepassxc-browser" "keepassxc-browser@keepassxc.org")
|
||||||
];
|
];
|
||||||
FirefoxHome = {
|
FirefoxHome = {
|
||||||
Search = true;
|
Search = true;
|
||||||
|
|
|
@ -79,4 +79,34 @@ in
|
||||||
inherit (lib.strings) sanitizeDerivationName;
|
inherit (lib.strings) sanitizeDerivationName;
|
||||||
in
|
in
|
||||||
str: (sanitizeDerivationName (lib.toLower str));
|
str: (sanitizeDerivationName (lib.toLower str));
|
||||||
|
|
||||||
|
disko = {
|
||||||
|
mkBoot = size: {
|
||||||
|
size = size;
|
||||||
|
type = "EF00";
|
||||||
|
content = {
|
||||||
|
type = "filesystem";
|
||||||
|
format = "vfat";
|
||||||
|
mountpoint = "/boot";
|
||||||
|
mountOptions = [ "umask=0077" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
mkSwap = size: {
|
||||||
|
size = "32G";
|
||||||
|
content = {
|
||||||
|
type = "swap";
|
||||||
|
randomEncryption = true;
|
||||||
|
priority = 100;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
mkRoot = size: format: {
|
||||||
|
inherit size;
|
||||||
|
content = {
|
||||||
|
inherit format;
|
||||||
|
type = "filesystem";
|
||||||
|
mountpoint = "/";
|
||||||
|
mountOptions = [ "defaults" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue