Skip to content

Commit

Permalink
build: routine update
Browse files Browse the repository at this point in the history
- updated noto-cjk to noto-cjk-sans
- disabled pulseaudio and switched back to pipewire
- update software
  • Loading branch information
LEXUGE committed Dec 17, 2024
1 parent 756d943 commit 655c764
Show file tree
Hide file tree
Showing 11 changed files with 683 additions and 485 deletions.
62 changes: 40 additions & 22 deletions cfgs/deck/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{ config, lib, pkgs, ... }: {
{ config
, lib
, pkgs
, ...
}:
{
imports = [
./boot.nix
./networking.nix
Expand Down Expand Up @@ -67,19 +72,27 @@
};

# Allow users in wheel to control sing-box without passwords.
security.sudo.extraRules = [{
groups = [ "whell" ];
commands = [
{
command = "${startSingBox}";
options = [ "NOPASSWD" "SETENV" ];
}
{
command = "${stopSingBox}";
options = [ "NOPASSWD" "SETENV" ];
}
];
}];
security.sudo.extraRules = [
{
groups = [ "whell" ];
commands = [
{
command = "${startSingBox}";
options = [
"NOPASSWD"
"SETENV"
];
}
{
command = "${stopSingBox}";
options = [
"NOPASSWD"
"SETENV"
];
}
];
}
];

my.home.ash = {
extraPackages = with pkgs; [
Expand Down Expand Up @@ -123,7 +136,8 @@

# Extra files
extraFiles = {
".config/steam-rom-manager/userData/userConfigurations.json".source = ../../misc/blobs/steam-rom-manager/userConfigurations.json;
".config/steam-rom-manager/userData/userConfigurations.json".source =
../../misc/blobs/steam-rom-manager/userConfigurations.json;
".config/yuzu/qt-config.ini".source = ../../misc/blobs/yuzu/qt-config.ini;
};
};
Expand All @@ -138,7 +152,7 @@
# Fonts
fonts.packages = with pkgs; [
noto-fonts
noto-fonts-cjk
noto-fonts-cjk-sans
noto-fonts-emoji
fira-code
fira-code-symbols
Expand Down Expand Up @@ -184,7 +198,10 @@
# Both git-credentials and zsh_hist_dir doesn't seem to play well with impermanence
# NO sensitive task shall be carried out!
# { directory = ".git_creds_dir"; mode = "0700"; }
{ directory = ".zsh_hist_dir"; mode = "0700"; }
{
directory = ".zsh_hist_dir";
mode = "0700";
}
# { directory = ".gnupg"; mode = "0700"; }
# { directory = ".ssh"; mode = "0700"; }
# { directory = ".local/share/keyrings"; mode = "0700"; }
Expand All @@ -196,19 +213,20 @@
users = {
mutableUsers = false;
users = {
root.hashedPassword =
"$6$oNsoXzCopc6uxli4$vthBqdTNXtq8MWlWRHRGe6QZUMb7CtPWaTdXSOKszeTAtmjG5zE/JPd7F668VTiuOUtpiy1oy061N0LlxjtHD1";
root.hashedPassword = "$6$oNsoXzCopc6uxli4$vthBqdTNXtq8MWlWRHRGe6QZUMb7CtPWaTdXSOKszeTAtmjG5zE/JPd7F668VTiuOUtpiy1oy061N0LlxjtHD1";
ash = {
hashedPassword =
"$y$j9T$yLdLVVEQoolJR9LNMYGl30$dNnh67D78jLz/YR9YXSR3i8efYd0QmI2ezo2h5v2W78";
hashedPassword = "$y$j9T$yLdLVVEQoolJR9LNMYGl30$dNnh67D78jLz/YR9YXSR3i8efYd0QmI2ezo2h5v2W78";
shell = pkgs.zsh;
isNormalUser = true;
# wheel - sudo
# networkmanager - manage network
# video - light control
# libvirtd - virtual manager controls.
# docker - Docker control
extraGroups = [ "wheel" "networkmanager" ];
extraGroups = [
"wheel"
"networkmanager"
];
};
};
};
Expand Down
59 changes: 40 additions & 19 deletions cfgs/img-deck/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{ config, lib, pkgs, ... }: with lib;
{ config
, lib
, pkgs
, ...
}:
with lib;
{
imports = [
./networking.nix
Expand All @@ -11,13 +16,23 @@

# This is a dummy key in ISO image, we shall not worry about its security.
# Agenix breaks in LiveCD due to https://github.com/ryantm/agenix/issues/165.
age.identityPaths = [ (pkgs.writeText "img_key_ed25519" (builtins.readFile ../../secrets/raw/img_key_ed25519)) ];
age.identityPaths = [
(pkgs.writeText "img_key_ed25519" (builtins.readFile ../../secrets/raw/img_key_ed25519))
];

# GPG agent that makes GPG work in LiveCD.
programs.gnupg.agent.enable = true;

# ZFS is currently broken on the latest kernel. Since we don't use it, it's fine to disable it.
boot.supportedFilesystems = lib.mkForce [ "btrfs" "reiserfs" "vfat" "f2fs" "xfs" "ntfs" "cifs" ];
boot.supportedFilesystems = lib.mkForce [
"btrfs"
"reiserfs"
"vfat"
"f2fs"
"xfs"
"ntfs"
"cifs"
];

# Needed for boot! Otherwise the initrd couldn't mount the root on hub.
boot.initrd.availableKernelModules = [ "hub" ];
Expand All @@ -32,14 +47,17 @@
inputMethod = {
enable = true;
type = "ibus";
ibus.engines = with pkgs.ibus-engines; [ libpinyin typing-booster ];
ibus.engines = with pkgs.ibus-engines; [
libpinyin
typing-booster
];
};
};

# Fonts
fonts.packages = with pkgs; [
noto-fonts
noto-fonts-cjk
noto-fonts-cjk-sans
noto-fonts-emoji
fira-code
fira-code-symbols
Expand Down Expand Up @@ -108,20 +126,23 @@
# This is a LiveCD, please don't enable disk config in NixOS.
disko.enableConfig = false;

environment.systemPackages = with pkgs; let
create-disko-pkg = name: path: (runCommandLocal "disko-${name}" { } ''
mkdir -p $out/bin
install ${path} $out/bin/disko-${name}
'');
in
[
(writeShellScriptBin "install-script"
(builtins.readFile ./install.sh))

(create-disko-pkg "main" config.system.build.diskoScript)
(create-disko-pkg "format" config.system.build.formatScript)
(create-disko-pkg "mount" config.system.build.mountScript)
];
environment.systemPackages =
with pkgs;
let
create-disko-pkg =
name: path:
(runCommandLocal "disko-${name}" { } ''
mkdir -p $out/bin
install ${path} $out/bin/disko-${name}
'');
in
[
(writeShellScriptBin "install-script" (builtins.readFile ./install.sh))

(create-disko-pkg "main" config.system.build.diskoScript)
(create-disko-pkg "format" config.system.build.formatScript)
(create-disko-pkg "mount" config.system.build.mountScript)
];

users.users.nixos = {
shell = pkgs.zsh;
Expand Down
70 changes: 48 additions & 22 deletions cfgs/img-x1c7/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{ inputs, config, lib, pkgs, ... }: with lib;
{ inputs
, config
, lib
, pkgs
, ...
}:
with lib;
{
imports = [
./networking.nix
Expand All @@ -13,13 +19,23 @@

# This is a dummy key in ISO image, we shall not worry about its security.
# Agenix breaks in LiveCD due to https://github.com/ryantm/agenix/issues/165.
age.identityPaths = [ (pkgs.writeText "img_key_ed25519" (builtins.readFile ../../secrets/raw/img_key_ed25519)) ];
age.identityPaths = [
(pkgs.writeText "img_key_ed25519" (builtins.readFile ../../secrets/raw/img_key_ed25519))
];

# GPG agent that makes GPG work in LiveCD.
programs.gnupg.agent.enable = true;

# ZFS is currently broken on the latest kernel. Since we don't use it, it's fine to disable it.
boot.supportedFilesystems = lib.mkForce [ "btrfs" "reiserfs" "vfat" "f2fs" "xfs" "ntfs" "cifs" ];
boot.supportedFilesystems = lib.mkForce [
"btrfs"
"reiserfs"
"vfat"
"f2fs"
"xfs"
"ntfs"
"cifs"
];

# Set internationalisation properties.
console = {
Expand All @@ -31,14 +47,17 @@
inputMethod = {
enable = true;
type = "ibus";
ibus.engines = with pkgs.ibus-engines; [ libpinyin typing-booster ];
ibus.engines = with pkgs.ibus-engines; [
libpinyin
typing-booster
];
};
};

# Fonts
fonts.packages = with pkgs; [
noto-fonts
noto-fonts-cjk
noto-fonts-cjk-sans
noto-fonts-emoji
fira-code
fira-code-symbols
Expand Down Expand Up @@ -94,29 +113,36 @@
dnsutils
smartmontools
];
extraDconf = let hm = inputs.home-manager.lib.hm; in {
"org/gnome/desktop/interface"."scaling-factor" = hm.gvariant.mkUint32 2;
};
extraDconf =
let
hm = inputs.home-manager.lib.hm;
in
{
"org/gnome/desktop/interface"."scaling-factor" = hm.gvariant.mkUint32 2;
};
};

disko.devices = (import ./../../modules/disko/disk.nix { });
# This is a LiveCD, please don't enable disk config in NixOS.
disko.enableConfig = false;

environment.systemPackages = with pkgs; let
create-disko-pkg = name: path: (runCommandLocal "disko-${name}" { } ''
mkdir -p $out/bin
install ${path} $out/bin/disko-${name}
'');
in
[
(writeShellScriptBin "install-script"
(builtins.readFile ./install.sh))

(create-disko-pkg "main" config.system.build.diskoScript)
(create-disko-pkg "format" config.system.build.formatScript)
(create-disko-pkg "mount" config.system.build.mountScript)
];
environment.systemPackages =
with pkgs;
let
create-disko-pkg =
name: path:
(runCommandLocal "disko-${name}" { } ''
mkdir -p $out/bin
install ${path} $out/bin/disko-${name}
'');
in
[
(writeShellScriptBin "install-script" (builtins.readFile ./install.sh))

(create-disko-pkg "main" config.system.build.diskoScript)
(create-disko-pkg "format" config.system.build.formatScript)
(create-disko-pkg "mount" config.system.build.mountScript)
];

users.users.nixos.shell = pkgs.zsh;
programs.zsh.enable = true;
Expand Down
Loading

0 comments on commit 655c764

Please sign in to comment.