mirror of
https://github.com/donovanglover/nix-config.git
synced 2024-11-22 00:03:55 +01:00
meta: Don't use variables
The previous commit didn't actually work, and I shouldn't need to change the variables often, so it's much simpler to not have them. In the event that I do need to change something, rg and sd should get the job done well.
This commit is contained in:
parent
2f056d1e72
commit
8ffb196c0b
10
default.nix
10
default.nix
@ -1,4 +1,4 @@
|
||||
{ home-manager, stylix, lib, ... }:
|
||||
{ home-manager, stylix, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
@ -12,12 +12,4 @@
|
||||
./specializations
|
||||
./src/main.nix
|
||||
];
|
||||
|
||||
options.variables = {
|
||||
hostname = lib.mkOption { default = "nixos"; };
|
||||
hostHardwareConfiguration = lib.mkOption { default = ./hardware/laptop.nix; };
|
||||
stateVersion = lib.mkOption { default = "22.11"; };
|
||||
username = lib.mkOption { default = "user"; };
|
||||
defaultBrowser = lib.mkOption { default = "librewolf"; };
|
||||
};
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ pkgs, config, ... }:
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [ tig ];
|
||||
@ -22,7 +22,7 @@
|
||||
quotePath = false;
|
||||
};
|
||||
|
||||
web.browser = config.variables.defaultBrowser;
|
||||
web.browser = "librewolf";
|
||||
push.default = "simple";
|
||||
branch.autosetuprebase = "always";
|
||||
init.defaultBranch = "master";
|
||||
|
@ -1,9 +1,9 @@
|
||||
{ pkgs, config, ... }:
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
xdg.configFile."hypr/hyprland.conf".text = /* bash */ ''
|
||||
env=XCURSOR_SIZE,24
|
||||
env=BROWSER,${config.variables.defaultBrowser}
|
||||
env=BROWSER,librewolf
|
||||
env=GTK_IM_MODULE,fcitx
|
||||
env=QT_IM_MODULE,fcitx
|
||||
env=XMODIFIERS,@im=fcitx
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ config, ... }: {
|
||||
{
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
close_on_child_death = true;
|
||||
cursor_blink_interval = 0;
|
||||
|
||||
open_url_with = config.variables.defaultBrowser;
|
||||
open_url_with = "librewolf";
|
||||
wayland_titlebar_color = "background";
|
||||
|
||||
allow_remote_control = true;
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ config, ... }: {
|
||||
{
|
||||
xdg.mimeApps = {
|
||||
enable = true;
|
||||
|
||||
@ -7,8 +7,8 @@
|
||||
"image/jpeg" = "feh.desktop";
|
||||
"image/gif" = "org.qutebrowser.qutebrowser.desktop";
|
||||
"application/x-wine-extension-osz" = "osu-stable.desktop";
|
||||
"x-scheme-handler/http" = "${config.variables.defaultBrowser}.desktop";
|
||||
"x-scheme-handler/https" = "${config.variables.defaultBrowser}.desktop";
|
||||
"x-scheme-handler/http" = "librewolf.desktop";
|
||||
"x-scheme-handler/https" = "librewolf.desktop";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -1,11 +1,11 @@
|
||||
{ pkgs, config, ... }:
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [ mpc-cli ];
|
||||
|
||||
services.mpd = {
|
||||
enable = true;
|
||||
musicDirectory = "/home/${config.variables.username}/Music";
|
||||
musicDirectory = "/home/user/Music";
|
||||
};
|
||||
|
||||
xdg.configFile = {
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ config, ... }: {
|
||||
{
|
||||
xdg.userDirs = {
|
||||
enable = true;
|
||||
|
||||
@ -6,11 +6,11 @@
|
||||
templates = null;
|
||||
publicShare = null;
|
||||
|
||||
download = "/home/${config.variables.username}/ダウンロード";
|
||||
documents = "/home/${config.variables.username}/ドキュメント";
|
||||
music = "/home/${config.variables.username}/音楽";
|
||||
pictures = "/home/${config.variables.username}/画像";
|
||||
videos = "/home/${config.variables.username}/ビデオ";
|
||||
download = "/home/user/ダウンロード";
|
||||
documents = "/home/user/ドキュメント";
|
||||
music = "/home/user/音楽";
|
||||
pictures = "/home/user/画像";
|
||||
videos = "/home/user/ビデオ";
|
||||
};
|
||||
|
||||
xdg.configFile."user-dirs.locale".text = "ja_JP";
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ pkgs, config, ... }:
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
users.defaultUserShell = pkgs.fish;
|
||||
@ -76,7 +76,7 @@
|
||||
jis = "recode shift_jis..utf8"; # Easily convert shift_jis-encoded files to utf8
|
||||
utf16 = "recode utf16..utf8"; # Rarely, some files from Japan are utf16 instead
|
||||
jp = "LANG=ja_JP.UTF-8 LC_ALL=ja_JP.UTF-8";
|
||||
vm = /* fish */ ''cd ~/nix-config && crystal spec tests/main.cr --progress --verbose --tag local && nixos-rebuild build-vm --flake . --verbose && ./result/bin/run-${config.variables.hostname}-vm && trash put result ${config.variables.hostname}.qcow2'';
|
||||
vm = /* fish */ ''cd ~/nix-config && crystal spec tests/main.cr --progress --verbose --tag local && nixos-rebuild build-vm --flake . --verbose && ./result/bin/run-nixos-vm && trash put result nixos.qcow2'';
|
||||
sw = "cd ~/nix-config && crystal spec tests/main.cr --progress --verbose --tag local && sudo nixos-rebuild switch --flake . --verbose";
|
||||
st = "cd ~/nix-config && crystal spec tests/main.cr --progress --verbose --tag local";
|
||||
tf = "treefmt";
|
||||
|
@ -1,4 +1,6 @@
|
||||
{ pkgs, config, ... }: {
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
services.greetd = {
|
||||
enable = true;
|
||||
restart = false;
|
||||
@ -9,7 +11,7 @@
|
||||
};
|
||||
initial_session = {
|
||||
command = "${pkgs.hyprland}/bin/Hyprland";
|
||||
user = config.variables.username;
|
||||
user = "user";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -1,16 +1,16 @@
|
||||
{ config, ... }: {
|
||||
{
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
|
||||
sharedModules = [{
|
||||
home.stateVersion = config.variables.stateVersion;
|
||||
home.stateVersion = "22.11";
|
||||
}];
|
||||
|
||||
users = {
|
||||
user = {
|
||||
home.username = config.variables.username;
|
||||
home.homeDirectory = "/home/${config.variables.username}";
|
||||
home.username = "user";
|
||||
home.homeDirectory = "/home/user";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ config, ... }: {
|
||||
{
|
||||
networking = {
|
||||
hostName = config.variables.hostname;
|
||||
hostName = "nixos";
|
||||
|
||||
networkmanager = {
|
||||
enable = true;
|
||||
|
@ -1,12 +1,14 @@
|
||||
{ config, ... }: {
|
||||
{
|
||||
users = {
|
||||
mutableUsers = false;
|
||||
|
||||
users."${config.variables.username}" = {
|
||||
isNormalUser = true;
|
||||
uid = 1000;
|
||||
password = "user";
|
||||
extraGroups = [ "wheel" "networkmanager" ];
|
||||
users = {
|
||||
user = {
|
||||
isNormalUser = true;
|
||||
uid = 1000;
|
||||
password = "user";
|
||||
extraGroups = [ "wheel" "networkmanager" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ pkgs, lib, config, ... }: {
|
||||
{ pkgs, lib, ... }: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
grimblast
|
||||
waycorner
|
||||
@ -88,5 +88,5 @@
|
||||
];
|
||||
|
||||
environment.defaultPackages = [ ];
|
||||
system.stateVersion = config.varables.stateVersion;
|
||||
system.stateVersion = "22.11";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user