restructure

This commit is contained in:
twoneis 2024-07-02 03:01:43 +02:00
parent 20b2af86d7
commit 8cf8c5609d
26 changed files with 265 additions and 283 deletions

View file

@ -1,11 +0,0 @@
{ lib, config, ... }: lib.mkIf(config.withAudio) {
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
};
}

View file

@ -1,14 +0,0 @@
{ lib, config, ... }: lib.mkIf(config.withBluetooth) {
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
settings = {
General = {
Enable = "Source,Sink,Media,Socket";
Experimental = true;
};
};
};
services.blueman.enable = true;
}

View file

@ -1,13 +1,14 @@
{ inputs, pkgs, lib, ... }: {
imports = [
./colors.nix
./audio
./bluetooth
./containers
./games
./gnome
./home
./niri
./virt
./user
./utils
./vm
];
nixpkgs = {
@ -45,10 +46,6 @@
''
10.10.11.245 surveillance.htb
'';
# 57621: spotifyd
firewall.allowedTCPPorts = [
57621
];
};
time.timeZone = "Europe/Amsterdam";
@ -78,18 +75,4 @@
description = "twoneis";
extraGroups = [ "networkmanager" "wheel" ];
};
services = {
# Needed for some features in nautilus such as auto-mounting and trash
gvfs.enable = true;
xserver = {
enable = true;
displayManager.gdm = {
enable = true;
};
};
};
programs.fish.enable = true;
users.defaultUserShell = pkgs.fish;
}

View file

@ -4,12 +4,6 @@
useUserPackages = true;
users.twoneis = {
imports = [
./utils
./programs
./themes
];
home = {
username = "twoneis";
homeDirectory = "/home/twoneis";

View file

@ -1,60 +0,0 @@
{ pkgs, osConfig, ... }: {
imports = [
./firefox.nix
];
home.packages = with pkgs; [
signal-desktop
vesktop
fractal
loupe
snapshot
gnome.nautilus
libreoffice-qt6-fresh
];
home.file = {
".config/vesktop/settings.json" = {
source = ./vesktop-settings.json;
};
".config/vesktop/settings/settings.json" = {
source = ./vencord-settings.json;
};
};
programs.pandoc = {
enable = true;
};
programs.mpv = {
enable = true;
};
services.spotifyd = {
enable = true;
settings = {
global = {
device_name = osConfig.networking.hostName;
bitrate = 320;
volume_normalisation = true;
autoplay = false;
zeroconf_port = 57621;
};
};
};
programs.thunderbird = {
enable = true;
profiles = {
"default" = {
isDefault = true;
};
};
};
programs.alacritty = {
enable = true;
settings = import ./alacritty-config.nix;
};
}

View file

@ -1,48 +0,0 @@
{ pkgs, ... }: {
home.packages = with pkgs; [
gnome.adwaita-icon-theme
adwaita-qt
adwaita-qt6
];
qt = {
enable = true;
platformTheme.name = "kde";
style.name = "adwaita-dark";
};
gtk = {
enable = true;
gtk4.extraConfig = {
gtk-application-prefer-dark-theme = true;
};
gtk3.extraConfig = {
gtk-application-prefer-dark-theme = true;
};
gtk2.extraConfig = "gtk-application-prefer-dark-theme=1\n";
theme.name = "Adwaita Dark";
};
dconf = {
enable = true;
settings = {
"org/gnome/desktop/interface" = {
color-scheme = "prefer-dark";
};
};
};
home.pointerCursor = let getFrom = url: hash: name: {
gtk.enable = true;
x11.enable = true;
name = name;
size = 24;
package = pkgs.runCommand "moveUp" {} ''
mkdir -p $out/share/icons
ln -s ${pkgs.fetchzip{
url = url;
hash = hash;
}} $out/share/icons/${name}
'';
}; in getFrom "https://github.com/rose-pine/cursor/releases/download/v1.1.0/BreezeX-RosePine-Linux.tar.xz" "sha256-t5xwAPGhuQUfGThedLsmtZEEp1Ljjo3Udhd5Ql3O67c=" "BreezX-RosePine-Linux";
}

View file

@ -1,101 +0,0 @@
{ pkgs, ... }: {
home.packages = with pkgs; [
man-pages
man-pages-posix
tree
file
zip
unzip
gnutar
lshw
netcat-openbsd
];
home.file = {
".gdbinit" = {
source = ./gdbinit;
};
};
programs.man = {
enable = true;
};
programs.less = {
enable = true;
keys = ''
t back-line
n forw-line
'';
};
programs.git = {
enable = true;
userName = "twoneis";
userEmail = "sanjay29@sapura.de";
extraConfig = {
init.defaultBranch = "main";
push.autoSetupRemote = true;
};
};
programs.gh = {
enable = true;
gitCredentialHelper.enable = true;
};
programs.helix = {
enable = true;
defaultEditor = true;
extraPackages = with pkgs; [ nil marksman ];
settings = import ./helix-config.nix;
languages = import ./helix-languages.nix;
};
programs.direnv = {
enable = true;
enableBashIntegration = true;
nix-direnv.enable = true;
};
programs.bottom = {
enable = true;
};
programs.hyfetch = {
enable = true;
settings = {
preset = "transgender";
mode = "rgb";
light_dark = "dark";
lightness = 0.65;
color_align = {
mode = "horizontal";
};
backend = "neofetch";
distro = "nixos_old";
};
};
programs.fish = {
enable = true;
plugins = with pkgs.fishPlugins; [
{ name = "tide"; src = pure.src; }
{ name = "bass"; src = bass.src; }
{ name = "sponge"; src = sponge.src; }
];
shellAbbrs = {
ga = "git add";
gc = "git commit";
gp = "git push";
gs = "git submodule sync --recursive && git submodule update --init --recursive";
gpl = "git pull --recurse-submodules";
gst = "git status";
repl = "nix repl --expr 'import <nixpkgs>{}'";
nrb = "sudo nixos-rebuild switch --cores 0 --flake .";
nd = "nix develop";
};
};
}

View file

@ -8,17 +8,17 @@
];
programs.niri = {
settings = import ./niri-settings.nix { config = config; };
settings = import ./niri.conf.nix { config = config; };
};
programs.fuzzel= {
enable = true;
settings = import ./fuzzel-settings.nix { lib = lib; config = config; };
settings = import ./fuzzel.conf.nix { lib = lib; config = config; };
};
programs.waybar = {
enable = true;
settings = import ./waybar-settings.nix { config = config; };
settings = import ./waybar.conf.nix { config = config; };
style = builtins.readFile(./waybar.css);
};
@ -38,7 +38,7 @@
programs.swaylock = {
enable = true;
package = pkgs.swaylock-effects;
settings = import ./swaylock-settings.nix { lib = lib; config = config; };
settings = import ./swaylock.conf.nix { lib = lib; config = config; };
};
};
}

