adapt desktop
adapt config so that it works on desktop too
This commit is contained in:
@@ -4,13 +4,13 @@ let
|
|||||||
images = pkgs.callPackage ./home/themes/images.nix { };
|
images = pkgs.callPackage ./home/themes/images.nix { };
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
# Importing necessary setup for Steam & Printing & Flutter.
|
# ── Steam & Printer ───────────────────────────────────────────────────
|
||||||
imports = [
|
imports = [
|
||||||
./builds/steam/default.nix
|
./builds/steam/default.nix
|
||||||
./home/extras/printer.nix
|
./home/extras/printer.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# Use the systemd-boot EFI boot loader.
|
# ── Use the systemd-boot EFI boot loader. ─────────────────────────────
|
||||||
boot.loader = {
|
boot.loader = {
|
||||||
systemd-boot = {
|
systemd-boot = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -19,18 +19,21 @@ in
|
|||||||
efi.canTouchEfiVariables = true;
|
efi.canTouchEfiVariables = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Chose NetworkManager, timezone, internationalisation properties and console settings.
|
# ── NetworkManager, timezone, internationalisation properties and ─────
|
||||||
networking.networkmanager.enable = true;
|
networking.networkmanager = {
|
||||||
networking.networkmanager.plugins = with pkgs; [
|
enable = true;
|
||||||
networkmanager-vpnc
|
plugins = with pkgs; [
|
||||||
];
|
networkmanager-vpnc
|
||||||
|
];
|
||||||
|
};
|
||||||
time.timeZone = "Europe/Berlin";
|
time.timeZone = "Europe/Berlin";
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
console = {
|
console = {
|
||||||
font = "Lat2-Terminus16";
|
font = "Lat2-Terminus16";
|
||||||
useXkbConfig = true;
|
useXkbConfig = true;
|
||||||
};
|
};
|
||||||
# Enable Asterisks for Password prompt.
|
|
||||||
|
# ── Enable Asterisks for Password prompt. ─────────────────────────────
|
||||||
security.sudo = {
|
security.sudo = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
@@ -38,17 +41,19 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
# Activate Flakes.
|
nix = {
|
||||||
nix.settings.experimental-features = [
|
# ── Flakes ────────────────────────────────────────────────────────────
|
||||||
"nix-command"
|
settings.experimental-features = [
|
||||||
"flakes"
|
"nix-command"
|
||||||
];
|
"flakes"
|
||||||
|
];
|
||||||
|
|
||||||
# Configuration of the Garbage collect.
|
# ── Garbage collect ───────────────────────────────────────────────────
|
||||||
nix.gc = {
|
gc = {
|
||||||
automatic = true; # Enable the automatic garbage collector
|
automatic = true;
|
||||||
dates = "10:00"; # When to run the garbage collector
|
dates = "12:00";
|
||||||
options = "--delete-older-than 7d";
|
options = "--delete-older-than 7d";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
@@ -78,7 +83,7 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Define a user account.
|
# ── User account ──────────────────────────────────────────────────────
|
||||||
users = {
|
users = {
|
||||||
mutableUsers = false;
|
mutableUsers = false;
|
||||||
users.elias = {
|
users.elias = {
|
||||||
@@ -97,7 +102,6 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Setting the Basic Packages.
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
(catppuccin-sddm.override {
|
(catppuccin-sddm.override {
|
||||||
flavor = "mocha";
|
flavor = "mocha";
|
||||||
@@ -146,17 +150,21 @@ in
|
|||||||
XDG_STATE_HOME = "$HOME/.local/state";
|
XDG_STATE_HOME = "$HOME/.local/state";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Enabling the Keyring.
|
# ── Keyring ───────────────────────────────────────────────────────────
|
||||||
security.pam.services.login.enableGnomeKeyring = true;
|
security.pam.services = {
|
||||||
security.pam.services.sddm.enableGnomeKeyring = true;
|
login.enableGnomeKeyring = true;
|
||||||
|
sddm.enableGnomeKeyring = true;
|
||||||
|
};
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
gnome.gnome-keyring.enable = true;
|
gnome = {
|
||||||
gnome.gcr-ssh-agent.enable = false;
|
gnome-keyring.enable = true;
|
||||||
# Disable powerbutton => for use with eww
|
gcr-ssh-agent.enable = false;
|
||||||
logind.settings.Login = {
|
|
||||||
HandlePowerKey = "ignore";
|
|
||||||
};
|
};
|
||||||
# Setting the permissions for acpilight.
|
|
||||||
|
# Disable powerbutton => for use with eww
|
||||||
|
logind.settings.Login.HandlePowerKey = "ignore";
|
||||||
|
# ── Permissions for acpilight ─────────────────────────────────────────
|
||||||
udev = {
|
udev = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraRules = ''
|
extraRules = ''
|
||||||
|
|||||||
25
flake.nix
25
flake.nix
@@ -96,6 +96,31 @@
|
|||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
nixos = nixpkgs.lib.nixosSystem {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
modules = [
|
||||||
|
./machines/configuration-desktop.nix
|
||||||
|
./home/services/pipewire.nix
|
||||||
|
nur.modules.nixos.default
|
||||||
|
catppuccin.nixosModules.catppuccin
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
|
# impermanence.nixosModules.impermanence
|
||||||
|
{
|
||||||
|
home-manager = {
|
||||||
|
useUserPackages = true;
|
||||||
|
extraSpecialArgs = { inherit inputs; };
|
||||||
|
users.elias.imports = [
|
||||||
|
./home/default-desktop.nix
|
||||||
|
catppuccin.homeModules.catppuccin
|
||||||
|
];
|
||||||
|
};
|
||||||
|
nixpkgs.overlays = [
|
||||||
|
inputs.nur.overlays.default
|
||||||
|
inputs.nix-vscode-extensions.overlays.default
|
||||||
|
];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,13 @@
|
|||||||
|
(defwindow power []
|
||||||
|
:class "powermenuWindow"
|
||||||
|
:geometry (geometry
|
||||||
|
:width "200px"
|
||||||
|
:height "50px"
|
||||||
|
:anchor "center center"
|
||||||
|
:x "0%"
|
||||||
|
:y "0%")
|
||||||
|
(powerpopup))
|
||||||
|
|
||||||
(defwidget powerpopup []
|
(defwidget powerpopup []
|
||||||
(box
|
(box
|
||||||
:class "powermenu"
|
:class "powermenu"
|
||||||
@@ -27,23 +37,3 @@
|
|||||||
:class "powermenu-button"
|
:class "powermenu-button"
|
||||||
(label
|
(label
|
||||||
:text ""))))
|
:text ""))))
|
||||||
(defwidget powermenu [shutdown shutdown_icon reboot
|
|
||||||
reboot_icon logout logout_icon]
|
|
||||||
(box :class "powermenu" :spacing 5
|
|
||||||
:vexpand true :hexpand true
|
|
||||||
:valign "end" :halign "end"
|
|
||||||
:space-evenly false
|
|
||||||
(button :onclick shutdown shutdown_icon)
|
|
||||||
(button :onclick reboot reboot_icon)
|
|
||||||
(button :onclick logout logout_icon)))
|
|
||||||
|
|
||||||
(defwindow power []
|
|
||||||
:class "powermenuWindow"
|
|
||||||
:geometry (geometry
|
|
||||||
:width "200px"
|
|
||||||
:height "50px"
|
|
||||||
:anchor "center center"
|
|
||||||
:x "0%"
|
|
||||||
:y "0%")
|
|
||||||
(powerpopup)
|
|
||||||
)
|
|
||||||
|
|||||||
@@ -1,10 +1,19 @@
|
|||||||
WINDOW_NAME="power"
|
WINDOW="power"
|
||||||
|
DISPLAY=""
|
||||||
echo "Power button pressed" >>/tmp/acpi_log.txt
|
|
||||||
|
|
||||||
# Check if the window is already open
|
# Check if the window is already open
|
||||||
if eww active-windows | grep -q "$WINDOW_NAME"; then
|
if eww active-windows | grep -q "$WINDOW"; then
|
||||||
eww close "$WINDOW_NAME"
|
eww close "$WINDOW"
|
||||||
else
|
exit 0
|
||||||
eww open "$WINDOW_NAME" --screen "$(wlr-randr | grep -oP '^\S+' | head -n 1)"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Determin screen
|
||||||
|
if [[ "$(hostname)" == "eliasLaptop" ]]; then
|
||||||
|
DISPLAY="eDP-1"
|
||||||
|
elif [[ "$(hostname)" == "eliasDesktop" ]]; then
|
||||||
|
DISPLAY="DVI-D-1"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "$DISPLAY"
|
||||||
|
|
||||||
|
eww open "$WINDOW" --screen "$DISPLAY"
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
hostname=$(hostname)
|
HOST_NAME=$(hostname)
|
||||||
|
|
||||||
if [[ "$hostname" == "eliasLaptop" ]]; then
|
if [[ "$HOST_NAME" == "eliasLaptop" ]]; then
|
||||||
eww open bar --screen eDP-1
|
eww open bar --screen eDP-1
|
||||||
/home/elias/.config/eww/scripts/ristate.sh
|
/home/elias/.config/eww/scripts/ristate.sh
|
||||||
elif [[ "$hostname" == "eliasDesktop" ]]; then
|
elif [[ "$HOST_NAME" == "eliasDesktop" ]]; then
|
||||||
echo "This is another PC!"
|
eww open bar --screen DVI-D-1
|
||||||
else
|
/home/elias/.config/eww/scripts/ristate.sh
|
||||||
echo "This is an unknown PC."
|
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -11,7 +11,6 @@
|
|||||||
profile.outputs = [ { criteria = "eDP-1"; } ];
|
profile.outputs = [ { criteria = "eDP-1"; } ];
|
||||||
profile.exec = [
|
profile.exec = [
|
||||||
"systemctl --user start hypridle.service"
|
"systemctl --user start hypridle.service"
|
||||||
"eww reload"
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
@@ -21,36 +20,59 @@
|
|||||||
"eww reload"
|
"eww reload"
|
||||||
];
|
];
|
||||||
profile.outputs = [
|
profile.outputs = [
|
||||||
{
|
|
||||||
criteria = "eDP-1";
|
|
||||||
mode = "1920x1080@60Hz";
|
|
||||||
position = "1920,0";
|
|
||||||
}
|
|
||||||
{
|
{
|
||||||
criteria = "HDMI-A-1";
|
criteria = "HDMI-A-1";
|
||||||
mode = "1920x1080@60Hz";
|
mode = "1920x1080@60Hz";
|
||||||
position = "0,0";
|
position = "0,0";
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
criteria = "eDP-1";
|
||||||
|
mode = "1920x1080@60Hz";
|
||||||
|
position = "1920,0";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
profile.name = "desktop";
|
||||||
|
profile.exec = [
|
||||||
|
"systemctl --user stop hypridle.service"
|
||||||
|
];
|
||||||
|
profile.outputs = [
|
||||||
|
{
|
||||||
|
criteria = "HDMI-A-2";
|
||||||
|
mode = "1920x1080@60Hz";
|
||||||
|
position = "0,0";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
criteria = "DVI-D-1";
|
||||||
|
mode = "1920x1080@60Hz";
|
||||||
|
position = "1920,0";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
criteria = "DP-2";
|
||||||
|
mode = "1920x1080@60Hz";
|
||||||
|
position = "3840,0";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
profile.name = "desktop-reduced";
|
||||||
|
profile.exec = [
|
||||||
|
"systemctl --user stop hypridle.service"
|
||||||
|
];
|
||||||
|
profile.outputs = [
|
||||||
|
{
|
||||||
|
criteria = "DVI-D-1";
|
||||||
|
mode = "1920x1080@60Hz";
|
||||||
|
position = "0,0";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
criteria = "DP-2";
|
||||||
|
mode = "1920x1080@60Hz";
|
||||||
|
position = "1920,0";
|
||||||
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
# {
|
|
||||||
# profile.name = "desktop";
|
|
||||||
# profile.exec = [
|
|
||||||
# "systemctl --user start hypridle.service"
|
|
||||||
# ];
|
|
||||||
# profile.outputs = [
|
|
||||||
# {
|
|
||||||
# criteria = "eDP-1";
|
|
||||||
# mode = "1920x1080@60Hz";
|
|
||||||
# position = "1920,0";
|
|
||||||
# }
|
|
||||||
# {
|
|
||||||
# criteria = "HDMI-A-1";
|
|
||||||
# mode = "1920x1080@60Hz";
|
|
||||||
# position = "0,0";
|
|
||||||
# }
|
|
||||||
# ];
|
|
||||||
# }
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,11 +10,11 @@ in
|
|||||||
imports = [
|
imports = [
|
||||||
./cursor.nix
|
./cursor.nix
|
||||||
./fnott.nix
|
./fnott.nix
|
||||||
# ./gtk.nix TODO: check why so weird
|
./gtk.nix
|
||||||
./hyprlock.nix
|
./hyprlock.nix
|
||||||
./nvim.nix
|
./nvim.nix
|
||||||
./taskwarrior.nix
|
./taskwarrior.nix
|
||||||
# ./qt.nix TODO: check why so weird
|
./qt.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
catppuccin = {
|
catppuccin = {
|
||||||
|
|||||||
@@ -7,13 +7,18 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
networking.hostName = "eliasDesktop";
|
networking.hostName = "eliasDesktop";
|
||||||
services.blueman.enable = true;
|
|
||||||
hardware.bluetooth.enable = true;
|
|
||||||
hardware.bluetooth.powerOnBoot = true;
|
|
||||||
|
|
||||||
# Hyprlock
|
# ── Hyprlock ──────────────────────────────────────────────────────────
|
||||||
security.pam.services.hyprlock = { };
|
security.pam.services.hyprlock = { };
|
||||||
|
|
||||||
|
# ── Bluetooth ─────────────────────────────────────────────────────────
|
||||||
|
services.blueman.enable = true;
|
||||||
|
hardware.bluetooth = {
|
||||||
|
enable = true;
|
||||||
|
powerOnBoot = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
# ── Network ───────────────────────────────────────────────────────────
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
networkmanager-vpnc
|
networkmanager-vpnc
|
||||||
networkmanagerapplet
|
networkmanagerapplet
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Hyprlock
|
# ── Hyprlock ──────────────────────────────────────────────────────────
|
||||||
security.pam.services = {
|
security.pam.services = {
|
||||||
hyprlock = {
|
hyprlock = {
|
||||||
text = ''
|
text = ''
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
services.blueman.enable = true;
|
services.blueman.enable = true;
|
||||||
hardware.bluetooth = {
|
hardware.bluetooth = {
|
||||||
enable = true;
|
enable = true;
|
||||||
powerOnBoot = true;
|
powerOnBoot = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
# ── Network ───────────────────────────────────────────────────────────
|
# ── Network ───────────────────────────────────────────────────────────
|
||||||
|
|||||||
@@ -14,27 +14,41 @@
|
|||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" =
|
||||||
{ device = "/dev/disk/by-label/NIXROOT";
|
{ device = "/dev/disk/by-uuid/aded1c84-f4d0-4841-ab2f-68266532737f";
|
||||||
fsType = "ext4";
|
fsType = "btrfs";
|
||||||
|
options = [ "subvol=root" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/.swapvol" =
|
||||||
|
{ device = "/dev/disk/by-uuid/aded1c84-f4d0-4841-ab2f-68266532737f";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [ "subvol=swap" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" =
|
||||||
{ device = "/dev/disk/by-label/NIXBOOT";
|
{ device = "/dev/disk/by-uuid/A38E-500D";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
options = [ "fmask=0022" "dmask=0022" ];
|
options = [ "fmask=0022" "dmask=0022" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [{
|
fileSystems."/home" =
|
||||||
device = "/.swapfile";
|
{ device = "/dev/disk/by-uuid/aded1c84-f4d0-4841-ab2f-68266532737f";
|
||||||
size = 2048;
|
fsType = "btrfs";
|
||||||
}];
|
options = [ "subvol=home" ];
|
||||||
|
};
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
fileSystems."/nix" =
|
||||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
{ device = "/dev/disk/by-uuid/aded1c84-f4d0-4841-ab2f-68266532737f";
|
||||||
# still possible to use this option, but it's recommended to use it in conjunction
|
fsType = "btrfs";
|
||||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
options = [ "subvol=nix" ];
|
||||||
networking.useDHCP = lib.mkDefault true;
|
};
|
||||||
# networking.interfaces.eno1.useDHCP = lib.mkDefault true;
|
|
||||||
|
fileSystems."/partition-root" =
|
||||||
|
{ device = "/dev/disk/by-uuid/aded1c84-f4d0-4841-ab2f-68266532737f";
|
||||||
|
fsType = "btrfs";
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [ ];
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
|||||||
Reference in New Issue
Block a user