90 current 1970-01-01 01:00:00 24.05.20240303.b8697e5 6.6.19 *

This commit is contained in:
Max Känner 2024-03-07 00:07:23 +01:00
parent b655dafce9
commit b261562377
6 changed files with 58 additions and 23 deletions

View File

@ -7,32 +7,31 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1706981411, "lastModified": 1709756385,
"narHash": "sha256-cLbLPTL1CDmETVh4p0nQtvoF+FSEjsnJTFpTxhXywhQ=", "narHash": "sha256-EwAsCWfjLnq6Rzh9c95ThPhTTOQkY/R9ZROPUfhtHmE=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "652fda4ca6dafeb090943422c34ae9145787af37", "rev": "ad9254cd9af9165000ecd6ef9c23c2b8ceda01c7",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "owner": "nix-community",
"ref": "release-23.11",
"repo": "home-manager", "repo": "home-manager",
"type": "github" "type": "github"
} }
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1709218635, "lastModified": 1709479366,
"narHash": "sha256-nytX/MkfqeTD4z7bMq4QRXcHxO9B3vRo9tM6fMtPFA8=", "narHash": "sha256-n6F0n8UV6lnTZbYPl1A9q1BS0p4hduAv1mGAP17CVd0=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "068d4db604958d05d0b46c47f79b507d84dbc069", "rev": "b8697e57f10292a6165a20f03d2f42920dfaf973",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nixos", "owner": "nixos",
"ref": "nixos-23.11", "ref": "nixos-unstable",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }

View File

@ -2,10 +2,10 @@
description = "Nixos config flake"; description = "Nixos config flake";
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = { home-manager = {
url = "github:nix-community/home-manager/release-23.11"; url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
}; };
@ -13,6 +13,7 @@
outputs = { outputs = {
self, self,
nixpkgs, nixpkgs,
home-manager,
... ...
} @ inputs: let } @ inputs: let
system = "x86_64-linux"; system = "x86_64-linux";
@ -22,7 +23,11 @@
specialArgs = {inherit inputs;}; specialArgs = {inherit inputs;};
modules = [ modules = [
./hosts/MaxNixosLaptop/configuration.nix ./hosts/MaxNixosLaptop/configuration.nix
inputs.home-manager.nixosModules.default home-manager.nixosModules.default
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
}
]; ];
}; };
}; };

View File

@ -10,6 +10,8 @@
imports = [ imports = [
# Include the results of the hardware scan. # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
# greetd login manager
../../modules/nixos/greetd.nix
# sway as window manager # sway as window manager
../../modules/nixos/sway.nix ../../modules/nixos/sway.nix
inputs.home-manager.nixosModules.default inputs.home-manager.nixosModules.default
@ -116,7 +118,7 @@
ffmpeg ffmpeg
]; ];
fonts.fonts = with pkgs; [ fonts.packages = with pkgs; [
nerdfonts nerdfonts
]; ];
@ -161,16 +163,6 @@
# fingerprint unlock # fingerprint unlock
services.fprintd.enable = true; services.fprintd.enable = true;
services.greetd = {
enable = true;
settings = rec {
default_session = {
command = "${pkgs.sway}/bin/sway";
user = "max";
};
};
};
# Enable the OpenSSH daemon. # Enable the OpenSSH daemon.
# services.openssh.enable = true; # services.openssh.enable = true;

View File

@ -5,7 +5,6 @@
... ...
}: { }: {
home.packages = with pkgs; [ home.packages = with pkgs; [
sway
waybar # status bar waybar # status bar
swaylock # screen locking swaylock # screen locking
swayidle # automatic screen locking after system idle time swayidle # automatic screen locking after system idle time

39
modules/nixos/greetd.nix Normal file
View File

@ -0,0 +1,39 @@
{
config,
lib,
pkgs,
...
}: let
swayConfig = pkgs.writeText "greetd-sway-config" ''
input * {
xkb_layout "de"
xkb_options "caps:ctrl_modifier"
xkb_numlock "enable"
}
input "type:touchpad" {
tap "enable"
natural_scroll "enable"
}
# `-l` activates layer-shell mode. Notice that `swaymsg exit` will run after gtkgreet.
exec "${pkgs.greetd.gtkgreet}/bin/gtkgreet -l; swaymsg exit"
bindsym Mod4+shift+e exec swaynag \
-t warning \
-m 'What do you want to do?' \
-b 'Poweroff' 'systemctl poweroff' \
-b 'Reboot' 'systemctl reboot'
'';
in {
services.greetd = {
enable = true;
settings = {
default_session = {
command = "${pkgs.sway}/bin/sway --config ${swayConfig}";
};
};
};
environment.etc."greetd/environments".text = ''
sway
'';
}

View File

@ -67,6 +67,7 @@ in {
xdg.portal = { xdg.portal = {
enable = true; enable = true;
wlr.enable = true; wlr.enable = true;
config.common.default = ["wlr" "gtk"];
# gtk portal needed to make gtk apps happy # gtk portal needed to make gtk apps happy
extraPortals = [pkgs.xdg-desktop-portal-gtk]; extraPortals = [pkgs.xdg-desktop-portal-gtk];
}; };