mirror of
https://github.com/Cian-H/My_NixOS_Config.git
synced 2026-08-21 01:12:50 +01:00
Changed greeter from gdk to regreet
This commit is contained in:
@@ -28,19 +28,53 @@
|
|||||||
...
|
...
|
||||||
} @ inputs: let
|
} @ inputs: let
|
||||||
inherit (self) outputs;
|
inherit (self) outputs;
|
||||||
|
worklaptopTheme = pkgs: {
|
||||||
|
theme = {
|
||||||
|
name = "Tokyonight-Dark";
|
||||||
|
package = pkgs.tokyonight-gtk-theme;
|
||||||
|
};
|
||||||
|
iconTheme = {
|
||||||
|
name = "Tokyonight-Light";
|
||||||
|
package = pkgs.tokyonight-gtk-theme;
|
||||||
|
};
|
||||||
|
cursorTheme = {
|
||||||
|
name = "phinger-cursors-dark";
|
||||||
|
package = pkgs.phinger-cursors;
|
||||||
|
};
|
||||||
|
fonts = {
|
||||||
|
serif = "NotoSerifNerdFont";
|
||||||
|
sansSerif = "NotoSansNerdFont";
|
||||||
|
monospace = "MonaspiceArNerdFontMono";
|
||||||
|
};
|
||||||
|
wallpaperSource = "/home/cianh/Pictures/Wallpapers/City_1_Upscaled.png";
|
||||||
|
wallpaper = "/var/lib/AccountsService/wallpaper/cianh";
|
||||||
|
avatarSource = "/home/cianh/Pictures/face.png";
|
||||||
|
avatar = "/var/lib/AccountsService/icons/cianh";
|
||||||
|
};
|
||||||
in {
|
in {
|
||||||
# NixOS configuration entrypoint
|
# NixOS configuration entrypoint
|
||||||
# Available through 'nixos-rebuild --flake .#your-hostname'
|
# Available through 'nixos-rebuild --flake .#your-hostname'
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
worklaptop = nixpkgs.lib.nixosSystem {
|
worklaptop = let
|
||||||
specialArgs = {
|
pkgs = import nixpkgs {
|
||||||
inherit inputs outputs;
|
system = "x86_64-linux";
|
||||||
unstablePkgs = inputs.nixpkgs-unstable.legacyPackages.x86_64-linux;
|
config = {
|
||||||
|
allowUnfree = true;
|
||||||
|
cudaSupport = true;
|
||||||
|
allowUnfreePredicate = _: true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in
|
||||||
|
nixpkgs.lib.nixosSystem {
|
||||||
|
specialArgs = {
|
||||||
|
inherit inputs outputs;
|
||||||
|
unstablePkgs = inputs.nixpkgs-unstable.legacyPackages.x86_64-linux;
|
||||||
|
theme = worklaptopTheme pkgs;
|
||||||
|
};
|
||||||
|
modules = [
|
||||||
|
./nixos/worklaptop.nix
|
||||||
|
];
|
||||||
};
|
};
|
||||||
modules = [
|
|
||||||
./nixos/worklaptop.nix
|
|
||||||
];
|
|
||||||
};
|
|
||||||
homeserver = nixpkgs.lib.nixosSystem {
|
homeserver = nixpkgs.lib.nixosSystem {
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
inherit inputs outputs;
|
inherit inputs outputs;
|
||||||
@@ -80,33 +114,36 @@
|
|||||||
./home-manager/core.nix
|
./home-manager/core.nix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
"cianh@worklaptop" = home-manager.lib.homeManagerConfiguration {
|
"cianh@worklaptop" = let
|
||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs {
|
||||||
# Home-manager requires 'pkgs' instance
|
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
config = {
|
config = {
|
||||||
allowUnfree = true;
|
allowUnfree = true;
|
||||||
cudaSupport = true;
|
cudaSupport = true;
|
||||||
# Workaround for https://github.com/nix-community/home-manager/issues/2942
|
|
||||||
allowUnfreePredicate = _: true;
|
allowUnfreePredicate = _: true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
extraSpecialArgs = {
|
in
|
||||||
inherit inputs outputs;
|
home-manager.lib.homeManagerConfiguration {
|
||||||
unstablePkgs = import nixpkgs-unstable {
|
inherit pkgs;
|
||||||
# We also need to do the same for unstable
|
|
||||||
system = "x86_64-linux";
|
extraSpecialArgs = {
|
||||||
cudaSupport = true;
|
inherit inputs outputs;
|
||||||
config = {
|
unstablePkgs = import nixpkgs-unstable {
|
||||||
allowUnfree = true;
|
system = "x86_64-linux";
|
||||||
allowUnfreePredicate = _: true;
|
cudaSupport = true;
|
||||||
|
config = {
|
||||||
|
allowUnfree = true;
|
||||||
|
allowUnfreePredicate = _: true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
theme = worklaptopTheme pkgs;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
modules = [
|
||||||
|
./home-manager/worklaptop.nix
|
||||||
|
];
|
||||||
};
|
};
|
||||||
modules = [
|
|
||||||
./home-manager/worklaptop.nix
|
|
||||||
];
|
|
||||||
};
|
|
||||||
"cianh@homeserver" = home-manager.lib.homeManagerConfiguration {
|
"cianh@homeserver" = home-manager.lib.homeManagerConfiguration {
|
||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs {
|
||||||
# Home-manager requires 'pkgs' instance
|
# Home-manager requires 'pkgs' instance
|
||||||
|
|||||||
Submodule home-manager/core/dotfiles updated: b7a2325ee1...54a02c7102
@@ -5,22 +5,23 @@
|
|||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
unstablePkgs,
|
unstablePkgs,
|
||||||
|
theme,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
# GTK theming
|
# GTK theming
|
||||||
gtk = {
|
gtk = {
|
||||||
enable = true;
|
enable = true;
|
||||||
iconTheme = {
|
iconTheme = {
|
||||||
name = "Tokyonight-Light";
|
name = theme.iconTheme.name;
|
||||||
package = pkgs.tokyonight-gtk-theme;
|
package = theme.iconTheme.package;
|
||||||
};
|
};
|
||||||
theme = {
|
theme = {
|
||||||
name = "Tokyonight-Dark";
|
name = theme.theme.name;
|
||||||
package = pkgs.tokyonight-gtk-theme;
|
package = theme.theme.package;
|
||||||
};
|
};
|
||||||
cursorTheme = {
|
cursorTheme = {
|
||||||
name = "phinger-cursors-dark";
|
name = theme.cursorTheme.name;
|
||||||
package = pkgs.phinger-cursors;
|
package = theme.cursorTheme.package;
|
||||||
};
|
};
|
||||||
gtk2.extraConfig = ''
|
gtk2.extraConfig = ''
|
||||||
gtk-theme-name="Tokyonight-Dark"
|
gtk-theme-name="Tokyonight-Dark"
|
||||||
@@ -42,9 +43,9 @@
|
|||||||
dconf.settings = {
|
dconf.settings = {
|
||||||
"org/gnome/desktop/interface" = {
|
"org/gnome/desktop/interface" = {
|
||||||
color-scheme = "prefer-dark";
|
color-scheme = "prefer-dark";
|
||||||
gtk-theme = "Tokyonight-Dark";
|
gtk-theme = theme.theme.name;
|
||||||
icon-theme = "Tokyonight-Light";
|
icon-theme = theme.iconTheme.name;
|
||||||
cursor-theme = "phinger-cursors-dark";
|
cursor-theme = theme.cursorTheme.name;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
pkgs.cargo
|
pkgs.cargo
|
||||||
pkgs.flatpak
|
pkgs.flatpak
|
||||||
pkgs.gdm
|
pkgs.greetd
|
||||||
pkgs.grim
|
pkgs.grim
|
||||||
pkgs.grub2_efi
|
pkgs.grub2_efi
|
||||||
pkgs.nix-ld
|
pkgs.nix-ld
|
||||||
@@ -20,6 +20,7 @@
|
|||||||
pkgs.qmk
|
pkgs.qmk
|
||||||
pkgs.qmk-udev-rules
|
pkgs.qmk-udev-rules
|
||||||
pkgs.qmk_hid
|
pkgs.qmk_hid
|
||||||
|
pkgs.regreet
|
||||||
pkgs.seahorse
|
pkgs.seahorse
|
||||||
pkgs.wayland
|
pkgs.wayland
|
||||||
pkgs.wayland-utils
|
pkgs.wayland-utils
|
||||||
|
|||||||
@@ -4,66 +4,101 @@
|
|||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
unstablePkgs,
|
unstablePkgs,
|
||||||
|
theme,
|
||||||
...
|
...
|
||||||
}: {
|
}: let
|
||||||
|
username = "cianh";
|
||||||
|
in {
|
||||||
# Activate DEs
|
# Activate DEs
|
||||||
programs.uwsm.enable = true;
|
programs = {
|
||||||
programs.hyprland = {
|
uwsm.enable = true;
|
||||||
enable = true;
|
regreet = {
|
||||||
withUWSM = true;
|
enable = true;
|
||||||
xwayland.enable = true;
|
theme = {
|
||||||
|
name = theme.theme.name;
|
||||||
|
package = theme.theme.package;
|
||||||
|
};
|
||||||
|
cursorTheme = {
|
||||||
|
name = theme.cursorTheme.name;
|
||||||
|
package = theme.cursorTheme.package;
|
||||||
|
};
|
||||||
|
iconTheme.name = "Adwaita";
|
||||||
|
# iconTheme = {
|
||||||
|
# name = theme.iconTheme.name;
|
||||||
|
# package = theme.iconTheme.package;
|
||||||
|
# };
|
||||||
|
font = {
|
||||||
|
name = "Noto Sans";
|
||||||
|
size = 16;
|
||||||
|
package = pkgs.noto-fonts;
|
||||||
|
};
|
||||||
|
settings = {
|
||||||
|
GTK.application_prefer_dark_theme = true;
|
||||||
|
appearance.greeting_msg = "Hello ${username}, welcome back to '${config.networking.hostName}'!";
|
||||||
|
background.path = theme.wallpaper;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
hyprland = {
|
||||||
|
enable = true;
|
||||||
|
withUWSM = true;
|
||||||
|
xwayland.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Enable my preferred DE utilities
|
||||||
|
thunar = {
|
||||||
|
enable = true;
|
||||||
|
plugins = [
|
||||||
|
pkgs.xfce.thunar-volman
|
||||||
|
pkgs.xfce.thunar-archive-plugin
|
||||||
|
pkgs.xfce.thunar-media-tags-plugin
|
||||||
|
];
|
||||||
|
};
|
||||||
|
xfconf.enable = true;
|
||||||
|
|
||||||
|
# Disable automatically activated programs i dont want
|
||||||
|
foot.enable = false;
|
||||||
|
|
||||||
|
# Lets also activate some handy devenv tools
|
||||||
|
direnv = {
|
||||||
|
enable = true;
|
||||||
|
nix-direnv.enable = true;
|
||||||
|
};
|
||||||
|
nix-ld = {
|
||||||
|
enable = true;
|
||||||
|
libraries = [
|
||||||
|
pkgs.acl
|
||||||
|
pkgs.alsa-lib
|
||||||
|
pkgs.at-spi2-core
|
||||||
|
pkgs.attr
|
||||||
|
pkgs.bzip2
|
||||||
|
pkgs.curl
|
||||||
|
pkgs.dbus
|
||||||
|
pkgs.eget
|
||||||
|
pkgs.expat
|
||||||
|
pkgs.glib
|
||||||
|
pkgs.libsodium
|
||||||
|
pkgs.libssh
|
||||||
|
pkgs.libxml2
|
||||||
|
pkgs.nspr
|
||||||
|
pkgs.nss
|
||||||
|
pkgs.openssl
|
||||||
|
pkgs.pango
|
||||||
|
pkgs.stdenv.cc
|
||||||
|
pkgs.systemd
|
||||||
|
pkgs.util-linux
|
||||||
|
pkgs.vulkan-loader
|
||||||
|
pkgs.xz
|
||||||
|
pkgs.zlib
|
||||||
|
pkgs.zstd
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
seahorse.enable = true; # enable the graphical frontend
|
||||||
|
gnupg.agent = {
|
||||||
|
enable = true;
|
||||||
|
pinentryPackage = pkgs.pinentry-gnome3;
|
||||||
|
enableSSHSupport = true;
|
||||||
|
};
|
||||||
|
virt-manager.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Enable my preferred DE utilities
|
|
||||||
programs.thunar.enable = true;
|
|
||||||
programs.thunar.plugins = [
|
|
||||||
pkgs.xfce.thunar-volman
|
|
||||||
pkgs.xfce.thunar-archive-plugin
|
|
||||||
pkgs.xfce.thunar-media-tags-plugin
|
|
||||||
];
|
|
||||||
programs.xfconf.enable = true;
|
|
||||||
|
|
||||||
# Disable automatically activated programs i dont want
|
|
||||||
programs.foot.enable = false;
|
|
||||||
|
|
||||||
# Lets also activate some handy devenv tools
|
|
||||||
programs.direnv.enable = true;
|
|
||||||
programs.direnv.nix-direnv.enable = true;
|
|
||||||
programs.nix-ld = {
|
|
||||||
enable = true;
|
|
||||||
libraries = [
|
|
||||||
pkgs.acl
|
|
||||||
pkgs.alsa-lib
|
|
||||||
pkgs.at-spi2-core
|
|
||||||
pkgs.attr
|
|
||||||
pkgs.bzip2
|
|
||||||
pkgs.curl
|
|
||||||
pkgs.dbus
|
|
||||||
pkgs.eget
|
|
||||||
pkgs.expat
|
|
||||||
pkgs.glib
|
|
||||||
pkgs.libsodium
|
|
||||||
pkgs.libssh
|
|
||||||
pkgs.libxml2
|
|
||||||
pkgs.nspr
|
|
||||||
pkgs.nss
|
|
||||||
pkgs.openssl
|
|
||||||
pkgs.pango
|
|
||||||
pkgs.stdenv.cc
|
|
||||||
pkgs.systemd
|
|
||||||
pkgs.util-linux
|
|
||||||
pkgs.vulkan-loader
|
|
||||||
pkgs.xz
|
|
||||||
pkgs.zlib
|
|
||||||
pkgs.zstd
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.seahorse.enable = true; # enable the graphical frontend
|
|
||||||
programs.gnupg.agent = {
|
|
||||||
enable = true;
|
|
||||||
pinentryPackage = pkgs.pinentry-gnome3;
|
|
||||||
enableSSHSupport = true;
|
|
||||||
};
|
|
||||||
programs.virt-manager.enable = true;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,12 +4,14 @@
|
|||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
unstablePkgs,
|
unstablePkgs,
|
||||||
|
theme,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
services = {
|
services = {
|
||||||
displayManager.defaultSession = "hyprland-uwsm";
|
displayManager.defaultSession = "hyprland-uwsm";
|
||||||
desktopManager.gnome.enable = false;
|
desktopManager.gnome.enable = false;
|
||||||
displayManager.gdm.enable = true;
|
displayManager.gdm.enable = false;
|
||||||
|
greetd.enable = true;
|
||||||
xserver = {
|
xserver = {
|
||||||
videoDrivers = ["nvidia"]; # or "nvidiaLegacy470 etc.
|
videoDrivers = ["nvidia"]; # or "nvidiaLegacy470 etc.
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -44,21 +46,31 @@
|
|||||||
|
|
||||||
# Add custom services
|
# Add custom services
|
||||||
systemd.services = {
|
systemd.services = {
|
||||||
setup-user-icon = {
|
greetd = {
|
||||||
description = "Set user profile icon";
|
after = ["setup-user-vars.service"];
|
||||||
wantedBy = ["multi-user.target"];
|
requires = ["setup-user-vars.service"];
|
||||||
|
};
|
||||||
|
setup-user-vars = {
|
||||||
|
description = "Set user profile vars";
|
||||||
|
wantedBy = [
|
||||||
|
"multi-user.target"
|
||||||
|
"graphical-session.target"
|
||||||
|
];
|
||||||
after = ["home.mount"];
|
after = ["home.mount"];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
ExecStart = ''
|
ExecStart = ''
|
||||||
${pkgs.bash}/bin/bash -c " \
|
${pkgs.bash}/bin/bash -c " \
|
||||||
mkdir -p /var/lib/AccountsService/{icons,users} && \
|
mkdir -p /var/lib/AccountsService/{icons,users,wallpaper} && \
|
||||||
cp /home/cianh/Pictures/face.png /var/lib/AccountsService/icons/cianh && \
|
cp ${theme.avatarSource} ${theme.avatar} && \
|
||||||
echo '[User]\nSession=\nIcon=/var/lib/AccountsService/icons/cianh\nSystemAccount=false' > /var/lib/AccountsService/users/cianh && \
|
echo '[User]\nSession=\nIcon=${theme.avatar}\nSystemAccount=false' > /var/lib/AccountsService/users/cianh && \
|
||||||
chown root:root /var/lib/AccountsService/users/cianh && \
|
chown root:root /var/lib/AccountsService/users/cianh && \
|
||||||
chmod 0600 /var/lib/AccountsService/users/cianh && \
|
chmod 0600 /var/lib/AccountsService/users/cianh && \
|
||||||
chown root:root /var/lib/AccountsService/icons/cianh && \
|
chown root:root ${theme.avatar} && \
|
||||||
chmod 0444 /var/lib/AccountsService/icons/cianh \
|
chmod 0444 ${theme.avatar} && \
|
||||||
|
cp ${theme.wallpaperSource} ${theme.wallpaper} && \
|
||||||
|
chown root:root ${theme.wallpaper} && \
|
||||||
|
chmod 0444 ${theme.wallpaper} \
|
||||||
"
|
"
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -3,10 +3,11 @@
|
|||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
modulesPath,
|
modulesPath,
|
||||||
|
theme,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
# GTK theming
|
# GTK theming
|
||||||
environment.sessionVariables.GTK_THEME = "Tokyonight-Dark";
|
environment.sessionVariables.GTK_THEME = theme.theme.name;
|
||||||
|
|
||||||
# Delegate QT theming to kvantum
|
# Delegate QT theming to kvantum
|
||||||
environment.sessionVariables.QT_STYLE_OVERRIDE = "kvantum";
|
environment.sessionVariables.QT_STYLE_OVERRIDE = "kvantum";
|
||||||
@@ -18,9 +19,9 @@
|
|||||||
|
|
||||||
fontconfig = {
|
fontconfig = {
|
||||||
defaultFonts = {
|
defaultFonts = {
|
||||||
serif = ["NotoSerifNerdFont"];
|
serif = [theme.fonts.serif];
|
||||||
sansSerif = ["NotoSansNerdFont"];
|
sansSerif = [theme.fonts.sansSerif];
|
||||||
monospace = ["MonaspiceArNerdFontMono"];
|
monospace = [theme.fonts.monospace];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user