hosts/hazel: init
This commit is contained in:
parent
3502a31065
commit
4d751d72b3
8 changed files with 121 additions and 8 deletions
15
flake.nix
15
flake.nix
|
|
@ -2,15 +2,19 @@
|
|||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
home-manager.url = "github:nix-community/home-manager";
|
||||
neovim-nightly.url = "github:nix-community/neovim-nightly-overlay";
|
||||
agenix.url = "github:ryantm/agenix";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
aagl.url = "github:ezKEa/aagl-gtk-on-nix";
|
||||
nixpkgs-vicuna.url = "github:NixOS/nixpkgs/release-24.11";
|
||||
home-manager-vicuna.url = "github:nix-community/home-manager/release-24.11";
|
||||
home-manager-vicuna.inputs.nixpkgs.follows = "nixpkgs-vicuna";
|
||||
|
||||
agenix.url = "github:ryantm/agenix";
|
||||
agenix.inputs.nixpkgs.follows = "nixpkgs";
|
||||
aagl.url = "github:ezKEa/aagl-gtk-on-nix";
|
||||
catppuccin.url = "github:catppuccin/nix/8eada392fd6571a747e1c5fc358dd61c14c8704e";
|
||||
catppuccin.inputs.nixpkgs.follows = "nixpkgs";
|
||||
catppuccin-palette = { url = "github:catppuccin/palette"; flake = false; };
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
neovim-nightly.url = "github:nix-community/neovim-nightly-overlay";
|
||||
neovim-nightly.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
nix-gaming.url = "github:fufexan/nix-gaming";
|
||||
|
|
@ -35,7 +39,7 @@
|
|||
wine-discord-ipc-bridge = { url = "github:0e4ef622/wine-discord-ipc-bridge"; flake = false; };
|
||||
};
|
||||
|
||||
outputs = { self, agenix, catppuccin, nixpkgs, ... } @ inputs:
|
||||
outputs = { self, agenix, catppuccin, nixpkgs, nixpkgs-vicuna, ... } @ inputs:
|
||||
let
|
||||
overlays = (import ./overlays)
|
||||
++ [(final: prev: {
|
||||
|
|
@ -69,6 +73,7 @@
|
|||
in
|
||||
{
|
||||
nixosConfigurations."anemone" = mkSystem nixpkgs "anemone" "x86_64-linux" [];
|
||||
nixosConfigurations."hazel" = mkSystem nixpkgs-vicuna "hazel" "x86_64-linux" [];
|
||||
nixosConfigurations."hyacinth" = mkSystem nixpkgs "hyacinth" "x86_64-linux" [];
|
||||
|
||||
packages."x86_64-linux" =
|
||||
|
|
|
|||
22
hosts/hazel/default.nix
Normal file
22
hosts/hazel/default.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{ modules, ... }: {
|
||||
networking.hostName = "hazel";
|
||||
system.stateVersion = "24.11";
|
||||
time.timeZone = "Australia/Melbourne";
|
||||
|
||||
imports = with modules.system; [
|
||||
home-manager
|
||||
|
||||
base
|
||||
kernel
|
||||
nix-stable
|
||||
packages
|
||||
security
|
||||
|
||||
./filesystem.nix
|
||||
./kernel.nix
|
||||
./networking.nix
|
||||
./packages.nix
|
||||
|
||||
../../users/hana
|
||||
];
|
||||
}
|
||||
53
hosts/hazel/filesystem.nix
Normal file
53
hosts/hazel/filesystem.nix
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
{ ... }:
|
||||
let
|
||||
mkLabelMount = label: type: options: {
|
||||
device = "/dev/disk/by-label/${label}";
|
||||
fsType = type;
|
||||
options = options;
|
||||
};
|
||||
mkBtrfsMount = name: ext: subvol: atime: mkLabelMount name "btrfs"
|
||||
[
|
||||
"autodefrag"
|
||||
"compress=zstd:4"
|
||||
"compress-force=zstd:4"
|
||||
"defaults"
|
||||
"nossd"
|
||||
"space_cache=v2"
|
||||
"subvol=${subvol}"
|
||||
(if atime then "relatime" else "noatime")
|
||||
] ++ ext;
|
||||
|
||||
mkHazelMount = mkBtrfsMount "HAZEL" [ "noauto" ];
|
||||
in
|
||||
{
|
||||
boot.supportedFilesystems = [ "btrfs" ];
|
||||
fileSystems = {
|
||||
"/" = {
|
||||
device = "rootfs";
|
||||
fsType = "tmpfs";
|
||||
options = [ "defaults" "mode=755" ];
|
||||
};
|
||||
"/boot" = mkLabelMount "ROOT" "vfat" [];
|
||||
|
||||
"/flower" = mkHazelMount "/current/flower" true;
|
||||
"/persist" = mkHazelMount "/current/persist" true;
|
||||
"/var" = mkHazelMount "/current/var" true;
|
||||
"/nix" = mkHazelMount "/current/nix" false;
|
||||
|
||||
"/mnt" = mkHazelMount "/" true;
|
||||
};
|
||||
|
||||
services.snapper.cleanupInterval = "1h";
|
||||
services.snapper.configs.flower = {
|
||||
FSTYPE = "btrfs";
|
||||
SUBVOLUME = "/mnt/current/flower";
|
||||
TIMELINE_CLEANUP = true;
|
||||
TIMELINE_CREATE = true;
|
||||
TIMELINE_MIN_AGE = "1800";
|
||||
TIMELINE_LIMIT_HOURLY = "5";
|
||||
TIMELINE_LIMIT_DAILY = "7";
|
||||
TIMELINE_LIMIT_WEEKLY = "0";
|
||||
TIMELINE_LIMIT_MONTHLY = "0";
|
||||
TIMELINE_LIMIT_YEARLY = "0";
|
||||
};
|
||||
}
|
||||
0
hosts/hazel/fs-decrypt.nix
Normal file
0
hosts/hazel/fs-decrypt.nix
Normal file
10
hosts/hazel/kernel.nix
Normal file
10
hosts/hazel/kernel.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{ ... }: {
|
||||
boot = {
|
||||
loader = {
|
||||
efi.canTouchEfiVariables = true;
|
||||
systemd-boot.enable = true;
|
||||
};
|
||||
initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
||||
kernelModules = [ "kvm-amd" ];
|
||||
};
|
||||
}
|
||||
5
hosts/hazel/networking.nix
Normal file
5
hosts/hazel/networking.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{ config, ... }: {
|
||||
networking = {
|
||||
useDHCP = true;
|
||||
};
|
||||
}
|
||||
19
modules/system/home-manager-stable.nix
Normal file
19
modules/system/home-manager-stable.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{ config, inputs, modules, ... }: {
|
||||
imports = [
|
||||
inputs.home-manager-vicuna.nixosModules.home-manager
|
||||
];
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
extraSpecialArgs = {
|
||||
inherit inputs modules;
|
||||
sysConfig = config;
|
||||
};
|
||||
sharedModules = [
|
||||
{
|
||||
imports = [ modules.options ];
|
||||
config.me = config.me;
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
@ -7,8 +7,7 @@
|
|||
uid = 1002;
|
||||
hashedPassword = "$y$j9T$3xCNDudmfrIu5VfQQoDkj/$ugzJWq0gORN9jnhDsREu31CkL3zwniQu6KoLbmg6Wr/";
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPru5eTBvHJ4ZmrrzPRHCGM09wQP/ZHSaKYalDuBVO15 rin@blossom"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ5l9t8dc6mPsKKYqZlPKvhOdyqz+DS5UOcvHuh3uVGt @strawberry"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPru5eTBvHJ4ZmrrzPRHCGM09wQP/ZHSaKYalDuBVO15 rin@anemone"
|
||||
];
|
||||
};
|
||||
|
||||
|
|
@ -16,7 +15,7 @@
|
|||
home = {
|
||||
username = "hana";
|
||||
homeDirectory = "/home/hana";
|
||||
stateVersion = "23.11";
|
||||
stateVersion = "24.11";
|
||||
};
|
||||
|
||||
imports = with modules.user; [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue