Skip to content

Commit

Permalink
cleanup time (#212)
Browse files Browse the repository at this point in the history
  • Loading branch information
isabelroses authored Jun 19, 2024
2 parents d511809 + 4d01b74 commit f504cf4
Show file tree
Hide file tree
Showing 137 changed files with 1,954 additions and 1,545 deletions.
29 changes: 6 additions & 23 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@
inputs = {
nixpkgs.follows = "nixpkgs";
nixpkgs-24_05.follows = "";
utils.follows = "";
flake-compat.follows = "";
};
};
Expand Down
7 changes: 2 additions & 5 deletions home/isabel/configs/gui/browsers/chromium.nix
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ in
# };

package = chrome_pkg.override {
nss = pkgs.nss_latest;
enableWideVine = true;

commandLineArgs =
Expand Down Expand Up @@ -78,13 +77,11 @@ in
"--disable-speech-synthesis-api"
]
++ lib.optionals (lib.isWayland osConfig) [
# Wayland
# Disabled because hardware acceleration doesn't work
# when disabling --use-gl=egl, it's not gonna show any emoji
# and it's gonna be slow as hell

# when disabling --use-gl=egl, it's not gonna show any emojis
# "--use-gl=egl"

# Wayland
"--ozone-platform=wayland"
"--enable-features=UseOzonePlatform"
];
Expand Down
6 changes: 1 addition & 5 deletions hosts/amaterasu/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,7 @@ in
tmpOnTmpfs = true;
enableKernelTweaks = true;
loadRecommendedModules = true;

plymouth = {
enable = true;
withThemes = true;
};
plymouth.enable = true;

