grub + sddm

This commit is contained in:
nx2
2024-03-31 14:49:39 +02:00
parent 66441c5774
commit 0dbcf8becf
8 changed files with 109 additions and 56 deletions

View File

@@ -12,6 +12,7 @@
./system-modules/sound.nix ./system-modules/sound.nix
./system-modules/ollama.nix ./system-modules/ollama.nix
./system-modules/grub.nix ./system-modules/grub.nix
./system-modules/dm.nix
./system-modules/hsmw.nix ./system-modules/hsmw.nix
./system-modules/health_reminder.nix ./system-modules/health_reminder.nix
@@ -35,13 +36,14 @@
console.font = "Lat2-Terminus16"; console.font = "Lat2-Terminus16";
console.keyMap = "de"; console.keyMap = "de";
# Enable the X11 windowing system. services.xserver = {
services.xserver.enable = true; enable = true;
xkb = {
# Configure keymap in X11 layout = "de";
services.xserver.xkb.layout = "de"; options = "eurosign:e,caps:escape";
services.xserver.xkb.options = "eurosign:e,caps:escape"; };
# lightdm in lightdm.nix
};
# Enable CUPS to print documents. # Enable CUPS to print documents.
services.printing.enable = true; services.printing.enable = true;

12
flake.lock generated
View File

@@ -23,11 +23,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1711124224, "lastModified": 1711668574,
"narHash": "sha256-l0zlN/3CiodvWDtfBOVxeTwYSRz93muVbXWSpaMjXxM=", "narHash": "sha256-u1dfs0ASQIEr1icTVrsKwg2xToIpn7ZXxW3RHfHxshg=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "56528ee42526794d413d6f244648aaee4a7b56c0", "rev": "219951b495fc2eac67b1456824cc1ec1fd2ee659",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -38,11 +38,11 @@
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1711163522, "lastModified": 1711523803,
"narHash": "sha256-YN/Ciidm+A0fmJPWlHBGvVkcarYWSC+s3NTPk/P+q3c=", "narHash": "sha256-UKcYiHWHQynzj6CN/vTcix4yd1eCu1uFdsuarupdCQQ=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "44d0940ea560dee511026a53f0e2e2cde489b4d4", "rev": "2726f127c15a4cc9810843b96cad73c7eb39e443",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@@ -21,6 +21,8 @@
"obsidian" "obsidian"
"zoom-us" "zoom-us"
"zoom" "zoom"
"vscode-extension-ms-vscode-remote-remote-ssh"
"vscode-extension-MS-python-vscode-pylance"
]; ];
inecure-packages = [ inecure-packages = [
"electron-25.9.0" "electron-25.9.0"

View File

@@ -1,22 +1,26 @@
{ config, pkgs, lib, system, user, allowed, secrets, ... }: { config, pkgs, lib, system, user, allowed, secrets, ... }:
{ {
home.packages = [ home.packages = [
pkgs.vscodium pkgs.vscodium
pkgs.nixpkgs-fmt
]; ];
imports = [ imports = [
# Make vscode settings writable # Make vscode settings writable
(import (builtins.fetchurl { (import
(builtins.fetchurl {
url = "https://gist.githubusercontent.com/piousdeer/b29c272eaeba398b864da6abf6cb5daa/raw/41e569ba110eb6ebbb463a6b1f5d9fe4f9e82375/mutability.nix"; url = "https://gist.githubusercontent.com/piousdeer/b29c272eaeba398b864da6abf6cb5daa/raw/41e569ba110eb6ebbb463a6b1f5d9fe4f9e82375/mutability.nix";
sha256 = "4b5ca670c1ac865927e98ac5bf5c131eca46cc20abf0bd0612db955bfc979de8"; sha256 = "4b5ca670c1ac865927e98ac5bf5c131eca46cc20abf0bd0612db955bfc979de8";
}) { inherit config lib; }) })
{ inherit config lib; })
(import (builtins.fetchurl { (import
(builtins.fetchurl {
url = "https://gist.githubusercontent.com/piousdeer/b29c272eaeba398b864da6abf6cb5daa/raw/41e569ba110eb6ebbb463a6b1f5d9fe4f9e82375/vscode.nix"; url = "https://gist.githubusercontent.com/piousdeer/b29c272eaeba398b864da6abf6cb5daa/raw/41e569ba110eb6ebbb463a6b1f5d9fe4f9e82375/vscode.nix";
sha256 = "fed877fa1eefd94bc4806641cea87138df78a47af89c7818ac5e76ebacbd025f"; sha256 = "fed877fa1eefd94bc4806641cea87138df78a47af89c7818ac5e76ebacbd025f";
}) { inherit config lib pkgs; }) })
{ inherit config lib pkgs; })
]; ];
programs.vscode = { programs.vscode = {
@@ -24,8 +28,8 @@
package = pkgs.vscodium; package = pkgs.vscodium;
extensions = with pkgs.vscode-extensions; [ extensions = with pkgs.vscode-extensions; [
jnoortheen.nix-ide jnoortheen.nix-ide
viktorqvarfordt.vscode-pitch-black-theme
ms-python.python ms-python.python
ms-python.vscode-pylance
ms-python.black-formatter ms-python.black-formatter
redhat.vscode-yaml redhat.vscode-yaml
redhat.vscode-xml redhat.vscode-xml
@@ -37,20 +41,38 @@
donjayamanne.githistory donjayamanne.githistory
mads-hartmann.bash-ide-vscode mads-hartmann.bash-ide-vscode
bungcip.better-toml bungcip.better-toml
#jeanp413.open-remote-ssh
# ms-vscode-remote.remote-ssh # ms-vscode-remote.remote-ssh
# ] ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
] ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
{
name = "just-black";
publisher = "nur";
version = "3.1.1";
sha256 = "sha256-fatJZquCDsLDFGVzBol2D6LIZUbZ6GzqcVEFAwLodW0=";
}
{
name = "vscode-sshfs";
publisher = "Kelvin";
version = "1.26.1";
sha256 = "sha256-WO9vYELNvwmuNeI05sUBE969KAiKYtrJ1fRfdZx3OYU=";
}
# { # {
# name = "remote-ssh-edit"; # name = "remote-ssh-edit";
# publisher = "ms-vscode-remote"; # publisher = "ms-vscode-remote";
# version = "0.47.2"; # version = "0.86.0";
# sha256 = "1hp6gjh4xp2m1xlm1jsdzxw9d8frkiidhph6nvl24d0h8z34w49g"; # sha256 = "1hp6gjh4xp2m1xlm1jsdzxw9d8frkiidhph6nvl24d0h8z34w49g";
# } # }
# {
# name = "remote-ssh";
# publisher = "ms-vscode-remote";
# version = "0.110.2024030715";
# sha256 = "sha256-gkxrBwPRDdLFaxc1/vYFBsv4Z0JOhDzb8LrLhkToC/g=";
# }
]; ];
userSettings = { userSettings = {
workbench.colorTheme = "Just Black"; workbench.colorTheme = "Just Black";
editor.fontFamily = "'CaskaydiaCove Nerd Font', 'monospace', monospace"; editor.fontFamily = "'CaskaydiaCove Nerd Font', 'monospace', monospace";
emote.SSH.useLocalServer = false;
}; };
enableUpdateCheck = false; enableUpdateCheck = false;
enableExtensionUpdateCheck = false; enableExtensionUpdateCheck = false;
@@ -65,12 +87,14 @@
command = "editor.action.duplicateSelection"; command = "editor.action.duplicateSelection";
when = "textInputFocus"; when = "textInputFocus";
} }
{ # unset so that ctrl d is not set twice {
# unset so that ctrl d is not set twice
key = ""; key = "";
command = "editor.action.addSelectionToNextFindMatch"; command = "editor.action.addSelectionToNextFindMatch";
when = "editorFocus"; when = "editorFocus";
} }
{ # unset so that ctrl shift d is not set twice {
# unset so that ctrl shift d is not set twice
key = ""; key = "";
command = "workbench.view.debug"; command = "workbench.view.debug";
} }

View File

@@ -37,10 +37,8 @@
gimp inkscape gimp inkscape
kitty kitty
zathura zathura
#vesktop element-desktop
thunderbird element-desktop
zoom-us zoom-us
# vesktop
discord discord
signal-desktop signal-desktop

22
system-modules/dm.nix Normal file
View File

@@ -0,0 +1,22 @@
{ config, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
sddm
where-is-my-sddm-theme
];
services.xserver = {
displayManager.sddm = {
enable = true;
theme = "where_is_my_sddm_theme";
settings = {
theme = {
# background = /home/nx2/Pictures/
passwordFontSize = 12;
passwordInputCursorVisible = true;
};
};
};
};
}

View File

@@ -1,4 +1,13 @@
{ config, pkgs, lib, system, user, allowed, secrets, ... }: { config, pkgs, ... }:
let
grub-theme-ascii-diana = (pkgs.fetchFromGitea {
domain = "git.nx2.site";
owner = "nx2";
repo = "grub-theme-ascii-diana";
rev = "0.5.0";
hash = "sha256-e+55NYsSsWY6GPbYUtdVEB9krueuCAWT3Ce/Ghops1g=";
});
in
{ {
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
boot.loader.grub = { boot.loader.grub = {
@@ -8,31 +17,27 @@
device = "nodev"; device = "nodev";
# useOSProber = true; # useOSProber = true;
efiSupport = true; efiSupport = true;
# theme = "${(pkgs.fetchFromGitea { # theme = pkgs.sleek-grub-theme;
# domain = "git.nx2.site"; theme = grub-theme-ascii-diana;
# owner = "nx2"; font = "${grub-theme-ascii-diana}/unicode.pf2";
# repo = "grub-theme-ascii-diana"; fontSize = 50;
# rev = "0.1.0"; splashImage = null;
# hash = "sha256-uqhj77CX6EaqF9SBDRKS8dfwSVyR9wb9xG9St4gJmFA=";
# })
# }/out/
# ";
extraEntries = '' extraEntries = ''
menuentry 'Windows Boot Manager (on /dev/nvme0n1p1)' --class windows --class os $menuentry_id_option 'osprober-efi-0A97-7A2D' { menuentry 'Windows 11' --class windows --class os $menuentry_id_option 'osprober-efi-0A97-7A2D' {
insmod part_gpt insmod part_gpt
insmod fat insmod fat
search --no-floppy --fs-uuid --set=root 0A97-7A2D search --no-floppy --fs-uuid --set=root 0A97-7A2D
chainloader /EFI/Microsoft/Boot/bootmgfw.efi chainloader /EFI/Microsoft/Boot/bootmgfw.efi
} }
menuentry 'Arch Linux (on /dev/nvme0n1p5)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-0c11547f-0294-419b-93d0-45c6d1f1c546' { menuentry 'Arch Linux ' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-0c11547f-0294-419b-93d0-45c6d1f1c546' {
insmod part_gpt insmod part_gpt
insmod ext2 insmod ext2
search --no-floppy --fs-uuid --set=root 0c11547f-0294-419b-93d0-45c6d1f1c546 search --no-floppy --fs-uuid --set=root 0c11547f-0294-419b-93d0-45c6d1f1c546
linux /boot/vmlinuz-linux-lts root=UUID=0c11547f-0294-419b-93d0-45c6d1f1c546 rw loglevel=3 quiet splash snd_hda_intel.dmic_detect=0 linux /boot/vmlinuz-linux-lts root=UUID=0c11547f-0294-419b-93d0-45c6d1f1c546 rw loglevel=3 quiet splash snd_hda_intel.dmic_detect=0
initrd /boot/intel-ucode.img /boot/initramfs-linux-lts.img initrd /boot/intel-ucode.img /boot/initramfs-linux-lts.img
} }
submenu 'Advanced options for Arch Linux (on /dev/nvme0n1p5)' $menuentry_id_option 'osprober-gnulinux-advanced-0c11547f-0294-419b-93d0-45c6d1f1c546' { submenu 'Arch (A.O.)' $menuentry_id_option 'osprober-gnulinux-advanced-0c11547f-0294-419b-93d0-45c6d1f1c546' {
menuentry 'Arch Linux (on /dev/nvme0n1p5)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-linux-lts--0c11547f-0294-419b-93d0-45c6d1f1c546' { menuentry 'Arch Linux (on /dev/nvme0n1p5)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-linux-lts--0c11547f-0294-419b-93d0-45c6d1f1c546' {
insmod part_gpt insmod part_gpt
insmod ext2 insmod ext2

View File

@@ -19,7 +19,7 @@
}; };
fileSystems."/boot" = fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/0A97-7A2D"; { device = "/dev/disk/by-uuid/C5AA-3190";
fsType = "vfat"; fsType = "vfat";
}; };
fileSystems."/home/${user}/shared" = fileSystems."/home/${user}/shared" =