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 = [
|
imports = [
|
||||||
../nix-os/core.nix
|
../nix-os/core.nix
|
||||||
|
../nix-os/core-desktop.nix
|
||||||
../nix-os/docker.nix
|
../nix-os/docker.nix
|
||||||
../nix-os/desktopManagers/cosmic.nix
|
../nix-os/desktopManagers/cosmic.nix
|
||||||
../nix-os/displayManagers/cosmic-greeter.nix
|
../nix-os/displayManagers/cosmic-greeter.nix
|
|
@ -14,5 +14,6 @@
|
||||||
../nix-os/adb.nix
|
../nix-os/adb.nix
|
||||||
../nix-os/account.nix
|
../nix-os/account.nix
|
||||||
../nix-os/xdg-default-apps.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)
|
(if config.programs.adb.enable then "adbusers" else null)
|
||||||
];
|
];
|
||||||
linger = true;
|
linger = true;
|
||||||
# Initial password for the account
|
initialPassword = "nixos";
|
||||||
password = "nixos";
|
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
firefox
|
firefox
|
||||||
vivaldi
|
vivaldi
|
||||||
discord-canary
|
discord-canary
|
||||||
unstablePkgs.vscode
|
unstablePkgs.vscode
|
||||||
|
gimp
|
||||||
|
inkscape
|
||||||
|
krita
|
||||||
|
unstablePkgs.zettlr
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
users.groups.wroclaw.gid = 1000;
|
users.groups.wroclaw.gid = 1000;
|
||||||
|
|
||||||
|
programs.steam = {
|
||||||
|
enable = true;
|
||||||
|
remotePlay.openFirewall = true;
|
||||||
|
};
|
||||||
|
|
||||||
services.syncthing = {
|
services.syncthing = {
|
||||||
enable = true;
|
enable = true;
|
||||||
user = "wroclaw";
|
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
|
# your system. Help is available in the configuration.nix(5) man page
|
||||||
# and in the NixOS manual (accessible by running 'nixos-help').
|
# 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
|
# kernel
|
||||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
|
||||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
|
||||||
|
|
||||||
# Enable networking
|
# Enable networking
|
||||||
networking.networkmanager.enable = true;
|
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
|
# Allow unfree packages
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
|
@ -46,55 +38,20 @@
|
||||||
# $ nix search wget
|
# $ nix search wget
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
wget
|
wget
|
||||||
git
|
|
||||||
ffmpeg
|
ffmpeg
|
||||||
yt-dlp
|
yt-dlp
|
||||||
mpv
|
|
||||||
htop
|
htop
|
||||||
btop
|
btop
|
||||||
neofetch
|
fastfetch
|
||||||
ranger
|
|
||||||
gimp
|
|
||||||
inkscape
|
|
||||||
krita
|
|
||||||
smartmontools
|
smartmontools
|
||||||
ddrescue
|
ddrescue
|
||||||
];
|
] ++ wrapedNixPrograms;
|
||||||
|
|
||||||
# terminal text editor
|
programs.git.enable = true;
|
||||||
programs.neovim = {
|
programs.git.config = {
|
||||||
enable = true;
|
init.defaultBranch = "main";
|
||||||
viAlias = true;
|
merge.conflictstyle = "diff3";
|
||||||
defaultEditor = true;
|
rerere.enabled = 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;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Enable fail2ban because of the OpenSSH server
|
# Enable fail2ban because of the OpenSSH server
|
||||||
|
@ -111,20 +68,5 @@
|
||||||
22
|
22
|
||||||
8022
|
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,9 +1,12 @@
|
||||||
# This file is not a NixOS system module
|
|
||||||
{config, lib, pkgs, ... }:
|
{config, lib, pkgs, ... }:
|
||||||
selection:
|
|
||||||
|
|
||||||
let
|
{
|
||||||
settings = with lib.gvariant; {
|
imports = [
|
||||||
|
./generic/dconf.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
config = {
|
||||||
|
proot.dconf.rules = with lib.gvariant; {
|
||||||
"org/gnome/desktop/background" = {
|
"org/gnome/desktop/background" = {
|
||||||
picture-options = "zoom";
|
picture-options = "zoom";
|
||||||
picture-uri = "file://${../media/wallpaper.png}";
|
picture-uri = "file://${../media/wallpaper.png}";
|
||||||
|
@ -30,6 +33,11 @@ let
|
||||||
allow-volume-above-100-percent = true;
|
allow-volume-above-100-percent = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
"org/gnome/desktop/wm/preferences" = {
|
||||||
|
button-layout = "appmenu:close";
|
||||||
|
resize-with-right-button = true;
|
||||||
|
};
|
||||||
|
|
||||||
"org/gnome/mutter" = {
|
"org/gnome/mutter" = {
|
||||||
dynamic-workspaces = true;
|
dynamic-workspaces = true;
|
||||||
workspaces-only-on-primary = true;
|
workspaces-only-on-primary = true;
|
||||||
|
@ -139,7 +147,7 @@ let
|
||||||
custom-keybindings = [
|
custom-keybindings = [
|
||||||
(
|
(
|
||||||
if builtins.elem pkgs.kitty config.environment.systemPackages then
|
if builtins.elem pkgs.kitty config.environment.systemPackages then
|
||||||
"org/gnome/settings-daemon/plugins/media-keys/custom-keybinding/custom0"
|
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/"
|
||||||
else null
|
else null
|
||||||
)
|
)
|
||||||
];
|
];
|
||||||
|
@ -147,12 +155,12 @@ let
|
||||||
screensaver = ["<Control><Super>l"];
|
screensaver = ["<Control><Super>l"];
|
||||||
};
|
};
|
||||||
|
|
||||||
"org/gnome/settings-daemon/plugins/media-keys/custom-keybinding/custom0" =
|
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0" =
|
||||||
if builtins.elem pkgs.kitty config.environment.systemPackages then {
|
if builtins.elem pkgs.kitty config.environment.systemPackages then {
|
||||||
binding = "<Control><Alt>t";
|
binding = "<Control><Alt>t";
|
||||||
command = "kitty";
|
command = "kitty";
|
||||||
name = "Terminal";
|
name = "Terminal";
|
||||||
} else null;
|
} else null;
|
||||||
};
|
};
|
||||||
in
|
};
|
||||||
lib.filterAttrs (n: v: builtins.elem n selection) settings
|
}
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
{pkgs, ... } @ moduleArgs:
|
{pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../unstable-packages.nix
|
../unstable-packages.nix
|
||||||
|
../dconf-common.nix
|
||||||
];
|
];
|
||||||
config = {
|
config = {
|
||||||
services.xserver.enable = true;
|
services.xserver.enable = true;
|
||||||
|
@ -10,13 +11,13 @@
|
||||||
|
|
||||||
# environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
# environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||||
|
|
||||||
programs.dconf.profiles.user.databases = [{
|
proot.dconf.profiles.user.rulesToApply = [
|
||||||
settings = import ../dconf-common.nix moduleArgs [
|
|
||||||
"org/gnome/desktop/background"
|
"org/gnome/desktop/background"
|
||||||
"org/gnome/desktop/interface"
|
"org/gnome/desktop/interface"
|
||||||
"org/gnome/desktop/media-handling"
|
"org/gnome/desktop/media-handling"
|
||||||
"org/gnome/desktop/peripherals/mouse"
|
"org/gnome/desktop/peripherals/mouse"
|
||||||
"org/gnome/desktop/sound"
|
"org/gnome/desktop/sound"
|
||||||
|
"org/gnome/desktop/wm/preferences"
|
||||||
"org/gnome/mutter"
|
"org/gnome/mutter"
|
||||||
"org/gnome/SessionManager"
|
"org/gnome/SessionManager"
|
||||||
"org/gnome/settings-daemon/plugins/power"
|
"org/gnome/settings-daemon/plugins/power"
|
||||||
|
@ -30,29 +31,28 @@
|
||||||
"org/gnome/shell/keybindings"
|
"org/gnome/shell/keybindings"
|
||||||
"org/gnome/desktop/default-applications/terminal"
|
"org/gnome/desktop/default-applications/terminal"
|
||||||
"org/gnome/settings-daemon/plugins/media-keys"
|
"org/gnome/settings-daemon/plugins/media-keys"
|
||||||
"org/gnome/settings-daemon/plugins/media-keys/custom-keybinding/custom0"
|
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0"
|
||||||
];
|
];
|
||||||
}];
|
|
||||||
|
|
||||||
environment.gnome.excludePackages = with pkgs; with pkgs.gnome; [
|
environment.gnome.excludePackages = with pkgs; [
|
||||||
baobab
|
gnome.baobab
|
||||||
cheese
|
gnome.cheese
|
||||||
epiphany
|
gnome.epiphany
|
||||||
evince
|
gnome.evince
|
||||||
geary
|
gnome.geary
|
||||||
gedit
|
gedit
|
||||||
gnome-characters
|
gnome.gnome-characters
|
||||||
gnome-connections
|
gnome-connections
|
||||||
gnome-console
|
gnome-console
|
||||||
gnome-disk-utility
|
gnome.gnome-disk-utility
|
||||||
gnome-font-viewer
|
gnome.gnome-font-viewer
|
||||||
gnome-logs
|
gnome.gnome-logs
|
||||||
gnome-maps
|
gnome.gnome-maps
|
||||||
gnome-text-editor
|
gnome-text-editor
|
||||||
gnome-tour
|
gnome-tour
|
||||||
seahorse
|
gnome.seahorse
|
||||||
totem
|
gnome.totem
|
||||||
yelp
|
gnome.yelp
|
||||||
];
|
];
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
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 = {
|
config = {
|
||||||
services.xserver.displayManager.gdm = {
|
services.xserver.displayManager.gdm = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -8,15 +11,13 @@
|
||||||
autoSuspend = false;
|
autoSuspend = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.dconf.profiles.gdm.databases = [{
|
proot.dconf.profiles.gdm.rulesToApply = [
|
||||||
settings = import ../dconf-common.nix moduleArgs [
|
|
||||||
"org/gnome/desktop/interface"
|
"org/gnome/desktop/interface"
|
||||||
"org/gnome/desktop/peripherals/mouse"
|
"org/gnome/desktop/peripherals/mouse"
|
||||||
"org/gnome/desktop/sound"
|
"org/gnome/desktop/sound"
|
||||||
"org/gnome/settings-daemon/plugins/power"
|
"org/gnome/settings-daemon/plugins/power"
|
||||||
"org/gnome/shell/keybindings"
|
"org/gnome/shell/keybindings"
|
||||||
];
|
];
|
||||||
}];
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
google-cursor
|
google-cursor
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
{ ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
config = {
|
|
||||||
services.xserver.displayManager.sddm.enable = true;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -3,7 +3,6 @@
|
||||||
{
|
{
|
||||||
config.virtualisation.docker = {
|
config.virtualisation.docker = {
|
||||||
enable = true;
|
enable = true;
|
||||||
# enableNvidia = true;
|
|
||||||
enableOnBoot = true;
|
enableOnBoot = true;
|
||||||
storageDriver = if config.fileSystems."/".fsType == "btrfs" then "btrfs" else null;
|
storageDriver = if config.fileSystems."/".fsType == "btrfs" then "btrfs" else null;
|
||||||
rootless.enable = true;
|
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
|
let
|
||||||
rangerGit = pkgs.ranger.overrideAttrs (old: {
|
rangerGit = pkgs.ranger.overrideAttrs (old: {
|
||||||
|
@ -37,6 +37,7 @@ in
|
||||||
'';
|
'';
|
||||||
|
|
||||||
programs.bash.interactiveShellInit = ''
|
programs.bash.interactiveShellInit = ''
|
||||||
|
HISTCONTROL=ignoreboth
|
||||||
if test -n "$KITTY_INSTALLATION_DIR"; then
|
if test -n "$KITTY_INSTALLATION_DIR"; then
|
||||||
export KITTY_SHELL_INTEGRATION="enabled,no-sudo"
|
export KITTY_SHELL_INTEGRATION="enabled,no-sudo"
|
||||||
source "$KITTY_INSTALLATION_DIR/shell-integration/bash/kitty.bash"
|
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 ""}
|
${if config.services.xserver.desktopManager.gnome.enable then "hide_window_decorations yes" else ""}
|
||||||
background_opacity 0.8
|
background_opacity 0.8
|
||||||
dynamic_background_opacity yes
|
dynamic_background_opacity yes
|
||||||
|
|
||||||
|
map kitty_mod+alt+c copy_ansi_to_clipboard
|
||||||
'';
|
'';
|
||||||
|
|
||||||
environment.etc."ranger/rc.conf".text = ''
|
environment.etc."ranger/rc.conf".text = ''
|
||||||
|
@ -74,6 +77,41 @@ in
|
||||||
|
|
||||||
programs.direnv.enable = true;
|
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 = {
|
programs.starship = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
|
@ -82,6 +120,9 @@ in
|
||||||
truncation_length = 5;
|
truncation_length = 5;
|
||||||
truncation_symbol = "…/";
|
truncation_symbol = "…/";
|
||||||
};
|
};
|
||||||
|
hostname = {
|
||||||
|
ssh_only = false;
|
||||||
|
};
|
||||||
username = {
|
username = {
|
||||||
show_always = true;
|
show_always = true;
|
||||||
};
|
};
|
||||||
|
@ -91,12 +132,6 @@ in
|
||||||
command = "echo \"✦\"";
|
command = "echo \"✦\"";
|
||||||
style = "bold 208";
|
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;
|
config._module.args.unstablePkgs = config.unstable.pkgs;
|
||||||
# FIXME: move it to the system derivation output (overrideAttrs config.system.build.toplevel?)
|
config.system.extraSystemBuilderCmds = lib.mkIf config.unstable.enable ''
|
||||||
config.environment.etc."NIXOS-UNSTABLE-VERSION".text = nixos-unstable-version;
|
echo ${nixos-unstable-version} > $out/nixos-unstable-version
|
||||||
|
'';
|
||||||
}
|
}
|
|
@ -6,5 +6,11 @@
|
||||||
programs.virt-manager.enable = true;
|
programs.virt-manager.enable = true;
|
||||||
virtualisation.libvirtd = {
|
virtualisation.libvirtd = {
|
||||||
enable = true;
|
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