add user configuration
This commit is contained in:
parent
61090d1439
commit
893aa88155
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
|||||||
hardware-configuration.nix
|
hardware-configuration.nix
|
||||||
calib-data.bin
|
calib-data.bin
|
||||||
|
user-config.nix
|
||||||
|
@ -1,36 +1,36 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
# DO NOT change this unless you know what you're doing!
|
# DO NOT change this unless you know what you're doing!
|
||||||
system.stateVersion = "24.11";
|
system.stateVersion = "24.11";
|
||||||
|
|
||||||
environment.variables = {
|
environment.variables = {
|
||||||
XDG_SESSION_TYPE = "wayland";
|
XDG_SESSION_TYPE = "wayland";
|
||||||
XDG_CURRENT_DESKTOP = "Hyprland";
|
XDG_CURRENT_DESKTOP = "Hyprland";
|
||||||
NIXPKGS_ALLOW_INSECURE = 1;
|
NIXPKGS_ALLOW_INSECURE = 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
nixpkgs.config = {
|
nixpkgs.config = {
|
||||||
allowInsecurePredicate = pkg: builtins.elem (pkgs.lib.getName pkg) [
|
allowInsecurePredicate = pkg: builtins.elem (pkgs.lib.getName pkg) [
|
||||||
"fluffychat-linux"
|
"fluffychat-linux"
|
||||||
"olm"
|
"olm"
|
||||||
"python312Packages.youtube-dl"
|
"python312Packages.youtube-dl"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
alacritty
|
alacritty
|
||||||
vim
|
vim
|
||||||
bluez
|
bluez
|
||||||
xwayland
|
xwayland
|
||||||
unzip
|
unzip
|
||||||
networkmanager
|
networkmanager
|
||||||
];
|
];
|
||||||
|
|
||||||
services.automatic-timezoned.enable = true;
|
services.automatic-timezoned.enable = true;
|
||||||
|
|
||||||
boot.loader.grub.enable = false;
|
boot.loader.grub.enable = false;
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
|
||||||
programs.xwayland.enable = true;
|
programs.xwayland.enable = true;
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
programs.adb.enable = true;
|
||||||
programs.thunar.enable = true;
|
programs.thunar.enable = true;
|
||||||
|
|
||||||
programs.thunar.plugins = with pkgs.xfce; [
|
programs.thunar.plugins = with pkgs.xfce; [
|
||||||
|
@ -18,24 +18,11 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
security.rtkit.enable = true;
|
security.rtkit.enable = true;
|
||||||
services.pipewire = {
|
|
||||||
enable = true;
|
|
||||||
alsa.enable = false;
|
|
||||||
alsa.support32Bit = true;
|
|
||||||
pulse.enable = true;
|
|
||||||
jack.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.services.bluetooth.serviceConfig.ExecStart = pkgs.lib.mkForce [
|
systemd.services.bluetooth.serviceConfig.ExecStart = pkgs.lib.mkForce [
|
||||||
""
|
""
|
||||||
"${pkgs.bluez}/libexec/bluetooth/bluetoothd -f /etc/bluetooth/main.conf -C"
|
"${pkgs.bluez}/libexec/bluetooth/bluetoothd -f /etc/bluetooth/main.conf -C"
|
||||||
];
|
];
|
||||||
|
|
||||||
hardware.bluetooth.enable = true;
|
|
||||||
hardware.bluetooth.powerOnBoot = true;
|
|
||||||
|
|
||||||
services.blueman.enable = true;
|
|
||||||
|
|
||||||
services.gvfs.enable = true;
|
services.gvfs.enable = true;
|
||||||
services.tlp = {
|
services.tlp = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@ -46,4 +33,19 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
services.dbus.enable = true;
|
services.dbus.enable = true;
|
||||||
|
services.pipewire = {
|
||||||
|
enable = true;
|
||||||
|
alsa.enable = true;
|
||||||
|
alsa.support32Bit = true;
|
||||||
|
pulse.enable = true;
|
||||||
|
jack.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
hardware.bluetooth = {
|
||||||
|
enable = true;
|
||||||
|
powerOnBoot = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.blueman.enable = true;
|
||||||
|
hardware.enableAllFirmware = true;
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@ in {
|
|||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
description = fullname;
|
description = fullname;
|
||||||
home = "/home/${username}";
|
home = "/home/${username}";
|
||||||
extraGroups = [ "wheel" "networkmanager" ];
|
extraGroups = [ "wheel" "networkmanager" "plugdev" "adbusers" ];
|
||||||
shell = preferredShell;
|
shell = preferredShell;
|
||||||
ignoreShellProgramCheck = true; # Will do it later in profile configuration
|
ignoreShellProgramCheck = true; # Will do it later in profile configuration
|
||||||
};
|
};
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
description = "Path to calibration data file.";
|
description = "Path to calibration data file.";
|
||||||
};
|
};
|
||||||
|
|
||||||
imports = lib.mkIf config.services.fingerprint-fix.enable [
|
imports = [
|
||||||
inputs.fingerprint-sensor.nixosModules."06cb-009a-fingerprint-sensor"
|
inputs.fingerprint-sensor.nixosModules."06cb-009a-fingerprint-sensor"
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -18,10 +18,7 @@
|
|||||||
description = "Restart services to fix fingerprint integration";
|
description = "Restart services to fix fingerprint integration";
|
||||||
wantedBy = targets;
|
wantedBy = targets;
|
||||||
after = targets;
|
after = targets;
|
||||||
serviceConfig = {
|
serviceConfig.ExecStart = "systemctl restart open-fprintd python3-validity";
|
||||||
type = "simple";
|
|
||||||
ExecStart = "systemctl --no-block restart python3-validity.service open-fprintd.service";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
services."06cb-009a-fingerprint-sensor" = {
|
services."06cb-009a-fingerprint-sensor" = {
|
||||||
@ -30,22 +27,9 @@
|
|||||||
calib-data-file = config.services.fingerprint-fix.calibDataFile;
|
calib-data-file = config.services.fingerprint-fix.calibDataFile;
|
||||||
};
|
};
|
||||||
|
|
||||||
services.open-fprintd.enable = true;
|
|
||||||
|
|
||||||
security.pam.services.login.fprintAuth = true;
|
|
||||||
security.pam.services.greetd.fprintAuth = true;
|
|
||||||
security.pam.services.sudo.fprintAuth = true;
|
|
||||||
security.pam.services.su.fprintAuth = true;
|
security.pam.services.su.fprintAuth = true;
|
||||||
|
security.pam.services.sudo.fprintAuth = true;
|
||||||
services.udev.extraRules = ''
|
security.pam.services.login.fprintAuth = true;
|
||||||
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="138a", ATTRS{idProduct}=="0097", ATTR{power/persist}="1"
|
security.pam.services.greetd.fprintAuth = true;
|
||||||
'';
|
|
||||||
|
|
||||||
security.pam.services.hyprlock.text = ''
|
|
||||||
# PAM configuration file for hyprlock
|
|
||||||
# the 'login' configuration file (see /etc/pam.d/login)
|
|
||||||
|
|
||||||
auth include login
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,8 @@ in {
|
|||||||
starship
|
starship
|
||||||
firefox-beta-bin
|
firefox-beta-bin
|
||||||
thunderbird-bin
|
thunderbird-bin
|
||||||
element-desktop
|
youtube-music
|
||||||
|
fluffychat
|
||||||
libreoffice-qt6-fresh
|
libreoffice-qt6-fresh
|
||||||
gimp
|
gimp
|
||||||
vscodium git nodejs
|
vscodium git nodejs
|
||||||
|
@ -1,29 +1,25 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
portals-config = pkgs.writeTextDir "share/xdg-desktop-portal/portals/portals.conf" ''
|
portals = [
|
||||||
[preferred]
|
|
||||||
default=hyprland
|
|
||||||
org.freedesktop.impl.portal.Settings=darkman
|
|
||||||
'';
|
|
||||||
packages = [
|
|
||||||
pkgs.xdg-desktop-portal
|
pkgs.xdg-desktop-portal
|
||||||
pkgs.xdg-desktop-portal-hyprland
|
pkgs.xdg-desktop-portal-hyprland
|
||||||
pkgs.xdg-desktop-portal-gtk
|
pkgs.xdg-desktop-portal-gtk
|
||||||
pkgs.darkman
|
pkgs.xdg-desktop-portal-wlr
|
||||||
|
];
|
||||||
|
|
||||||
|
packages = portals ++ [
|
||||||
|
pkgs.darkman
|
||||||
];
|
];
|
||||||
portals = pkgs.symlinkJoin {
|
|
||||||
name = "xdg-portals";
|
|
||||||
paths = [ portals-config ] ++ packages;
|
|
||||||
pathsToLink = [
|
|
||||||
"/share/xdg-desktop-portal/portals"
|
|
||||||
"/share/applications"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
in {
|
in {
|
||||||
home.sessionVariables = {
|
xdg.portal = {
|
||||||
XDG_DESKTOP_PORTAL_DIR = "${portals}/share/xdg-desktop-portal/portals";
|
enable = true;
|
||||||
};
|
extraPortals = portals;
|
||||||
|
config = {
|
||||||
|
common.default = "hyprland";
|
||||||
|
"org.freedesktop.impl.portal.Settings".default = "darkman";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
home.packages = packages;
|
home.packages = packages;
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
{ inputs, pkgs, ... }:
|
{ inputs, pkgs, ... }:
|
||||||
|
|
||||||
{
|
let
|
||||||
|
userConfig = import ../../user-config.nix;
|
||||||
|
in {
|
||||||
imports = [ ./fish ];
|
imports = [ ./fish ];
|
||||||
|
|
||||||
programs.pywal.enable = true;
|
programs.pywal.enable = true;
|
||||||
@ -13,11 +15,23 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
programs.obs-studio = {
|
||||||
|
enable = true;
|
||||||
|
plugins = with pkgs.obs-studio-plugins; [
|
||||||
|
obs-backgroundremoval
|
||||||
|
obs-pipewire-audio-capture
|
||||||
|
#advanced-scene-switcher
|
||||||
|
obs-tuna
|
||||||
|
obs-move-transition
|
||||||
|
waveform
|
||||||
|
wlrobs
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
services.darkman = {
|
services.darkman = {
|
||||||
enable = true;
|
enable = true;
|
||||||
darkModeScripts = {
|
darkModeScripts = {
|
||||||
theme = ''
|
theme = ''
|
||||||
${pkgs.pywalfox-native}/bin/pywalfox dark
|
|
||||||
${pkgs.dconf}/bin/dconf write\
|
${pkgs.dconf}/bin/dconf write\
|
||||||
/org/gnome/desktop/interface/color-scheme "'prefer-dark'"
|
/org/gnome/desktop/interface/color-scheme "'prefer-dark'"
|
||||||
'';
|
'';
|
||||||
@ -25,11 +39,12 @@
|
|||||||
wallpaper = ''
|
wallpaper = ''
|
||||||
$HOME/.config/hypr/scripts/random-wallpaper.sh
|
$HOME/.config/hypr/scripts/random-wallpaper.sh
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
pywalfox = "command -v pywalfox &>/dev/null && pywalfox dark && pywalfox update";
|
||||||
};
|
};
|
||||||
|
|
||||||
lightModeScripts = {
|
lightModeScripts = {
|
||||||
theme = ''
|
theme = ''
|
||||||
${pkgs.pywalfox-native}/bin/pywalfox light
|
|
||||||
${pkgs.dconf}/bin/dconf write\
|
${pkgs.dconf}/bin/dconf write\
|
||||||
/org/gnome/desktop/interface/color-scheme "'prefer-light'"
|
/org/gnome/desktop/interface/color-scheme "'prefer-light'"
|
||||||
'';
|
'';
|
||||||
@ -37,8 +52,12 @@
|
|||||||
wallpaper = ''
|
wallpaper = ''
|
||||||
$HOME/.config/hypr/scripts/random-wallpaper.sh
|
$HOME/.config/hypr/scripts/random-wallpaper.sh
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
pywalfox = "command -v pywalfox &>/dev/null && pywalfox light && pywalfox update";
|
||||||
};
|
};
|
||||||
|
|
||||||
settings.usegeoclue = false;
|
settings.usegeoclue = userConfig.geoclue;
|
||||||
|
settings.lat = userConfig.latitude;
|
||||||
|
settings.lng = userConfig.longtitude;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
5
user-config.nix.template
Normal file
5
user-config.nix.template
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
geoclue = true;
|
||||||
|
latitude = 0;
|
||||||
|
longtitude = 0;
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user