[modules] add plasma nixos module, modify gnome nixos module
feat(modules): add plasma module refactor(module): gnome module has to be explicitly enabled now
This commit is contained in:
parent
d218f5a13c
commit
32ab43f7dd
7 changed files with 117 additions and 67 deletions
24
flake.lock
24
flake.lock
|
@ -2,11 +2,11 @@
|
|||
"nodes": {
|
||||
"catppuccin": {
|
||||
"locked": {
|
||||
"lastModified": 1720472194,
|
||||
"narHash": "sha256-CYscFEts6tyvosc1T29nxhzIYJAj/1CCEkV3ZMzSN/c=",
|
||||
"lastModified": 1721784420,
|
||||
"narHash": "sha256-bgF6fN4Qgk7NErFKGuuqWXcLORsiykTYyqMUFRiAUBY=",
|
||||
"owner": "catppuccin",
|
||||
"repo": "nix",
|
||||
"rev": "d75d5803852fb0833767dc969a4581ac13204e22",
|
||||
"rev": "8bdb55cc1c13f572b6e4307a3c0d64f1ae286a4f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -70,11 +70,11 @@
|
|||
},
|
||||
"hardware": {
|
||||
"locked": {
|
||||
"lastModified": 1721413321,
|
||||
"narHash": "sha256-0GdiQScDceUrVGbxYpV819LHesK3szHOhJ09e6sgES4=",
|
||||
"lastModified": 1722332872,
|
||||
"narHash": "sha256-2xLM4sc5QBfi0U/AANJAW21Bj4ZX479MHPMPkB+eKBU=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixos-hardware",
|
||||
"rev": "ab165a8a6cd12781d76fe9cbccb9e975d0fb634f",
|
||||
"rev": "14c333162ba53c02853add87a0000cbd7aa230c2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -91,11 +91,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1721534365,
|
||||
"narHash": "sha256-XpZOkaSJKdOsz1wU6JfO59Rx2fqtcarQ0y6ndIOKNpI=",
|
||||
"lastModified": 1722321190,
|
||||
"narHash": "sha256-WeVWVRqkgrbLzmk6FfJoloJ7Xe7HWD27Pv950IUG2kI=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "635563f245309ef5320f80c7ebcb89b2398d2949",
|
||||
"rev": "4fcd54df7cbb1d79cbe81209909ee8514d6b17a4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -122,11 +122,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1721562059,
|
||||
"narHash": "sha256-Tybxt65eyOARf285hMHIJ2uul8SULjFZbT9ZaEeUnP8=",
|
||||
"lastModified": 1722185531,
|
||||
"narHash": "sha256-veKR07psFoJjINLC8RK4DiLniGGMgF3QMlS4tb74S6k=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "68c9ed8bbed9dfce253cc91560bf9043297ef2fe",
|
||||
"rev": "52ec9ac3b12395ad677e8b62106f0b98c1f8569d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -51,7 +51,6 @@
|
|||
git
|
||||
nodejs_22
|
||||
bun
|
||||
kitty
|
||||
forge-sparks
|
||||
devenv
|
||||
|
||||
|
@ -67,4 +66,4 @@
|
|||
];
|
||||
|
||||
home.stateVersion = "24.05";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,10 +16,10 @@
|
|||
catppuccin = {
|
||||
enable = true;
|
||||
accent = "blue";
|
||||
flavor = "frappe";
|
||||
flavor = "macchiato";
|
||||
|
||||
pointerCursor.enable = true;
|
||||
pointerCursor.accent = "blue";
|
||||
pointerCursor.flavor = "frappe";
|
||||
pointerCursor.flavor = "macchiato";
|
||||
};
|
||||
}
|
|
@ -1,50 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
inputs,
|
||||
|
||||
namespace, # The flake namespace, set in flake.nix. If not set, defaults to "internal".
|
||||
system, # The system architecture for this host (eg. `x86_64-linux`).
|
||||
target, # The Snowfall Lib target for this system (eg. `x86_64-iso`).
|
||||
format, # A normalized name for the system target (eg. `iso`).
|
||||
virtual, # A boolean to determine whether this system is a virtual target using nixos-generators.
|
||||
systems, # An attribute map of your defined hosts.
|
||||
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
services.xserver.enable = true;
|
||||
|
||||
# Enable GNOME and GDM.
|
||||
services.xserver.displayManager.gdm.enable = true;
|
||||
services.xserver.desktopManager.gnome.enable = true;
|
||||
|
||||
environment.gnome.excludePackages = (with pkgs; [
|
||||
gnome-tour
|
||||
gedit
|
||||
cheese
|
||||
geary
|
||||
yelp # Help view
|
||||
epiphany # Gnome web
|
||||
]) ++ (with pkgs.gnome; [
|
||||
gnome-music
|
||||
tali # Poker game
|
||||
iagno # Go game
|
||||
hitori # Sudoku game
|
||||
gnome-contacts
|
||||
gnome-initial-setup
|
||||
]);
|
||||
|
||||
programs.dconf.enable = true;
|
||||
|
||||
services.gnome.gnome-keyring.enable = true;
|
||||
|
||||
programs.kdeconnect = {
|
||||
enable = true;
|
||||
package = pkgs.gnomeExtensions.gsconnect;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
gnome-tweaks
|
||||
];
|
||||
}
|
57
modules/nixos/desktop/gnome/default.nix
Normal file
57
modules/nixos/desktop/gnome/default.nix
Normal file
|
@ -0,0 +1,57 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
inputs,
|
||||
|
||||
namespace, # The flake namespace, set in flake.nix. If not set, defaults to "internal".
|
||||
system, # The system architecture for this host (eg. `x86_64-linux`).
|
||||
target, # The Snowfall Lib target for this system (eg. `x86_64-iso`).
|
||||
format, # A normalized name for the system target (eg. `iso`).
|
||||
virtual, # A boolean to determine whether this system is a virtual target using nixos-generators.
|
||||
systems, # An attribute map of your defined hosts.
|
||||
|
||||
config,
|
||||
...
|
||||
}: with lib; with lib.${namespace};
|
||||
let
|
||||
cfg = config.${namespace}.desktop.gnome;
|
||||
in {
|
||||
options.${namespace}.desktop.gnome = { enable = mkEnableOption "gnome"; };
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.xserver.enable = true;
|
||||
|
||||
# Enable GNOME and GDM.
|
||||
services.xserver.displayManager.gdm.enable = true;
|
||||
services.xserver.desktopManager.gnome.enable = true;
|
||||
|
||||
environment.gnome.excludePackages = (with pkgs; [
|
||||
gnome-tour
|
||||
gedit
|
||||
cheese
|
||||
geary
|
||||
yelp # Help view
|
||||
epiphany # Gnome web
|
||||
]) ++ (with pkgs.gnome; [
|
||||
gnome-music
|
||||
tali # Poker game
|
||||
iagno # Go game
|
||||
hitori # Sudoku game
|
||||
gnome-contacts
|
||||
gnome-initial-setup
|
||||
]);
|
||||
|
||||
programs.dconf.enable = true;
|
||||
|
||||
services.gnome.gnome-keyring.enable = true;
|
||||
|
||||
programs.kdeconnect = {
|
||||
enable = true;
|
||||
package = pkgs.gnomeExtensions.gsconnect;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
gnome-tweaks
|
||||
];
|
||||
};
|
||||
}
|
29
modules/nixos/desktop/plasma/default.nix
Normal file
29
modules/nixos/desktop/plasma/default.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
inputs,
|
||||
|
||||
namespace, # The flake namespace, set in flake.nix. If not set, defaults to "internal".
|
||||
system, # The system architecture for this host (eg. `x86_64-linux`).
|
||||
target, # The Snowfall Lib target for this system (eg. `x86_64-iso`).
|
||||
format, # A normalized name for the system target (eg. `iso`).
|
||||
virtual, # A boolean to determine whether this system is a virtual target using nixos-generators.
|
||||
systems, # An attribute map of your defined hosts.
|
||||
|
||||
config,
|
||||
...
|
||||
}: with lib; with lib.${namespace};
|
||||
let
|
||||
cfg = config.${namespace}.desktop.plasma;
|
||||
in {
|
||||
options.${namespace}.desktop.plasma = { enable = mkEnableOption "Whether to enable the KDE Plasma desktop environment"; };
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.xserver.enable = true;
|
||||
|
||||
services.desktopManager.plasma6.enable = true;
|
||||
services.displayManager.sddm.enable = true;
|
||||
|
||||
programs.kdeconnect.enable = true;
|
||||
};
|
||||
}
|
|
@ -18,7 +18,10 @@
|
|||
# All other arguments come from the system system.
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
with lib;
|
||||
with lib.${namespace};
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
inputs.hardware.nixosModules.common-pc-laptop
|
||||
|
@ -125,6 +128,9 @@
|
|||
# Enable printing.
|
||||
services.printing.enable = true;
|
||||
|
||||
# Enable docker
|
||||
virtualisation.docker.enable = true;
|
||||
|
||||
# Sound configuration based on pipewire.
|
||||
hardware.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
|
@ -151,12 +157,18 @@
|
|||
};
|
||||
};
|
||||
|
||||
# Enable Gnome
|
||||
puzzlevision.desktop.gnome.enable = true;
|
||||
|
||||
# Enable flatpak support.
|
||||
services.flatpak.enable = true;
|
||||
|
||||
# Enable iio-sensor for automatic screen rotation and similar features.
|
||||
hardware.sensor.iio.enable = true;
|
||||
|
||||
# Enable support for flipper zero devices
|
||||
hardware.flipperzero.enable = true;
|
||||
|
||||
# Configure system-wide default shell.
|
||||
environment.shells = with pkgs; [ fish ];
|
||||
users.defaultUserShell = pkgs.fish;
|
||||
|
@ -165,6 +177,9 @@
|
|||
# Configure users.
|
||||
snowfallorg.users.jo.admin = true;
|
||||
|
||||
users.users.jo.isNormalUser = true;
|
||||
users.users.jo.extraGroups = [ "dialout" "docker" ];
|
||||
|
||||
# Configure home-manager
|
||||
home-manager = {
|
||||
backupFileExtension = "homeManagerBackup";
|
||||
|
|
Loading…
Reference in a new issue