mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 06:39:14 +00:00
hydrogen: init (#20)
Reviewed-on: https://codeberg.org/leana8959/.files/pulls/20 Co-authored-by: Léana 江 <leana.jiang+git@icloud.com> Co-committed-by: Léana 江 <leana.jiang+git@icloud.com>
This commit is contained in:
parent
a1024668db
commit
006798d917
31 changed files with 481 additions and 141 deletions
134
nix/configurations/hydrogen.nix
Normal file
134
nix/configurations/hydrogen.nix
Normal file
|
|
@ -0,0 +1,134 @@
|
|||
let
|
||||
sources = import ../../npins;
|
||||
|
||||
hostname = "hydrogen";
|
||||
username = "leana";
|
||||
in
|
||||
{
|
||||
modulesPath,
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkAliasOptionModule;
|
||||
in {
|
||||
imports = [
|
||||
# The generator and hardware configuration
|
||||
(modulesPath + "/installer/sd-card/sd-image-aarch64.nix")
|
||||
|
||||
#
|
||||
# Shorthands
|
||||
#
|
||||
(mkAliasOptionModule ["me"] ["users" "users" username])
|
||||
(mkAliasOptionModule ["hm"] ["home-manager" "users" username])
|
||||
|
||||
#
|
||||
# hostname
|
||||
#
|
||||
{_module.args = {inherit hostname;};}
|
||||
|
||||
#
|
||||
# nixpkgs
|
||||
#
|
||||
{
|
||||
nixpkgs = {
|
||||
overlays = map import [
|
||||
../overlays/agenix.nix
|
||||
../overlays/nur.nix
|
||||
../overlays/nix-tree.nix
|
||||
../packages/overlay.nix
|
||||
|
||||
# use lix everywhere and wrap it with nom
|
||||
../overlays/lix.nix
|
||||
../overlays/nix-monitored.nix
|
||||
];
|
||||
|
||||
# Set NIX_PATH and flake registry at the same time
|
||||
# https://github.com/NixOS/nixpkgs/pull/254405
|
||||
flake.source = sources.nixpkgs;
|
||||
};
|
||||
|
||||
nix.package = pkgs.nix-monitored;
|
||||
|
||||
system.nixos.version = lib.substring 0 8 sources.nixpkgs.revision;
|
||||
}
|
||||
|
||||
./hydrogen/nixos/misc.nix
|
||||
./hydrogen/nixos/programs.nix
|
||||
./hydrogen/nixos/connectivity.nix
|
||||
|
||||
# QUIRK:
|
||||
# Had issue when building the installer as it fails to bootstrap itself
|
||||
# Might be useful to disable for the first build.
|
||||
../nixosModules/extra/secure_dns.nix
|
||||
../nixosModules/common/disable-command-not-found.nix
|
||||
../nixosModules/common/network.nix
|
||||
../nixosModules/common/sudo-conf.nix
|
||||
../nixosModules/common/system-nixconf.nix
|
||||
|
||||
../nixosModules/extra/leana.nix
|
||||
|
||||
#
|
||||
# Extern modules
|
||||
#
|
||||
(sources.agenix + "/modules/age.nix")
|
||||
|
||||
(sources.nixos-hardware + "/raspberry-pi/4")
|
||||
|
||||
#
|
||||
# home-manager
|
||||
#
|
||||
(sources.home-manager + "/nixos")
|
||||
{
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
sharedModules = [{home.stateVersion = lib.mkDefault config.system.stateVersion;}];
|
||||
};
|
||||
|
||||
hm.imports = [
|
||||
#
|
||||
# hostname
|
||||
#
|
||||
{_module.args = {inherit hostname;};}
|
||||
|
||||
#
|
||||
# home modules
|
||||
#
|
||||
./hydrogen/home/programs.nix
|
||||
|
||||
../homeModules/common/btop
|
||||
../homeModules/common/fish
|
||||
../homeModules/common/starship
|
||||
../homeModules/common/fzf.nix
|
||||
../homeModules/common/tmux
|
||||
../homeModules/common/vim
|
||||
../homeModules/common/direnv.nix
|
||||
../homeModules/common/git.nix
|
||||
../homeModules/common/gpg.nix
|
||||
../homeModules/common/leana.nix
|
||||
../homeModules/common/locale.nix
|
||||
../homeModules/common/packages.nix
|
||||
../homeModules/common/tealdeer.nix
|
||||
|
||||
../homeModules/extra/tmux-fish-integration.nix
|
||||
|
||||
#
|
||||
# Extern modules
|
||||
#
|
||||
(sources.agenix + "/modules/age-home.nix")
|
||||
(import sources.wired-notify).homeManagerModules.default
|
||||
];
|
||||
}
|
||||
|
||||
#
|
||||
# Secrets
|
||||
#
|
||||
{
|
||||
age.secrets = {
|
||||
wpa_password.file = "${../secrets/wpa_password.age}";
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue