another reorg; add options for full or minimal helix install

This commit is contained in:
2025-02-08 17:27:13 +00:00
parent ea4e20e990
commit 99768f0b4a
25 changed files with 265 additions and 394 deletions

View File

@@ -7,9 +7,9 @@
{ {
imports = imports =
[ [
./nix-settings.nix ./base/nix-settings.nix
./fonts.nix ./base/fonts.nix
./kde.nix ./base/kde.nix
]; ];
# Use the systemd-boot EFI boot loader. # Use the systemd-boot EFI boot loader.

View File

@@ -1,118 +0,0 @@
{ pkgs, ... }:
{
imports = [
../home-manager/fonts.nix
../home-manager/terminal.nix
../home-manager/firefox/firefox.nix
../home-manager/development/vscode.nix
];
terminal.homeUpdateLocation = "/home/deck/Projects/nixos#deck";
terminal.flakeUpdateLocation = "/home/deck/Projects/nixos";
nixpkgs.config =
{
allowUnfree = true;
};
# Home Manager needs a bit of information about you and the paths it should
# manage.
home.username = "deck";
home.homeDirectory = "/home/deck";
# This value determines the Home Manager release that your configuration is
# compatible with. This helps avoid breakage when a new Home Manager release
# introduces backwards incompatible changes.
#
# You should not change this value, even if you update Home Manager. If you do
# want to update the value, then make sure to first check the Home Manager
# release notes.
home.stateVersion = "24.05"; # Please read the comment before changing.
# The home.packages option allows you to install Nix packages into your
# environment.
home.packages = with pkgs;[
# # Adds the 'hello' command to your environment. It prints a friendly
# # "Hello, world!" when run.
# pkgs.hello
# # It is sometimes useful to fine-tune packages, for example, by applying
# # overrides. You can do that directly here, just don't forget the
# # parentheses. Maybe you want to install Nerd Fonts with a limited number of
# # fonts?
# (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
# # You can also create simple shell scripts directly inside your
# # configuration. For example, this adds a command 'my-hello' to your
# # environment:
# (pkgs.writeShellScriptBin "my-hello" ''
# echo "Hello, ${config.home.username}!"
# '')
# general
thunderbird
keepassxc
qbittorrent
libreoffice-qt
joplin-desktop
obsidian
# media
strawberry-qt6
jellyfin-media-player
# comms
teamspeak_client
vesktop
];
# Home Manager is pretty good at managing dotfiles. The primary way to manage
# plain files is through 'home.file'.
home.file = {
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
# # symlink to the Nix store copy.
# ".screenrc".source = dotfiles/screenrc;
# # You can also set the file content immediately.
# ".gradle/gradle.properties".text = ''
# org.gradle.console=verbose
# org.gradle.daemon.idletimeout=3600000
# '';
};
# Home Manager can also manage your environment variables through
# 'home.sessionVariables'. These will be explicitly sourced when using a
# shell provided by Home Manager. If you don't want to manage your shell
# through Home Manager then you have to manually source 'hm-session-vars.sh'
# located at either
#
# ~/.nix-profile/etc/profile.d/hm-session-vars.sh
#
# or
#
# ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh
#
# or
#
# /etc/profiles/per-user/worble/etc/profile.d/hm-session-vars.sh
#
home.sessionVariables = {
NIXOS_OZONE_WL = "1";
};
# home.sessionPath = [
# "$HOME/.local/bin"
# ];
services.nextcloud-client = {
enable = true;
startInBackground = true;
};
# Let Home Manager install and manage itself.
programs = {
home-manager.enable = true;
};
}

69
devices/deck/home.nix Normal file
View File

@@ -0,0 +1,69 @@
{ pkgs, ... }:
{
imports = [
../../home-manager/fonts.nix
../../home-manager/terminal.nix
../../home-manager/gaming.nix
../../home-manager/firefox/firefox.nix
../../home-manager/development/vscode.nix
];
terminal.homeUpdateLocation = "/home/deck/Projects/nixos#deck";
terminal.flakeUpdateLocation = "/home/deck/Projects/nixos";
nixpkgs.config =
{
allowUnfree = true;
};
home.username = "deck";
home.homeDirectory = "/home/deck";
home.stateVersion = "24.05";
home.packages = with pkgs;[
# general
thunderbird
keepassxc
qbittorrent
libreoffice-qt
joplin-desktop
obsidian
# media
strawberry-qt6
jellyfin-media-player
# comms
teamspeak_client
vesktop
];
home.file = {
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
# # symlink to the Nix store copy.
# ".screenrc".source = dotfiles/screenrc;
# # You can also set the file content immediately.
# ".gradle/gradle.properties".text = ''
# org.gradle.console=verbose
# org.gradle.daemon.idletimeout=3600000
# '';
};
home.sessionVariables = {
NIXOS_OZONE_WL = "1";
};
services.nextcloud-client = {
enable = true;
startInBackground = true;
};
programs = {
home-manager.enable = true;
};
}

View File

@@ -7,13 +7,13 @@
{ {
imports = imports =
[ [
../configuration/base.nix ../../configuration/base.nix
# Include the results of the hardware scan. # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
inputs.disko.nixosModules.default inputs.disko.nixosModules.default
./disk-config.nix ./disk-config.nix
inputs.home-manager.nixosModules.default inputs.home-manager.nixosModules.default
../modules/laptop.nix ../../configuration/modules/laptop.nix
]; ];
networking.hostName = "starlite"; # Define your hostname. networking.hostName = "starlite"; # Define your hostname.

76
devices/starlite/home.nix Normal file
View File

@@ -0,0 +1,76 @@
{ pkgs, ... }:
{
imports = [
../../home-manager/fonts.nix
../../home-manager/terminal.nix
../../home-manager/firefox/firefox.nix
../../home-manager/development/vscode.nix
];
terminal.nixUpdateLocation = "/home/worble/Projects/nixos#starlite";
terminal.flakeUpdateLocation = "/home/worble/Projects/nixos";
home.username = "worble";
home.homeDirectory = "/home/worble";
home.stateVersion = "24.05";
home.packages = with pkgs;[
# general
thunderbird
keepassxc
qbittorrent
libreoffice-qt
joplin-desktop
obsidian
# media
strawberry-qt6
jellyfin-media-player
# comms
teamspeak_client
vesktop
];
home.file = {
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
# # symlink to the Nix store copy.
# ".screenrc".source = dotfiles/screenrc;
# # You can also set the file content immediately.
# ".gradle/gradle.properties".text = ''
# org.gradle.console=verbose
# org.gradle.daemon.idletimeout=3600000
# '';
};
home.sessionVariables = {
NIXOS_OZONE_WL = "1";
};
services.nextcloud-client = {
enable = true;
startInBackground = true;
};
# Let Home Manager install and manage itself.
programs = {
home-manager.enable = true;
chromium = {
enable = true;
package = pkgs.brave;
};
mpv = {
enable = true;
config = {
screenshot-directory = "~/Pictures/";
screenshot-template = "%F/%F_snapshot_%P";
};
};
};
}

View File

@@ -7,15 +7,15 @@
{ {
imports = imports =
[ [
../configuration/base.nix ../../configuration/base.nix
# Include the results of the hardware scan. # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
inputs.disko.nixosModules.default inputs.disko.nixosModules.default
./disk-config.nix ./disk-config.nix
inputs.home-manager.nixosModules.default inputs.home-manager.nixosModules.default
../modules/laptop.nix ../../configuration/modules/laptop.nix
../modules/virtualisation.nix ../../configuration/modules/virtualisation.nix
../modules/gaming.nix ../../configuration/modules/gaming.nix
]; ];
networking.hostName = "tuxedo"; # Define your hostname. networking.hostName = "tuxedo"; # Define your hostname.

View File

@@ -2,50 +2,23 @@
{ {
imports = [ imports = [
../home-manager/fonts.nix ../../home-manager/fonts.nix
../home-manager/terminal.nix ../../home-manager/terminal.nix
../home-manager/firefox/firefox.nix ../../home-manager/firefox/firefox.nix
../home-manager/development/all.nix ../../home-manager/development/all.nix
../home-manager/gaming.nix ../../home-manager/gaming.nix
]; ];
terminal.nixUpdateLocation = "/home/worble/Projects/nixos#tuxedo"; terminal.nixUpdateLocation = "/home/worble/Projects/nixos#tuxedo";
terminal.flakeUpdateLocation = "/home/worble/Projects/nixos"; terminal.flakeUpdateLocation = "/home/worble/Projects/nixos";
helix.fullInstall = true;
# Home Manager needs a bit of information about you and the paths it should
# manage.
home.username = "worble"; home.username = "worble";
home.homeDirectory = "/home/worble"; home.homeDirectory = "/home/worble";
# This value determines the Home Manager release that your configuration is home.stateVersion = "24.05";
# compatible with. This helps avoid breakage when a new Home Manager release
# introduces backwards incompatible changes.
#
# You should not change this value, even if you update Home Manager. If you do
# want to update the value, then make sure to first check the Home Manager
# release notes.
home.stateVersion = "24.05"; # Please read the comment before changing.
# The home.packages option allows you to install Nix packages into your
# environment.
home.packages = with pkgs;[ home.packages = with pkgs;[
# # Adds the 'hello' command to your environment. It prints a friendly
# # "Hello, world!" when run.
# pkgs.hello
# # It is sometimes useful to fine-tune packages, for example, by applying
# # overrides. You can do that directly here, just don't forget the
# # parentheses. Maybe you want to install Nerd Fonts with a limited number of
# # fonts?
# (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
# # You can also create simple shell scripts directly inside your
# # configuration. For example, this adds a command 'my-hello' to your
# # environment:
# (pkgs.writeShellScriptBin "my-hello" ''
# echo "Hello, ${config.home.username}!"
# '')
# general # general
thunderbird thunderbird
keepassxc keepassxc
@@ -76,8 +49,6 @@
gpu-screen-recorder-gtk gpu-screen-recorder-gtk
]; ];
# Home Manager is pretty good at managing dotfiles. The primary way to manage
# plain files is through 'home.file'.
home.file = { home.file = {
# # Building this configuration will create a copy of 'dotfiles/screenrc' in # # Building this configuration will create a copy of 'dotfiles/screenrc' in
# # the Nix store. Activating the configuration will then make '~/.screenrc' a # # the Nix store. Activating the configuration will then make '~/.screenrc' a
@@ -91,30 +62,10 @@
# ''; # '';
}; };
# Home Manager can also manage your environment variables through
# 'home.sessionVariables'. These will be explicitly sourced when using a
# shell provided by Home Manager. If you don't want to manage your shell
# through Home Manager then you have to manually source 'hm-session-vars.sh'
# located at either
#
# ~/.nix-profile/etc/profile.d/hm-session-vars.sh
#
# or
#
# ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh
#
# or
#
# /etc/profiles/per-user/worble/etc/profile.d/hm-session-vars.sh
#
home.sessionVariables = { home.sessionVariables = {
NIXOS_OZONE_WL = "1"; NIXOS_OZONE_WL = "1";
}; };
# home.sessionPath = [
# "$HOME/.local/bin"
# ];
services.nextcloud-client = { services.nextcloud-client = {
enable = true; enable = true;
startInBackground = true; startInBackground = true;
@@ -125,7 +76,7 @@
home-manager.enable = true; home-manager.enable = true;
firefox = { firefox = {
profiles.work = import ../home-manager/firefox/firefox-profile.nix // { profiles.work = import ../../home-manager/firefox/firefox-profile.nix // {
id = 1; id = 1;
name = "work"; name = "work";
isDefault = false; isDefault = false;

View File

@@ -22,13 +22,13 @@
nixosConfigurations.tuxedo = nixpkgs.lib.nixosSystem { nixosConfigurations.tuxedo = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs; }; specialArgs = { inherit inputs; };
modules = [ modules = [
./tuxedo/configuration.nix ./devices/tuxedo/configuration.nix
]; ];
}; };
nixosConfigurations.starlite = nixpkgs.lib.nixosSystem { nixosConfigurations.starlite = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs; }; specialArgs = { inherit inputs; };
modules = [ modules = [
./starlite/configuration.nix ./devices/starlite/configuration.nix
]; ];
}; };
packages.${system}.homeConfigurations.deck = home-manager.lib.homeManagerConfiguration { packages.${system}.homeConfigurations.deck = home-manager.lib.homeManagerConfiguration {
@@ -37,7 +37,7 @@
# Specify your home configuration modules here, for example, # Specify your home configuration modules here, for example,
# the path to your home.nix. # the path to your home.nix.
modules = [ ./deck/home.nix ]; modules = [ ./devices/deck/home.nix ];
# Optionally use extraSpecialArgs # Optionally use extraSpecialArgs
# to pass through arguments to home.nix # to pass through arguments to home.nix

2
home-manager-update.sh Normal file
View File

@@ -0,0 +1,2 @@
#!/usr/bin/env bash
home-manager switch --flake "/home/worble/Projects/nixos#$(whoami)"

View File

@@ -1,89 +1,102 @@
{ pkgs, ... }: { lib, config, pkgs, ... }:
with lib;
{ {
programs = { options.helix = {
helix = { fullInstall = mkOption {
enable = true; type = lib.types.nullOr lib.types.bool;
defaultEditor = true; default = false;
settings = { };
theme = "dracula"; };
};
extraPackages = with pkgs;[ config = {
marksman programs = {
shfmt helix = mkMerge [{
bash-language-server enable = true;
superhtml defaultEditor = true;
nixd settings = {
nixpkgs-fmt theme = "dracula";
biome };
] ++ (with nodePackages;[ extraPackages = with pkgs;[ gcc ];
vscode-langservers-extracted }
typescript-language-server (mkIf config.helix.fullInstall {
]); extraPackages = with pkgs;[
languages = { marksman
language = [ shfmt
{ bash-language-server
name = "nix"; superhtml
language-servers = [ "nixd" "nil" ]; nixd
} nixpkgs-fmt
{ biome
name = "html"; ] ++ (with nodePackages;[
language-servers = [ "superhtml" "vscode-html-language-server" ]; vscode-langservers-extracted
} typescript-language-server
{ ]);
name = "bash"; languages = {
formatter = { command = "${pkgs.shfmt}/bin/shfmt"; }; language = [
}
{
name = "javascript";
language-servers = [
{ name = "biome"; }
{ {
name = "typescript-language-server"; name = "nix";
except-features = [ "format" ]; language-servers = [ "nixd" "nil" ];
}
{
name = "html";
language-servers = [ "superhtml" "vscode-html-language-server" ];
}
{
name = "bash";
formatter = { command = "shfmt"; };
}
{
name = "javascript";
language-servers = [
{ name = "biome"; }
{
name = "typescript-language-server";
except-features = [ "format" ];
}
];
auto-format = true;
formatter = { command = "biome"; args = [ "format" "--stdin-file-path" "a.js" ]; };
}
{
name = "typescript";
language-servers = [
{ name = "biome"; }
{
name = "typescript-language-server";
except-features = [ "format" ];
}
];
auto-format = true;
formatter = { command = "biome"; args = [ "format" "--stdin-file-path" "a.ts" ]; };
}
{
name = "jsx";
language-servers = [
{ name = "biome"; }
{
name = "typescript-language-server";
except-features = [ "format" ];
}
];
auto-format = true;
formatter = { command = "biome"; args = [ "format" "--stdin-file-path" "a.jsx" ]; };
}
{
name = "tsx";
language-servers = [
{ name = "biome"; }
{
name = "typescript-language-server";
except-features = [ "format" ];
}
];
auto-format = true;
formatter = { command = "biome"; args = [ "format" "--stdin-file-path" "a.tsx" ]; };
} }
]; ];
auto-format = true; };
formatter = { command = "biome"; args = [ "format" "--stdin-file-path" "a.js" ]; }; })];
}
{
name = "typescript";
language-servers = [
{ name = "biome"; }
{
name = "typescript-language-server";
except-features = [ "format" ];
}
];
auto-format = true;
formatter = { command = "biome"; args = [ "format" "--stdin-file-path" "a.ts" ]; };
}
{
name = "jsx";
language-servers = [
{ name = "biome"; }
{
name = "typescript-language-server";
except-features = [ "format" ];
}
];
auto-format = true;
formatter = { command = "biome"; args = [ "format" "--stdin-file-path" "a.jsx" ]; };
}
{
name = "tsx";
language-servers = [
{ name = "biome"; }
{
name = "typescript-language-server";
except-features = [ "format" ];
}
];
auto-format = true;
formatter = { command = "biome"; args = [ "format" "--stdin-file-path" "a.tsx" ]; };
}
];
};
}; };
}; };
} }

View File

@@ -2,6 +2,10 @@
with lib; with lib;
{ {
imports = [
./development/helix.nix
];
options.terminal = { options.terminal = {
nixUpdateLocation = mkOption { nixUpdateLocation = mkOption {
type = lib.types.nullOr lib.types.str; type = lib.types.nullOr lib.types.str;

View File

@@ -1,126 +0,0 @@
{ pkgs, ... }:
{
imports = [
../home-manager/fonts.nix
../home-manager/terminal.nix
../home-manager/firefox/firefox.nix
../home-manager/development/vscode.nix
];
terminal.nixUpdateLocation = "/home/worble/Projects/nixos#starlite";
terminal.flakeUpdateLocation = "/home/worble/Projects/nixos";
# Home Manager needs a bit of information about you and the paths it should
# manage.
home.username = "worble";
home.homeDirectory = "/home/worble";
# This value determines the Home Manager release that your configuration is
# compatible with. This helps avoid breakage when a new Home Manager release
# introduces backwards incompatible changes.
#
# You should not change this value, even if you update Home Manager. If you do
# want to update the value, then make sure to first check the Home Manager
# release notes.
home.stateVersion = "24.05"; # Please read the comment before changing.
# The home.packages option allows you to install Nix packages into your
# environment.
home.packages = with pkgs;[
# # Adds the 'hello' command to your environment. It prints a friendly
# # "Hello, world!" when run.
# pkgs.hello
# # It is sometimes useful to fine-tune packages, for example, by applying
# # overrides. You can do that directly here, just don't forget the
# # parentheses. Maybe you want to install Nerd Fonts with a limited number of
# # fonts?
# (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
# # You can also create simple shell scripts directly inside your
# # configuration. For example, this adds a command 'my-hello' to your
# # environment:
# (pkgs.writeShellScriptBin "my-hello" ''
# echo "Hello, ${config.home.username}!"
# '')
# general
thunderbird
keepassxc
qbittorrent
libreoffice-qt
joplin-desktop
obsidian
# media
strawberry-qt6
jellyfin-media-player
# comms
teamspeak_client
vesktop
];
# Home Manager is pretty good at managing dotfiles. The primary way to manage
# plain files is through 'home.file'.
home.file = {
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
# # symlink to the Nix store copy.
# ".screenrc".source = dotfiles/screenrc;
# # You can also set the file content immediately.
# ".gradle/gradle.properties".text = ''
# org.gradle.console=verbose
# org.gradle.daemon.idletimeout=3600000
# '';
};
# Home Manager can also manage your environment variables through
# 'home.sessionVariables'. These will be explicitly sourced when using a
# shell provided by Home Manager. If you don't want to manage your shell
# through Home Manager then you have to manually source 'hm-session-vars.sh'
# located at either
#
# ~/.nix-profile/etc/profile.d/hm-session-vars.sh
#
# or
#
# ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh
#
# or
#
# /etc/profiles/per-user/worble/etc/profile.d/hm-session-vars.sh
#
home.sessionVariables = {
NIXOS_OZONE_WL = "1";
};
# home.sessionPath = [
# "$HOME/.local/bin"
# ];
services.nextcloud-client = {
enable = true;
startInBackground = true;
};
# Let Home Manager install and manage itself.
programs = {
home-manager.enable = true;
chromium = {
enable = true;
package = pkgs.brave;
};
mpv = {
enable = true;
config = {
screenshot-directory = "~/Pictures/";
screenshot-template = "%F/%F_snapshot_%P";
};
};
};
}