initial commit
This commit is contained in:
@@ -0,0 +1,138 @@
|
||||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page, on
|
||||
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
|
||||
|
||||
{ config, lib, pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
inputs.home-manager.nixosModules.default
|
||||
];
|
||||
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
# networking.hostName = "nixos"; # Define your hostname.
|
||||
# Pick only one of the below networking options.
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Dublin";
|
||||
|
||||
# Configure network proxy if necessary
|
||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
# console = {
|
||||
# font = "Lat2-Terminus16";
|
||||
# keyMap = "us";
|
||||
# useXkbConfig = true; # use xkb.options in tty.
|
||||
# };
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
services.xserver.enable = true;
|
||||
services.xserver.displayManager.sddm.enable = true;
|
||||
services.xserver.windowManager.i3.enable = true;
|
||||
|
||||
# services.xserver.xkb.options = "eurosign:e,caps:escape";
|
||||
services.xserver = {
|
||||
xkb = {
|
||||
layout = "us";
|
||||
variant = "";
|
||||
};
|
||||
};
|
||||
hardware.bluetooth.enable = true;
|
||||
|
||||
# Configure keymap in X11
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
|
||||
# Enable sound.
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio.enable = true;
|
||||
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
services.xserver.libinput.enable = true;
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
# users.users.alice = {
|
||||
# isNormalUser = true;
|
||||
# extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
|
||||
# packages = with pkgs; [
|
||||
# firefox
|
||||
# tree
|
||||
# ];
|
||||
# };
|
||||
nix.settings.trusted-users = [ "root" "@wheel" ];
|
||||
|
||||
users.users.liamm = {
|
||||
isNormalUser = true;
|
||||
description = "liamm";
|
||||
extraGroups = [ "networkmanager" "wheel" ]; # Enable ‘sudo’ for the user.
|
||||
};
|
||||
|
||||
home-manager = {
|
||||
extraSpecialArgs = { inherit inputs; };
|
||||
users = {
|
||||
"liamm" = import ./home.nix;
|
||||
};
|
||||
};
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
||||
wget
|
||||
alacritty
|
||||
];
|
||||
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
# started in user sessions.
|
||||
# programs.mtr.enable = true;
|
||||
# programs.gnupg.agent = {
|
||||
# enable = true;
|
||||
# enableSSHSupport = true;
|
||||
# };
|
||||
|
||||
# List services that you want to enable:
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
services.openssh.enable = true;
|
||||
|
||||
# Open ports in the firewall.
|
||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||
# Or disable the firewall altogether.
|
||||
networking.firewall.enable = false;
|
||||
|
||||
# Copy the NixOS configuration file and link it from the resulting system
|
||||
# (/run/current-system/configuration.nix). This is useful in case you
|
||||
# accidentally delete configuration.nix.
|
||||
# system.copySystemConfiguration = true;
|
||||
|
||||
# This option defines the first version of NixOS you have installed on this particular machine,
|
||||
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
|
||||
#
|
||||
# Most users should NEVER change this value after the initial install, for any reason,
|
||||
# even if you've upgraded your system to a new NixOS release.
|
||||
#
|
||||
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
|
||||
# so changing it will NOT upgrade your system.
|
||||
#
|
||||
# This value being lower than the current NixOS release does NOT mean your system is
|
||||
# out of date, out of support, or vulnerable.
|
||||
#
|
||||
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
|
||||
# and migrated your data accordingly.
|
||||
#
|
||||
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
|
||||
system.stateVersion = "23.11"; # Did you read the comment?
|
||||
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/5c0b32f9-9711-4483-9717-842706d4f901";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/home" =
|
||||
{ device = "/dev/disk/by-uuid/3a477a6e-f720-414b-ac19-16dadfb01d93";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/FE97-DFFD";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/cf76c3c2-7f63-4bd9-9480-4e935f60cf24"; }
|
||||
];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp1s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
}
|
||||
@@ -0,0 +1,136 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.username = "liamm";
|
||||
home.homeDirectory = "/home/liamm";
|
||||
|
||||
# You should not change this value, even if you update Home Manager. If you do
|
||||
# want to update the value, then make sure to first check the Home Manager
|
||||
# release notes.
|
||||
home.stateVersion = "23.11"; # Please read the comment before changing.
|
||||
|
||||
# The home.packages option allows you to install Nix packages into your
|
||||
# environment.
|
||||
home.packages = [
|
||||
pkgs.htop
|
||||
pkgs.firefox
|
||||
pkgs.thunderbird
|
||||
pkgs.neofetch
|
||||
pkgs.tree
|
||||
pkgs.cmake
|
||||
pkgs.gcc
|
||||
pkgs.libtool
|
||||
(pkgs.nerdfonts.override { fonts = [ "FiraCode" "DroidSansMono" ]; })
|
||||
];
|
||||
|
||||
# Home Manager is pretty good at managing dotfiles. The primary way to manage
|
||||
# plain files is through 'home.file'.
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
home.sessionVariables = {
|
||||
EDITOR = "emacs";
|
||||
GIT_EDITOR = "nvim";
|
||||
NIX_SHELL_PRESERVE_PROMPT = 1;
|
||||
};
|
||||
|
||||
nix.settings.extra-trusted-substituters = [
|
||||
"https://ghostty.cachix.org"
|
||||
];
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
|
||||
# Let Home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
# ENV/APPEARANCE SETTINGS
|
||||
|
||||
fonts.fontconfig = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
# BEGIN PROGRAMS
|
||||
|
||||
programs.bash = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
enableVteIntegration = true;
|
||||
initExtra =''
|
||||
export PS1='\[\e[1;m\e[1;33m\e[1;m\] \W\[\e[m\e[m\] 🐧 \[\e[1;32m\]~> \[\e[m\e[m\]'
|
||||
set -o vi
|
||||
'';
|
||||
shellAliases = {
|
||||
ls = "ls --color=auto";
|
||||
ll = "ls -l";
|
||||
la = "ls -lA";
|
||||
ping = "ping -c 5";
|
||||
kpx = "keepassxc-cli open";
|
||||
nixbuild = "sudo nixos-rebuild switch --flake";
|
||||
nixtest = "sudo nixos-rebuild test --flake";
|
||||
vi = "\vim";
|
||||
emacsd = "emacs --daemon";
|
||||
emacsc = "emacsclient -c -a 'emacs'";
|
||||
new = "source $HOME/.bashrc";
|
||||
newbar = "pkill waybar; waybar &disown";
|
||||
".." = "cd ..";
|
||||
set-github-var = "export GITHUB=$(sed -n 2p ~/documents/.git_keys)";
|
||||
set-gitlab-var = "export GITLAB=$(sed -n 4p ~/documents/.git_keys)";
|
||||
};
|
||||
};
|
||||
programs.emacs = {
|
||||
enable = true;
|
||||
# extraPackages = epkgs: [
|
||||
# epkgs.nix-mode
|
||||
# epkgs.magit
|
||||
# ];
|
||||
};
|
||||
programs.git = {
|
||||
enable = true;
|
||||
diff-so-fancy.enable = true;
|
||||
userEmail = "maloneliam@proton.me";
|
||||
userName = "Liam Malone";
|
||||
};
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
package = pkgs.neovim-unwrapped;
|
||||
vimAlias = true;
|
||||
vimdiffAlias = true;
|
||||
};
|
||||
|
||||
|
||||
# BEGIN SERVICES
|
||||
|
||||
services.emacs = {
|
||||
enable = true;
|
||||
client = {
|
||||
enable = true;
|
||||
arguments = [
|
||||
"-c"
|
||||
"-a emacs"
|
||||
];
|
||||
};
|
||||
startWithUserSession = true;
|
||||
};
|
||||
|
||||
services.flameshot = {
|
||||
enable = true;
|
||||
settings = {
|
||||
General = {
|
||||
disabledTrayIcon = true;
|
||||
showStartupLaunchMessage = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.gpg-agent = {
|
||||
enable = true;
|
||||
defaultCacheTtl = 1800;
|
||||
enableSshSupport = true;
|
||||
};
|
||||
|
||||
#services.nexcloud-client.enable = true;
|
||||
}
|
||||
@@ -0,0 +1,139 @@
|
||||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page, on
|
||||
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
|
||||
|
||||
{ config, lib, pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
inputs.home-manager.nixosModules.default
|
||||
];
|
||||
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
|
||||
# networking.hostName = "nixos"; # Define your hostname.
|
||||
# Pick only one of the below networking options.
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Dublin";
|
||||
|
||||
# Configure network proxy if necessary
|
||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
# console = {
|
||||
# font = "Lat2-Terminus16";
|
||||
# keyMap = "us";
|
||||
# useXkbConfig = true; # use xkb.options in tty.
|
||||
# };
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
services.xserver.enable = true;
|
||||
services.xserver.displayManager.sddm.enable = true;
|
||||
services.xserver.windowManager.i3.enable = true;
|
||||
|
||||
# services.xserver.xkb.options = "eurosign:e,caps:escape";
|
||||
services.xserver = {
|
||||
xkb = {
|
||||
layout = "us";
|
||||
variant = "";
|
||||
};
|
||||
};
|
||||
hardware.bluetooth.enable = true;
|
||||
|
||||
# Configure keymap in X11
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
|
||||
# Enable sound.
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio.enable = true;
|
||||
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
services.xserver.libinput.enable = true;
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
# users.users.alice = {
|
||||
# isNormalUser = true;
|
||||
# extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
|
||||
# packages = with pkgs; [
|
||||
# firefox
|
||||
# tree
|
||||
# ];
|
||||
# };
|
||||
users.users.liamm = {
|
||||
isNormalUser = true;
|
||||
description = "liamm";
|
||||
extraGroups = [ "networkmanager" "wheel" ]; # Enable ‘sudo’ for the user.
|
||||
};
|
||||
|
||||
home-manager = {
|
||||
extraSpecialArgs = { inherit inputs; };
|
||||
users = {
|
||||
"liamm" = import ./home.nix;
|
||||
};
|
||||
};
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
||||
wget
|
||||
alacritty
|
||||
];
|
||||
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
# started in user sessions.
|
||||
# programs.mtr.enable = true;
|
||||
# programs.gnupg.agent = {
|
||||
# enable = true;
|
||||
# enableSSHSupport = true;
|
||||
# };
|
||||
|
||||
# List services that you want to enable:
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
services.openssh.enable = true;
|
||||
|
||||
# Open ports in the firewall.
|
||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||
# Or disable the firewall altogether.
|
||||
networking.firewall.enable = false;
|
||||
|
||||
# Copy the NixOS configuration file and link it from the resulting system
|
||||
# (/run/current-system/configuration.nix). This is useful in case you
|
||||
# accidentally delete configuration.nix.
|
||||
# system.copySystemConfiguration = true;
|
||||
|
||||
# This option defines the first version of NixOS you have installed on this particular machine,
|
||||
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
|
||||
#
|
||||
# Most users should NEVER change this value after the initial install, for any reason,
|
||||
# even if you've upgraded your system to a new NixOS release.
|
||||
#
|
||||
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
|
||||
# so changing it will NOT upgrade your system.
|
||||
#
|
||||
# This value being lower than the current NixOS release does NOT mean your system is
|
||||
# out of date, out of support, or vulnerable.
|
||||
#
|
||||
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
|
||||
# and migrated your data accordingly.
|
||||
#
|
||||
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
|
||||
system.stateVersion = "23.11"; # Did you read the comment?
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/5c0b32f9-9711-4483-9717-842706d4f901";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/home" =
|
||||
{ device = "/dev/disk/by-uuid/3a477a6e-f720-414b-ac19-16dadfb01d93";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/FE97-DFFD";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/cf76c3c2-7f63-4bd9-9480-4e935f60cf24"; }
|
||||
];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp1s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
}
|
||||
@@ -0,0 +1,142 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.username = "liamm";
|
||||
home.homeDirectory = "/home/liamm";
|
||||
|
||||
# You should not change this value, even if you update Home Manager. If you do
|
||||
# want to update the value, then make sure to first check the Home Manager
|
||||
# release notes.
|
||||
home.stateVersion = "23.11"; # Please read the comment before changing.
|
||||
|
||||
# The home.packages option allows you to install Nix packages into your
|
||||
# environment.
|
||||
home.packages = [
|
||||
pkgs.htop
|
||||
pkgs.firefox
|
||||
pkgs.git
|
||||
pkgs.thunderbird
|
||||
pkgs.neofetch
|
||||
pkgs.tree
|
||||
pkgs.cmake
|
||||
pkgs.gnumake
|
||||
pkgs.clang
|
||||
pkgs.libtool
|
||||
(pkgs.nerdfonts.override { fonts = [ "FiraCode" "DroidSansMono" ]; })
|
||||
|
||||
# # It is sometimes useful to fine-tune packages, for example, by applying
|
||||
# # overrides. You can do that directly here, just don't forget the
|
||||
# # parentheses. Maybe you want to install Nerd Fonts with a limited number of
|
||||
# # fonts?
|
||||
# (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
|
||||
|
||||
# # You can also create simple shell scripts directly inside your
|
||||
# # configuration. For example, this adds a command 'my-hello' to your
|
||||
# # environment:
|
||||
# (pkgs.writeShellScriptBin "my-hello" ''
|
||||
# echo "Hello, ${config.home.username}!"
|
||||
# '')
|
||||
];
|
||||
|
||||
# Home Manager is pretty good at managing dotfiles. The primary way to manage
|
||||
# plain files is through 'home.file'.
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
home.sessionVariables = {
|
||||
EDITOR = "emacs";
|
||||
GIT_EDITOR = "nvim";
|
||||
NIX_SHELL_PRESERVE_PROMPT = 1;
|
||||
};
|
||||
|
||||
# Let Home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
# ENV/APPEARANCE SETTINGS
|
||||
|
||||
fonts.fontconfig = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
# BEGIN PROGRAMS
|
||||
|
||||
programs.bash = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
enableVteIntegration = true;
|
||||
initExtra =''
|
||||
export PS1='\[\e[1;m\e[1;33m\e[1;m\] \W\[\e[m\e[m\] 🐧 \[\e[1;32m\]~> \[\e[m\e[m\]'
|
||||
set -o vi
|
||||
'';
|
||||
shellAliases = {
|
||||
ls = "ls --color=auto";
|
||||
ll = "ls -l";
|
||||
la = "ls -lA";
|
||||
ping = "ping -c 5";
|
||||
kpx = "keepassxc-cli open";
|
||||
nixbuild = "sudo nixos-rebuild switch --flake";
|
||||
nixtest = "sudo nixos-rebuild test --flake";
|
||||
vi = "\vim";
|
||||
emacsd = "emacs --daemon";
|
||||
emacsc = "emacsclient -c -a 'emacs'";
|
||||
neofetch = "neofetch --ascii_distro nixos_small";
|
||||
new = "source $HOME/.bashrc";
|
||||
newbar = "pkill waybar; waybar &disown";
|
||||
".." = "cd ..";
|
||||
set-github-var = "export GITHUB=$(sed -n 2p ~/documents/.git_keys)";
|
||||
set-gitlab-var = "export GITLAB=$(sed -n 4p ~/documents/.git_keys)";
|
||||
};
|
||||
};
|
||||
programs.emacs = {
|
||||
enable = true;
|
||||
# extraPackages = epkgs: [
|
||||
# epkgs.nix-mode
|
||||
# epkgs.magit
|
||||
# ];
|
||||
};
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
package = pkgs.neovim-unwrapped;
|
||||
vimAlias = true;
|
||||
vimdiffAlias = true;
|
||||
};
|
||||
|
||||
|
||||
# BEGIN SERVICES
|
||||
|
||||
services.emacs = {
|
||||
enable = true;
|
||||
client = {
|
||||
enable = true;
|
||||
arguments = [
|
||||
"-c"
|
||||
"-a emacs"
|
||||
];
|
||||
};
|
||||
startWithUserSession = true;
|
||||
};
|
||||
|
||||
services.flameshot = {
|
||||
enable = true;
|
||||
settings = {
|
||||
General = {
|
||||
disabledTrayIcon = true;
|
||||
showStartupLaunchMessage = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.gpg-agent = {
|
||||
enable = true;
|
||||
defaultCacheTtl = 1800;
|
||||
enableSshSupport = true;
|
||||
};
|
||||
|
||||
#services.nexcloud-client.enable = true;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
# main-user.nix
|
||||
{ lib, config, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.main-user;
|
||||
in
|
||||
{
|
||||
options.main-user = {
|
||||
enable
|
||||
= lib.mkEnableOption "enable user module";
|
||||
userName = lib.mkOption {
|
||||
default = "mainuser";
|
||||
description = ''
|
||||
username
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
users.users.${config.main-user.userName} = {
|
||||
isNormalUser = true;
|
||||
initialPasswork = "p4ss";
|
||||
description = "main user";
|
||||
shell = pkgs.bash;
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user