View file

@ -1,18 +0,0 @@
{ lib, config, pkgs, ... }: lib.mkIf (config.withPlasma) {
services.desktopManager.plasma6.enable = true;
environment.plasma6.excludePackages = with pkgs; [
plasma-browser-integration
konsole
ark
elisa
gwenview
okular
kate
khelpcenter
print-manager
dolphin
dolphin-plugins
spectacle
ffmpegthumbs
];
}

31
modules/user/default.nix Normal file
View file

@ -0,0 +1,31 @@
{ lib, config, ... }: lib.mkIf (config.user) {
imports = [
./programs.nix
./themes.nix
];
# Audio
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
};
# Bluetooth
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
settings = {
General = {
Enable = "Source,Sink,Media,Socket";
Experimental = true;
};
};
};
services.blueman.enable = true;
}

70
modules/user/programs.nix Normal file
View file

@ -0,0 +1,70 @@
{ config, pkgs, ... }: {
networking.firewall.allowedTCPPorts = [
57621 # spotifyd
];
services = {
# Needed for some features in nautilus such as auto-mounting and trash
gvfs.enable = true;
};
home-manager.users.twoneis = {
imports = [
./firefox.nix
];
home.packages = with pkgs; [
signal-desktop
vesktop
fractal
loupe
snapshot
gnome.nautilus
libreoffice-qt6-fresh
];
home.file = {
".config/vesktop/settings.json" = {
source = ./vesktop.conf.json;
};
".config/vesktop/settings/settings.json" = {
source = ./vencord.conf.json;
};
};
programs.pandoc = {
enable = true;
};
programs.mpv = {
enable = true;
};
services.spotifyd = {
enable = true;
settings = {
global = {
device_name = config.networking.hostName;
bitrate = 320;
volume_normalisation = true;
autoplay = false;
zeroconf_port = 57621;
};
};
};
programs.thunderbird = {
enable = true;
profiles = {
"default" = {
isDefault = true;
};
};
};
programs.alacritty = {
enable = true;
settings = import ./alacritty.conf.nix;
};
};
}

