add kde module, remove cosmic defs.

This commit is contained in:
Joseph Hanson 2024-09-24 13:36:57 -05:00
parent 5dbb043b5c
commit 7d64f9a3ba
Signed by: jahanson
SSH key fingerprint: SHA256:vy6dKBECV522aPAwklFM3ReKAVB086rT3oWwiuiFG7o
5 changed files with 49 additions and 162 deletions

View file

@ -77,45 +77,7 @@
"type": "github" "type": "github"
} }
}, },
"flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1717312683,
"narHash": "sha256-FrlieJH50AuvagamEvWMIE6D2OAnERuDboFDYAED/dE=",
"owner": "nix-community",
"repo": "flake-compat",
"rev": "38fd3954cf65ce6faf3d0d45cd26059e059f07ea",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "flake-compat",
"type": "github"
}
},
"flake-parts": { "flake-parts": {
"inputs": {
"nixpkgs-lib": [
"nixos-cosmic",
"nix-update",
"nixpkgs"
]
},
"locked": {
"lastModified": 1719994518,
"narHash": "sha256-pQMhCCHyQGRzdfAkdJ4cIWiw+JNuWsTX7f0ZYSyz0VY=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "9227223f6d922fee3c7b190b2cc238a99527bbb7",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_2": {
"inputs": { "inputs": {
"nixpkgs-lib": "nixpkgs-lib" "nixpkgs-lib": "nixpkgs-lib"
}, },
@ -398,29 +360,6 @@
"type": "github" "type": "github"
} }
}, },
"nix-update": {
"inputs": {
"flake-parts": "flake-parts",
"nixpkgs": [
"nixos-cosmic",
"nixpkgs"
],
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1726651036,
"narHash": "sha256-6kR4UEBZvbQNoR3l8/It5ZTCC+mB14jzj7MNnFoQJwE=",
"owner": "Mic92",
"repo": "nix-update",
"rev": "7dd0e4467c571ebb7e53d9e3d40c49f75473efdf",
"type": "github"
},
"original": {
"owner": "Mic92",
"repo": "nix-update",
"type": "github"
}
},
"nix-vscode-extensions": { "nix-vscode-extensions": {
"inputs": { "inputs": {
"flake-compat": "flake-compat", "flake-compat": "flake-compat",
@ -443,30 +382,6 @@
"type": "github" "type": "github"
} }
}, },
"nixos-cosmic": {
"inputs": {
"flake-compat": "flake-compat_2",
"nix-update": "nix-update",
"nixpkgs": [
"nixpkgs"
],
"nixpkgs-stable": "nixpkgs-stable",
"rust-overlay": "rust-overlay_2"
},
"locked": {
"lastModified": 1727138676,
"narHash": "sha256-py+c+r8dP3BmiGv44OIEHRZx6EFncpRJGlYzfVNINa8=",
"owner": "lilyinstarlight",
"repo": "nixos-cosmic",
"rev": "ffd6b5ce3de69631f4eae17e13ba17650b126471",
"type": "github"
},
"original": {
"owner": "lilyinstarlight",
"repo": "nixos-cosmic",
"type": "github"
}
},
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1726650330, "lastModified": 1726650330,
@ -528,22 +443,6 @@
} }
}, },
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": {
"lastModified": 1726838390,
"narHash": "sha256-NmcVhGElxDbmEWzgXsyAjlRhUus/nEqPC5So7BOJLUM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "944b2aea7f0a2d7c79f72468106bc5510cbf5101",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-24.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable_2": {
"locked": { "locked": {
"lastModified": 1725762081, "lastModified": 1725762081,
"narHash": "sha256-vNv+aJUW5/YurRy1ocfvs4q/48yVESwlC/yHzjkZSP8=", "narHash": "sha256-vNv+aJUW5/YurRy1ocfvs4q/48yVESwlC/yHzjkZSP8=",
@ -720,7 +619,6 @@
"nix-index-database": "nix-index-database", "nix-index-database": "nix-index-database",
"nix-inspect": "nix-inspect", "nix-inspect": "nix-inspect",
"nix-vscode-extensions": "nix-vscode-extensions", "nix-vscode-extensions": "nix-vscode-extensions",
"nixos-cosmic": "nixos-cosmic",
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable", "nixpkgs-unstable": "nixpkgs-unstable",
@ -747,27 +645,6 @@
"type": "github" "type": "github"
} }
}, },
"rust-overlay_2": {
"inputs": {
"nixpkgs": [
"nixos-cosmic",
"nixpkgs"
]
},
"locked": {
"lastModified": 1726972233,
"narHash": "sha256-FlL/bNESOtDQoczRhmPfReNAmLqVg+dAX4HectPOOf0=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "36d73192555e569d27579f6c486fea3ab768823c",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"slimlock": { "slimlock": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -797,7 +674,7 @@
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ],
"nixpkgs-stable": "nixpkgs-stable_2" "nixpkgs-stable": "nixpkgs-stable"
}, },
"locked": { "locked": {
"lastModified": 1726524647, "lastModified": 1726524647,
@ -875,7 +752,7 @@
}, },
"talhelper": { "talhelper": {
"inputs": { "inputs": {
"flake-parts": "flake-parts_2", "flake-parts": "flake-parts",
"nixpkgs": [ "nixpkgs": [
"nixpkgs-unstable" "nixpkgs-unstable"
] ]
@ -916,28 +793,6 @@
"type": "github" "type": "github"
} }
}, },
"treefmt-nix": {
"inputs": {
"nixpkgs": [
"nixos-cosmic",
"nix-update",
"nixpkgs"
]
},
"locked": {
"lastModified": 1719887753,
"narHash": "sha256-p0B2r98UtZzRDM5miGRafL4h7TwGRC4DII+XXHDHqek=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "bdb6355009562d8f9313d9460c0d3860f525bc6c",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
},
"vscode-server": { "vscode-server": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_4", "flake-utils": "flake-utils_4",

View file

@ -86,17 +86,10 @@
url = "github:ajgon/krewfile?ref=feat/indexes"; url = "github:ajgon/krewfile?ref=feat/indexes";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
# NixOS Cosmic
nixos-cosmic = {
url = "github:lilyinstarlight/nixos-cosmic";
inputs.nixpkgs.follows = "nixpkgs";
};
}; };
outputs = outputs =
{ self, nixpkgs, sops-nix, home-manager, nix-vscode-extensions, impermanence, disko, talhelper, lix-module, vscode-server, krewfile, nixos-cosmic, ... } @ inputs: { self, nixpkgs, sops-nix, home-manager, nix-vscode-extensions, impermanence, disko, talhelper, lix-module, vscode-server, krewfile, ... } @ inputs:
let let
forAllSystems = nixpkgs.lib.genAttrs [ forAllSystems = nixpkgs.lib.genAttrs [
"aarch64-linux" "aarch64-linux"
@ -173,7 +166,6 @@
system = "x86_64-linux"; system = "x86_64-linux";
hardwareModules = [ hardwareModules = [
inputs.nixos-hardware.nixosModules.framework-16-7040-amd inputs.nixos-hardware.nixosModules.framework-16-7040-amd
# nixos-cosmic.nixosModules.default
./nixos/profiles/hw-framework-16-7840hs.nix ./nixos/profiles/hw-framework-16-7840hs.nix
disko.nixosModules.disko disko.nixosModules.disko
(import ./nixos/profiles/disko-telchar.nix) (import ./nixos/profiles/disko-telchar.nix)

View file

@ -23,12 +23,6 @@
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
# KDE
services.displayManager.sddm.enable = true;
services.displayManager.sddm.wayland.enable = true;
services.desktopManager.plasma6.enable = true;
# Enable Flatpak support # Enable Flatpak support
services.flatpak.enable = true; services.flatpak.enable = true;
@ -39,6 +33,8 @@
# Desktop Environment # Desktop Environment
# Gnome # Gnome
# de.gnome.enable = true; # de.gnome.enable = true;
# KDE
de.kde.enable = true;
# System config # System config
system = { system = {

View file

@ -1,5 +1,6 @@
{ {
imports = [ imports = [
./gnome.nix ./gnome.nix
./kde.nix
]; ];
} }

View file

@ -0,0 +1,43 @@
{ lib, config, pkgs, ... }:
with lib;
let
cfg = config.mySystem.de.kde;
in
{
options = {
mySystem.de.kde = {
enable = mkEnableOption "KDE" // { default = false; };
};
};
config = mkIf cfg.enable {
# Ref: https://wiki.nixos.org/wiki/KDE
# KDE
services = {
displayManager = {
sddm = {
enable = true;
wayland = {
enable = true;
};
};
};
desktopManager.plasma6.enable = true;
};
# extra pkgs and extensions
environment = {
systemPackages = with pkgs; [
wl-clipboard # ls ~/Downloads | wl-copy or wl-paste > clipboard.txt
playerctl # gsconnect play/pause command
];
};
# enable kdeconnect
# this method also opens the firewall ports required when enable = true
programs.kdeconnect = {
enable = true;
};
};
}