initrd = {
enableTweaks = true;
Expand Down
1 change: 0 additions & 1 deletion hosts/luz/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
video.enable = false;
sound.enable = false;
bluetooth.enable = false;
printing.enable = false;

networking = {
optimizeTcp = false;
Expand Down
7 changes: 1 addition & 6 deletions hosts/valkyrie/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,7 @@
tmpOnTmpfs = true;
enableKernelTweaks = true;
loadRecommendedModules = true;

plymouth = {
enable = false;
withThemes = true;
};
plymouth.enable = false;

initrd = {
enableTweaks = true;
Expand All @@ -39,7 +35,6 @@
video.enable = false;
sound.enable = false;
bluetooth.enable = false;
printing.enable = false;
yubikeySupport.enable = false;

security = {
Expand Down
39 changes: 4 additions & 35 deletions modules/base/activation/default.nix
Original file line number Diff line number Diff line change
@@ -1,37 +1,6 @@
{ pkgs, config, ... }:
{
system.activationScripts = {
# https://github.com/colemickens/nixcfg/blob/main/mixins/ssh.nix
# symlink root's ssh config to ours
# to fix nix-daemon's ability to remote build since it sshs from the root account
root_ssh_config =
let
inherit (config.modules.system) mainUser;

sshDir = "${config.users.users.${mainUser}.home}/.ssh";
in
{
text = ''
(
# symlink root ssh config to ours so daemon can use our agent/keys/etc...
mkdir -p /root/.ssh
ln -sf ${sshDir}/config /root/.ssh/config
ln -sf ${sshDir}/known_hosts /root/.ssh/known_hosts
ln -sf ${sshDir}/known_hosts /root/.ssh/known_hosts
)
'';
deps = [ ];
};

diff = {
supportsDryActivation = true;
text = ''
if [[ -e /run/current-system ]]; then
echo "=== diff to current-system ==="
${pkgs.nvd}/bin/nvd --nix-bin-dir='${config.nix.package}/bin' diff /run/current-system "$systemConfig"
echo "=== end of the system diff ==="
fi
'';
};
};
imports = [
./diff.nix
./root-ssh.nix
];
}
13 changes: 13 additions & 0 deletions modules/base/activation/diff.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{ pkgs, config, ... }:
{
system.activationScripts.diff = {
supportsDryActivation = true;
text = ''
if [[ -e /run/current-system ]]; then
echo "=== diff to current-system ==="
${pkgs.nvd}/bin/nvd --nix-bin-dir='${config.nix.package}/bin' diff /run/current-system "$systemConfig"
echo "=== end of the system diff ==="
fi
'';
};
}
24 changes: 24 additions & 0 deletions modules/base/activation/root-ssh.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{ config, ... }:
{
# https://github.com/colemickens/nixcfg/blob/main/mixins/ssh.nix
# symlink root's ssh config to ours
# to fix nix-daemon's ability to remote build since it sshs from the root account
system.activationScripts.root_ssh_config =
let
inherit (config.modules.system) mainUser;

sshDir = "${config.users.users.${mainUser}.home}/.ssh";
in
{
text = ''
(
# symlink root ssh config to ours so daemon can use our agent/keys/etc...
mkdir -p /root/.ssh
ln -sf ${sshDir}/config /root/.ssh/config
ln -sf ${sshDir}/known_hosts /root/.ssh/known_hosts
ln -sf ${sshDir}/known_hosts /root/.ssh/known_hosts
)
'';
deps = [ ];
};
}
22 changes: 8 additions & 14 deletions modules/base/environment/vars.nix
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
{ config, ... }:
{
# variables that I want to set globally on all systems
environment.variables = {
EDITOR = "nvim";
VISUAL = "vscode";
SUDO_EDITOR = "nvim";

environment = {
# the below can be done for faster shell response time but it can break things, and it did
# binsh = "${pkgs.dash}/bin/dash";
SYSTEMD_PAGERSECURE = "true";
PAGER = "less -FR";
MANPAGER = "nvim +Man!";

variables = {
EDITOR = "nvim";
VISUAL = "vscode";
SUDO_EDITOR = "nvim";

SYSTEMD_PAGERSECURE = "true";
PAGER = "less -FR";
MANPAGER = "nvim +Man!";

FLAKE = "${config.modules.environment.flakePath}";
};
FLAKE = "${config.modules.environment.flakePath}";
};
}
2 changes: 0 additions & 2 deletions modules/base/options/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
imports = [
./device
./programs
./themes
./services
./system
./environment
];
Expand Down
31 changes: 1 addition & 30 deletions modules/base/options/environment/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@ let
;

inherit (config.modules.system) mainUser;
cfg = config.modules.environment;
in
{
options.modules.environment = {
useHomeManager = mkEnableOption "Whether to use home-manager or not." // {
useHomeManager = mkEnableOption "Whether to use home-manager or not" // {
default = true;
};

Expand All @@ -26,34 +25,6 @@ in
default = "/${ldTernary pkgs "home" "Users"}/${mainUser}/.config/flake";
description = "The path to the configuration";
};

desktop = mkOption {
type = types.nullOr (
types.enum [
"Hyprland"
"Sway"
]
);
default = "Hyprland";
description = "The desktop environment to be used.";
};

loginManager = mkOption {
type = types.nullOr (
types.enum [
"greetd"
"gdm"
"lightdm"
"sddm"
]
);
default = "greetd";
description = "The login manager to be used by the system.";
};

isWayland = mkEnableOption "Inferred data based on the desktop environment." // {
default = cfg.desktop == "Hyprland" || cfg.desktop == "Sway";
};
};

config.assertions = [
Expand Down
9 changes: 2 additions & 7 deletions modules/base/options/programs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@ let
cfg = config.modules.programs;
in
{
imports = [
./defaults.nix
./gaming.nix
];
imports = [ ./defaults.nix ];

options.modules.programs = {
# For programs that are not exactly limited to cli, tui or gui
Expand All @@ -23,9 +20,7 @@ in
neovim.enable = mkEnableOption "Neovim editor" // {
default = true;
};
vscode.enable = mkEnableOption "VScode editor" // {
default = cfg.gui.enable;
};
vscode.enable = mkEnableOption "VScode editor";
micro.enable = mkEnableOption "Micro editor";
};

Expand Down
26 changes: 0 additions & 26 deletions modules/base/options/programs/gaming.nix

This file was deleted.

Loading

0 comments on commit f504cf4

Please sign in to comment.