Compare commits
41 commits
9fffce71cd
...
756547a1f6
Author | SHA1 | Date | |
---|---|---|---|
756547a1f6 | |||
898b301fbc | |||
2e58988fff | |||
c41c2293f3 | |||
7202e30fa7 | |||
ee64e04166 | |||
8f15bf0e0c | |||
23bfb2d222 | |||
e66e4aaec0 | |||
98bba7fa6a | |||
5acbee3237 | |||
a6568d4891 | |||
af43682e8b | |||
a91317ff35 | |||
2670ad97e8 | |||
4d4a007a00 | |||
da55e963be | |||
8db3b7cc1b | |||
384fdd9172 | |||
1308bb8cc5 | |||
8c352ea5ec | |||
99a10f35dd | |||
22a7d47ace | |||
0dfba79fd3 | |||
6d793ecb1c | |||
1786dbfac7 | |||
6a7dff6a96 | |||
43ba0271aa | |||
ab2c2b00fb | |||
1095c7884b | |||
bd309d916c | |||
31994d38f6 | |||
cae29c2484 | |||
5d0bf2000d | |||
1cc877bddb | |||
30bee709a5 | |||
b5885e7fa8 | |||
cab57d1dcc | |||
04767f4059 | |||
2042ae5232 | |||
0d838e68aa |
23 changed files with 494 additions and 353 deletions
50
hosts/main.nix
Normal file
50
hosts/main.nix
Normal file
|
@ -0,0 +1,50 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../nix-os/core.nix
|
||||
../nix-os/core-desktop.nix
|
||||
../nix-os/nvidia.nix
|
||||
../nix-os/docker.nix
|
||||
../nix-os/razer.nix
|
||||
../nix-os/desktopManagers/gnome.nix
|
||||
../nix-os/displayManagers/gdm.nix
|
||||
#../nix-os/desktop/kde-plasma.nix
|
||||
../nix-os/shell.nix
|
||||
../nix-os/virtualization.nix
|
||||
../nix-os/polkit/disable-shutdown.nix
|
||||
../nix-os/locale.nix
|
||||
../nix-os/adb.nix
|
||||
../nix-os/account.nix
|
||||
../nix-os/xdg-default-apps.nix
|
||||
../nix-os/services/nix-binary-cache.nix
|
||||
../nix-os/udev.nix
|
||||
|
||||
(builtins.fetchTarball "https://github.com/nix-community/nixos-vscode-server/tarball/fc900c16efc6a5ed972fb6be87df018bcf3035bc")
|
||||
];
|
||||
|
||||
config = {
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
networking.hostName = "wroclaw-main";
|
||||
|
||||
services.xrdp.enable = true;
|
||||
users.groups."tsusers".members = [ "wroclaw" ];
|
||||
|
||||
services.printing.drivers = with pkgs; [
|
||||
hplip
|
||||
];
|
||||
|
||||
# nixos-vscode-server module needs this
|
||||
programs.nix-ld.enable = true;
|
||||
services.vscode-server = {
|
||||
enable = true;
|
||||
extraRuntimeDependencies = with pkgs; [
|
||||
docker
|
||||
];
|
||||
};
|
||||
|
||||
system.stateVersion = "23.05";
|
||||
};
|
||||
}
|
50
hosts/tablet.nix
Normal file
50
hosts/tablet.nix
Normal file
|
@ -0,0 +1,50 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../nix-os/core.nix
|
||||
../nix-os/core-desktop.nix
|
||||
../nix-os/account.nix
|
||||
../nix-os/adb.nix
|
||||
../nix-os/locale.nix
|
||||
../nix-os/shell.nix
|
||||
|
||||
../nix-os/desktopManagers/gnome.nix
|
||||
../nix-os/displayManagers/gdm.nix
|
||||
../nix-os/udev.nix
|
||||
];
|
||||
|
||||
config = {
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
networking.hostName = "wroclaw-hp";
|
||||
networking.networkmanager.enable = true;
|
||||
networking.firewall.enable = true;
|
||||
services.xserver.displayManager.gdm.wayland = lib.mkForce true;
|
||||
hardware.sensor.iio.enable = true;
|
||||
|
||||
networking.firewall.allowedTCPPortRanges = [
|
||||
# KDE Connect
|
||||
rec { from = 1714; to = from + 50; }
|
||||
];
|
||||
|
||||
networking.firewall.allowedUDPPortRanges = [
|
||||
# KDE Connect
|
||||
rec { from = 1714; to = from + 50; }
|
||||
];
|
||||
|
||||
services.logind.extraConfig = ''
|
||||
HandlePowerKey=suspend
|
||||
HandlePowerKeyLongPress=poweroff
|
||||
HandleSuspendKey=suspend-then-hibernate
|
||||
HandleSuspendKeyLongPress=hibernate
|
||||
HandleLidSwitch=lock
|
||||
HandleLidSwitchDocked=ignore
|
||||
HandleLidSwitchExternalPower=lock
|
||||
'';
|
||||
|
||||
system.stateVersion = "23.11";
|
||||
};
|
||||
}
|
||||
|
|
@ -3,6 +3,7 @@
|
|||
{
|
||||
imports = [
|
||||
../nix-os/core.nix
|
||||
../nix-os/core-desktop.nix
|
||||
../nix-os/docker.nix
|
||||
../nix-os/desktopManagers/cosmic.nix
|
||||
../nix-os/displayManagers/cosmic-greeter.nix
|
|
@ -14,5 +14,6 @@
|
|||
../nix-os/adb.nix
|
||||
../nix-os/account.nix
|
||||
../nix-os/xdg-default-apps.nix
|
||||
../nix-os/udev.nix
|
||||
];
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
(if builtins.pathExists /etc/nixos/hardware-configuration.nix then /etc/nixos/hardware-configuration.nix else null)
|
||||
# Include device-specific overrides
|
||||
(if builtins.pathExists /etc/nixos/device-configuration.nix then /etc/nixos/device-configuration.nix else null)
|
||||
../nix-os/core.nix
|
||||
../nix-os/nvidia.nix
|
||||
../nix-os/docker.nix
|
||||
../nix-os/razer.nix
|
||||
../nix-os/desktopManagers/gnome.nix
|
||||
../nix-os/displayManagers/gdm.nix
|
||||
#../nix-os/desktop/kde-plasma.nix
|
||||
../nix-os/shell.nix
|
||||
../nix-os/virtualization.nix
|
||||
../nix-os/polkit/disable-shutdown.nix
|
||||
../nix-os/locale.nix
|
||||
../nix-os/adb.nix
|
||||
../nix-os/account.nix
|
||||
../nix-os/xdg-default-apps.nix
|
||||
];
|
||||
}
|
|
@ -14,17 +14,25 @@
|
|||
(if config.programs.adb.enable then "adbusers" else null)
|
||||
];
|
||||
linger = true;
|
||||
# Initial password for the account
|
||||
password = "nixos";
|
||||
initialPassword = "nixos";
|
||||
packages = with pkgs; [
|
||||
firefox
|
||||
vivaldi
|
||||
discord-canary
|
||||
unstablePkgs.vscode
|
||||
gimp
|
||||
inkscape
|
||||
krita
|
||||
unstablePkgs.zettlr
|
||||
];
|
||||
};
|
||||
users.groups.wroclaw.gid = 1000;
|
||||
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
remotePlay.openFirewall = true;
|
||||
};
|
||||
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
user = "wroclaw";
|
||||
|
|
28
nix-os/core-desktop.nix
Normal file
28
nix-os/core-desktop.nix
Normal file
|
@ -0,0 +1,28 @@
|
|||
{config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
config = {
|
||||
services.printing.enable = true;
|
||||
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
|
||||
# Enable audio interfaces renaming
|
||||
wireplumber.enable = true;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
mpv
|
||||
];
|
||||
|
||||
services.openssh.extraConfig = ''
|
||||
X11Forwarding yes
|
||||
'';
|
||||
};
|
||||
}
|
114
nix-os/core.nix
114
nix-os/core.nix
|
@ -2,43 +2,35 @@
|
|||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running 'nixos-help').
|
||||
|
||||
{ config, pkgs, ... }:
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
/*
|
||||
* pkgs: package - nixpkgs package
|
||||
* exe: string - executable (under bin) in pkgs
|
||||
* wrapperArgs: string[] - arguments to pass to the wrapper
|
||||
*/
|
||||
mkWrappedExecutable = {pkg, exe ? pkg.meta.mainProgram, wrapperArgs}: let inherit (pkgs) lib makeWrapper; in pkgs.stdenv.mkDerivation {
|
||||
name = "${pkg.name}-wrap-${exe}";
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
phases = ["installPhase"];
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
makeWrapper ${pkg}/bin/${exe} $out/bin/${exe} ${lib.concatStringsSep " " wrapperArgs}
|
||||
'';
|
||||
};
|
||||
wrapedNixPrograms = builtins.map lib.hiPrio [
|
||||
(mkWrappedExecutable {pkg = pkgs.nix; exe = "nix-build"; wrapperArgs = ["--add-flags" "\"--log-format\"" "--add-flags" "bar-with-logs"];})
|
||||
(mkWrappedExecutable {pkg = pkgs.nix; exe = "nix-shell"; wrapperArgs = ["--add-flags" "\"--log-format\"" "--add-flags" "bar"];})
|
||||
];
|
||||
in
|
||||
{
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
# kernel
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
|
||||
# Enable networking
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# X11 and desktop/display manager is enabled using imported files
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
|
||||
# Enable flatpak, some software is newer here unfortunately
|
||||
services.flatpak.enable = true;
|
||||
|
||||
# Enable sound with pipewire.
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
|
||||
# Enable audio interfaces renaming
|
||||
wireplumber.enable = true;
|
||||
};
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
|
@ -46,55 +38,20 @@
|
|||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
wget
|
||||
git
|
||||
ffmpeg
|
||||
yt-dlp
|
||||
mpv
|
||||
htop
|
||||
btop
|
||||
neofetch
|
||||
ranger
|
||||
gimp
|
||||
inkscape
|
||||
krita
|
||||
fastfetch
|
||||
smartmontools
|
||||
ddrescue
|
||||
];
|
||||
] ++ wrapedNixPrograms;
|
||||
|
||||
# terminal text editor
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
viAlias = true;
|
||||
defaultEditor = true;
|
||||
configure = {
|
||||
customRC = ''
|
||||
set number
|
||||
set hlsearch
|
||||
set incsearch
|
||||
set tabstop=4
|
||||
set softtabstop=4
|
||||
set shiftwidth=4
|
||||
set expandtab
|
||||
set autoindent
|
||||
|
||||
syntax on
|
||||
set encoding=utf-8
|
||||
set wildmode=longest,list,full
|
||||
set listchars=space:·,tab:┄┄»
|
||||
set indentkeys-=0#
|
||||
'';
|
||||
packages.myVimPackage = with pkgs.vimPlugins; {
|
||||
start = [
|
||||
guess-indent-nvim
|
||||
vim-visual-multi
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
remotePlay.openFirewall = true;
|
||||
programs.git.enable = true;
|
||||
programs.git.config = {
|
||||
init.defaultBranch = "main";
|
||||
merge.conflictstyle = "diff3";
|
||||
rerere.enabled = true;
|
||||
};
|
||||
|
||||
# Enable fail2ban because of the OpenSSH server
|
||||
|
@ -111,20 +68,5 @@
|
|||
22
|
||||
8022
|
||||
];
|
||||
extraConfig = ''
|
||||
X11Forwarding yes
|
||||
'';
|
||||
};
|
||||
|
||||
# Disable firewall
|
||||
networking.firewall.enable = false;
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It's perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "23.05"; # Did you read the comment?
|
||||
# I am lazy
|
||||
}
|
||||
|
|
|
@ -1,158 +1,166 @@
|
|||
# This file is not a NixOS system module
|
||||
{config, lib, pkgs, ... }:
|
||||
selection:
|
||||
|
||||
let
|
||||
settings = with lib.gvariant; {
|
||||
"org/gnome/desktop/background" = {
|
||||
picture-options = "zoom";
|
||||
picture-uri = "file://${../media/wallpaper.png}";
|
||||
picture-uri-dark = "file://${../media/wallpaper.png}";
|
||||
{
|
||||
imports = [
|
||||
./generic/dconf.nix
|
||||
];
|
||||
|
||||
config = {
|
||||
proot.dconf.rules = with lib.gvariant; {
|
||||
"org/gnome/desktop/background" = {
|
||||
picture-options = "zoom";
|
||||
picture-uri = "file://${../media/wallpaper.png}";
|
||||
picture-uri-dark = "file://${../media/wallpaper.png}";
|
||||
};
|
||||
|
||||
"org/gnome/desktop/interface" = {
|
||||
clock-show-date = true;
|
||||
clock-show-seconds = true;
|
||||
clock-show-weekday = true;
|
||||
color-scheme = "prefer-dark";
|
||||
cursor-theme = "GoogleDot-White";
|
||||
};
|
||||
|
||||
"org/gnome/desktop/media-handling" = {
|
||||
automount = false;
|
||||
};
|
||||
|
||||
"org/gnome/desktop/peripherals/mouse" = {
|
||||
accel-profile = "flat";
|
||||
};
|
||||
|
||||
"org/gnome/desktop/sound" = {
|
||||
allow-volume-above-100-percent = true;
|
||||
};
|
||||
|
||||
"org/gnome/desktop/wm/preferences" = {
|
||||
button-layout = "appmenu:close";
|
||||
resize-with-right-button = true;
|
||||
};
|
||||
|
||||
"org/gnome/mutter" = {
|
||||
dynamic-workspaces = true;
|
||||
workspaces-only-on-primary = true;
|
||||
};
|
||||
|
||||
"org/gnome/SessionManager" = {
|
||||
logout-prompt = false;
|
||||
};
|
||||
|
||||
"org/gnome/settings-daemon/plugins/power" = {
|
||||
power-button-action = "notning";
|
||||
sleep-inactive-ac-type = "nothing";
|
||||
};
|
||||
|
||||
"org/gnome/shell" = {
|
||||
enabled-extensions = [
|
||||
"drive-menu@gnome-shell-extensions.gcampax.github.com"
|
||||
"pop-shell@system76.com"
|
||||
"workspace-indicator@gnome-shell-extensions.gcampax.github.com"
|
||||
"Vitals@CoreCoding.com"
|
||||
"trayIconsReloaded@selfmade.pl"
|
||||
"places-menu@gnome-shell-extensions.gcampax.github.com"
|
||||
"apps-menu@gnome-shell-extensions.gcampax.github.com"
|
||||
"top-bar-organizer@julian.gse.jsts.xyz"
|
||||
"color-picker@tuberry"
|
||||
];
|
||||
favorite-apps = [
|
||||
(if builtins.elem pkgs.kitty config.environment.systemPackages then
|
||||
"kitty.desktop"
|
||||
else none)
|
||||
"vivaldi-stable.desktop"
|
||||
"code.desktop"
|
||||
"org.gnome.Nautilus.desktop"
|
||||
(if config.programs.steam.enable then
|
||||
"steam.desktop"
|
||||
else none)
|
||||
"pavucontrol.desktop"
|
||||
];
|
||||
};
|
||||
|
||||
"org/gnome/shell/app-switcher" = {
|
||||
current-workspace-only = false;
|
||||
};
|
||||
|
||||
"org/gnome/shell/extensions/color-picker" = {
|
||||
color-picker-shortcut = ["<Super><Alt>c"];
|
||||
enable-shortcut = true;
|
||||
enable-systray = false;
|
||||
menu-key = "";
|
||||
notify-style = mkUint32 1;
|
||||
preview-style = mkUint32 0;
|
||||
};
|
||||
|
||||
"org/gnome/shell/extensions/pop-shell" = {
|
||||
active-hint = true;
|
||||
active-hint-border-radius = mkUint32 1;
|
||||
gap-inner = mkUint32 2;
|
||||
gap-outer = mkUint32 1;
|
||||
show-skip-taskbar = true;
|
||||
show-title = true;
|
||||
smart-gaps = false;
|
||||
snap-to-grid = false;
|
||||
tile-by-default = true;
|
||||
};
|
||||
|
||||
"org/gnome/shell/extensions/top-bar-organizer" = {
|
||||
center-box-order = ["dateMenu"];
|
||||
left-box-order = ["activities" "apps-menu" "places-menu" "vitalsMenu"];
|
||||
right-box-order = ["TrayIconsReloaded" "workspace-indicator" "pop-shell" "color-picker@tuberry" "drive-menu" "screenRecording" "screenSharing" "dwellClick" "a11y" "keyboard" "quickSettings"];
|
||||
};
|
||||
|
||||
"org/gnome/shell/extensions/trayIconsReloaded" = {
|
||||
icon-brightness = mkInt32 0;
|
||||
icon-contrast = mkInt32 0;
|
||||
icon-margin-horizontal = mkInt32 0;
|
||||
icon-margin-vertical = mkInt32 0;
|
||||
icon-padding-horizontal = mkInt32 4;
|
||||
icon-padding-vertical = mkInt32 0;
|
||||
icon-saturation = mkInt32 0;
|
||||
icon-size = mkInt32 16;
|
||||
icons-limit = mkInt32 16;
|
||||
invoke-to-workspace = true;
|
||||
position-weight = mkInt32 0;
|
||||
tray-margin-left = mkInt32 0;
|
||||
tray-margin-right = mkInt32 0;
|
||||
};
|
||||
|
||||
"org/gnome/shell/extensions/vitals" = {
|
||||
hide-icons = false;
|
||||
hot-sensors = ["_processor_usage_" "_memory_allocated_"];
|
||||
memory-measurement = mkInt32 1;
|
||||
update-time = mkInt32 2;
|
||||
use-higher-precision = true;
|
||||
};
|
||||
|
||||
"org/gnome/shell/keybindings" = {
|
||||
show-screenshot-ui = ["Print" "<Super><Shift>S"];
|
||||
};
|
||||
|
||||
"org/gnome/desktop/default-applications/terminal" =
|
||||
if builtins.elem pkgs.kitty config.environment.systemPackages then {
|
||||
exec = "kitty";
|
||||
exec-arg = "";
|
||||
} else null;
|
||||
|
||||
"org/gnome/settings-daemon/plugins/media-keys" = {
|
||||
custom-keybindings = [
|
||||
(
|
||||
if builtins.elem pkgs.kitty config.environment.systemPackages then
|
||||
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/"
|
||||
else null
|
||||
)
|
||||
];
|
||||
help = mkEmptyArray "s";
|
||||
screensaver = ["<Control><Super>l"];
|
||||
};
|
||||
|
||||
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0" =
|
||||
if builtins.elem pkgs.kitty config.environment.systemPackages then {
|
||||
binding = "<Control><Alt>t";
|
||||
command = "kitty";
|
||||
name = "Terminal";
|
||||
} else null;
|
||||
};
|
||||
|
||||
"org/gnome/desktop/interface" = {
|
||||
clock-show-date = true;
|
||||
clock-show-seconds = true;
|
||||
clock-show-weekday = true;
|
||||
color-scheme = "prefer-dark";
|
||||
cursor-theme = "GoogleDot-White";
|
||||
};
|
||||
|
||||
"org/gnome/desktop/media-handling" = {
|
||||
automount = false;
|
||||
};
|
||||
|
||||
"org/gnome/desktop/peripherals/mouse" = {
|
||||
accel-profile = "flat";
|
||||
};
|
||||
|
||||
"org/gnome/desktop/sound" = {
|
||||
allow-volume-above-100-percent = true;
|
||||
};
|
||||
|
||||
"org/gnome/mutter" = {
|
||||
dynamic-workspaces = true;
|
||||
workspaces-only-on-primary = true;
|
||||
};
|
||||
|
||||
"org/gnome/SessionManager" = {
|
||||
logout-prompt = false;
|
||||
};
|
||||
|
||||
"org/gnome/settings-daemon/plugins/power" = {
|
||||
power-button-action = "notning";
|
||||
sleep-inactive-ac-type = "nothing";
|
||||
};
|
||||
|
||||
"org/gnome/shell" = {
|
||||
enabled-extensions = [
|
||||
"drive-menu@gnome-shell-extensions.gcampax.github.com"
|
||||
"pop-shell@system76.com"
|
||||
"workspace-indicator@gnome-shell-extensions.gcampax.github.com"
|
||||
"Vitals@CoreCoding.com"
|
||||
"trayIconsReloaded@selfmade.pl"
|
||||
"places-menu@gnome-shell-extensions.gcampax.github.com"
|
||||
"apps-menu@gnome-shell-extensions.gcampax.github.com"
|
||||
"top-bar-organizer@julian.gse.jsts.xyz"
|
||||
"color-picker@tuberry"
|
||||
];
|
||||
favorite-apps = [
|
||||
(if builtins.elem pkgs.kitty config.environment.systemPackages then
|
||||
"kitty.desktop"
|
||||
else none)
|
||||
"vivaldi-stable.desktop"
|
||||
"code.desktop"
|
||||
"org.gnome.Nautilus.desktop"
|
||||
(if config.programs.steam.enable then
|
||||
"steam.desktop"
|
||||
else none)
|
||||
"pavucontrol.desktop"
|
||||
];
|
||||
};
|
||||
|
||||
"org/gnome/shell/app-switcher" = {
|
||||
current-workspace-only = false;
|
||||
};
|
||||
|
||||
"org/gnome/shell/extensions/color-picker" = {
|
||||
color-picker-shortcut = ["<Super><Alt>c"];
|
||||
enable-shortcut = true;
|
||||
enable-systray = false;
|
||||
menu-key = "";
|
||||
notify-style = mkUint32 1;
|
||||
preview-style = mkUint32 0;
|
||||
};
|
||||
|
||||
"org/gnome/shell/extensions/pop-shell" = {
|
||||
active-hint = true;
|
||||
active-hint-border-radius = mkUint32 1;
|
||||
gap-inner = mkUint32 2;
|
||||
gap-outer = mkUint32 1;
|
||||
show-skip-taskbar = true;
|
||||
show-title = true;
|
||||
smart-gaps = false;
|
||||
snap-to-grid = false;
|
||||
tile-by-default = true;
|
||||
};
|
||||
|
||||
"org/gnome/shell/extensions/top-bar-organizer" = {
|
||||
center-box-order = ["dateMenu"];
|
||||
left-box-order = ["activities" "apps-menu" "places-menu" "vitalsMenu"];
|
||||
right-box-order = ["TrayIconsReloaded" "workspace-indicator" "pop-shell" "color-picker@tuberry" "drive-menu" "screenRecording" "screenSharing" "dwellClick" "a11y" "keyboard" "quickSettings"];
|
||||
};
|
||||
|
||||
"org/gnome/shell/extensions/trayIconsReloaded" = {
|
||||
icon-brightness = mkInt32 0;
|
||||
icon-contrast = mkInt32 0;
|
||||
icon-margin-horizontal = mkInt32 0;
|
||||
icon-margin-vertical = mkInt32 0;
|
||||
icon-padding-horizontal = mkInt32 4;
|
||||
icon-padding-vertical = mkInt32 0;
|
||||
icon-saturation = mkInt32 0;
|
||||
icon-size = mkInt32 16;
|
||||
icons-limit = mkInt32 16;
|
||||
invoke-to-workspace = true;
|
||||
position-weight = mkInt32 0;
|
||||
tray-margin-left = mkInt32 0;
|
||||
tray-margin-right = mkInt32 0;
|
||||
};
|
||||
|
||||
"org/gnome/shell/extensions/vitals" = {
|
||||
hide-icons = false;
|
||||
hot-sensors = ["_processor_usage_" "_memory_allocated_"];
|
||||
memory-measurement = mkInt32 1;
|
||||
update-time = mkInt32 2;
|
||||
use-higher-precision = true;
|
||||
};
|
||||
|
||||
"org/gnome/shell/keybindings" = {
|
||||
show-screenshot-ui = ["Print" "<Super><Shift>S"];
|
||||
};
|
||||
|
||||
"org/gnome/desktop/default-applications/terminal" =
|
||||
if builtins.elem pkgs.kitty config.environment.systemPackages then {
|
||||
exec = "kitty";
|
||||
exec-arg = "";
|
||||
} else null;
|
||||
|
||||
"org/gnome/settings-daemon/plugins/media-keys" = {
|
||||
custom-keybindings = [
|
||||
(
|
||||
if builtins.elem pkgs.kitty config.environment.systemPackages then
|
||||
"org/gnome/settings-daemon/plugins/media-keys/custom-keybinding/custom0"
|
||||
else null
|
||||
)
|
||||
];
|
||||
help = mkEmptyArray "s";
|
||||
screensaver = ["<Control><Super>l"];
|
||||
};
|
||||
|
||||
"org/gnome/settings-daemon/plugins/media-keys/custom-keybinding/custom0" =
|
||||
if builtins.elem pkgs.kitty config.environment.systemPackages then {
|
||||
binding = "<Control><Alt>t";
|
||||
command = "kitty";
|
||||
name = "Terminal";
|
||||
} else null;
|
||||
};
|
||||
in
|
||||
lib.filterAttrs (n: v: builtins.elem n selection) settings
|
||||
}
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
{pkgs, ... } @ moduleArgs:
|
||||
{pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../unstable-packages.nix
|
||||
../dconf-common.nix
|
||||
];
|
||||
config = {
|
||||
services.xserver.enable = true;
|
||||
|
@ -10,49 +11,48 @@
|
|||
|
||||
# environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
|
||||
programs.dconf.profiles.user.databases = [{
|
||||
settings = import ../dconf-common.nix moduleArgs [
|
||||
"org/gnome/desktop/background"
|
||||
"org/gnome/desktop/interface"
|
||||
"org/gnome/desktop/media-handling"
|
||||
"org/gnome/desktop/peripherals/mouse"
|
||||
"org/gnome/desktop/sound"
|
||||
"org/gnome/mutter"
|
||||
"org/gnome/SessionManager"
|
||||
"org/gnome/settings-daemon/plugins/power"
|
||||
"org/gnome/shell"
|
||||
"org/gnome/shell/app-switcher"
|
||||
"org/gnome/shell/extensions/color-picker"
|
||||
"org/gnome/shell/extensions/pop-shell"
|
||||
"org/gnome/shell/extensions/top-bar-organizer"
|
||||
"org/gnome/shell/extensions/trayIconsReloaded"
|
||||
"org/gnome/shell/extensions/vitals"
|
||||
"org/gnome/shell/keybindings"
|
||||
"org/gnome/desktop/default-applications/terminal"
|
||||
"org/gnome/settings-daemon/plugins/media-keys"
|
||||
"org/gnome/settings-daemon/plugins/media-keys/custom-keybinding/custom0"
|
||||
];
|
||||
}];
|
||||
proot.dconf.profiles.user.rulesToApply = [
|
||||
"org/gnome/desktop/background"
|
||||
"org/gnome/desktop/interface"
|
||||
"org/gnome/desktop/media-handling"
|
||||
"org/gnome/desktop/peripherals/mouse"
|
||||
"org/gnome/desktop/sound"
|
||||
"org/gnome/desktop/wm/preferences"
|
||||
"org/gnome/mutter"
|
||||
"org/gnome/SessionManager"
|
||||
"org/gnome/settings-daemon/plugins/power"
|
||||
"org/gnome/shell"
|
||||
"org/gnome/shell/app-switcher"
|
||||
"org/gnome/shell/extensions/color-picker"
|
||||
"org/gnome/shell/extensions/pop-shell"
|
||||
"org/gnome/shell/extensions/top-bar-organizer"
|
||||
"org/gnome/shell/extensions/trayIconsReloaded"
|
||||
"org/gnome/shell/extensions/vitals"
|
||||
"org/gnome/shell/keybindings"
|
||||
"org/gnome/desktop/default-applications/terminal"
|
||||
"org/gnome/settings-daemon/plugins/media-keys"
|
||||
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0"
|
||||
];
|
||||
|
||||
environment.gnome.excludePackages = with pkgs; with pkgs.gnome; [
|
||||
baobab
|
||||
cheese
|
||||
epiphany
|
||||
evince
|
||||
geary
|
||||
environment.gnome.excludePackages = with pkgs; [
|
||||
gnome.baobab
|
||||
gnome.cheese
|
||||
gnome.epiphany
|
||||
gnome.evince
|
||||
gnome.geary
|
||||
gedit
|
||||
gnome-characters
|
||||
gnome.gnome-characters
|
||||
gnome-connections
|
||||
gnome-console
|
||||
gnome-disk-utility
|
||||
gnome-font-viewer
|
||||
gnome-logs
|
||||
gnome-maps
|
||||
gnome.gnome-disk-utility
|
||||
gnome.gnome-font-viewer
|
||||
gnome.gnome-logs
|
||||
gnome.gnome-maps
|
||||
gnome-text-editor
|
||||
gnome-tour
|
||||
seahorse
|
||||
totem
|
||||
yelp
|
||||
gnome.seahorse
|
||||
gnome.totem
|
||||
gnome.yelp
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
{lib, config, pkgs, ...}:
|
||||
|
||||
{
|
||||
config = {
|
||||
services.xserver.enable = true;
|
||||
services.xserver.desktopManager.plasma5.enable = true;
|
||||
|
||||
# environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
libsForQt5.plasma-browser-integration
|
||||
translate-shell
|
||||
pavucontrol
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,6 +1,9 @@
|
|||
{pkgs, ... } @ moduleArgs:
|
||||
{pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../dconf-common.nix
|
||||
];
|
||||
config = {
|
||||
services.xserver.displayManager.gdm = {
|
||||
enable = true;
|
||||
|
@ -8,15 +11,13 @@
|
|||
autoSuspend = false;
|
||||
};
|
||||
|
||||
programs.dconf.profiles.gdm.databases = [{
|
||||
settings = import ../dconf-common.nix moduleArgs [
|
||||
"org/gnome/desktop/interface"
|
||||
"org/gnome/desktop/peripherals/mouse"
|
||||
"org/gnome/desktop/sound"
|
||||
"org/gnome/settings-daemon/plugins/power"
|
||||
"org/gnome/shell/keybindings"
|
||||
];
|
||||
}];
|
||||
proot.dconf.profiles.gdm.rulesToApply = [
|
||||
"org/gnome/desktop/interface"
|
||||
"org/gnome/desktop/peripherals/mouse"
|
||||
"org/gnome/desktop/sound"
|
||||
"org/gnome/settings-daemon/plugins/power"
|
||||
"org/gnome/shell/keybindings"
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
google-cursor
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
config = {
|
||||
services.xserver.displayManager.sddm.enable = true;
|
||||
};
|
||||
}
|
|
@ -3,7 +3,6 @@
|
|||
{
|
||||
config.virtualisation.docker = {
|
||||
enable = true;
|
||||
# enableNvidia = true;
|
||||
enableOnBoot = true;
|
||||
storageDriver = if config.fileSystems."/".fsType == "btrfs" then "btrfs" else null;
|
||||
rootless.enable = true;
|
||||
|
|
46
nix-os/generic/dconf.nix
Normal file
46
nix-os/generic/dconf.nix
Normal file
|
@ -0,0 +1,46 @@
|
|||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
# proot.dconf.rules
|
||||
# proot.dconf.profiles.<profile>.rulesToApply
|
||||
# proot.dconf.profiles.<profile>.extraRules
|
||||
let
|
||||
cfg = config.proot.dconf;
|
||||
profileOpts = lib.types.submodule {
|
||||
options = {
|
||||
rulesToApply = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
default = lib.attrNames cfg.rules;
|
||||
description = lib.mdDoc "A list of rules keys to apply for profile";
|
||||
};
|
||||
extraRules = lib.mkOption {
|
||||
type = lib.types.attrs;
|
||||
default = {};
|
||||
description = lib.mdDoc "An attrset of additional dconf rules to apply ontop of selected";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
mapper = _: value: {
|
||||
databases = lib.singleton {
|
||||
settings = lib.filterAttrs (key: _: lib.elem key value.rulesToApply) cfg.rules // value.extraRules;
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
options.proot.dconf = {
|
||||
rules = lib.mkOption {
|
||||
type = lib.types.attrs;
|
||||
default = {};
|
||||
description = lib.mdDoc "An attrset of dconf rules to pull from";
|
||||
};
|
||||
profiles = lib.mkOption {
|
||||
type = lib.types.attrsOf profileOpts;
|
||||
default = {};
|
||||
description = lib.mdDoc "An attret of profiles to create, with pulled rules";
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
programs.dconf.profiles = lib.mapAttrs mapper cfg.profiles;
|
||||
};
|
||||
}
|
8
nix-os/services/nix-binary-cache.nix
Normal file
8
nix-os/services/nix-binary-cache.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
config = {
|
||||
services.nix-serve = {
|
||||
enable = true;
|
||||
secretKeyFile = "/var/cache-priv-key.pem";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
{ config, pkgs, unstablePkgs, ... }:
|
||||
{ config, pkgs, unstablePkgs, lib, ... }:
|
||||
|
||||
let
|
||||
rangerGit = pkgs.ranger.overrideAttrs (old: {
|
||||
|
@ -37,6 +37,7 @@ in
|
|||
'';
|
||||
|
||||
programs.bash.interactiveShellInit = ''
|
||||
HISTCONTROL=ignoreboth
|
||||
if test -n "$KITTY_INSTALLATION_DIR"; then
|
||||
export KITTY_SHELL_INTEGRATION="enabled,no-sudo"
|
||||
source "$KITTY_INSTALLATION_DIR/shell-integration/bash/kitty.bash"
|
||||
|
@ -53,6 +54,8 @@ in
|
|||
${if config.services.xserver.desktopManager.gnome.enable then "hide_window_decorations yes" else ""}
|
||||
background_opacity 0.8
|
||||
dynamic_background_opacity yes
|
||||
|
||||
map kitty_mod+alt+c copy_ansi_to_clipboard
|
||||
'';
|
||||
|
||||
environment.etc."ranger/rc.conf".text = ''
|
||||
|
@ -74,6 +77,41 @@ in
|
|||
|
||||
programs.direnv.enable = true;
|
||||
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
configure = {
|
||||
customRC = ''
|
||||
set number
|
||||
set hlsearch
|
||||
set incsearch
|
||||
set tabstop=4
|
||||
set softtabstop=4
|
||||
set shiftwidth=4
|
||||
set expandtab
|
||||
set autoindent
|
||||
|
||||
syntax on
|
||||
set encoding=utf-8
|
||||
set wildmode=longest,list,full
|
||||
set listchars=space:·,tab:┄┄»
|
||||
set indentkeys-=0#
|
||||
'';
|
||||
packages.myVimPackage = with pkgs.vimPlugins; {
|
||||
start = [
|
||||
guess-indent-nvim
|
||||
vim-visual-multi
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
environment.variables = lib.mkIf config.programs.neovim.enable rec {
|
||||
EDITOR = "/run/current-system/sw/bin/nvim";
|
||||
VISUAL = EDITOR;
|
||||
};
|
||||
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
settings = {
|
||||
|
@ -82,6 +120,9 @@ in
|
|||
truncation_length = 5;
|
||||
truncation_symbol = "…/";
|
||||
};
|
||||
hostname = {
|
||||
ssh_only = false;
|
||||
};
|
||||
username = {
|
||||
show_always = true;
|
||||
};
|
||||
|
@ -91,12 +132,6 @@ in
|
|||
command = "echo \"✦\"";
|
||||
style = "bold 208";
|
||||
};
|
||||
# custom.PS1 = {
|
||||
# when = true;
|
||||
# command = "echo -e \"\\x1b\\x5d133;A\\x1b\\x5c\"";
|
||||
# format = "$output";
|
||||
# use_stdin = false;
|
||||
# };
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
5
nix-os/udev.nix
Normal file
5
nix-os/udev.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
config = {
|
||||
hardware.ledger.enable = true;
|
||||
};
|
||||
}
|
|
@ -31,6 +31,7 @@ in
|
|||
};
|
||||
};
|
||||
config._module.args.unstablePkgs = config.unstable.pkgs;
|
||||
# FIXME: move it to the system derivation output (overrideAttrs config.system.build.toplevel?)
|
||||
config.environment.etc."NIXOS-UNSTABLE-VERSION".text = nixos-unstable-version;
|
||||
config.system.extraSystemBuilderCmds = lib.mkIf config.unstable.enable ''
|
||||
echo ${nixos-unstable-version} > $out/nixos-unstable-version
|
||||
'';
|
||||
}
|
|
@ -6,5 +6,11 @@
|
|||
programs.virt-manager.enable = true;
|
||||
virtualisation.libvirtd = {
|
||||
enable = true;
|
||||
qemu.ovmf = {
|
||||
enable = true;
|
||||
packages = [
|
||||
pkgs.OVMFFull.fd
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
NIXOS_CONFIG="$(pwd)/nix-os-configs/main.nix" nixos-rebuild $@
|
|
@ -1 +1 @@
|
|||
nix-build '<nixos-unstable/nixos>' -A vm -I nixpkgs=channel:nixos-unstable -I nixos-config=./nix-os-configs/vm-cosmic.nix $@ && $(ls ./result/bin/run-*) -m 4096 && rm *.qcow2
|
||||
nix-build '<nixos-unstable/nixos>' -A vm -I nixos-config=./hosts/vm-cosmic.nix $@ && $(ls ./result/bin/run-*) -m 4096 && rm *.qcow2
|
||||
|
|
2
vm.sh
2
vm.sh
|
@ -1 +1 @@
|
|||
nix-build '<nixpkgs/nixos>' -A vm -I nixpkgs=channel:nixos-23.11 -I nixos-config=./nix-os-configs/vm.nix $@ && $(ls ./result/bin/run-*) -m 4096 && rm *.qcow2
|
||||
nix-build '<nixpkgs/nixos>' -A vm -I nixos-config=./hosts/vm.nix $@ && $(ls ./result/bin/run-*) -m 4096 && rm *.qcow2
|
||||
|
|
Loading…
Reference in a new issue