more improvements

This commit is contained in:
Julian Mutter 2024-06-09 09:42:08 +02:00
parent 35e84fade2
commit 9dc0377a77
5 changed files with 61 additions and 44 deletions

View File

@ -27,7 +27,7 @@
home.stateVersion = "23.11"; home.stateVersion = "23.11";
modules = { modules = {
non-nixos.is-nxos = false; non-nixos.is-nixos = false;
shell = { shell = {
# zsh.enable = true; # zsh.enable = true;
fish.enable = true; fish.enable = true;

View File

@ -28,7 +28,6 @@
modules = { modules = {
shell = { shell = {
# zsh.enable = true;
fish.enable = true; fish.enable = true;
direnv.enable = true; direnv.enable = true;
}; };

View File

@ -38,10 +38,6 @@
home.packages = with pkgs; [ ]; home.packages = with pkgs; [ ];
home.sessionVariables = {
FLAKE = "/home/julian/.dotfiles";
};
# Let Home Manager install and manage itself. # Let Home Manager install and manage itself.
programs.home-manager.enable = true; programs.home-manager.enable = true;
} }

View File

@ -1,50 +1,62 @@
{ {
# Snowfall Lib provides a customized `lib` instance with access to your flake's library # Snowfall Lib provides a customized `lib` instance with access to your flake's library
# as well as the libraries available from your flake's inputs. # as well as the libraries available from your flake's inputs.
lib, lib,
# An instance of `pkgs` with your overlays and packages applied is also available. # An instance of `pkgs` with your overlays and packages applied is also available.
pkgs, pkgs,
# You also have access to your flake's inputs. # You also have access to your flake's inputs.
inputs, inputs,
# Additional metadata is provided by Snowfall Lib. # Additional metadata is provided by Snowfall Lib.
system, # The system architecture for this host (eg. `x86_64-linux`). system, # The system architecture for this host (eg. `x86_64-linux`).
target, # The Snowfall Lib target for this system (eg. `x86_64-iso`). target, # The Snowfall Lib target for this system (eg. `x86_64-iso`).
format, # A normalized name for the system target (eg. `iso`). format, # A normalized name for the system target (eg. `iso`).
virtual virtual, # A boolean to determine whether this system is a virtual target using nixos-generators.
, # A boolean to determine whether this system is a virtual target using nixos-generators. systems, # An attribute map of your defined hosts.
systems, # An attribute map of your defined hosts.
# All other arguments come from the module system. # All other arguments come from the module system.
config, host, ... }: config,
host,
...
}:
with lib; with lib;
let cfg = config.modules.i3; let
in { cfg = config.modules.i3;
options.modules.i3 = { enable = mkOption { default = false; }; }; in
{
options.modules.i3 = {
enable = mkOption { default = false; };
};
config = mkIf cfg.enable { config = mkIf cfg.enable {
programs = { i3status-rust = { enable = true; }; }; programs = {
i3status-rust = {
enable = true;
};
};
home.packages = with pkgs; [ nitrogen ]; home.packages = with pkgs; [ nitrogen ];
xsession.windowManager.i3 = { enable = true; }; xsession.windowManager.i3 = {
enable = true;
};
# Overwrite default home-manager config file # Overwrite default home-manager config file
xdg.configFile."i3/config".source = lib.mkForce (if host == "kardorf" then xdg.configFile."i3/config".source = lib.mkForce (
./i3/config-kardorf if host == "kardorf" then ./i3/config-kardorf else ./i3/config
else );
lib.mkForce ./i3/config);
home.file = { home.file = {
".config/i3/scripts" = { ".config/i3/scripts" = {
source = ./i3/scripts; source = ./i3/scripts;
recursive = true; recursive = true;
}; };
".config/i3/workspace-messaging.json".source = ".config/i3/workspace-messaging.json".source = ./i3/workspace-chat-element-tele.json;
./i3/workspace-chat-element-tele.json;
".config/i3status-rust/config.toml".source = ./i3status-rust/config.toml; ".config/i3status-rust/config.toml".source = ./i3status-rust/config.toml;
}; };
home.file = { ".profile".source = ./.profile; }; home.file = {
".profile".source = ./.profile;
};
}; };
} }

View File

@ -7,7 +7,8 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
imports = [ # Include the results of the hardware scan. imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
]; ];
@ -54,20 +55,26 @@
users.users.nix = { users.users.nix = {
isNormalUser = true; isNormalUser = true;
description = "Nix"; description = "Nix";
extraGroups = [ "networkmanager" "wheel" ]; extraGroups = [
"networkmanager"
"wheel"
];
packages = with pkgs; [ ]; packages = with pkgs; [ ];
}; };
nix.settings.trusted-users = [ "@wheel" ]; nix.settings.trusted-users = [ "@wheel" ];
nix.settings.experimental-features = [ "nix-command" "flakes" ]; nix.settings.experimental-features = [
"nix-command"
"flakes"
];
# Setup binary caches # Setup binary caches
nix.settings = { nix.settings = {
substituters = substituters = [
[ "https://nix-community.cachix.org" "https://cache.nixos.org/" ]; "https://nix-community.cachix.org"
trusted-public-keys = [ "https://cache.nixos.org/"
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
]; ];
trusted-public-keys = [ "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" ];
}; };
# optimize store by hardlinking store files # optimize store by hardlinking store files
@ -89,7 +96,11 @@
# List packages installed in system profile. To search, run: # List packages installed in system profile. To search, run:
# $ nix search wget # $ nix search wget
environment.systemPackages = with pkgs; [ vim htop mc ]; environment.systemPackages = with pkgs; [
vim
htop
mc
];
# Enable the OpenSSH daemon. # Enable the OpenSSH daemon.
services.openssh.enable = true; services.openssh.enable = true;
@ -99,7 +110,7 @@
acceleration = "cuda"; acceleration = "cuda";
}; };
security.pam.enableSSHAgentAuth = true; # enable sudo logins via ssh security.pam.sshAgentAuth = true; # enable sudo logins via ssh
# Open ports in the firewall. # Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ]; # networking.firewall.allowedTCPPorts = [ ... ];
@ -114,5 +125,4 @@
# Before changing this value read the documentation for this option # Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "23.11"; # Did you read the comment? system.stateVersion = "23.11"; # Did you read the comment?
} }