50
modules/user/themes.nix Normal file
View file

@ -0,0 +1,50 @@
{ pkgs, ... }: {
home-manager.users.twoneis = {
home.packages = with pkgs; [
gnome.adwaita-icon-theme
adwaita-qt
adwaita-qt6
];
qt = {
enable = true;
platformTheme.name = "kde";
style.name = "adwaita-dark";
};
gtk = {
enable = true;
gtk4.extraConfig = {
gtk-application-prefer-dark-theme = true;
};
gtk3.extraConfig = {
gtk-application-prefer-dark-theme = true;
};
gtk2.extraConfig = "gtk-application-prefer-dark-theme=1\n";
theme.name = "Adwaita Dark";
};
dconf = {
enable = true;
settings = {
"org/gnome/desktop/interface" = {
color-scheme = "prefer-dark";
};
};
};
home.pointerCursor = let getFrom = url: hash: name: {
gtk.enable = true;
x11.enable = true;
name = name;
size = 24;
package = pkgs.runCommand "moveUp" {} ''
mkdir -p $out/share/icons
ln -s ${pkgs.fetchzip{
url = url;
hash = hash;
}} $out/share/icons/${name}
'';
}; in getFrom "https://github.com/rose-pine/cursor/releases/download/v1.1.0/BreezeX-RosePine-Linux.tar.xz" "sha256-t5xwAPGhuQUfGThedLsmtZEEp1Ljjo3Udhd5Ql3O67c=" "BreezX-RosePine-Linux";
};
}

95
modules/utils/default.nix Normal file
View file

@ -0,0 +1,95 @@
{ pkgs, ... }: {
programs.fish.enable = true;
users.defaultUserShell = pkgs.fish;
home-manager.users.twoneis = {
home.packages = with pkgs; [
man-pages
man-pages-posix
tree
file
zip
unzip
gnutar
lshw
netcat-openbsd
];
home.file = {
".gdbinit" = {
source = ./gdbinit;
};
};
programs.man = {
enable = true;
};
programs.less = {
enable = true;
keys = ''
t back-line
n forw-line
'';
};
programs.git = {
enable = true;
userName = "twoneis";
userEmail = "sanjay29@sapura.de";
extraConfig = {
init.defaultBranch = "main";
push.autoSetupRemote = true;
};
};
programs.gh = {
enable = true;
gitCredentialHelper.enable = true;
};
programs.helix = {
enable = true;
defaultEditor = true;
extraPackages = with pkgs; [ nil marksman ];
settings = import ./helix.conf.nix;
languages = import ./helix-languages.conf.nix;
};
programs.direnv = {
enable = true;
enableBashIntegration = true;
nix-direnv.enable = true;
};
programs.bottom = {
enable = true;
};
programs.hyfetch = {
enable = true;
settings = import ./hyfetch.conf.nix { };
};
programs.fish = {
enable = true;
plugins = with pkgs.fishPlugins; [
{ name = "tide"; src = pure.src; }
{ name = "bass"; src = bass.src; }
];
shellAbbrs = {
ga = "git add";
gc = "git commit";
gp = "git push";
gs = "git submodule sync --recursive && git submodule update --init --recursive";
gpl = "git pull --recurse-submodules";
gst = "git status";
repl = "nix repl --expr 'import <nixpkgs>{}'";
nrb = "sudo nixos-rebuild switch --cores 0 --flake .";
nd = "nix develop";
};
};
};
}

View file

@ -0,0 +1,11 @@
{ ... }: {
preset = "transgender";
mode = "rgb";
light_dark = "dark";
lightness = 0.65;
color_align = {
mode = "horizontal";
};
backend = "neofetch";
distro = "nixos_old";
}