Initial commit
This commit is contained in:
commit
8570b60b0a
12 changed files with 372 additions and 0 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
home-manager/result
|
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
[submodule "dotfiles"]
|
||||||
|
path = dotfiles
|
||||||
|
url = git@git.askiiart.net:askiiart/dotfiles
|
8
backup.sh
Normal file
8
backup.sh
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
SCRIPT_LOCATION=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
|
||||||
|
|
||||||
|
sudo rm -rf $SCRIPT_LOCATION/etc-nixos
|
||||||
|
sudo cp -r /etc/nixos/ $SCRIPT_LOCATION/etc-nixos
|
||||||
|
|
||||||
|
sudo rm -rf $SCRIPT_LOCATION/home-manager
|
||||||
|
sudo cp -r $HOME/.config/home-manager/ $SCRIPT_LOCATION/home-manager
|
1
dotfiles
Submodule
1
dotfiles
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit bdb22ac5128ac61f0702ead6c4911ed39d716bb4
|
117
etc-nixos/configuration.nix
Normal file
117
etc-nixos/configuration.nix
Normal file
|
@ -0,0 +1,117 @@
|
||||||
|
# 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, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
swayConfig = pkgs.writeText "greetd-sway-config" ''
|
||||||
|
# `-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
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
[ # Include the results of the hardware scan.
|
||||||
|
./hardware-configuration.nix
|
||||||
|
./custom.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
# Use the ~~systemd-boot~~ grub EFI boot loader.
|
||||||
|
boot.loader.systemd-boot.enable = false;
|
||||||
|
boot.loader.grub.device = "nodev";
|
||||||
|
boot.loader.grub.efiSupport = true;
|
||||||
|
boot.loader.grub.useOSProber = true;
|
||||||
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
|
networking.hostName = "nixvm"; # 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 = "America/Chicago";
|
||||||
|
|
||||||
|
# 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;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Configure keymap in X11
|
||||||
|
services.xserver.xkb.layout = "us";
|
||||||
|
services.xserver.xkb.options = "eurosign:e,caps:escape";
|
||||||
|
|
||||||
|
# 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;
|
||||||
|
|
||||||
|
# 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
|
||||||
|
# ];
|
||||||
|
|
||||||
|
# Some programs need SUID wrappers, can be configured further or are
|
||||||
|
# started in user sessions.
|
||||||
|
# programs.mtr.enable = 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?
|
||||||
|
|
||||||
|
}
|
96
etc-nixos/custom.nix
Normal file
96
etc-nixos/custom.nix
Normal file
|
@ -0,0 +1,96 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
swayConfig = pkgs.writeText "greetd-sway-config" ''
|
||||||
|
# `-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
|
||||||
|
{
|
||||||
|
# packages
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
environment.systemPackages = [
|
||||||
|
pkgs.mate.mate-polkit
|
||||||
|
pkgs.sway
|
||||||
|
pkgs.swaybg
|
||||||
|
pkgs.swaylock
|
||||||
|
pkgs.j4-dmenu-desktop
|
||||||
|
pkgs.i3status
|
||||||
|
pkgs.clipman
|
||||||
|
pkgs.slurp
|
||||||
|
pkgs.grim
|
||||||
|
pkgs.gnome.zenity
|
||||||
|
pkgs.imagemagick
|
||||||
|
pkgs.greetd.gtkgreet
|
||||||
|
pkgs.fish
|
||||||
|
pkgs.qemu
|
||||||
|
pkgs.home-manager
|
||||||
|
];
|
||||||
|
|
||||||
|
# fix swaylock never unlocking
|
||||||
|
security.pam.services.swaylock = {
|
||||||
|
text = ''
|
||||||
|
auth include login
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
# Set up fish
|
||||||
|
programs.fish.enable = true;
|
||||||
|
|
||||||
|
# polkit (auth agent) config
|
||||||
|
security.polkit.enable = true;
|
||||||
|
|
||||||
|
# Set up greetd (gtkgreet)
|
||||||
|
services.greetd = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
default_session = {
|
||||||
|
command = "${pkgs.sway}/bin/sway --config ${swayConfig}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
environment.etc."greetd/environments".text = ''
|
||||||
|
sway
|
||||||
|
fish
|
||||||
|
bash
|
||||||
|
'';
|
||||||
|
|
||||||
|
# gnupg agent settings
|
||||||
|
programs.gnupg.agent = {
|
||||||
|
enable = true;
|
||||||
|
enableSSHSupport = true;
|
||||||
|
pinentryFlavor = "gnome3";
|
||||||
|
settings = {
|
||||||
|
default-cache-ttl = 60;
|
||||||
|
max-cache-ttl = 120;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||||
|
users.users.askiiart = {
|
||||||
|
isNormalUser = true;
|
||||||
|
extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
|
||||||
|
shell = pkgs.fish;
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd = {
|
||||||
|
user.services.polkit-mate-authentication-agent-1 = {
|
||||||
|
description = "polkit-mate-authentication-agent-1";
|
||||||
|
wantedBy = [ "graphical-session.target" ];
|
||||||
|
wants = [ "graphical-session.target" ];
|
||||||
|
after = [ "graphical-session.target" ];
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "simple";
|
||||||
|
ExecStart = "${pkgs.mate.mate-polkit}/libexec/polkit-mate-authentication-agent-1";
|
||||||
|
Restart = "on-failure";
|
||||||
|
RestartSec = 1;
|
||||||
|
TimeoutStopSec = 10;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
36
etc-nixos/hardware-configuration.nix
Normal file
36
etc-nixos/hardware-configuration.nix
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
# 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/a549bc26-0d1e-4fd4-bd7b-2960933b20fb";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" =
|
||||||
|
{ device = "/dev/disk/by-uuid/8264-AB5D";
|
||||||
|
fsType = "vfat";
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [ ];
|
||||||
|
|
||||||
|
# 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";
|
||||||
|
}
|
30
home-manager/home-manager/home.nix
Normal file
30
home-manager/home-manager/home.nix
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
|
# Home Manager needs a bit of information about you and the
|
||||||
|
# paths it should manage.
|
||||||
|
home.username = "askiiart";
|
||||||
|
home.homeDirectory = "/home/askiiart";
|
||||||
|
|
||||||
|
# This value determines the Home Manager release that your
|
||||||
|
# configuration is compatible with. This helps avoid breakage
|
||||||
|
# when a new Home Manager release introduces backwards
|
||||||
|
# incompatible changes.
|
||||||
|
#
|
||||||
|
# You can update Home Manager without changing this value. See
|
||||||
|
# the Home Manager release notes for a list of state version
|
||||||
|
# changes in each release.
|
||||||
|
home.stateVersion = "23.11";
|
||||||
|
|
||||||
|
# Let Home Manager install and manage itself.
|
||||||
|
programs.home-manager.enable = true;
|
||||||
|
|
||||||
|
imports = [
|
||||||
|
./packages.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
programs.fish.enable = true;
|
||||||
|
programs.bash.enable = true;
|
||||||
|
}
|
22
home-manager/home-manager/packages.nix
Normal file
22
home-manager/home-manager/packages.nix
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
home.packages = [
|
||||||
|
pkgs.librewolf
|
||||||
|
pkgs.thunderbird
|
||||||
|
pkgs.vscode
|
||||||
|
pkgs.kitty
|
||||||
|
pkgs.git
|
||||||
|
pkgs.file
|
||||||
|
pkgs.git-credential-manager
|
||||||
|
pkgs.schildichat-desktop
|
||||||
|
pkgs.vesktop
|
||||||
|
pkgs.protonup-qt
|
||||||
|
pkgs.steam
|
||||||
|
pkgs.mate.eom
|
||||||
|
pkgs.neovim
|
||||||
|
pkgs.virt-manager
|
||||||
|
pkgs.youtube-music
|
||||||
|
pkgs.gparted
|
||||||
|
];
|
||||||
|
}
|
27
home-manager/home.nix
Normal file
27
home-manager/home.nix
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
|
# Home Manager needs a bit of information about you and the
|
||||||
|
# paths it should manage.
|
||||||
|
home.username = "askiiart";
|
||||||
|
home.homeDirectory = "/home/askiiart";
|
||||||
|
|
||||||
|
# This value determines the Home Manager release that your
|
||||||
|
# configuration is compatible with. This helps avoid breakage
|
||||||
|
# when a new Home Manager release introduces backwards
|
||||||
|
# incompatible changes.
|
||||||
|
#
|
||||||
|
# You can update Home Manager without changing this value. See
|
||||||
|
# the Home Manager release notes for a list of state version
|
||||||
|
# changes in each release.
|
||||||
|
home.stateVersion = "23.11";
|
||||||
|
|
||||||
|
# Let Home Manager install and manage itself.
|
||||||
|
programs.home-manager.enable = true;
|
||||||
|
|
||||||
|
imports = [
|
||||||
|
./packages.nix
|
||||||
|
];
|
||||||
|
}
|
21
home-manager/packages.nix
Normal file
21
home-manager/packages.nix
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
home.packages = [
|
||||||
|
pkgs.librewolf
|
||||||
|
pkgs.thunderbird
|
||||||
|
pkgs.vscode
|
||||||
|
pkgs.kitty
|
||||||
|
pkgs.git
|
||||||
|
pkgs.file
|
||||||
|
pkgs.git-credential-manager
|
||||||
|
pkgs.schildichat-desktop
|
||||||
|
pkgs.vesktop
|
||||||
|
pkgs.protonup-qt
|
||||||
|
pkgs.steam
|
||||||
|
pkgs.mate.eom
|
||||||
|
pkgs.neovim
|
||||||
|
pkgs.virt-manager
|
||||||
|
pkgs.youtube-music
|
||||||
|
];
|
||||||
|
}
|
10
restore.sh
Normal file
10
restore.sh
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
SCRIPT_LOCATION=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
|
||||||
|
|
||||||
|
sudo rm -rf /etc/nixos/*
|
||||||
|
sudo mkdir /etc/nixos/
|
||||||
|
sudo cp -r $SCRIPT_LOCATION/etc-nixos/* /etc/nixos/
|
||||||
|
|
||||||
|
sudo rm -rf $HOME/.config/home-manager/
|
||||||
|
sudo mkdir -p $HOME/.config/home-manager/
|
||||||
|
sudo cp -r $SCRIPT_LOCATION/home-manager/* $HOME/.config/home-manager/
|
Loading…
Reference in a new issue