mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-18 08:59:39 +00:00
iron: format configuration
This commit is contained in:
parent
eb750b585d
commit
6783ce6f72
8 changed files with 180 additions and 160 deletions
|
|
@ -5,25 +5,27 @@ let
|
||||||
hostname = "iron";
|
hostname = "iron";
|
||||||
username = "leana";
|
username = "leana";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
inherit (lib.modules) mkAliasOptionModule;
|
inherit (lib.modules) mkAliasOptionModule;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
#
|
#
|
||||||
# Shorthands
|
# Shorthands
|
||||||
#
|
#
|
||||||
(mkAliasOptionModule ["me"] ["users" "users" username])
|
(mkAliasOptionModule [ "me" ] [ "users" "users" username ])
|
||||||
(mkAliasOptionModule ["hm"] ["home-manager" "users" username])
|
(mkAliasOptionModule [ "hm" ] [ "home-manager" "users" username ])
|
||||||
|
|
||||||
#
|
#
|
||||||
# hostname
|
# hostname
|
||||||
#
|
#
|
||||||
{_module.args = {inherit hostname;};}
|
{ _module.args = { inherit hostname; }; }
|
||||||
|
|
||||||
#
|
#
|
||||||
# nixpkgs
|
# nixpkgs
|
||||||
|
|
@ -37,8 +39,7 @@ in
|
||||||
|
|
||||||
nixpkgs = {
|
nixpkgs = {
|
||||||
overlays =
|
overlays =
|
||||||
map import
|
map import [
|
||||||
[
|
|
||||||
../overlays/agenix.nix
|
../overlays/agenix.nix
|
||||||
../overlays/disko.nix
|
../overlays/disko.nix
|
||||||
../overlays/nur.nix
|
../overlays/nur.nix
|
||||||
|
|
@ -50,7 +51,7 @@ in
|
||||||
]
|
]
|
||||||
# use lix everywhere and wrap it with nom
|
# use lix everywhere and wrap it with nom
|
||||||
++ [
|
++ [
|
||||||
(import (sources.lix-module + "/overlay.nix") {inherit (sources) lix;})
|
(import (sources.lix-module + "/overlay.nix") { inherit (sources) lix; })
|
||||||
(import ../overlays/nix-monitored.nix)
|
(import ../overlays/nix-monitored.nix)
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
@ -110,14 +111,14 @@ in
|
||||||
home-manager = {
|
home-manager = {
|
||||||
useGlobalPkgs = true;
|
useGlobalPkgs = true;
|
||||||
useUserPackages = true;
|
useUserPackages = true;
|
||||||
sharedModules = [{home.stateVersion = lib.mkDefault config.system.stateVersion;}];
|
sharedModules = [ { home.stateVersion = lib.mkDefault config.system.stateVersion; } ];
|
||||||
};
|
};
|
||||||
|
|
||||||
hm.imports = [
|
hm.imports = [
|
||||||
#
|
#
|
||||||
# hostname
|
# hostname
|
||||||
#
|
#
|
||||||
{_module.args = {inherit hostname;};}
|
{ _module.args = { inherit hostname; }; }
|
||||||
|
|
||||||
#
|
#
|
||||||
# home modules
|
# home modules
|
||||||
|
|
@ -159,4 +160,4 @@ in
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,14 +3,17 @@
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
home.sessionPath = [
|
home.sessionPath = [
|
||||||
"${config.home.homeDirectory}/.local/bin"
|
"${config.home.homeDirectory}/.local/bin"
|
||||||
];
|
];
|
||||||
|
|
||||||
home.sessionVariables = let
|
home.sessionVariables =
|
||||||
|
let
|
||||||
fishCfg = config.programs.fish;
|
fishCfg = config.programs.fish;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
"SHELL" = lib.mkIf fishCfg.enable (lib.getExe fishCfg.package);
|
"SHELL" = lib.mkIf fishCfg.enable (lib.getExe fishCfg.package);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,10 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
users.users.root.openssh.authorizedKeys.keys = let
|
{
|
||||||
|
users.users.root.openssh.authorizedKeys.keys =
|
||||||
|
let
|
||||||
# TODO: put iron keys in identities
|
# TODO: put iron keys in identities
|
||||||
ids = import ../../../identities.nix;
|
ids = import ../../../identities.nix;
|
||||||
in
|
in
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{
|
{
|
||||||
me.extraGroups = ["video"];
|
me.extraGroups = [ "video" ];
|
||||||
programs.light.enable = true;
|
programs.light.enable = true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
services.btrfs.autoScrub = {
|
services.btrfs.autoScrub = {
|
||||||
enable = true;
|
enable = true;
|
||||||
fileSystems = [
|
fileSystems = [
|
||||||
|
|
|
||||||
|
|
@ -7,15 +7,26 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
modulesPath,
|
modulesPath,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
(modulesPath + "/installer/scan/not-detected.nix")
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = ["uhci_hcd" "ehci_pci" "ahci" "firewire_ohci" "usbhid" "uas" "sd_mod" "sr_mod" "sdhci_pci"];
|
boot.initrd.availableKernelModules = [
|
||||||
boot.initrd.kernelModules = ["dm-snapshot"];
|
"uhci_hcd"
|
||||||
boot.kernelModules = ["kvm-intel"];
|
"ehci_pci"
|
||||||
boot.extraModulePackages = [];
|
"ahci"
|
||||||
|
"firewire_ohci"
|
||||||
|
"usbhid"
|
||||||
|
"uas"
|
||||||
|
"sd_mod"
|
||||||
|
"sr_mod"
|
||||||
|
"sdhci_pci"
|
||||||
|
];
|
||||||
|
boot.initrd.kernelModules = [ "dm-snapshot" ];
|
||||||
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
{lib, ...}: {
|
{ lib, ... }:
|
||||||
|
{
|
||||||
# https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
# https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
||||||
# `timedatectl list-timezones`
|
# `timedatectl list-timezones`
|
||||||
time.timeZone = "Asia/Taipei";
|
time.timeZone = "Asia/Taipei";
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
pkgs.man-pages
|
pkgs.man-pages
|
||||||
pkgs.man-pages-posix
|
pkgs.man-pages-posix
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue