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

12
flake.lock generated
View File

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

View File

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

View File

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

View File

@@ -37,10 +37,8 @@
gimp inkscape
kitty
zathura
#vesktop
thunderbird element-desktop
element-desktop
zoom-us
# vesktop
discord
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.grub = {
@@ -8,31 +17,27 @@
device = "nodev";
# useOSProber = true;
efiSupport = true;
# theme = "${(pkgs.fetchFromGitea {
# domain = "git.nx2.site";
# owner = "nx2";
# repo = "grub-theme-ascii-diana";
# rev = "0.1.0";
# hash = "sha256-uqhj77CX6EaqF9SBDRKS8dfwSVyR9wb9xG9St4gJmFA=";
# })
# }/out/
# ";
# theme = pkgs.sleek-grub-theme;
theme = grub-theme-ascii-diana;
font = "${grub-theme-ascii-diana}/unicode.pf2";
fontSize = 50;
splashImage = null;
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 fat
search --no-floppy --fs-uuid --set=root 0A97-7A2D
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 ext2
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
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' {
insmod part_gpt
insmod ext2
@@ -71,4 +76,4 @@
}
'';
};
}
}

View File

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