mirror of
https://github.com/Gerg-L/nixos.git
synced 2025-12-10 00:43:56 -05:00
moving towards modules...
This commit is contained in:
parent
32bf78aa36
commit
f911f3f44d
18 changed files with 288 additions and 237 deletions
23
common.nix
23
common.nix
|
|
@ -34,28 +34,6 @@ _: {
|
|||
"kmsconvt@tty1".enable = false;
|
||||
};
|
||||
|
||||
#hardware stuff
|
||||
hardware = {
|
||||
enableRedistributableFirmware = true;
|
||||
opengl = {
|
||||
enable = true;
|
||||
driSupport = true;
|
||||
driSupport32Bit = true;
|
||||
};
|
||||
};
|
||||
#sound settings
|
||||
security.rtkit.enable = true;
|
||||
sound.enable = lib.mkForce false; #disable alsa
|
||||
hardware.pulseaudio.enable = lib.mkForce false; #disable pulseAudio
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
audio.enable = true;
|
||||
wireplumber.enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
};
|
||||
networking = {
|
||||
firewall = {
|
||||
enable = true;
|
||||
|
|
@ -91,5 +69,4 @@ _: {
|
|||
};
|
||||
};
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
services.gvfs.enable = true; #gvfs for pcmanfm
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,7 +58,6 @@
|
|||
modules = [
|
||||
(import ./modules inputs)
|
||||
(import ./common.nix inputs)
|
||||
(import ./nix.nix inputs)
|
||||
(import ./systems/gerg-desktop inputs)
|
||||
{
|
||||
nixpkgs.overlays = [
|
||||
|
|
@ -80,7 +79,6 @@
|
|||
modules = [
|
||||
(import ./modules inputs)
|
||||
(import ./common.nix inputs)
|
||||
(import ./nix.nix inputs)
|
||||
(import ./systems/game-laptop inputs)
|
||||
];
|
||||
};
|
||||
|
|
@ -96,7 +94,6 @@
|
|||
modules = [
|
||||
(import ./modules inputs)
|
||||
(import ./common.nix inputs)
|
||||
(import ./nix.nix inputs)
|
||||
(import ./systems/mom-laptop inputs)
|
||||
];
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,60 +0,0 @@
|
|||
{suckless, ...}: {
|
||||
pkgs,
|
||||
settings,
|
||||
...
|
||||
}: {
|
||||
environment.systemPackages = [suckless.packages.${pkgs.system}.dmenu];
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
exportConfiguration = true; #make config debuggable
|
||||
layout = "us";
|
||||
libinput.enable = true;
|
||||
xautolock.enable = false;
|
||||
desktopManager.xterm.enable = false;
|
||||
excludePackages = [pkgs.xterm];
|
||||
windowManager.dwm = {
|
||||
enable = true;
|
||||
package = suckless.packages.${pkgs.system}.dwm;
|
||||
};
|
||||
displayManager = {
|
||||
sessionCommands = ''
|
||||
feh --bg-scale ${../misc/recursion.png}
|
||||
'';
|
||||
defaultSession = "none+dwm";
|
||||
lightdm = {
|
||||
enable = true;
|
||||
background = ../misc/recursion.png;
|
||||
extraConfig = "minimum-vt=1";
|
||||
greeters.mini = {
|
||||
enable = true;
|
||||
user = settings.username;
|
||||
extraConfig = ''
|
||||
[greeter]
|
||||
show-password-label = false
|
||||
password-label-text =
|
||||
invalid-password-text =
|
||||
show-input-cursor = false
|
||||
password-alignment = center
|
||||
password-input-width = 19
|
||||
show-image-on-all-monitors = true
|
||||
|
||||
|
||||
[greeter-theme]
|
||||
font = "OverpassMono Nerd Font"
|
||||
font-size = 1.1em
|
||||
text-color = "#7AA2F7"
|
||||
error-color = "#DB4B4B"
|
||||
background-color = "#000000"
|
||||
window-color = "#000000"
|
||||
border-color = "#000000"
|
||||
password-character = -1
|
||||
password-color = "#7AA2F7"
|
||||
password-background-color = "#24283B"
|
||||
password-border-color = "#000000"
|
||||
password-border-radius = 0.341125em
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,89 +0,0 @@
|
|||
_: {
|
||||
pkgs,
|
||||
settings,
|
||||
...
|
||||
}: {
|
||||
environment.gnome.excludePackages =
|
||||
(with pkgs; [
|
||||
gnome-photos
|
||||
gnome-tour
|
||||
gnome-console
|
||||
gnome-text-editor
|
||||
gnome-online-accounts
|
||||
])
|
||||
++ (with pkgs.gnome; [
|
||||
gnome-terminal
|
||||
gnome-weather
|
||||
gnome-shell
|
||||
gnome-calculator
|
||||
gnome-disk-utility
|
||||
gnome-maps
|
||||
gnome-clocks
|
||||
gnome-remote-desktop
|
||||
gnome-calendar
|
||||
gnome-music
|
||||
simple-scan
|
||||
cheese # webcam tool
|
||||
gedit # text editor
|
||||
epiphany # web browser
|
||||
geary # email reader
|
||||
evince # document viewer
|
||||
gnome-characters
|
||||
totem # video player
|
||||
tali # poker game
|
||||
iagno # go game
|
||||
hitori # sudoku game
|
||||
atomix # puzzle game
|
||||
]);
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
exportConfiguration = true; #make config debuggable
|
||||
layout = "us";
|
||||
libinput.enable = true;
|
||||
xautolock.enable = false;
|
||||
desktopManager.xterm.enable = false;
|
||||
excludePackages = [pkgs.xterm];
|
||||
desktopManager.gnome.enable = true;
|
||||
displayManager = {
|
||||
autoLogin = {
|
||||
enable = true;
|
||||
user = settings.username;
|
||||
};
|
||||
defaultSession = "gnome";
|
||||
lightdm = {
|
||||
enable = true;
|
||||
extraConfig = "minimum-vt=1";
|
||||
background = ../misc/recursion.png;
|
||||
greeters.mini = {
|
||||
enable = true;
|
||||
user = settings.username;
|
||||
extraConfig = ''
|
||||
[greeter]
|
||||
show-password-label = false
|
||||
password-label-text =
|
||||
invalid-password-text =
|
||||
show-input-cursor = false
|
||||
password-alignment = center
|
||||
password-input-width = 19
|
||||
show-image-on-all-monitors = true
|
||||
|
||||
|
||||
[greeter-theme]
|
||||
font = "OverpassMono Nerd Font"
|
||||
font-size = 1.1em
|
||||
text-color = "#7AA2F7"
|
||||
error-color = "#DB4B4B"
|
||||
background-color = "#000000"
|
||||
window-color = "#000000"
|
||||
border-color = "#000000"
|
||||
password-character = -1
|
||||
password-color = "#7AA2F7"
|
||||
password-background-color = "#24283B"
|
||||
password-border-color = "#000000"
|
||||
password-border-radius = 0.341125em
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,61 +0,0 @@
|
|||
_: {
|
||||
pkgs,
|
||||
settings,
|
||||
...
|
||||
}: {
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
exportConfiguration = true; #make config debuggable
|
||||
layout = "us";
|
||||
libinput.enable = true;
|
||||
xautolock.enable = false;
|
||||
desktopManager.xterm.enable = false;
|
||||
excludePackages = [pkgs.xterm];
|
||||
desktopManager.gnome.enable = true;
|
||||
displayManager = {
|
||||
autoLogin = {
|
||||
enable = true;
|
||||
user = settings.username;
|
||||
};
|
||||
defaultSession = "xfce";
|
||||
lightdm = {
|
||||
enable = true;
|
||||
extraConfig = "minimum-vt=1";
|
||||
background = ../misc/recursion.png;
|
||||
greeters.mini = {
|
||||
enable = true;
|
||||
user = settings.username;
|
||||
extraConfig = ''
|
||||
[greeter]
|
||||
show-password-label = false
|
||||
password-label-text =
|
||||
invalid-password-text =
|
||||
show-input-cursor = false
|
||||
password-alignment = center
|
||||
password-input-width = 19
|
||||
show-image-on-all-monitors = true
|
||||
|
||||
|
||||
[greeter-theme]
|
||||
font = "OverpassMono Nerd Font"
|
||||
font-size = 1.1em
|
||||
text-color = "#7AA2F7"
|
||||
error-color = "#DB4B4B"
|
||||
background-color = "#000000"
|
||||
window-color = "#000000"
|
||||
border-color = "#000000"
|
||||
password-character = -1
|
||||
password-color = "#7AA2F7"
|
||||
password-background-color = "#24283B"
|
||||
password-border-color = "#000000"
|
||||
password-border-radius = 0.341125em
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
desktopManager.xfce = {
|
||||
enable = true;
|
||||
enableScreensaver = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
7
modules/DE-WM/default.nix
Normal file
7
modules/DE-WM/default.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
inputs: {
|
||||
imports = [
|
||||
(import ./gnome.nix inputs)
|
||||
(import ./xfce.nix inputs)
|
||||
(import ./dwm.nix inputs)
|
||||
];
|
||||
}
|
||||
32
modules/DE-WM/dwm.nix
Normal file
32
modules/DE-WM/dwm.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{suckless, ...}: {
|
||||
pkgs,
|
||||
config,
|
||||
options,
|
||||
lib,
|
||||
self,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.localModules.dwm;
|
||||
in {
|
||||
options.localModules.dwm = {
|
||||
enable = mkEnableOption "";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = [suckless.packages.${pkgs.system}.dmenu];
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
windowManager.dwm = {
|
||||
enable = true;
|
||||
package = suckless.packages.${pkgs.system}.dwm;
|
||||
};
|
||||
displayManager = {
|
||||
sessionCommands = ''
|
||||
feh --bg-scale ${self + /misc/recursion.png}
|
||||
'';
|
||||
defaultSession = "none+dwm";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
53
modules/DE-WM/gnome.nix
Normal file
53
modules/DE-WM/gnome.nix
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
_: {
|
||||
config,
|
||||
lib,
|
||||
options,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.localModules.gnome;
|
||||
in {
|
||||
options.localModules.gnome = {
|
||||
enable = mkEnableOption "";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
environment.gnome.excludePackages =
|
||||
(with pkgs; [
|
||||
gnome-photos
|
||||
gnome-tour
|
||||
gnome-console
|
||||
gnome-text-editor
|
||||
gnome-online-accounts
|
||||
])
|
||||
++ (with pkgs.gnome; [
|
||||
gnome-terminal
|
||||
gnome-weather
|
||||
gnome-shell
|
||||
gnome-calculator
|
||||
gnome-disk-utility
|
||||
gnome-maps
|
||||
gnome-clocks
|
||||
gnome-remote-desktop
|
||||
gnome-calendar
|
||||
gnome-music
|
||||
simple-scan
|
||||
cheese # webcam tool
|
||||
gedit # text editor
|
||||
epiphany # web browser
|
||||
geary # email reader
|
||||
evince # document viewer
|
||||
gnome-characters
|
||||
totem # video player
|
||||
tali # poker game
|
||||
iagno # go game
|
||||
hitori # sudoku game
|
||||
atomix # puzzle game
|
||||
]);
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
desktopManager.gnome.enable = true;
|
||||
displayManager.defaultSession = "gnome";
|
||||
};
|
||||
};
|
||||
}
|
||||
23
modules/DE-WM/xfce.nix
Normal file
23
modules/DE-WM/xfce.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
_: {
|
||||
config,
|
||||
lib,
|
||||
options,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.localModules.xfce;
|
||||
in {
|
||||
options.localModules.xfce = {
|
||||
enable = mkEnableOption "";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
desktopManager.xfce = {
|
||||
enable = true;
|
||||
enableScreensaver = true;
|
||||
};
|
||||
displayManager.defaultSession = "xfce";
|
||||
};
|
||||
};
|
||||
}
|
||||
22
modules/DM/autoLogin.nix
Normal file
22
modules/DM/autoLogin.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
_: {
|
||||
config,
|
||||
lib,
|
||||
options,
|
||||
settings,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.localModules.autoLogin;
|
||||
in {
|
||||
options.localModules.autoLogin = {
|
||||
enable = mkEnableOption "";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
services.xserver.displayManager = {
|
||||
autoLogin = {
|
||||
enable = true;
|
||||
user = settings.username;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
6
modules/DM/default.nix
Normal file
6
modules/DM/default.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
inputs: {
|
||||
imports = [
|
||||
(import ./lightDM.nix inputs)
|
||||
(import ./autoLogin.nix inputs)
|
||||
];
|
||||
}
|
||||
55
modules/DM/lightDM.nix
Normal file
55
modules/DM/lightDM.nix
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
_: {
|
||||
config,
|
||||
lib,
|
||||
options,
|
||||
settings,
|
||||
self,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.localModules.lightdm;
|
||||
in {
|
||||
options.localModules.lightdm = {
|
||||
enable = mkEnableOption "";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
services.xserver = {
|
||||
displayManager = {
|
||||
lightdm = {
|
||||
enable = true;
|
||||
background = self + /misc/recursion.png;
|
||||
extraConfig = "minimum-vt=1";
|
||||
greeters.mini = {
|
||||
enable = true;
|
||||
user = settings.username;
|
||||
extraConfig = ''
|
||||
[greeter]
|
||||
show-password-label = false
|
||||
password-label-text =
|
||||
invalid-password-text =
|
||||
show-input-cursor = false
|
||||
password-alignment = center
|
||||
password-input-width = 19
|
||||
show-image-on-all-monitors = true
|
||||
|
||||
|
||||
[greeter-theme]
|
||||
font = "OverpassMono Nerd Font"
|
||||
font-size = 1.1em
|
||||
text-color = "#7AA2F7"
|
||||
error-color = "#DB4B4B"
|
||||
background-color = "#000000"
|
||||
window-color = "#000000"
|
||||
border-color = "#000000"
|
||||
password-character = -1
|
||||
password-color = "#7AA2F7"
|
||||
password-background-color = "#24283B"
|
||||
password-border-color = "#000000"
|
||||
password-border-radius = 0.341125em
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
6
modules/common/default.nix
Normal file
6
modules/common/default.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
inputs: {
|
||||
imports = [
|
||||
(import ./nix.nix inputs)
|
||||
(import ./x.nix inputs)
|
||||
];
|
||||
}
|
||||
15
modules/common/x.nix
Normal file
15
modules/common/x.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
_: {
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; {
|
||||
services.xserver = {
|
||||
exportConfiguration = mkDefault true;
|
||||
layout = mkDefault "us";
|
||||
libinput.enable = mkDefault true;
|
||||
xautolock.enable = mkDefault false;
|
||||
desktopManager.xterm.enable = mkDefault false;
|
||||
excludePackages = mkDefault [pkgs.xterm];
|
||||
};
|
||||
}
|
||||
|
|
@ -1,6 +1,10 @@
|
|||
inputs: {
|
||||
imports = [
|
||||
(import ./sxhkd.nix inputs)
|
||||
(import ./common inputs)
|
||||
(import ./unfree.nix inputs)
|
||||
(import ./DE-WM inputs)
|
||||
(import ./DM inputs)
|
||||
(import ./hardware.nix inputs)
|
||||
];
|
||||
}
|
||||
|
|
|
|||
59
modules/hardware.nix
Normal file
59
modules/hardware.nix
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
_: {
|
||||
config,
|
||||
options,
|
||||
...
|
||||
}: let
|
||||
cfg = config.localModules.hardware;
|
||||
in {
|
||||
options.localModules.hardware = {
|
||||
gpuAcceleration = {
|
||||
disable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
};
|
||||
};
|
||||
sound = {
|
||||
disable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
config =
|
||||
mkMerge [
|
||||
(
|
||||
mkIf (! cfg.gpuAcceleration.disable) {
|
||||
hardware = {
|
||||
opengl = {
|
||||
enable = true;
|
||||
driSupport = true;
|
||||
driSupport32Bit = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
)
|
||||
(mkIf (! cfg.sound.disable) {
|
||||
security.rtkit.enable = true;
|
||||
sound.enable = lib.mkForce false; #disable alsa
|
||||
hardware.pulseaudio.enable = lib.mkForce false; #disable pulseAudio
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
audio.enable = true;
|
||||
wireplumber.enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
};
|
||||
})
|
||||
]
|
||||
++ {
|
||||
hardware = {
|
||||
cpu = {
|
||||
intel.updateMicrocode = true;
|
||||
amd.updateMicrocode = true;
|
||||
enableRedistributableFirmware = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -6,7 +6,7 @@ inputs: {
|
|||
}: {
|
||||
imports = [
|
||||
# (import ../imports/boot.nix inputs)
|
||||
(import ../../imports/dwm.nix inputs)
|
||||
#(import ../../imports/dwm.nix inputs)
|
||||
(import ../../imports/fonts.nix inputs)
|
||||
(import ../../imports/git.nix inputs)
|
||||
(import ../../imports/packages.nix inputs)
|
||||
|
|
@ -23,8 +23,13 @@ inputs: {
|
|||
|
||||
localModules = {
|
||||
sxhkd.enable = true;
|
||||
dwm.enable = true;
|
||||
lightdm.enable = true;
|
||||
autoLogin.enable = true;
|
||||
};
|
||||
|
||||
services.gvfs.enable = true; #gvfs for pcmanfm
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
webcord # talk to people (gross)
|
||||
bitwarden #store stuff
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue