home->nixos: restructure sway

This commit is contained in:
genofire 2021-10-13 00:47:43 +02:00
parent ab01192de5
commit 86e6bd6184
9 changed files with 190 additions and 133 deletions

View File

@ -1,9 +1,5 @@
{pkgs, ...}:
{
home.sessionVariables = {
EDITOR = "nvim";
};
home.packages = with pkgs; [
python3
killall

View File

@ -7,23 +7,23 @@
};
home.packages = with pkgs; [
sway
alacritty
swayidle
swaylock-effects
mako
wl-clipboard
xdg-desktop-portal-wlr
bemenu
i3blocks
acpi
lm_sensors
kdeconnect
ponymix
brightnessctl
#gammastep
grim
slurp
# sway
# alacritty
# swayidle
# swaylock-effects
# mako
# wl-clipboard
#- xdg-desktop-portal-wlr
# bemenu
# i3blocks
# acpi
# lm_sensors
# ponymix
# brightnessctl
# gammastep
# grim
# slurp
# kdeconnect
];
wayland.windowManager.sway =
@ -316,6 +316,7 @@
};
};
# use nixos's ....
# from programs.sway:
# xdg.portal.enable = true;
# xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-wlr ];

View File

@ -3,33 +3,32 @@
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, ... }:
{
imports =
[
./hardware-configuration.nix
./repo/default.nix
./repo/desktop.nix
./repo/genofire.nix
];
imports = [
./hardware-configuration.nix
./repo/default-hardware.nix
./repo/desktop-sway.nix
./repo/users.nix
];
system.stateVersion = "21.05";
system.stateVersion = "21.05";
system.autoUpgrade.channel = "//nixos.org/channels/nixos-unstable";
# boot
boot.zfs.requestEncryptionCredentials = []; # list -> default: true - always request for password
# boot
boot.zfs.requestEncryptionCredentials = []; # list -> default: true - always request for password
# --------
# specifical this maschine:
# --------
# --------
# specifical this maschine:
# --------
networking.hostId = "6a465f93"; # zfs needed
networking.hostName = "fireEmerald"; # Define your hostname.
# cryptsetup
# boot.initrd.luks.enable = true;
boot.initrd.luks.devices = {
"croot" = {
device = "/dev/disk/by-uuid/e75385e9-b733-49d4-91fd-6ac2fa821195" ;
};
};
networking.hostId = "/etc/machine-id"; # zfs needed
networking.hostName = "nixos"; # Define your hostname.
# cryptsetup
# boot.initrd.luks.enable = true;
boot.initrd.luks.devices = {
"croot" = {
device = "/dev/disk/by-uuid/e75385e9-b733-49d4-91fd-6ac2fa821195" ;
};
};
}

View File

@ -0,0 +1,17 @@
{ config, pkgs, ... }:
{
imports = [./default.nix];
# boot
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
# zfs
boot.initrd.supportedFilesystems = ["zfs"]; # boot from zfs
boot.supportedFilesystems = [ "zfs" ];
#boot.kernelParams = [ "nohibernate" ];
services.zfs.autoScrub.enable = true;
networking.useNetworkd = true;
networking.useDHCP = false;
}

View File

@ -5,54 +5,60 @@
{ config, pkgs, ... }:
{
system.autoUpgrade.enable = true;
system.autoUpgrade.enable = true;
# boot
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
# zfs
boot.initrd.supportedFilesystems = ["zfs"]; # boot from zfs
boot.supportedFilesystems = [ "zfs" ];
#boot.kernelParams = [ "nohibernate" ];
services.zfs.autoScrub.enable = true;
networking.useDHCP = false;
networking.useNetworkd = true;
networking.useDHCP = false;
services.openssh.enable = true;
services.openssh = {
enable = true;
openFirewall = true;
ports = [ 1512 ];
startWhenNeeded = true;
};
users.users.root.openssh.authorizedKeys.keys = [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDZm0TZPBzgXrY1vrLoYviNRb/oGZQDQk9vrppPK84sN55ZPlr9VvP+JYE7Qkx8teRuH9ulxqX40+dxKaiAXMUl4HU57KPLjwCb7SnBNIFTv6ZHGxPS8ZgUzKJr4Agph51oenNEO3RziEqAo3EwK67SGnjeIYQQKcjpfwd08+PYMOjv42zSYQ9umooj5LooOvbxoogZ3VpboXv6DeyA4rev1M9RgnMWaWVF2LxJjQ3jVr7xh1vZktVGKuVk/XXKD6WVAuwmGMVEouQzjtG9kepWd8FUYe+fgj5mtdqfeQP9CypxvOcb7jT20wO1Abpp5udS9iPDQHg+lafklIAeKG3qgxxhBDH3otXtnWcoeXUmDpBI8HU/8d/yrGaLHYRfy3HHiSGFq3lBgoxi83QIOl9ELeKWMJC0fWKBApm0NU0flgwfy2j7GRyXmlM7tVFyuj5RTAZNQfgD9g054di9WbtUs7sm/9r3/rQe2+3neE3Jskt4xvZK0xbc4dZSZGn4E2JDWjENqPBvQ2dU5lsjpUKTZWAnxVGPe//BErsDxNLIHWz8emG71r3Q2yud4KPdAR9CgeC8g1bwlCI6JDFZutKBzIlE3QQ4ryKJEioiUL89xi6G+nNB7W5ABsQN0ZtWvZl8TG4Wh00B+oBXzgRER5Y9SdAYcrwWxlGVxxQyElUNrw=="
];
time.timeZone = "Europe/Berlin";
i18n.defaultLocale = "en_IE.UTF-8";
console = {
font = "Lat2-Terminus16";
keyMap = "de";
};
time.timeZone = "Europe/Berlin";
i18n.defaultLocale = "en_IE.UTF-8";
console = {
font = "Lat2-Terminus16";
keyMap = "de";
};
environment.systemPackages = with pkgs; [
python3
killall
htop
mosh
git
git-lfs
tig
figlet
grml-zsh-config
tmux
neovim
xh
liboping
mtr
home-manager
];
environment.systemPackages = with pkgs; [
python3
killall
htop
mosh
git
git-lfs
tig
figlet
grml-zsh-config
tmux
neovim
xh
liboping
mtr
home-manager
];
# zsh
users.defaultUserShell = pkgs.zsh;
programs.zsh.enable = true;
programs.zsh.autosuggestions.enable = true;
programs.zsh.syntaxHighlighting.enable = true;
programs.zsh.interactiveShellInit = ''
source ${pkgs.grml-zsh-config}/etc/zsh/zshrc
'';
programs.zsh.promptInit = "";
programs.neovim = {
enable = true;
defaultEditor = true;
viAlias = true;
vimAlias = true;
};
# zsh
users.defaultUserShell = pkgs.zsh;
programs.zsh.enable = true;
programs.zsh.autosuggestions.enable = true;
programs.zsh.syntaxHighlighting.enable = true;
programs.zsh.interactiveShellInit = ''
source ${pkgs.grml-zsh-config}/etc/zsh/zshrc
'';
programs.zsh.promptInit = "";
}

55
nixos/desktop-sway.nix Normal file
View File

@ -0,0 +1,55 @@
{ pkgs, ... }:
{
imports = [./desktop.nix];
services.pipewire = {
enable = true;
alsa.enable = true;
# alsa.support32bit = true;
pulse.enable = true;
};
programs.sway = {
enable = true;
wrapperFeatures = { gtk = true; };
extraPackages = with pkgs; [
swaylock
alacritty
swayidle
swaylock-effects
mako
bemenu
# - bar
i3blocks
acpi
lm_sensors
# - tools
wl-clipboard
ponymix
brightnessctl
gammastep
grim
slurp
];
};
# done my sway:
# security.pam.services.swaylock = {};
# hardware.opengl.enable = true;
# fonts.enableDefaultFonts = true;
# programs.dconf.enable = true; # gtk theme
programs.kdeconnect = {
enable = true;
# openFirewall = true; - by enable
};
programs.browserpass.enable = true;
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
pinentryFlavor = "gnome3";
};
# services.acpid.enable = true;
}

View File

@ -1,30 +1,17 @@
{ pkgs, ... }:
{
networking.wireless.iwd.enable = true;
systemd.network.networks.wifi.matchConfig = { Name = "wlan0";};
systemd.network.networks.wifi.DHCP = "ipv4";
networking.wireless.iwd.enable = true;
systemd.network.networks.wifi = {
matchConfig.Name = "wlan0";
DHCP = "ipv4";
};
sound.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
#alsa.support32bit = true;
pulse.enable = true;
};
#services.acpid.enable = true;
sound.enable = true;
environment.systemPackages = with pkgs; [
iw
];
# allow wayland / sway
hardware.opengl.enable = true;
# gtk config
programs.dconf.enable = true;
fonts.enableDefaultFonts = true;
# smartcard
services.pcscd.enable = true;
environment.systemPackages = with pkgs; [
iw
];
# smartcard
services.pcscd.enable = true;
}

View File

@ -1,21 +0,0 @@
{pkgs, config, ... }:
{
services.postgresql = {
enable = true;
package = pkgs.postgresql_14;
dataDir = "/var/lib/postgres/${config.services.postgresql.package.psqlSchema}";
# dataDir = /var/lib/postgres/data;
};
users.users.genofire = {
uid = 1021;
home = "/home/genofire";
extraGroups = ["wheel"];
isNormalUser = true;
useDefaultShell = true;
};
# wayland
security.pam.services.swaylock = {};
}

17
nixos/users.nix Normal file
View File

@ -0,0 +1,17 @@
{pkgs, config, ... }:
{
users.groups.genofire = {
gid = 1021;
};
users.users.genofire = {
uid = 1021;
home = "/home/genofire";
group = "genofire";
extraGroups = ["wheel"];
isNormalUser = true;
useDefaultShell = true;
openssh.authorizedKeys.keys = [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDZm0TZPBzgXrY1vrLoYviNRb/oGZQDQk9vrppPK84sN55ZPlr9VvP+JYE7Qkx8teRuH9ulxqX40+dxKaiAXMUl4HU57KPLjwCb7SnBNIFTv6ZHGxPS8ZgUzKJr4Agph51oenNEO3RziEqAo3EwK67SGnjeIYQQKcjpfwd08+PYMOjv42zSYQ9umooj5LooOvbxoogZ3VpboXv6DeyA4rev1M9RgnMWaWVF2LxJjQ3jVr7xh1vZktVGKuVk/XXKD6WVAuwmGMVEouQzjtG9kepWd8FUYe+fgj5mtdqfeQP9CypxvOcb7jT20wO1Abpp5udS9iPDQHg+lafklIAeKG3qgxxhBDH3otXtnWcoeXUmDpBI8HU/8d/yrGaLHYRfy3HHiSGFq3lBgoxi83QIOl9ELeKWMJC0fWKBApm0NU0flgwfy2j7GRyXmlM7tVFyuj5RTAZNQfgD9g054di9WbtUs7sm/9r3/rQe2+3neE3Jskt4xvZK0xbc4dZSZGn4E2JDWjENqPBvQ2dU5lsjpUKTZWAnxVGPe//BErsDxNLIHWz8emG71r3Q2yud4KPdAR9CgeC8g1bwlCI6JDFZutKBzIlE3QQ4ryKJEioiUL89xi6G+nNB7W5ABsQN0ZtWvZl8TG4Wh00B+oBXzgRER5Y9SdAYcrwWxlGVxxQyElUNrw=="
];
};
}