beginning a lot of reorganizing stuff
This commit is contained in:
4
base/base-gui/default.nix
Normal file
4
base/base-gui/default.nix
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
imports = [ ./services.nix ];
|
||||||
|
}
|
||||||
15
base/base-gui/services.nix
Normal file
15
base/base-gui/services.nix
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
{ lib, ... }:
|
||||||
|
{
|
||||||
|
services = {
|
||||||
|
# configure pipewire
|
||||||
|
pipewire = {
|
||||||
|
enable = lib.mkDefault true;
|
||||||
|
alsa.enable = lib.mkDefault true;
|
||||||
|
alsa.support32Bit = lib.mkDefault true;
|
||||||
|
pulse.enable = lib.mkDefault true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Enable CUPS to print documents.
|
||||||
|
printing.enable = lib.mkDefault true;
|
||||||
|
};
|
||||||
|
}
|
||||||
14
base/base-nogui/boot.nix
Normal file
14
base/base-nogui/boot.nix
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
{ lib, pkgs, ... }:
|
||||||
|
{
|
||||||
|
boot = {
|
||||||
|
# Enable AppImage
|
||||||
|
binfmt.registrations.appimage = {
|
||||||
|
wrapInterpreterInShell = lib.mkDefault false;
|
||||||
|
interpreter = "${pkgs.appimage-run}/bin/appimage-run";
|
||||||
|
recognitionType = "magic";
|
||||||
|
offset = 0;
|
||||||
|
mask = "\\xff\\xff\\xff\\xff\\x00\\x00\\x00\\x00\\xff\\xff\\xff";
|
||||||
|
magicOrExtension = "\\x7fELF....AI\\x02";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
45
base/base-nogui/default.nix
Normal file
45
base/base-nogui/default.nix
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
{ lib, ... }:
|
||||||
|
let
|
||||||
|
timezone = "America/Chicago";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./boot.nix
|
||||||
|
./environment.nix
|
||||||
|
./nix-settings.nix
|
||||||
|
./security.nix
|
||||||
|
./services.nix
|
||||||
|
../../share
|
||||||
|
];
|
||||||
|
|
||||||
|
# Hardware configs
|
||||||
|
hardware = {
|
||||||
|
# Bluetooth
|
||||||
|
bluetooth.enable = lib.mkDefault true;
|
||||||
|
|
||||||
|
# Enable all firmware
|
||||||
|
enableAllFirmware = lib.mkForce true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Time config
|
||||||
|
time = {
|
||||||
|
# Set your time zone.
|
||||||
|
timeZone = timezone;
|
||||||
|
};
|
||||||
|
|
||||||
|
programs = {
|
||||||
|
zsh.enable = lib.mkDefault true;
|
||||||
|
gnupg.agent = {
|
||||||
|
enable = lib.mkDefault true;
|
||||||
|
enableSSHSupport = lib.mkDefault true;
|
||||||
|
};
|
||||||
|
command-not-found.enable = lib.mkForce false;
|
||||||
|
nix-index = {
|
||||||
|
enable = true;
|
||||||
|
enableBashIntegration = false;
|
||||||
|
enableZshIntegration = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
system.stateVersion = "23.11";
|
||||||
|
}
|
||||||
12
base/base-nogui/environment.nix
Normal file
12
base/base-nogui/environment.nix
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
environment = {
|
||||||
|
systemPackages = with pkgs; [
|
||||||
|
uutils-coreutils
|
||||||
|
uutils-diffutils
|
||||||
|
uutils-findutils
|
||||||
|
coreutils
|
||||||
|
nixd
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
41
base/base-nogui/nix-settings.nix
Normal file
41
base/base-nogui/nix-settings.nix
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
{ lib, outputs, ... }:
|
||||||
|
{
|
||||||
|
nix = {
|
||||||
|
settings = {
|
||||||
|
substituters = [
|
||||||
|
"https://nix-community.cachix.org"
|
||||||
|
"https://cache.nixos.org/"
|
||||||
|
];
|
||||||
|
trusted-public-keys = [
|
||||||
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||||
|
];
|
||||||
|
warn-dirty = lib.mkForce false;
|
||||||
|
experimental-features = lib.mkForce [
|
||||||
|
"nix-command"
|
||||||
|
"flakes"
|
||||||
|
];
|
||||||
|
trusted-users = [ "@wheel" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
# Garbage collect automatically every week
|
||||||
|
gc.automatic = lib.mkDefault true;
|
||||||
|
gc.options = lib.mkDefault "--delete-older-than 30d";
|
||||||
|
|
||||||
|
optimise.automatic = lib.mkDefault true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Nixpkgs configuration
|
||||||
|
nixpkgs = {
|
||||||
|
# add unstable and stable overlays
|
||||||
|
overlays = [
|
||||||
|
outputs.overlays.nixpkgs-unstable
|
||||||
|
outputs.overlays.nixpkgs-stable
|
||||||
|
];
|
||||||
|
config = {
|
||||||
|
allowUnfree = lib.mkForce true;
|
||||||
|
permittedInsecurePackages = [
|
||||||
|
# ...
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
31
base/base-nogui/security.nix
Normal file
31
base/base-nogui/security.nix
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
{ lib, pkgs, ... }:
|
||||||
|
{
|
||||||
|
security = {
|
||||||
|
rtkit.enable = lib.mkDefault true;
|
||||||
|
|
||||||
|
# configure sudo
|
||||||
|
sudo.enable = lib.mkDefault false;
|
||||||
|
sudo-rs = {
|
||||||
|
enable = lib.mkDefault true;
|
||||||
|
extraRules = [
|
||||||
|
{
|
||||||
|
commands = [
|
||||||
|
{
|
||||||
|
command = "${pkgs.systemd}/bin/systemctl suspend";
|
||||||
|
options = [ "NOPASSWD" ];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
command = "${pkgs.systemd}/bin/reboot";
|
||||||
|
options = [ "NOPASSWD" ];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
command = "${pkgs.systemd}/bin/poweroff";
|
||||||
|
options = [ "NOPASSWD" ];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
groups = [ "wheel" ];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
25
base/base-nogui/services.nix
Normal file
25
base/base-nogui/services.nix
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
{ lib, ... }:
|
||||||
|
{
|
||||||
|
services = {
|
||||||
|
openssh.enable = lib.mkDefault true;
|
||||||
|
|
||||||
|
# Enable firmware updates
|
||||||
|
fwupd.enable = lib.mkForce true;
|
||||||
|
|
||||||
|
fstrim.enable = lib.mkDefault true;
|
||||||
|
|
||||||
|
pcscd.enable = lib.mkDefault true;
|
||||||
|
|
||||||
|
# Enable Avahi for .local hostname resolution
|
||||||
|
avahi = {
|
||||||
|
enable = lib.mkDefault true;
|
||||||
|
nssmdns4 = lib.mkDefault true; # For modern systems, use nssmdns4 instead of nssmdns
|
||||||
|
publish = {
|
||||||
|
enable = lib.mkDefault true;
|
||||||
|
addresses = lib.mkDefault true;
|
||||||
|
domain = lib.mkDefault true;
|
||||||
|
workstation = lib.mkDefault true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
27
base/default.nix
Normal file
27
base/default.nix
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
# { lib, config, ... }:
|
||||||
|
|
||||||
|
# let
|
||||||
|
# cfg = config.base;
|
||||||
|
|
||||||
|
# cosmicPath =
|
||||||
|
# if cfg.desktopEnvironments.cosmic.enableSpecialisation then
|
||||||
|
# ../../modules/desktop-environments/cosmic/specialisation.nix
|
||||||
|
# else
|
||||||
|
# ../../modules/desktop-environments/cosmic/default.nix;
|
||||||
|
|
||||||
|
# hyprlandPath =
|
||||||
|
# if cfg.desktopEnvironments.hyprland.enableSpecialisation then
|
||||||
|
# ../../modules/desktop-environments/hyprland/specialisation.nix
|
||||||
|
# else
|
||||||
|
# ../../modules/desktop-environments/hyprland/default.nix;
|
||||||
|
|
||||||
|
# extraImports = lib.optionals cfg.enable (
|
||||||
|
# [ ./base-nogui ]
|
||||||
|
# ++ lib.optional cfg.baseGui.enable ./base-gui
|
||||||
|
# ++ lib.optional cfg.desktopEnvironments.cosmic.enable cosmicPath
|
||||||
|
# ++ lib.optional cfg.desktopEnvironments.hyprland.enable hyprlandPath
|
||||||
|
# );
|
||||||
|
# in
|
||||||
|
# {
|
||||||
|
# imports = [ ./options.nix ] ++ extraImports;
|
||||||
|
# }
|
||||||
35
base/options.nix
Normal file
35
base/options.nix
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
{ lib, ... }:
|
||||||
|
with lib;
|
||||||
|
{
|
||||||
|
options.base = {
|
||||||
|
enable = mkEnableOption "base config";
|
||||||
|
|
||||||
|
baseGui.enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
desktopEnvironments = {
|
||||||
|
cosmic = {
|
||||||
|
enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
};
|
||||||
|
enableSpecialisation = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
hyprland = {
|
||||||
|
enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
};
|
||||||
|
enableSpecialisation = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
42
flake.nix
42
flake.nix
@@ -347,11 +347,22 @@
|
|||||||
inherit inputs outputs;
|
inherit inputs outputs;
|
||||||
};
|
};
|
||||||
modules = [
|
modules = [
|
||||||
desktop-impermanence.nixosModules.impermanence
|
./base/base-nogui
|
||||||
desktop-lanzaboote.nixosModules.lanzaboote
|
./base/base-gui
|
||||||
./hosts/desktop/configuration.nix
|
./hosts/desktop/configuration.nix
|
||||||
./share/impermanence
|
./modules/desktop-environments/gnome
|
||||||
|
|
||||||
|
# Lanzaboote
|
||||||
|
desktop-lanzaboote.nixosModules.lanzaboote
|
||||||
|
|
||||||
|
# Chaotic Nyx
|
||||||
desktop-chaotic.nixosModules.default
|
desktop-chaotic.nixosModules.default
|
||||||
|
|
||||||
|
# Impermanence
|
||||||
|
desktop-impermanence.nixosModules.impermanence
|
||||||
|
./share/impermanence
|
||||||
|
|
||||||
|
# Home Manager
|
||||||
desktop-home-manager.nixosModules.home-manager
|
desktop-home-manager.nixosModules.home-manager
|
||||||
{
|
{
|
||||||
home-manager.useGlobalPkgs = true;
|
home-manager.useGlobalPkgs = true;
|
||||||
@@ -376,14 +387,13 @@
|
|||||||
home-manager.backupFileExtension = "backup";
|
home-manager.backupFileExtension = "backup";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# nixos hardware
|
||||||
desktop-nixos-hardware.nixosModules.common-cpu-amd
|
desktop-nixos-hardware.nixosModules.common-cpu-amd
|
||||||
desktop-nixos-hardware.nixosModules.common-cpu-amd-pstate
|
desktop-nixos-hardware.nixosModules.common-cpu-amd-pstate
|
||||||
desktop-nixos-hardware.nixosModules.common-cpu-amd-zenpower
|
desktop-nixos-hardware.nixosModules.common-cpu-amd-zenpower
|
||||||
desktop-nixos-hardware.nixosModules.common-gpu-amd
|
desktop-nixos-hardware.nixosModules.common-gpu-amd
|
||||||
desktop-nixos-hardware.nixosModules.common-hidpi
|
desktop-nixos-hardware.nixosModules.common-hidpi
|
||||||
desktop-nixos-hardware.nixosModules.common-pc
|
desktop-nixos-hardware.nixosModules.common-pc
|
||||||
|
|
||||||
desktop-sops-nix.nixosModules.sops
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -394,11 +404,18 @@
|
|||||||
inherit inputs outputs;
|
inherit inputs outputs;
|
||||||
};
|
};
|
||||||
modules = [
|
modules = [
|
||||||
nas-impermanence.nixosModules.impermanence
|
./base/base-nogui
|
||||||
nas-lanzaboote.nixosModules.lanzaboote
|
./base/base-gui
|
||||||
nas-cosmic.nixosModules.default
|
|
||||||
./hosts/nas/configuration.nix
|
./hosts/nas/configuration.nix
|
||||||
|
./modules/desktop-environments/cosmic
|
||||||
|
|
||||||
|
nas-lanzaboote.nixosModules.lanzaboote
|
||||||
|
|
||||||
|
nas-impermanence.nixosModules.impermanence
|
||||||
./hosts/nas/impermanence.nix
|
./hosts/nas/impermanence.nix
|
||||||
|
|
||||||
|
nas-cosmic.nixosModules.default
|
||||||
|
|
||||||
nas-home-manager.nixosModules.home-manager
|
nas-home-manager.nixosModules.home-manager
|
||||||
{
|
{
|
||||||
home-manager.useGlobalPkgs = false;
|
home-manager.useGlobalPkgs = false;
|
||||||
@@ -501,15 +518,6 @@
|
|||||||
pi4-impermanence.nixosModules.impermanence
|
pi4-impermanence.nixosModules.impermanence
|
||||||
pi4-sops-nix.nixosModules.sops
|
pi4-sops-nix.nixosModules.sops
|
||||||
./hosts/pi4/configuration.nix
|
./hosts/pi4/configuration.nix
|
||||||
#{
|
|
||||||
# # Hardware specific configuration, see section below for a more complete
|
|
||||||
# # list of modules
|
|
||||||
# imports = with nixos-raspberrypi.nixosModules; [
|
|
||||||
# raspberry-pi-4.base
|
|
||||||
# raspberry-pi-4.display-vc4
|
|
||||||
# raspberry-pi-4.bluetooth
|
|
||||||
# ];
|
|
||||||
#}
|
|
||||||
pi4-home-manager.nixosModules.home-manager
|
pi4-home-manager.nixosModules.home-manager
|
||||||
{
|
{
|
||||||
home-manager.useGlobalPkgs = true;
|
home-manager.useGlobalPkgs = true;
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ let
|
|||||||
configLimit = 5;
|
configLimit = 5;
|
||||||
# default = "@saved";
|
# default = "@saved";
|
||||||
kernel = pkgs.linuxPackages_cachyos;
|
kernel = pkgs.linuxPackages_cachyos;
|
||||||
pkgsVersion = pkgs.unstable;
|
pkgsVersion = pkgs; #.unstable;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
# Configure bootloader with lanzaboot and secureboot
|
# Configure bootloader with lanzaboot and secureboot
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
pkgsVersion = pkgs.unstable;
|
pkgsVersion = pkgs; #.unstable;
|
||||||
environmentVariables = {
|
environmentVariables = {
|
||||||
STEAM_FORCE_DESKTOPUI_SCALING = "1.0";
|
STEAM_FORCE_DESKTOPUI_SCALING = "1.0";
|
||||||
GDK_SCALE = "1";
|
GDK_SCALE = "1";
|
||||||
@@ -158,10 +158,6 @@ in
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
coolercontrol.enable = true;
|
coolercontrol.enable = true;
|
||||||
kdeconnect = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.gnomeExtensions.gsconnect;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Common Configuration
|
# Common Configuration
|
||||||
|
|||||||
@@ -1,21 +1,9 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
let
|
let
|
||||||
pkgsVersion = pkgs.unstable;
|
pkgsVersion = pkgs; #.unstable;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
services = {
|
services = {
|
||||||
# Enable Desktop Environment.
|
|
||||||
xserver = {
|
|
||||||
desktopManager.gnome.enable = true;
|
|
||||||
# Enable Desktop Environment.
|
|
||||||
displayManager = {
|
|
||||||
gdm.enable = lib.mkDefault true;
|
|
||||||
gdm.wayland = lib.mkDefault true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
gnome.gnome-remote-desktop.enable = true;
|
|
||||||
|
|
||||||
# Enable Flatpak
|
# Enable Flatpak
|
||||||
flatpak.enable = lib.mkDefault false;
|
flatpak.enable = lib.mkDefault false;
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
let
|
let
|
||||||
user = "matt";
|
user = "matt";
|
||||||
passwordFile = config.sops.secrets."desktop/matt_password".path;
|
passwordFile = config.sops.secrets."desktop/matt_password".path;
|
||||||
pkgsVersion = pkgs.unstable;
|
pkgsVersion = pkgs; #.unstable;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
users.users."${user}" = {
|
users.users."${user}" = {
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ let
|
|||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
'';
|
'';
|
||||||
pkgsVersion = pkgs.unstable;
|
pkgsVersion = pkgs; #.unstable;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
systemd = {
|
systemd = {
|
||||||
|
|||||||
@@ -21,8 +21,6 @@
|
|||||||
./samba.nix
|
./samba.nix
|
||||||
./services.nix
|
./services.nix
|
||||||
./sops.nix
|
./sops.nix
|
||||||
../default.nix
|
|
||||||
../../modules/desktop-environments/cosmic/default.nix
|
|
||||||
];
|
];
|
||||||
|
|
||||||
powerManagement.cpuFreqGovernor = "powersave";
|
powerManagement.cpuFreqGovernor = "powersave";
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
{ ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
# specialisation.cosmic.configuration = {
|
services = {
|
||||||
services = {
|
desktopManager.cosmic.enable = true;
|
||||||
desktopManager.cosmic.enable = true;
|
displayManager.cosmic-greeter.enable = true;
|
||||||
displayManager.cosmic-greeter.enable = true;
|
};
|
||||||
};
|
|
||||||
# };
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,18 +1,6 @@
|
|||||||
{ lib, ... }:
|
{ lib, ... }:
|
||||||
{
|
{
|
||||||
specialisation.cosmic.configuration = {
|
specialisation.cosmic.configuration = {
|
||||||
services = {
|
imports = [ ./default.nix ]
|
||||||
desktopManager.cosmic.enable = lib.mkForce true;
|
|
||||||
displayManager.cosmic-greeter.enable = lib.mkForce true;
|
|
||||||
# Disable Gnome
|
|
||||||
xserver = {
|
|
||||||
desktopManager.gnome.enable = lib.mkForce false;
|
|
||||||
# Enable Desktop Environment.
|
|
||||||
displayManager = {
|
|
||||||
gdm.enable = lib.mkForce false;
|
|
||||||
gdm.wayland = lib.mkForce false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
23
modules/desktop-environments/gnome/default.nix
Normal file
23
modules/desktop-environments/gnome/default.nix
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
services = {
|
||||||
|
# Enable Desktop Environment.
|
||||||
|
xserver = {
|
||||||
|
desktopManager.gnome.enable = true;
|
||||||
|
# Enable Desktop Environment.
|
||||||
|
displayManager = {
|
||||||
|
gdm.enable = lib.mkDefault true;
|
||||||
|
gdm.wayland = lib.mkDefault true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
gnome.gnome-remote-desktop.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
programs = {
|
||||||
|
kdeconnect = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.gnomeExtensions.gsconnect;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -3,106 +3,104 @@ let
|
|||||||
sddmTheme = "catppuccin-mocha";
|
sddmTheme = "catppuccin-mocha";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
specialisation.hyprland.configuration = {
|
imports = [
|
||||||
imports = [
|
./environment.nix
|
||||||
./environment.nix
|
];
|
||||||
];
|
|
||||||
|
|
||||||
home-manager.users.matt = import ./home.nix;
|
home-manager.users.matt = import ./home.nix;
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
displayManager.sddm.enable = true;
|
displayManager.sddm.enable = true;
|
||||||
displayManager.sddm.package = pkgs.kdePackages.sddm;
|
displayManager.sddm.package = pkgs.kdePackages.sddm;
|
||||||
displayManager.sddm.theme = sddmTheme;
|
displayManager.sddm.theme = sddmTheme;
|
||||||
displayManager.defaultSession = "hyprland";
|
displayManager.defaultSession = "hyprland";
|
||||||
# disable plasma
|
# disable plasma
|
||||||
desktopManager.plasma6.enable = false;
|
desktopManager.plasma6.enable = false;
|
||||||
|
|
||||||
dbus.enable = true;
|
dbus.enable = true;
|
||||||
|
|
||||||
ddccontrol.enable = true;
|
ddccontrol.enable = true;
|
||||||
|
|
||||||
blueman.enable = true;
|
blueman.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.hyprland = {
|
programs.hyprland = {
|
||||||
enable = true;
|
enable = true;
|
||||||
xwayland.enable = true;
|
xwayland.enable = true;
|
||||||
portalPackage = pkgs.xdg-desktop-portal-hyprland;
|
portalPackage = pkgs.xdg-desktop-portal-hyprland;
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.nm-applet.enable = true;
|
programs.nm-applet.enable = true;
|
||||||
|
|
||||||
systemd = {
|
systemd = {
|
||||||
user.services.polkit-gnome-authentication-agent-1 = {
|
user.services.polkit-gnome-authentication-agent-1 = {
|
||||||
description = "polkit-gnome-authentication-agent-1";
|
description = "polkit-gnome-authentication-agent-1";
|
||||||
wantedBy = [ "graphical-session.target" ];
|
wantedBy = [ "graphical-session.target" ];
|
||||||
wants = [ "graphical-session.target" ];
|
wants = [ "graphical-session.target" ];
|
||||||
after = [ "graphical-session.target" ];
|
after = [ "graphical-session.target" ];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "simple";
|
Type = "simple";
|
||||||
ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
|
ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
RestartSec = 1;
|
RestartSec = 1;
|
||||||
TimeoutStopSec = 10;
|
TimeoutStopSec = 10;
|
||||||
};
|
|
||||||
};
|
};
|
||||||
extraConfig = ''
|
|
||||||
DefaultTimeoutStopSec=10s
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
extraConfig = ''
|
||||||
|
DefaultTimeoutStopSec=10s
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
security = {
|
security = {
|
||||||
polkit.enable = true;
|
polkit.enable = true;
|
||||||
|
|
||||||
# configure sudo
|
# configure sudo
|
||||||
sudo.extraRules = [
|
sudo.extraRules = [
|
||||||
{
|
{
|
||||||
commands = [
|
commands = [
|
||||||
{
|
{
|
||||||
command = "/run/current-system/sw/bin/waybar-weather";
|
command = "/run/current-system/sw/bin/waybar-weather";
|
||||||
options = [ "NOPASSWD" ];
|
options = [ "NOPASSWD" ];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
command = "/run/current-system/sw/bin/waybar-updates";
|
command = "/run/current-system/sw/bin/waybar-updates";
|
||||||
options = [ "NOPASSWD" ];
|
options = [ "NOPASSWD" ];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
groups = [ "wheel" ];
|
groups = [ "wheel" ];
|
||||||
}
|
}
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
xdg.portal = {
|
|
||||||
enable = true;
|
|
||||||
wlr.enable = false;
|
|
||||||
xdgOpenUsePortal = false;
|
|
||||||
extraPortals = [
|
|
||||||
pkgs.xdg-desktop-portal-hyprland
|
|
||||||
pkgs.xdg-desktop-portal-gtk
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
fonts.packages = with pkgs; [
|
|
||||||
font-awesome
|
|
||||||
noto-fonts
|
|
||||||
noto-fonts-color-emoji
|
|
||||||
nerdfonts
|
|
||||||
meslo-lgs-nf
|
|
||||||
];
|
|
||||||
|
|
||||||
fonts.fontconfig.defaultFonts = {
|
|
||||||
emoji = [
|
|
||||||
"Noto Color Emoji"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
nixpkgs.overlays = [
|
|
||||||
(self: super: {
|
|
||||||
waybar = super.waybar.overrideAttrs (oldAttrs: {
|
|
||||||
mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ];
|
|
||||||
});
|
|
||||||
})
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
xdg.portal = {
|
||||||
|
enable = true;
|
||||||
|
wlr.enable = false;
|
||||||
|
xdgOpenUsePortal = false;
|
||||||
|
extraPortals = [
|
||||||
|
pkgs.xdg-desktop-portal-hyprland
|
||||||
|
pkgs.xdg-desktop-portal-gtk
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
fonts.packages = with pkgs; [
|
||||||
|
font-awesome
|
||||||
|
noto-fonts
|
||||||
|
noto-fonts-color-emoji
|
||||||
|
nerdfonts
|
||||||
|
meslo-lgs-nf
|
||||||
|
];
|
||||||
|
|
||||||
|
fonts.fontconfig.defaultFonts = {
|
||||||
|
emoji = [
|
||||||
|
"Noto Color Emoji"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
nixpkgs.overlays = [
|
||||||
|
(self: super: {
|
||||||
|
waybar = super.waybar.overrideAttrs (oldAttrs: {
|
||||||
|
mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ];
|
||||||
|
});
|
||||||
|
})
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
6
modules/desktop-environments/hyprland/specialisation.nix
Executable file
6
modules/desktop-environments/hyprland/specialisation.nix
Executable file
@@ -0,0 +1,6 @@
|
|||||||
|
{ lib, ... }:
|
||||||
|
{
|
||||||
|
specialisation.hyprland.configuration = {
|
||||||
|
imports = [ ./default.nix ]
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
cfg = config.share.hardware.amd;
|
cfg = config.share.hardware.amd;
|
||||||
pkgsVersion = pkgs.unstable;
|
pkgsVersion = pkgs;#.unstable;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [ ./options.nix ];
|
imports = [ ./options.nix ];
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{ lib, config, pkgs, ... }:
|
{ lib, config, pkgs, ... }:
|
||||||
let
|
let
|
||||||
cfg = config.share.gaming;
|
cfg = config.share.gaming;
|
||||||
pkgsVersion = pkgs.unstable;
|
pkgsVersion = pkgs; #.unstable;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [ ./options.nix ];
|
imports = [ ./options.nix ];
|
||||||
|
|||||||
Reference in New Issue
Block a user