Add pianonix, create modules and augment others
This commit is contained in:
parent
8ef5530145
commit
4e8291bb14
@ -1,22 +1,25 @@
|
|||||||
{
|
{
|
||||||
# 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.
|
||||||
home, # The home architecture for this host (eg. `x86_64-linux`).
|
namespace, # The namespace used for your flake, defaulting to "internal" if not set.
|
||||||
target, # The Snowfall Lib target for this home (eg. `x86_64-home`).
|
home, # The home architecture for this host (eg. `x86_64-linux`).
|
||||||
format, # A normalized name for the home target (eg. `home`).
|
target, # The Snowfall Lib target for this home (eg. `x86_64-home`).
|
||||||
virtual
|
format, # A normalized name for the home target (eg. `home`).
|
||||||
, # A boolean to determine whether this home is a virtual target using nixos-generators.
|
virtual, # A boolean to determine whether this home is a virtual target using nixos-generators.
|
||||||
host, # The host name for this home.
|
host, # The host name for this home.
|
||||||
|
|
||||||
# All other arguments come from the home home.
|
# All other arguments come from the home home.
|
||||||
config, ... }: {
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
home.username = "julian";
|
home.username = "julian";
|
||||||
home.homeDirectory = "/home/julian";
|
home.homeDirectory = "/home/julian";
|
||||||
|
|
||||||
@ -35,6 +38,7 @@ config, ... }: {
|
|||||||
emacs.enable = true;
|
emacs.enable = true;
|
||||||
i3.enable = true;
|
i3.enable = true;
|
||||||
rofi.enable = true;
|
rofi.enable = true;
|
||||||
|
nix-helper.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
@ -54,7 +58,6 @@ config, ... }: {
|
|||||||
unstable.rust-analyzer
|
unstable.rust-analyzer
|
||||||
|
|
||||||
# Further tools
|
# Further tools
|
||||||
unstable.nh # nix helper
|
|
||||||
cntr # nix debugger
|
cntr # nix debugger
|
||||||
|
|
||||||
(lib.frajul.my-helper-function lazygit)
|
(lib.frajul.my-helper-function lazygit)
|
||||||
@ -71,46 +74,6 @@ config, ... }: {
|
|||||||
pkgs.frajul.edit-config
|
pkgs.frajul.edit-config
|
||||||
];
|
];
|
||||||
|
|
||||||
home.file = {
|
|
||||||
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
|
|
||||||
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
|
|
||||||
# # symlink to the Nix store copy.
|
|
||||||
# ".screenrc".source = dotfiles/screenrc;
|
|
||||||
|
|
||||||
# # You can also set the file content immediately.
|
|
||||||
# ".gradle/gradle.properties".text = ''
|
|
||||||
# org.gradle.console=verbose
|
|
||||||
# org.gradle.daemon.idletimeout=3600000
|
|
||||||
# '';
|
|
||||||
};
|
|
||||||
|
|
||||||
# Home Manager can also manage your environment variables through
|
|
||||||
# 'home.sessionVariables'. If you don't want to manage your shell through Home
|
|
||||||
# Manager then you have to manually source 'hm-session-vars.sh' located at
|
|
||||||
# either
|
|
||||||
# ~/.nix-profile/etc/profile.d/hm-session-vars.sh
|
|
||||||
# or
|
|
||||||
# /etc/profiles/per-user/julian/etc/profile.d/hm-session-vars.sh
|
|
||||||
#
|
|
||||||
#
|
|
||||||
|
|
||||||
home.shellAliases = {
|
|
||||||
g = "git status";
|
|
||||||
fd = "fd -HI";
|
|
||||||
ls = "ls --color";
|
|
||||||
la = "ls -Alh --color";
|
|
||||||
grep = "grep --color";
|
|
||||||
conf = "edit-config";
|
|
||||||
c = "fzf-z";
|
|
||||||
};
|
|
||||||
|
|
||||||
home.sessionVariables = {
|
|
||||||
TERMINAL = "alacritty";
|
|
||||||
EDITOR = "nvim";
|
|
||||||
VISUAL = "nvim";
|
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
@ -1,22 +1,25 @@
|
|||||||
{
|
{
|
||||||
# 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.
|
||||||
home, # The home architecture for this host (eg. `x86_64-linux`).
|
namespace, # The namespace used for your flake, defaulting to "internal" if not set.
|
||||||
target, # The Snowfall Lib target for this home (eg. `x86_64-home`).
|
home, # The home architecture for this host (eg. `x86_64-linux`).
|
||||||
format, # A normalized name for the home target (eg. `home`).
|
target, # The Snowfall Lib target for this home (eg. `x86_64-home`).
|
||||||
virtual
|
format, # A normalized name for the home target (eg. `home`).
|
||||||
, # A boolean to determine whether this home is a virtual target using nixos-generators.
|
virtual, # A boolean to determine whether this home is a virtual target using nixos-generators.
|
||||||
host, # The host name for this home.
|
host, # The host name for this home.
|
||||||
|
|
||||||
# All other arguments come from the home home.
|
# All other arguments come from the home home.
|
||||||
config, ... }: {
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
home.username = "julian";
|
home.username = "julian";
|
||||||
home.homeDirectory = "/home/julian";
|
home.homeDirectory = "/home/julian";
|
||||||
|
|
||||||
@ -33,61 +36,26 @@ config, ... }: {
|
|||||||
neovim.enable = true;
|
neovim.enable = true;
|
||||||
alacritty.enable = true;
|
alacritty.enable = true;
|
||||||
emacs.enable = true;
|
emacs.enable = true;
|
||||||
i3 = { enable = true; };
|
i3 = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
rofi.enable = true;
|
rofi.enable = true;
|
||||||
|
nix-helper.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
home.packages = lib.lists.concatMap
|
home.packages =
|
||||||
(packages-list-file: import packages-list-file { inherit pkgs; }) [
|
lib.lists.concatMap (packages-list-file: import packages-list-file { inherit pkgs; })
|
||||||
./fonts.nix
|
[
|
||||||
./packages.nix
|
./fonts.nix
|
||||||
];
|
./packages.nix
|
||||||
|
];
|
||||||
fonts.fontconfig.enable = true; # required to autoload fonts from packages
|
fonts.fontconfig.enable = true; # required to autoload fonts from packages
|
||||||
|
|
||||||
home.file = {
|
|
||||||
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
|
|
||||||
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
|
|
||||||
# # symlink to the Nix store copy.
|
|
||||||
# ".screenrc".source = dotfiles/screenrc;
|
|
||||||
|
|
||||||
# # You can also set the file content immediately.
|
|
||||||
# ".gradle/gradle.properties".text = ''
|
|
||||||
# org.gradle.console=verbose
|
|
||||||
# org.gradle.daemon.idletimeout=3600000
|
|
||||||
# '';
|
|
||||||
};
|
|
||||||
|
|
||||||
# Home Manager can also manage your environment variables through
|
|
||||||
# 'home.sessionVariables'. If you don't want to manage your shell through Home
|
|
||||||
# Manager then you have to manually source 'hm-session-vars.sh' located at
|
|
||||||
# either
|
|
||||||
# ~/.nix-profile/etc/profile.d/hm-session-vars.sh
|
|
||||||
# or
|
|
||||||
# /etc/profiles/per-user/julian/etc/profile.d/hm-session-vars.sh
|
|
||||||
#
|
|
||||||
#
|
|
||||||
|
|
||||||
gtk = {
|
gtk = {
|
||||||
enable = true;
|
enable = true;
|
||||||
theme.name = "Adwaita-dark";
|
theme.name = "Adwaita-dark";
|
||||||
};
|
};
|
||||||
|
|
||||||
home.shellAliases = {
|
|
||||||
g = "git status";
|
|
||||||
fd = "fd -HI";
|
|
||||||
ls = "ls --color";
|
|
||||||
la = "ls -Alh --color";
|
|
||||||
grep = "grep --color";
|
|
||||||
conf = "edit-config";
|
|
||||||
c = "fzf-z";
|
|
||||||
};
|
|
||||||
|
|
||||||
home.sessionVariables = {
|
|
||||||
TERMINAL = "alacritty";
|
|
||||||
EDITOR = "nvim";
|
|
||||||
VISUAL = "nvim";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Let Home Manager install and manage itself.
|
# Let Home Manager install and manage itself.
|
||||||
programs.home-manager.enable = true;
|
programs.home-manager.enable = true;
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
with pkgs; [
|
with pkgs;
|
||||||
|
[
|
||||||
|
|
||||||
shellcheck
|
shellcheck
|
||||||
|
|
||||||
@ -163,6 +164,7 @@ with pkgs; [
|
|||||||
# cudaPackages.cudatoolkit
|
# cudaPackages.cudatoolkit
|
||||||
# openmvg
|
# openmvg
|
||||||
# colmapWithCuda
|
# colmapWithCuda
|
||||||
|
path-of-building
|
||||||
|
|
||||||
## My scripts
|
## My scripts
|
||||||
frajul.edit-config
|
frajul.edit-config
|
||||||
|
47
homes/x86_64-linux/julian@pianonix/default.nix
Normal file
47
homes/x86_64-linux/julian@pianonix/default.nix
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
{
|
||||||
|
# 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.
|
||||||
|
lib,
|
||||||
|
# An instance of `pkgs` with your overlays and packages applied is also available.
|
||||||
|
pkgs,
|
||||||
|
# You also have access to your flake's inputs.
|
||||||
|
inputs,
|
||||||
|
|
||||||
|
# Additional metadata is provided by Snowfall Lib.
|
||||||
|
namespace, # The namespace used for your flake, defaulting to "internal" if not set.
|
||||||
|
home, # The home architecture for this host (eg. `x86_64-linux`).
|
||||||
|
target, # The Snowfall Lib target for this home (eg. `x86_64-home`).
|
||||||
|
format, # A normalized name for the home target (eg. `home`).
|
||||||
|
virtual, # A boolean to determine whether this home is a virtual target using nixos-generators.
|
||||||
|
host, # The host name for this home.
|
||||||
|
|
||||||
|
# All other arguments come from the home home.
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
home.username = "julian";
|
||||||
|
home.homeDirectory = "/home/julian";
|
||||||
|
|
||||||
|
# DO NOT CHANGE!!!
|
||||||
|
home.stateVersion = "23.11";
|
||||||
|
|
||||||
|
modules = {
|
||||||
|
shell = {
|
||||||
|
fish.enable = true;
|
||||||
|
};
|
||||||
|
topgrade.enable = true;
|
||||||
|
neovim.enable = true;
|
||||||
|
alacritty.enable = true;
|
||||||
|
nix-helper.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
home.packages = with pkgs; [ ];
|
||||||
|
|
||||||
|
home.sessionVariables = {
|
||||||
|
FLAKE = "/home/julian/.dotfiles";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Let Home Manager install and manage itself.
|
||||||
|
programs.home-manager.enable = true;
|
||||||
|
}
|
@ -1,28 +1,33 @@
|
|||||||
{
|
{
|
||||||
# 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, ... }:
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
let cfg = config.modules.alacritty;
|
let
|
||||||
in {
|
cfg = config.modules.alacritty;
|
||||||
options.modules.alacritty = { enable = mkOption { default = false; }; };
|
in
|
||||||
|
{
|
||||||
|
options.modules.alacritty = {
|
||||||
|
enable = mkOption { default = false; };
|
||||||
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
# Does not work on non-nixos due to opengl
|
# Does not work on non-nixos due to opengl
|
||||||
@ -32,5 +37,7 @@ in {
|
|||||||
".config/alacritty/theme".source = "${inputs.alacritty-theme}";
|
".config/alacritty/theme".source = "${inputs.alacritty-theme}";
|
||||||
".config/alacritty/alacritty.toml".source = ./alacritty.toml;
|
".config/alacritty/alacritty.toml".source = ./alacritty.toml;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
home.sessionVariables.TERMINAL = "alacritty";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,39 +1,53 @@
|
|||||||
{
|
{
|
||||||
# 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, ... }:
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
let cfg = config.modules.shell.fish;
|
let
|
||||||
in {
|
cfg = config.modules.shell.fish;
|
||||||
options.modules.shell.fish = { enable = mkOption { default = false; }; };
|
in
|
||||||
|
{
|
||||||
|
options.modules.shell.fish = {
|
||||||
|
enable = mkOption { default = false; };
|
||||||
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
||||||
home.file = {
|
home.file = {
|
||||||
".config/starship.toml".source = ./starship.toml;
|
".config/starship.toml".source = ./starship.toml;
|
||||||
".config/fish/conf.d/last-working-dir.fish".source =
|
".config/fish/conf.d/last-working-dir.fish".source = ./last-working-dir.fish;
|
||||||
./last-working-dir.fish;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
home.packages = with pkgs; [ starship ];
|
home.packages = with pkgs; [ starship ];
|
||||||
|
|
||||||
|
home.shellAliases = {
|
||||||
|
g = "git status";
|
||||||
|
fd = "fd -HI";
|
||||||
|
ls = "ls --color";
|
||||||
|
la = "ls -Alh --color";
|
||||||
|
grep = "grep --color";
|
||||||
|
conf = "edit-config";
|
||||||
|
c = "fzf-z";
|
||||||
|
};
|
||||||
|
|
||||||
programs.starship = {
|
programs.starship = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableFishIntegration = true;
|
enableFishIntegration = true;
|
||||||
@ -44,10 +58,12 @@ in {
|
|||||||
|
|
||||||
interactiveShellInit = "set fish_greeting"; # Disable default greeting
|
interactiveShellInit = "set fish_greeting"; # Disable default greeting
|
||||||
|
|
||||||
plugins = [{
|
plugins = [
|
||||||
name = "z";
|
{
|
||||||
src = pkgs.fishPlugins.z.src;
|
name = "z";
|
||||||
}];
|
src = pkgs.fishPlugins.z.src;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
functions = {
|
functions = {
|
||||||
fzf-z = ''
|
fzf-z = ''
|
||||||
|
@ -25,8 +25,12 @@ in {
|
|||||||
options.modules.neovim = { enable = mkOption { default = false; }; };
|
options.modules.neovim = { enable = mkOption { default = false; }; };
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
programs = {
|
home.sessionVariables = {
|
||||||
neovim = let
|
EDITOR = "nvim";
|
||||||
|
VISUAL = "nvim";
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.neovim = let
|
||||||
toLua = str: ''
|
toLua = str: ''
|
||||||
lua << EOF
|
lua << EOF
|
||||||
${str}
|
${str}
|
||||||
|
37
modules/home/nix-helper/default.nix
Normal file
37
modules/home/nix-helper/default.nix
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
{
|
||||||
|
# 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.
|
||||||
|
lib,
|
||||||
|
# An instance of `pkgs` with your overlays and packages applied is also available.
|
||||||
|
pkgs,
|
||||||
|
# You also have access to your flake's inputs.
|
||||||
|
inputs,
|
||||||
|
|
||||||
|
# Additional metadata is provided by Snowfall Lib.
|
||||||
|
system, # The system architecture for this host (eg. `x86_64-linux`).
|
||||||
|
target, # The Snowfall Lib target for this system (eg. `x86_64-iso`).
|
||||||
|
format, # A normalized name for the system target (eg. `iso`).
|
||||||
|
virtual, # A boolean to determine whether this system is a virtual target using nixos-generators.
|
||||||
|
systems, # An attribute map of your defined hosts.
|
||||||
|
|
||||||
|
# All other arguments come from the module system.
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.modules.nix-helper;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.modules.nix-helper = {
|
||||||
|
enable = lib.mkOption { default = false; };
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
home.sessionVariables = {
|
||||||
|
FLAKE = "/home/julian/.dotfiles";
|
||||||
|
};
|
||||||
|
|
||||||
|
home.packages = with pkgs; [ nh ];
|
||||||
|
};
|
||||||
|
}
|
47
modules/nixos/locales/default.nix
Normal file
47
modules/nixos/locales/default.nix
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
{
|
||||||
|
# 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.
|
||||||
|
lib,
|
||||||
|
# An instance of `pkgs` with your overlays and packages applied is also available.
|
||||||
|
pkgs,
|
||||||
|
# You also have access to your flake's inputs.
|
||||||
|
inputs,
|
||||||
|
|
||||||
|
# Additional metadata is provided by Snowfall Lib.
|
||||||
|
namespace, # The namespace used for your flake, defaulting to "internal" if not set.
|
||||||
|
system, # The system architecture for this host (eg. `x86_64-linux`).
|
||||||
|
target, # The Snowfall Lib target for this system (eg. `x86_64-iso`).
|
||||||
|
format, # A normalized name for the system target (eg. `iso`).
|
||||||
|
virtual, # A boolean to determine whether this system is a virtual target using nixos-generators.
|
||||||
|
systems, # An attribute map of your defined hosts.
|
||||||
|
|
||||||
|
# All other arguments come from the module system.
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.modules.locales;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.modules.locales = {
|
||||||
|
enable = lib.mkOption { default = false; };
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
# Select internationalisation properties.
|
||||||
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
|
|
||||||
|
i18n.extraLocaleSettings = {
|
||||||
|
LC_ADDRESS = "de_DE.UTF-8";
|
||||||
|
LC_IDENTIFICATION = "de_DE.UTF-8";
|
||||||
|
LC_MEASUREMENT = "de_DE.UTF-8";
|
||||||
|
LC_MONETARY = "de_DE.UTF-8";
|
||||||
|
LC_NAME = "de_DE.UTF-8";
|
||||||
|
LC_NUMERIC = "en_US.UTF-8";
|
||||||
|
LC_PAPER = "de_DE.UTF-8";
|
||||||
|
LC_TELEPHONE = "de_DE.UTF-8";
|
||||||
|
LC_TIME = "de_DE.UTF-8";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -2,21 +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’).
|
||||||
|
|
||||||
{ lib, inputs, config, pkgs, ... }: {
|
{
|
||||||
|
lib,
|
||||||
|
inputs,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
imports = [ ./hardware-configuration.nix ];
|
imports = [ ./hardware-configuration.nix ];
|
||||||
|
|
||||||
nix.buildMachines = [{
|
nix.buildMachines = [
|
||||||
hostName = "192.168.3.118";
|
{
|
||||||
system = "x86_64-linux";
|
hostName = "192.168.3.118";
|
||||||
protocol = "ssh";
|
system = "x86_64-linux";
|
||||||
# if the builder supports building for multiple architectures,
|
protocol = "ssh";
|
||||||
# replace the previous line by, e.g.
|
# if the builder supports building for multiple architectures,
|
||||||
# systems = ["x86_64-linux" "aarch64-linux"];
|
# replace the previous line by, e.g.
|
||||||
maxJobs = 4;
|
# systems = ["x86_64-linux" "aarch64-linux"];
|
||||||
speedFactor = 3;
|
maxJobs = 4;
|
||||||
supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ];
|
speedFactor = 3;
|
||||||
mandatoryFeatures = [ ];
|
supportedFeatures = [
|
||||||
}];
|
"nixos-test"
|
||||||
|
"benchmark"
|
||||||
|
"big-parallel"
|
||||||
|
"kvm"
|
||||||
|
];
|
||||||
|
mandatoryFeatures = [ ];
|
||||||
|
}
|
||||||
|
];
|
||||||
nix.distributedBuilds = true;
|
nix.distributedBuilds = true;
|
||||||
# optional, useful when the builder has a faster internet connection than yours
|
# optional, useful when the builder has a faster internet connection than yours
|
||||||
nix.extraOptions = " builders-use-substitutes = true\n";
|
nix.extraOptions = " builders-use-substitutes = true\n";
|
||||||
@ -27,7 +41,12 @@
|
|||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
boot.loader.efi.efiSysMountPoint = "/boot/efi";
|
boot.loader.efi.efiSysMountPoint = "/boot/efi";
|
||||||
|
|
||||||
boot.supportedFilesystems = [ "btrfs" "ntfs" "nfs" "cifs" ];
|
boot.supportedFilesystems = [
|
||||||
|
"btrfs"
|
||||||
|
"ntfs"
|
||||||
|
"nfs"
|
||||||
|
"cifs"
|
||||||
|
];
|
||||||
|
|
||||||
networking.hostName = "kardorf"; # Define your hostname.
|
networking.hostName = "kardorf"; # Define your hostname.
|
||||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||||
@ -47,38 +66,29 @@
|
|||||||
location.latitude = 47.92;
|
location.latitude = 47.92;
|
||||||
location.longitude = 10.12;
|
location.longitude = 10.12;
|
||||||
|
|
||||||
# Select internationalisation properties.
|
modules = {
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
locales.enable = true;
|
||||||
|
|
||||||
i18n.extraLocaleSettings = {
|
|
||||||
LC_ADDRESS = "de_DE.UTF-8";
|
|
||||||
LC_IDENTIFICATION = "de_DE.UTF-8";
|
|
||||||
LC_MEASUREMENT = "de_DE.UTF-8";
|
|
||||||
LC_MONETARY = "de_DE.UTF-8";
|
|
||||||
LC_NAME = "de_DE.UTF-8";
|
|
||||||
LC_NUMERIC = "en_US.UTF-8";
|
|
||||||
LC_PAPER = "de_DE.UTF-8";
|
|
||||||
LC_TELEPHONE = "de_DE.UTF-8";
|
|
||||||
LC_TIME = "de_DE.UTF-8";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
nix.settings.auto-optimise-store = true;
|
nix.settings.auto-optimise-store = true;
|
||||||
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=" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
# Enable the X11 windowing system.
|
# Enable the X11 windowing system.
|
||||||
services.xserver.enable = true;
|
services.xserver.enable = true;
|
||||||
services.xserver.videoDrivers = [ "nvidia" ];
|
services.xserver.videoDrivers = [ "nvidia" ];
|
||||||
hardware.nvidia.package =
|
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.legacy_470;
|
||||||
config.boot.kernelPackages.nvidiaPackages.legacy_470;
|
|
||||||
hardware.opengl.enable = true;
|
hardware.opengl.enable = true;
|
||||||
# hardware.nvidia.modesetting.enable = true; # for wayland
|
# hardware.nvidia.modesetting.enable = true; # for wayland
|
||||||
|
|
||||||
@ -146,12 +156,15 @@
|
|||||||
uid = 1000;
|
uid = 1000;
|
||||||
group = "julian";
|
group = "julian";
|
||||||
shell = pkgs.fish;
|
shell = pkgs.fish;
|
||||||
extraGroups = [ "networkmanager" "wheel" "docker" ];
|
extraGroups = [
|
||||||
|
"networkmanager"
|
||||||
|
"wheel"
|
||||||
|
"docker"
|
||||||
|
];
|
||||||
packages = with pkgs; [ ]; # Using home-manager instead
|
packages = with pkgs; [ ]; # Using home-manager instead
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager.useGlobalPkgs =
|
home-manager.useGlobalPkgs = true; # make overlays for nixpkgs work for home-manager, not only the system
|
||||||
true; # make overlays for nixpkgs work for home-manager, not only the system
|
|
||||||
home-manager.useUserPackages = true;
|
home-manager.useUserPackages = true;
|
||||||
|
|
||||||
programs.fish.enable = true;
|
programs.fish.enable = true;
|
||||||
@ -159,7 +172,9 @@
|
|||||||
|
|
||||||
programs.nix-ld.enable = true;
|
programs.nix-ld.enable = true;
|
||||||
|
|
||||||
users.groups.julian = { gid = 1000; };
|
users.groups.julian = {
|
||||||
|
gid = 1000;
|
||||||
|
};
|
||||||
# users.groups.wolfi = { gid = 1001; };
|
# users.groups.wolfi = { gid = 1001; };
|
||||||
|
|
||||||
# users.users.wolfi = {
|
# users.users.wolfi = {
|
||||||
@ -171,10 +186,8 @@
|
|||||||
# extraGroups = [ "networkmanager" "wheel" ];
|
# extraGroups = [ "networkmanager" "wheel" ];
|
||||||
# };
|
# };
|
||||||
|
|
||||||
environment.etc."manual-links/xfce4-notifyd".source =
|
environment.etc."manual-links/xfce4-notifyd".source = "${pkgs.xfce.xfce4-notifyd}/lib/xfce4/notifyd/xfce4-notifyd";
|
||||||
"${pkgs.xfce.xfce4-notifyd}/lib/xfce4/notifyd/xfce4-notifyd";
|
environment.etc."manual-links/polkit-gnome-authentication-agent-1".source = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
|
||||||
environment.etc."manual-links/polkit-gnome-authentication-agent-1".source =
|
|
||||||
"${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
|
|
||||||
|
|
||||||
# List services that you want to enable:
|
# List services that you want to enable:
|
||||||
# Enable the OpenSSH daemon.
|
# Enable the OpenSSH daemon.
|
||||||
@ -202,7 +215,12 @@
|
|||||||
# $ nix search wget
|
# $ nix search wget
|
||||||
|
|
||||||
# Packages needed as root
|
# Packages needed as root
|
||||||
environment.systemPackages = with pkgs; [ vim htop mc home-manager ];
|
environment.systemPackages = with pkgs; [
|
||||||
|
vim
|
||||||
|
htop
|
||||||
|
mc
|
||||||
|
home-manager
|
||||||
|
];
|
||||||
|
|
||||||
virtualisation.docker.enable = true;
|
virtualisation.docker.enable = true;
|
||||||
|
|
||||||
@ -233,5 +251,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 = "22.11"; # Did you read the comment?
|
system.stateVersion = "22.11"; # Did you read the comment?
|
||||||
|
|
||||||
}
|
}
|
||||||
|
135
systems/x86_64-linux/pianonix/default.nix
Normal file
135
systems/x86_64-linux/pianonix/default.nix
Normal file
@ -0,0 +1,135 @@
|
|||||||
|
# Edit this configuration file to define what should be installed on
|
||||||
|
# your system. Help is available in the configuration.nix(5) man page
|
||||||
|
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||||
|
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
inputs,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
imports = [ ./hardware-configuration.nix ];
|
||||||
|
|
||||||
|
# Bootloader
|
||||||
|
# Use this for simple nix boot menu, if no dual boot required
|
||||||
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
boot.loader.efi.efiSysMountPoint = "/boot/efi";
|
||||||
|
|
||||||
|
networking.networkmanager.enable = true;
|
||||||
|
networking.hostName = "pianonix"; # Define your hostname.
|
||||||
|
networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||||
|
|
||||||
|
# Set your time zone.
|
||||||
|
time.timeZone = "Europe/Berlin";
|
||||||
|
|
||||||
|
# Set location used by redshift
|
||||||
|
location.provider = "manual";
|
||||||
|
location.latitude = 47.92;
|
||||||
|
location.longitude = 10.12;
|
||||||
|
|
||||||
|
modules = {
|
||||||
|
locales.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
nix.settings.auto-optimise-store = true;
|
||||||
|
nix.settings.experimental-features = [
|
||||||
|
"nix-command"
|
||||||
|
"flakes"
|
||||||
|
];
|
||||||
|
|
||||||
|
# Setup binary caches
|
||||||
|
nix.settings = {
|
||||||
|
substituters = [
|
||||||
|
"https://nix-community.cachix.org"
|
||||||
|
"https://cache.nixos.org/"
|
||||||
|
];
|
||||||
|
trusted-public-keys = [ "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
# Enable the X11 windowing system.
|
||||||
|
services.xserver.enable = true;
|
||||||
|
hardware.opengl.enable = true;
|
||||||
|
|
||||||
|
nix.gc = {
|
||||||
|
automatic = true;
|
||||||
|
dates = "weekly";
|
||||||
|
options = "--delete-older-than 30d";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Enable the XFCE Desktop Environment.
|
||||||
|
services.xserver.displayManager.lightdm.enable = true;
|
||||||
|
services.xserver.desktopManager = {
|
||||||
|
xterm.enable = false;
|
||||||
|
xfce = {
|
||||||
|
enable = true;
|
||||||
|
noDesktop = true;
|
||||||
|
enableXfwm = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Configure keymap in X11
|
||||||
|
services.xserver = {
|
||||||
|
xkb.layout = "de";
|
||||||
|
xkb.variant = "";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Configure console keymap
|
||||||
|
console.keyMap = "de";
|
||||||
|
|
||||||
|
# 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;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||||
|
users.users.julian = {
|
||||||
|
isNormalUser = true;
|
||||||
|
description = "Julian";
|
||||||
|
uid = 1000;
|
||||||
|
gid = 1000;
|
||||||
|
group = "julian";
|
||||||
|
extraGroups = [
|
||||||
|
"networkmanager"
|
||||||
|
"wheel"
|
||||||
|
"docker"
|
||||||
|
];
|
||||||
|
packages = with pkgs; [ ]; # Using home-manager instead
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.nix-ld.enable = true;
|
||||||
|
|
||||||
|
# List services that you want to enable:
|
||||||
|
services.openssh.enable = false;
|
||||||
|
|
||||||
|
services.syncthing.enable = true;
|
||||||
|
services.syncthing.user = "julian";
|
||||||
|
services.syncthing.group = "julian";
|
||||||
|
|
||||||
|
services.redshift.enable = true;
|
||||||
|
|
||||||
|
services.gnome.gnome-keyring.enable = true;
|
||||||
|
|
||||||
|
# Packages needed as root
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
vim
|
||||||
|
htop
|
||||||
|
mc
|
||||||
|
];
|
||||||
|
|
||||||
|
# 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 = "22.11"; # Did you read the comment?
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user