Compare commits
29 Commits
ae59ef84f8
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 3f2875faa9 | |||
| e6328e254b | |||
| b7342e6e6a | |||
| 390392813b | |||
| 3cf8a263c7 | |||
| 9e2b554152 | |||
| 6ce0c1da57 | |||
| 6216fcd751 | |||
| 442f46f622 | |||
| c05821755c | |||
| 87d132cb4f | |||
| 1030d3e37f | |||
| a72167be09 | |||
| ddd508b148 | |||
| 43b7f5dda5 | |||
| b7776cc283 | |||
| 44f0e39204 | |||
| f81f24a954 | |||
| d714d14fcd | |||
| 33e9b6e48f | |||
| 28d3694708 | |||
| 02ded93d14 | |||
| eebaa957af | |||
| 15832ba2f3 | |||
| 70bb31c3f5 | |||
| 0940cc8427 | |||
| 8c79af7feb | |||
| 3964424b46 | |||
| 043c527b64 |
@@ -1,3 +1,7 @@
|
|||||||
# nixos-dotfiles
|
# nixos-dotfiles
|
||||||
|
|
||||||
dotfiles for nixos
|
dotfiles for nixos
|
||||||
|
|
||||||
|
~~referenced heavily on [librephoenix's nixos-config](https://github.com/librephoenix/nixos-config).~~
|
||||||
|
|
||||||
|
This config is now more looks like [sioodmy's config](https://github.com/sioodmy/dotfiles).
|
||||||
|
|||||||
58
flake.lock
generated
58
flake.lock
generated
@@ -1,33 +1,30 @@
|
|||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"home-manager": {
|
"homix": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": "nixpkgs"
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1720042825,
|
"lastModified": 1720719665,
|
||||||
"narHash": "sha256-A0vrUB6x82/jvf17qPCpxaM+ulJnD8YZwH9Ci0BsAzE=",
|
"narHash": "sha256-BKcOoDlMC86zExMKXFXQ04HO99fUNFmtEdvP+gB45Pk=",
|
||||||
"owner": "nix-community",
|
"owner": "sioodmy",
|
||||||
"repo": "home-manager",
|
"repo": "homix",
|
||||||
"rev": "e1391fb22e18a36f57e6999c7a9f966dc80ac073",
|
"rev": "62bc58f2350cbb061e61ac0f3d63018663fbe4cb",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nix-community",
|
"owner": "sioodmy",
|
||||||
"ref": "release-24.05",
|
"repo": "homix",
|
||||||
"repo": "home-manager",
|
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixos-hardware": {
|
"nixos-hardware": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1723310128,
|
"lastModified": 1752666637,
|
||||||
"narHash": "sha256-IiH8jG6PpR4h9TxSGMYh+2/gQiJW9MwehFvheSb5rPc=",
|
"narHash": "sha256-P8J72psdc/rWliIvp8jUpoQ6qRDlVzgSDDlgkaXQ0Fw=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixos-hardware",
|
"repo": "nixos-hardware",
|
||||||
"rev": "c54cf53e022b0b3c1d3b8207aa0f9b194c24f0cf",
|
"rev": "d1bfa8f6ccfb5c383e1eba609c1eb67ca24ed153",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -39,25 +36,40 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1723282977,
|
"lastModified": 1719690277,
|
||||||
"narHash": "sha256-oTK91aOlA/4IsjNAZGMEBz7Sq1zBS0Ltu4/nIQdYDOg=",
|
"narHash": "sha256-0xSej1g7eP2kaUF+JQp8jdyNmpmCJKRpO12mKl/36Kc=",
|
||||||
"owner": "nixos",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "a781ff33ae258bbcfd4ed6e673860c3e923bf2cc",
|
"rev": "2741b4b489b55df32afac57bc4bfd220e8bf617e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nixos",
|
"owner": "NixOS",
|
||||||
"ref": "nixos-24.05",
|
"ref": "nixos-unstable",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nixpkgs_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1752687322,
|
||||||
|
"narHash": "sha256-RKwfXA4OZROjBTQAl9WOZQFm7L8Bo93FQwSJpAiSRvo=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "6e987485eb2c77e5dcc5af4e3c70843711ef9251",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"id": "nixpkgs",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"type": "indirect"
|
||||||
|
}
|
||||||
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"home-manager": "home-manager",
|
"homix": "homix",
|
||||||
"nixos-hardware": "nixos-hardware",
|
"nixos-hardware": "nixos-hardware",
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs_2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
64
flake.nix
64
flake.nix
@@ -2,66 +2,24 @@
|
|||||||
description = "kenryuS nixos configurations/dotfiles";
|
description = "kenryuS nixos configurations/dotfiles";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-24.05";
|
nixpkgs.url = "nixpkgs/nixos-unstable";
|
||||||
home-manager.url = "github:nix-community/home-manager/release-24.05";
|
homix.url = "github:sioodmy/homix";
|
||||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs@{ nixpkgs, home-manager, ... }:
|
outputs = inputs@{ self, nixpkgs, homix, ... }:
|
||||||
let
|
let
|
||||||
systemSettings = {
|
|
||||||
system = "x86_64-linux";
|
|
||||||
hostname = "kenryu-nixos";
|
|
||||||
machine = "workstation";
|
|
||||||
timezone = "Asia/Tokyo";
|
|
||||||
locale = "ja_JP.UTF-8";
|
|
||||||
bootConf = {
|
|
||||||
mode = "uefi";
|
|
||||||
mountPath = "/boot";
|
|
||||||
grubDev = "";
|
|
||||||
};
|
|
||||||
gpuType = "nvidia";
|
|
||||||
};
|
|
||||||
|
|
||||||
userSettings = {
|
|
||||||
username = "kenryus";
|
|
||||||
name = "Kenryu Shibata";
|
|
||||||
email-dev = "kenryudev5894@gmail.com";
|
|
||||||
dotfilesDir = "/etc/nixos";
|
|
||||||
editor = "nvim";
|
|
||||||
editor-pkg = pkgs.neovim;
|
|
||||||
};
|
|
||||||
|
|
||||||
pkgs = import inputs.nixpkgs {
|
pkgs = import inputs.nixpkgs {
|
||||||
system = systemSettings.system;
|
system = "x86_64-linux";
|
||||||
config = {
|
|
||||||
allowUnfree = true;
|
|
||||||
allowUnfreePredicate = (_: true);
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
lib = inputs.nixpkgs.lib;
|
lib = inputs.nixpkgs.lib;
|
||||||
home-manager = inputs.home-manager;
|
in
|
||||||
in {
|
{
|
||||||
nixosConfigurations.system = lib.nixosSystem {
|
nixosModules = {
|
||||||
system = systemSettings.system;
|
homix = homix.nixosModules.default;
|
||||||
modules = [
|
};
|
||||||
(./. + "/machines" + ("/" + systemSettings.machine) + "/configuration.nix")
|
nixosConfigurations = import ./hosts inputs;
|
||||||
home-manager.nixosModules.home-manager {
|
|
||||||
home-manager.useGlobalPkgs = true;
|
|
||||||
home-manager.useUserPackages = true;
|
|
||||||
home-manager.users.${userSettings.username} = import (./. + "/machines" + ("/" + systemSettings.machine) + "/home.nix");
|
|
||||||
home-manager.extraSpecialArgs = {
|
|
||||||
inherit userSettings;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
|
||||||
specialArgs = {
|
|
||||||
inherit systemSettings;
|
|
||||||
inherit userSettings;
|
|
||||||
inherit inputs;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
20
hosts/default.nix
Normal file
20
hosts/default.nix
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
{ self, nixpkgs, ... }:
|
||||||
|
let
|
||||||
|
inherit (self) inputs;
|
||||||
|
mkHost = name:
|
||||||
|
nixpkgs.lib.nixosSystem {
|
||||||
|
modules = [
|
||||||
|
./${name}
|
||||||
|
../overlays
|
||||||
|
] ++ builtins.attrValues self.nixosModules;
|
||||||
|
|
||||||
|
specialArgs = {
|
||||||
|
inherit inputs;
|
||||||
|
systemSettings = import ./${name}/systemSettings.nix;
|
||||||
|
userSettings = import ../user/userSettings.nix;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
syushiki = mkHost "syushiki";
|
||||||
|
}
|
||||||
52
hosts/syushiki/default.nix
Normal file
52
hosts/syushiki/default.nix
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
{ config, lib, pkgs, modulesPath, systemSettings, ... }: {
|
||||||
|
imports = [
|
||||||
|
../../system
|
||||||
|
../../system/nvidia
|
||||||
|
../../user
|
||||||
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
fileSystems."/" =
|
||||||
|
{ device = "/dev/disk/by-uuid/f4c95da6-3c6b-4414-a62a-c8c26c4a1c73";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" =
|
||||||
|
{ device = "/dev/disk/by-uuid/C83C-841F";
|
||||||
|
fsType = "vfat";
|
||||||
|
options = [ "fmask=0077" "dmask=0077" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/run/media/kenryus/hdd" = {
|
||||||
|
device = "/dev/disk/by-uuid/0d146628-12f4-4bb6-abde-bbf798a57c25";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices =
|
||||||
|
[ { device = "/dev/disk/by-uuid/d933c349-8e70-41e1-8d13-605656dba18b"; }
|
||||||
|
];
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault systemSettings.system;
|
||||||
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
|
||||||
|
# Use the systemd-boot EFI boot loader.
|
||||||
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
|
programs.appimage = {
|
||||||
|
enable = true;
|
||||||
|
binfmt = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
|
||||||
|
|
||||||
|
# Open ports in the firewall.
|
||||||
|
networking.firewall.allowedTCPPorts = [ 3000 3001 22 ];
|
||||||
|
|
||||||
|
system.stateVersion = "24.05"; # Did you read the changelog?
|
||||||
|
}
|
||||||
6
hosts/syushiki/systemSettings.nix
Normal file
6
hosts/syushiki/systemSettings.nix
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
system = "x86_64-linux";
|
||||||
|
hostname = "kenryu-nixos";
|
||||||
|
timezone = "Asia/Tokyo";
|
||||||
|
locale = "ja_JP.UTF-8";
|
||||||
|
}
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
{ pkgs, lib, config, systemSettings, userSettings, ... }:
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
../system/hardware/audio.nix
|
|
||||||
../system/hardware/time.nix
|
|
||||||
../system/services/network-manager.nix
|
|
||||||
../system/utils.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
time.timeZone = systemSettings.timezone;
|
|
||||||
|
|
||||||
networking.hostName = systemSettings.hostname;
|
|
||||||
|
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
|
||||||
|
|
||||||
i18n.defaultLocale = systemSettings.locale;
|
|
||||||
i18n.extraLocaleSettings = {
|
|
||||||
LC_ADDRESS = systemSettings.locale;
|
|
||||||
LC_IDENTIFICATION = systemSettings.locale;
|
|
||||||
LC_MEASUREMENT = systemSettings.locale;
|
|
||||||
LC_MONETARY = systemSettings.locale;
|
|
||||||
LC_NAME = systemSettings.locale;
|
|
||||||
LC_NUMERIC = systemSettings.locale;
|
|
||||||
LC_PAPER = systemSettings.locale;
|
|
||||||
LC_TELEPHONE = systemSettings.locale;
|
|
||||||
LC_TIME = systemSettings.locale;
|
|
||||||
};
|
|
||||||
|
|
||||||
users.users.${userSettings.username} = {
|
|
||||||
isNormalUser = true;
|
|
||||||
description = userSettings.name;
|
|
||||||
extraGroups = [ "networkmanager" "wheel" ];
|
|
||||||
packages = with pkgs; [];
|
|
||||||
uid = 1000;
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.shells = with pkgs; [ bash ];
|
|
||||||
users.defaultUserShell = pkgs.bash;
|
|
||||||
}
|
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
# 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, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports =
|
|
||||||
[ # Include the results of the hardware scan.
|
|
||||||
./hardware-configuration.nix
|
|
||||||
../base.nix
|
|
||||||
../../system/services/cups.nix
|
|
||||||
../../system/services/ssh.nix
|
|
||||||
../../system/hardware/kernel.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
# Use the systemd-boot EFI boot loader.
|
|
||||||
boot.loader.systemd-boot.enable = true;
|
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
|
||||||
|
|
||||||
# Configure keymap in X11
|
|
||||||
# services.xserver.xkb.layout = "us";
|
|
||||||
# services.xserver.xkb.options = "eurosign:e,caps:escape";
|
|
||||||
|
|
||||||
# Open ports in the firewall.
|
|
||||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
|
||||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
|
||||||
# Or disable the firewall altogether.
|
|
||||||
# networking.firewall.enable = false;
|
|
||||||
|
|
||||||
# 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 - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how
|
|
||||||
# to actually do that.
|
|
||||||
#
|
|
||||||
# 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 = "24.05"; # Did you read the comment?
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
# 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 + "/installer/scan/not-detected.nix")
|
|
||||||
];
|
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
|
|
||||||
boot.initrd.kernelModules = [ ];
|
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
|
||||||
boot.extraModulePackages = [ ];
|
|
||||||
|
|
||||||
fileSystems."/" =
|
|
||||||
{ device = "/dev/disk/by-uuid/f4c95da6-3c6b-4414-a62a-c8c26c4a1c73";
|
|
||||||
fsType = "ext4";
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/boot" =
|
|
||||||
{ device = "/dev/disk/by-uuid/C83C-841F";
|
|
||||||
fsType = "vfat";
|
|
||||||
options = [ "fmask=0077" "dmask=0077" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
swapDevices =
|
|
||||||
[ { device = "/dev/disk/by-uuid/d933c349-8e70-41e1-8d13-605656dba18b"; }
|
|
||||||
];
|
|
||||||
|
|
||||||
# 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.enp4s0.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.wlo1.useDHCP = lib.mkDefault true;
|
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
|
||||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
||||||
}
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
{ pkgs, userSettings, ... }:
|
|
||||||
{
|
|
||||||
home.username = userSettings.username;
|
|
||||||
home.homeDirectory = "/home/" + userSettings.username;
|
|
||||||
|
|
||||||
programs.home-manager.enable = true;
|
|
||||||
|
|
||||||
imports = [];
|
|
||||||
|
|
||||||
home.stateVersion = "24.05";
|
|
||||||
|
|
||||||
home.packages = with pkgs; [];
|
|
||||||
}
|
|
||||||
11
overlays/default.nix
Normal file
11
overlays/default.nix
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
{
|
||||||
|
nixpkgs.overlays = [
|
||||||
|
(final: prev: {
|
||||||
|
qemu_full = prev.qemu_full.override {
|
||||||
|
cephSupport = false;
|
||||||
|
xenSupport = false;
|
||||||
|
};
|
||||||
|
})
|
||||||
|
];
|
||||||
|
}
|
||||||
23
system/audio/default.nix
Normal file
23
system/audio/default.nix
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
services.pulseaudio = {
|
||||||
|
support32Bit = true;
|
||||||
|
daemon.config = {
|
||||||
|
flat-volumes = "yes";
|
||||||
|
};
|
||||||
|
package = pkgs.pulseaudioFull;
|
||||||
|
};
|
||||||
|
|
||||||
|
security.rtkit.enable = true;
|
||||||
|
#services.pipewire = {
|
||||||
|
# enable = true;
|
||||||
|
# alsa.enable = true;
|
||||||
|
# alsa.support32Bit = true;
|
||||||
|
# pulse.enable = true;
|
||||||
|
# jack.enable = true;
|
||||||
|
#};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
alsa-utils
|
||||||
|
];
|
||||||
|
}
|
||||||
19
system/default.nix
Normal file
19
system/default.nix
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
{ pkgs, ... }: {
|
||||||
|
imports = [
|
||||||
|
./audio
|
||||||
|
./bluetooth
|
||||||
|
./inputMethods
|
||||||
|
./kernel
|
||||||
|
./locale
|
||||||
|
./network
|
||||||
|
./nix
|
||||||
|
./opengl
|
||||||
|
./time
|
||||||
|
./users
|
||||||
|
./services
|
||||||
|
./vnc
|
||||||
|
./wm
|
||||||
|
./env.nix
|
||||||
|
./utils.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
6
system/env.nix
Normal file
6
system/env.nix
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
environment.variables = {
|
||||||
|
EDITOR = "vim";
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
{ ... }:
|
|
||||||
{
|
|
||||||
hardware.pulseaudio.enable = true;
|
|
||||||
}
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
{ config, pkgs, ... }:
|
|
||||||
{
|
|
||||||
boot.kernelPackages = pkgs.linuxPackages_xanmod_stable;
|
|
||||||
boot.consoleLogLevel = 3;
|
|
||||||
}
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
{ pkgs, ... }:
|
|
||||||
{
|
|
||||||
hardware.opengl.enable = true;
|
|
||||||
hardware.opengl.extraPackages = with pkgs; [
|
|
||||||
mesa
|
|
||||||
];
|
|
||||||
}
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
{ ... }:
|
|
||||||
{
|
|
||||||
services.timesyncd.enable = true;
|
|
||||||
}
|
|
||||||
17
system/inputMethods/default.nix
Normal file
17
system/inputMethods/default.nix
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
{ config, lib, pkgs, systemSettings, ... }:
|
||||||
|
{
|
||||||
|
i18n = {
|
||||||
|
inputMethod = {
|
||||||
|
enable = true;
|
||||||
|
type = "fcitx5";
|
||||||
|
fcitx5 = {
|
||||||
|
waylandFrontend = true;
|
||||||
|
plasma6Support = true;
|
||||||
|
addons = with pkgs; [
|
||||||
|
fcitx5-mozc
|
||||||
|
fcitx5-skk
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
5
system/kernel/default.nix
Normal file
5
system/kernel/default.nix
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
boot.kernelPackages = pkgs.linuxPackages;
|
||||||
|
boot.consoleLogLevel = 3;
|
||||||
|
}
|
||||||
14
system/locale/default.nix
Normal file
14
system/locale/default.nix
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
{ systemSettings, ... }: {
|
||||||
|
i18n.defaultLocale = systemSettings.locale;
|
||||||
|
i18n.extraLocaleSettings = {
|
||||||
|
LC_ADDRESS = systemSettings.locale;
|
||||||
|
LC_IDENTIFICATION = systemSettings.locale;
|
||||||
|
LC_MEASUREMENT = systemSettings.locale;
|
||||||
|
LC_MONETARY = systemSettings.locale;
|
||||||
|
LC_NAME = systemSettings.locale;
|
||||||
|
LC_NUMERIC = systemSettings.locale;
|
||||||
|
LC_PAPER = systemSettings.locale;
|
||||||
|
LC_TELEPHONE = systemSettings.locale;
|
||||||
|
LC_TIME = systemSettings.locale;
|
||||||
|
};
|
||||||
|
}
|
||||||
9
system/network/default.nix
Normal file
9
system/network/default.nix
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{ systemSettings, ... }:
|
||||||
|
{
|
||||||
|
networking = {
|
||||||
|
hostName = systemSettings.hostname;
|
||||||
|
networkmanager.enable = true;
|
||||||
|
firewall.enable = true;
|
||||||
|
};
|
||||||
|
systemd.services.NetworkManager-wait-online.enable = false;
|
||||||
|
}
|
||||||
34
system/nix/default.nix
Normal file
34
system/nix/default.nix
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
{ ... }: {
|
||||||
|
nix = {
|
||||||
|
gc.automatic = false;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
auto-optimise-store = true;
|
||||||
|
builders-use-substitutes = true;
|
||||||
|
allowed-users = ["@wheel"];
|
||||||
|
trusted-users = ["@wheel"];
|
||||||
|
commit-lockfile-summary = "Update flake.lock";
|
||||||
|
accept-flake-config = true;
|
||||||
|
keep-derivations = true;
|
||||||
|
keep-outputs = true;
|
||||||
|
warn-dirty = false;
|
||||||
|
sandbox = true;
|
||||||
|
max-jobs = "auto";
|
||||||
|
log-lines = 30;
|
||||||
|
experimental-features = [ "nix-command" "flakes" ];
|
||||||
|
substituters = [
|
||||||
|
"https://cache.nixos.org"
|
||||||
|
];
|
||||||
|
trusted-public-keys = [
|
||||||
|
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
nixpkgs = {
|
||||||
|
config = {
|
||||||
|
allowUnfree = true;
|
||||||
|
allowBroken = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
13
system/nvidia/default.nix
Normal file
13
system/nvidia/default.nix
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
{
|
||||||
|
services.xserver.videoDrivers = [ "nvidia" ];
|
||||||
|
|
||||||
|
hardware.nvidia = {
|
||||||
|
modesetting.enable = true;
|
||||||
|
powerManagement.enable = false;
|
||||||
|
powerManagement.finegrained = false;
|
||||||
|
nvidiaSettings = true;
|
||||||
|
open = false;
|
||||||
|
package = config.boot.kernelPackages.nvidiaPackages.production;
|
||||||
|
};
|
||||||
|
}
|
||||||
8
system/opengl/default.nix
Normal file
8
system/opengl/default.nix
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
hardware.graphics.enable = true;
|
||||||
|
hardware.graphics.enable32Bit = true;
|
||||||
|
hardware.graphics.extraPackages = with pkgs; [
|
||||||
|
mesa
|
||||||
|
];
|
||||||
|
}
|
||||||
13
system/services/default.nix
Normal file
13
system/services/default.nix
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
{ ... }: {
|
||||||
|
imports = [
|
||||||
|
./cups
|
||||||
|
./docker
|
||||||
|
./flatpak
|
||||||
|
./libvirtd
|
||||||
|
./podman
|
||||||
|
./polkit
|
||||||
|
./ssh
|
||||||
|
./steam
|
||||||
|
./tailscale
|
||||||
|
];
|
||||||
|
}
|
||||||
19
system/services/docker/default.nix
Normal file
19
system/services/docker/default.nix
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
{ pkgs, config, lib, ... }:
|
||||||
|
{
|
||||||
|
virtualisation.containers.enable = true;
|
||||||
|
|
||||||
|
virtualisation.docker = {
|
||||||
|
enable = true;
|
||||||
|
storageDriver = "overlay2";
|
||||||
|
enableOnBoot = true;
|
||||||
|
daemon.settings = {
|
||||||
|
features.cdi = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
docker
|
||||||
|
docker-compose
|
||||||
|
docker-buildx
|
||||||
|
];
|
||||||
|
}
|
||||||
4
system/services/flatpak/default.nix
Normal file
4
system/services/flatpak/default.nix
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
services.flatpak.enable = true;
|
||||||
|
}
|
||||||
16
system/services/libvirtd/default.nix
Normal file
16
system/services/libvirtd/default.nix
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
virtualisation.libvirtd = {
|
||||||
|
enable = true;
|
||||||
|
allowedBridges = [
|
||||||
|
"virbr0"
|
||||||
|
"nm-bridge"
|
||||||
|
];
|
||||||
|
qemu.package = pkgs.qemu_full;
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
qemu-utils
|
||||||
|
virt-manager
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
{ ... }:
|
|
||||||
{
|
|
||||||
networking.networkmanager.enable = true;
|
|
||||||
}
|
|
||||||
20
system/services/podman/default.nix
Normal file
20
system/services/podman/default.nix
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
{
|
||||||
|
virtualisation.containers.enable = true;
|
||||||
|
|
||||||
|
virtualisation.podman = {
|
||||||
|
enable = true;
|
||||||
|
dockerCompat = false;
|
||||||
|
dockerSocket.enable = false;
|
||||||
|
defaultNetwork.settings.dns_enabled = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
dive
|
||||||
|
virtiofsd
|
||||||
|
podman-tui
|
||||||
|
podman-compose
|
||||||
|
];
|
||||||
|
|
||||||
|
hardware.nvidia-container-toolkit.enable = true;
|
||||||
|
}
|
||||||
4
system/services/polkit/default.nix
Normal file
4
system/services/polkit/default.nix
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{ pkgs, lib, config, ... }:
|
||||||
|
{
|
||||||
|
security.polkit.enable = true;
|
||||||
|
}
|
||||||
6
system/services/steam/default.nix
Normal file
6
system/services/steam/default.nix
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
environment.systemPackages = [ pkgs.steam ];
|
||||||
|
programs.steam.enable = true;
|
||||||
|
programs.steam.fontPackages = with pkgs; [ ipafont ];
|
||||||
|
}
|
||||||
8
system/services/tailscale/default.nix
Normal file
8
system/services/tailscale/default.nix
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
services.tailscale = {
|
||||||
|
enable = true;
|
||||||
|
openFirewall = true;
|
||||||
|
interfaceName = "tailscale0";
|
||||||
|
};
|
||||||
|
}
|
||||||
6
system/time/default.nix
Normal file
6
system/time/default.nix
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{ systemSettings, ... }:
|
||||||
|
{
|
||||||
|
time.timeZone = systemSettings.timezone;
|
||||||
|
|
||||||
|
services.timesyncd.enable = true;
|
||||||
|
}
|
||||||
40
system/users/default.nix
Normal file
40
system/users/default.nix
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
{ pkgs, config, userSettings, ... }: {
|
||||||
|
users.users.${userSettings.username} = {
|
||||||
|
isNormalUser = true;
|
||||||
|
description = userSettings.name;
|
||||||
|
extraGroups = [
|
||||||
|
"networkmanager"
|
||||||
|
"wheel"
|
||||||
|
"docker"
|
||||||
|
"podman"
|
||||||
|
"input"
|
||||||
|
"flatpak"
|
||||||
|
"dialout"
|
||||||
|
"video"
|
||||||
|
"audio"
|
||||||
|
"libvirtd"
|
||||||
|
"nix"
|
||||||
|
"power"
|
||||||
|
"docker"
|
||||||
|
];
|
||||||
|
uid = 1000;
|
||||||
|
homix = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
users.defaultUserShell = pkgs.bash;
|
||||||
|
|
||||||
|
security.sudo = {
|
||||||
|
enable = true;
|
||||||
|
extraRules = [
|
||||||
|
{
|
||||||
|
commands =
|
||||||
|
builtins.map (command: {
|
||||||
|
command = "/run/current-system/sw/bin/${command}";
|
||||||
|
options = ["NOPASSWD"];
|
||||||
|
})
|
||||||
|
[ "poweroff" "reboot" "nixos-rebuild" "systemctl" "nmtui" "tailscale" ];
|
||||||
|
groups = [ "wheel" ];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -4,9 +4,13 @@
|
|||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
vim
|
vim
|
||||||
wget
|
wget
|
||||||
|
file
|
||||||
|
eza
|
||||||
|
jq
|
||||||
|
killall
|
||||||
htop
|
htop
|
||||||
|
btop
|
||||||
mc
|
mc
|
||||||
git
|
|
||||||
parted
|
parted
|
||||||
tree
|
tree
|
||||||
tmux
|
tmux
|
||||||
|
|||||||
11
system/vnc/default.nix
Normal file
11
system/vnc/default.nix
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{ pkgs, lib, ... }:
|
||||||
|
let
|
||||||
|
use-vnc = pkgs.callPackage ./use-vnc-script.nix { };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
x11vnc
|
||||||
|
wayvnc
|
||||||
|
use-vnc
|
||||||
|
];
|
||||||
|
}
|
||||||
10
system/vnc/use-vnc-script.nix
Normal file
10
system/vnc/use-vnc-script.nix
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{ pkgs, lib, ... }:
|
||||||
|
pkgs.writeShellScriptBin "use-vnc" ''
|
||||||
|
if [[ $XDG_SESSION_TYPE == "x11" ]]; then
|
||||||
|
x11vnc -display :0 &
|
||||||
|
else
|
||||||
|
wayvnc 0.0.0.0 &
|
||||||
|
fi
|
||||||
|
|
||||||
|
sudo echo $! > /var/run/use-vnc.pid
|
||||||
|
''
|
||||||
9
system/wm/dbus/default.nix
Normal file
9
system/wm/dbus/default.nix
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
services.dbus = {
|
||||||
|
enable = true;
|
||||||
|
packages = [ pkgs.dconf ];
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.dconf.enable = true;
|
||||||
|
}
|
||||||
11
system/wm/default.nix
Normal file
11
system/wm/default.nix
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{ ... }: {
|
||||||
|
imports = [
|
||||||
|
./dbus
|
||||||
|
./fonts
|
||||||
|
./gnome-keyring
|
||||||
|
./plasma
|
||||||
|
./sddm
|
||||||
|
./sway
|
||||||
|
./xmonad
|
||||||
|
];
|
||||||
|
}
|
||||||
11
system/wm/fonts/default.nix
Normal file
11
system/wm/fonts/default.nix
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
fonts.packages = with pkgs; [
|
||||||
|
_0xproto
|
||||||
|
nerd-fonts._0xproto
|
||||||
|
ipafont
|
||||||
|
takao
|
||||||
|
noto-fonts-cjk-serif
|
||||||
|
noto-fonts-cjk-sans
|
||||||
|
];
|
||||||
|
}
|
||||||
4
system/wm/gnome-keyring/default.nix
Normal file
4
system/wm/gnome-keyring/default.nix
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
services.gnome.gnome-keyring.enable = true;
|
||||||
|
}
|
||||||
11
system/wm/plasma/default.nix
Normal file
11
system/wm/plasma/default.nix
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
../dbus
|
||||||
|
];
|
||||||
|
services.desktopManager.plasma6.enable = true;
|
||||||
|
|
||||||
|
environment.plasma6.excludePackages = with pkgs.kdePackages; [
|
||||||
|
plasma-browser-integration
|
||||||
|
];
|
||||||
|
}
|
||||||
32
system/wm/sddm/default.nix
Normal file
32
system/wm/sddm/default.nix
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
../fonts
|
||||||
|
../dbus
|
||||||
|
../gnome-keyring
|
||||||
|
../xmonad
|
||||||
|
../sway
|
||||||
|
../plasma
|
||||||
|
];
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
wayland
|
||||||
|
];
|
||||||
|
|
||||||
|
services.displayManager.sddm = lib.mkDefault {
|
||||||
|
enable = true;
|
||||||
|
wayland.enable = true;
|
||||||
|
package = pkgs.sddm;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.xserver = {
|
||||||
|
enable = true;
|
||||||
|
xkb = {
|
||||||
|
layout = "us";
|
||||||
|
variant = "";
|
||||||
|
options = "";
|
||||||
|
};
|
||||||
|
dpi = 96;
|
||||||
|
excludePackages = [ pkgs.xterm ];
|
||||||
|
};
|
||||||
|
}
|
||||||
12
system/wm/sway/default.nix
Normal file
12
system/wm/sway/default.nix
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{ pkgs, lib, config, ... }:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
../gnome-keyring
|
||||||
|
../dbus
|
||||||
|
];
|
||||||
|
|
||||||
|
programs.sway = {
|
||||||
|
enable = true;
|
||||||
|
wrapperFeatures.gtk = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
7
system/wm/xmonad/default.nix
Normal file
7
system/wm/xmonad/default.nix
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
services.xserver.windowManager.xmonad = {
|
||||||
|
enable = true;
|
||||||
|
enableContribAndExtras = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
3
user/README.md
Normal file
3
user/README.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
* `packages`: packages that have zero to few configs and do not require any wrapping
|
||||||
|
* `wrapped`: packages that is wrapped with extensive config
|
||||||
|
* `homed`: packages that has configuration on common home directory.
|
||||||
7
user/default.nix
Normal file
7
user/default.nix
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{ ... }: {
|
||||||
|
imports = [
|
||||||
|
./packages
|
||||||
|
./homed
|
||||||
|
./wrapped
|
||||||
|
];
|
||||||
|
}
|
||||||
10
user/homed/default.nix
Normal file
10
user/homed/default.nix
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./git
|
||||||
|
./polybar
|
||||||
|
./profile
|
||||||
|
./xmonad
|
||||||
|
./zed-editor
|
||||||
|
];
|
||||||
|
}
|
||||||
19
user/homed/git/default.nix
Normal file
19
user/homed/git/default.nix
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
{ config, pkgs, userSettings, ... }:
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
git
|
||||||
|
gh
|
||||||
|
];
|
||||||
|
|
||||||
|
homix.".gitconfig".text = ''
|
||||||
|
[user]
|
||||||
|
email = ${userSettings.email-dev}
|
||||||
|
name = ${userSettings.name}
|
||||||
|
[credential "https://github.com"]
|
||||||
|
helper =
|
||||||
|
helper = ${pkgs.gh}/bin/gh auth git-credential
|
||||||
|
[credential "https://gist.github.com"]
|
||||||
|
helper =
|
||||||
|
helper = ${pkgs.gh}/bin/gh auth git-credential
|
||||||
|
'';
|
||||||
|
}
|
||||||
15
user/homed/polybar/default.nix
Normal file
15
user/homed/polybar/default.nix
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
let
|
||||||
|
bar-launcher = conf: bar:
|
||||||
|
pkgs.writeShellScriptBin "launch-polybar-${conf}" ''
|
||||||
|
killall -q polybar
|
||||||
|
polybar -c ~/.config/polybar/${conf}.ini ${bar} 2>&1 | tee /tmp/polybar.log & disown
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
{
|
||||||
|
environment.systemPackages = [
|
||||||
|
pkgs.polybar
|
||||||
|
(bar-launcher "xmonadAppTray" "apptray")
|
||||||
|
];
|
||||||
|
homix.".config/polybar/xmonadAppTray.ini".source = ./xmonadAppTray.ini;
|
||||||
|
}
|
||||||
15
user/homed/polybar/xmonadAppTray.ini
Normal file
15
user/homed/polybar/xmonadAppTray.ini
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
[bar/apptray]
|
||||||
|
monitor-strict = false
|
||||||
|
bottom = false
|
||||||
|
width = 7%
|
||||||
|
height = 24px
|
||||||
|
offset-x = 93%
|
||||||
|
modules-right = tray
|
||||||
|
foreground = #ffffff00
|
||||||
|
background = #000000A0
|
||||||
|
border-color = #000000
|
||||||
|
|
||||||
|
[module/tray]
|
||||||
|
type = internal/tray
|
||||||
|
tray-spacing = 2px
|
||||||
|
format-margin = 4px
|
||||||
4
user/homed/profile/default.nix
Normal file
4
user/homed/profile/default.nix
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{ config, ... }:
|
||||||
|
{
|
||||||
|
homix.".profile".source = ./profile;
|
||||||
|
}
|
||||||
3
user/homed/profile/profile
Normal file
3
user/homed/profile/profile
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
export XDG_DATA_DIRS=$XDG_DATA_DIRS:/usr/share:/var/lib/flatpak/exports/share:$HOME/.local/share/flatpak/exports/share
|
||||||
|
|
||||||
|
export PATH="$PATH:${XDG_BIN_HOME:-$HOME/.local/bin}"
|
||||||
4
user/homed/xmonad/README.md
Normal file
4
user/homed/xmonad/README.md
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
xmobar weather station
|
||||||
|
|
||||||
|
- *RJNG*: Gifu Air Base
|
||||||
|
- *RJGG*: Nagoya Airport
|
||||||
18
user/homed/xmonad/default.nix
Normal file
18
user/homed/xmonad/default.nix
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
xmobar
|
||||||
|
dunst
|
||||||
|
networkmanagerapplet
|
||||||
|
rofi
|
||||||
|
feh
|
||||||
|
pavucontrol
|
||||||
|
xorg.xkill
|
||||||
|
xdg-utils
|
||||||
|
xdg-desktop-portal
|
||||||
|
xdg-desktop-portal-gtk
|
||||||
|
];
|
||||||
|
|
||||||
|
#homix.".config/xmonad/xmonad.hs".source = ./xmonad.hs;
|
||||||
|
#homix.".config/xmobar/xmobarrc".source = ./xmobarrc;
|
||||||
|
}
|
||||||
46
user/homed/xmonad/xmobarrc
Normal file
46
user/homed/xmonad/xmobarrc
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
Config { font = "DejaVu Sans Mono 9"
|
||||||
|
, additionalFonts = ["DejaVu Sans Mono italic 9"]
|
||||||
|
, borderColor = "black"
|
||||||
|
, border = FullB
|
||||||
|
, bgColor = "black"
|
||||||
|
, fgColor = "whitesmoke"
|
||||||
|
, alpha = 160
|
||||||
|
, position = TopSize L 93 24
|
||||||
|
, textOffset = -1
|
||||||
|
, iconOffset = -1
|
||||||
|
, lowerOnStart = True
|
||||||
|
, pickBroadest = False
|
||||||
|
, persistent = False
|
||||||
|
, hideOnStart = False
|
||||||
|
, iconRoot = "."
|
||||||
|
, allDesktops = True
|
||||||
|
, overrideRedirect = False
|
||||||
|
, textOutputFormat = Ansi
|
||||||
|
, commands = [ Run Weather "RJNG" ["-t","@<station> <tempC>C, <rh>%, <pressure>hPa",
|
||||||
|
"-L","18","-H","25",
|
||||||
|
"--normal","green",
|
||||||
|
"--high","red",
|
||||||
|
"--low","lightblue"] 36000
|
||||||
|
, Run Weather "RJGG" ["-t","@<station> <tempC>C, <rh>%, <pressure>hPa",
|
||||||
|
"-L", "18", "-H", "25",
|
||||||
|
"--normal", "green",
|
||||||
|
"--high", "red",
|
||||||
|
"--low", "lightblue"] 36000
|
||||||
|
, Run Network "wlo1" ["-L","0","-H","32",
|
||||||
|
"--normal","green","--high","red"] 10
|
||||||
|
, Run Network "enp4s0" ["-L","0","-H","32",
|
||||||
|
"--normal","green","--high","red"] 10
|
||||||
|
, Run Cpu ["-L","3","-H","50",
|
||||||
|
"--normal","green","--high","red"] 10
|
||||||
|
, Run Memory ["-t","Mem: <usedratio>%"] 10
|
||||||
|
, Run Swap [] 10
|
||||||
|
, Run Com "uname" ["-s","-r"] "" 36000
|
||||||
|
, Run Date "%a %b %_d %Y %H:%M:%S" "date" 10
|
||||||
|
, Run StdinReader
|
||||||
|
]
|
||||||
|
, sepChar = "%"
|
||||||
|
, alignSep = "}{"
|
||||||
|
, template = "%StdinReader% | %cpu% | <box>%memory% * %swap%</box> | %wlo1% - %enp4s0% }\
|
||||||
|
\{ %RJNG% <fc=#ee9a00><fn=1>%date%</fn></fc>"
|
||||||
|
}
|
||||||
|
|
||||||
221
user/homed/xmonad/xmonad.hs
Normal file
221
user/homed/xmonad/xmonad.hs
Normal file
@@ -0,0 +1,221 @@
|
|||||||
|
import XMonad
|
||||||
|
import Data.Monoid
|
||||||
|
import System.Exit
|
||||||
|
|
||||||
|
-- XMonad Contrib
|
||||||
|
import XMonad.Actions.Submap
|
||||||
|
import XMonad.Actions.Minimize
|
||||||
|
import XMonad.Actions.CopyWindow
|
||||||
|
import XMonad.Actions.CycleWS
|
||||||
|
import XMonad.Hooks.DynamicLog
|
||||||
|
import XMonad.Hooks.ManageDocks
|
||||||
|
import XMonad.Hooks.ManageHelpers
|
||||||
|
import XMonad.Layout.Gaps
|
||||||
|
import XMonad.Layout.Minimize
|
||||||
|
import XMonad.Layout.NoBorders
|
||||||
|
import XMonad.Layout.Tabbed
|
||||||
|
import XMonad.Util.Run
|
||||||
|
import XMonad.Util.Run(spawnPipe)
|
||||||
|
import XMonad.Util.SpawnOnce
|
||||||
|
|
||||||
|
import qualified XMonad.StackSet as W
|
||||||
|
import qualified Data.Map as M
|
||||||
|
|
||||||
|
-- Main Terminal Program
|
||||||
|
term :: String
|
||||||
|
term = "alacritty"
|
||||||
|
|
||||||
|
-- Launcher Program
|
||||||
|
menu :: String
|
||||||
|
menu = "rofi -show drun"
|
||||||
|
|
||||||
|
-- Focus Follows Mouse
|
||||||
|
ffm :: Bool
|
||||||
|
ffm = True
|
||||||
|
|
||||||
|
-- Click Focus
|
||||||
|
cf :: Bool
|
||||||
|
cf = False
|
||||||
|
|
||||||
|
-- Border Width
|
||||||
|
bw :: Dimension
|
||||||
|
bw = 1
|
||||||
|
|
||||||
|
-- Modifier Key (1: left alt, 2: right alt, 4: win key)
|
||||||
|
modKey :: KeyMask
|
||||||
|
modKey = mod4Mask
|
||||||
|
|
||||||
|
-- workspace
|
||||||
|
ws :: [String]
|
||||||
|
ws = ["term", "web", "school", "docs", "code", "debug", "media", "games", "other"]
|
||||||
|
|
||||||
|
-- Border Color Normal
|
||||||
|
bcn :: String
|
||||||
|
bcn = "#dddddd"
|
||||||
|
|
||||||
|
-- Border Color Focused
|
||||||
|
bcf :: String
|
||||||
|
bcf = "#ff0000"
|
||||||
|
|
||||||
|
-- Key Bindings
|
||||||
|
keyBinds conf@(XConfig {XMonad.modMask = modm}) = M.fromList $
|
||||||
|
[
|
||||||
|
-- Program Launch KB
|
||||||
|
((modm .|. shiftMask, xK_Return), spawn $ XMonad.terminal conf),
|
||||||
|
((modm, xK_r), spawn menu),
|
||||||
|
|
||||||
|
-- Program Close KB
|
||||||
|
((modm .|. shiftMask, xK_c), kill),
|
||||||
|
((modm .|. shiftMask .|. controlMask, xK_c), spawn "xkill"),
|
||||||
|
|
||||||
|
-- WM Related KB
|
||||||
|
((modm, xK_Escape), visualSubmap def $ M.fromList $
|
||||||
|
[
|
||||||
|
((shiftMask, xK_q), subName "Exit" $ io exitSuccess),
|
||||||
|
((0, xK_r), subName "Restart" $ spawn "xmonad --recompile; xmonad --restart")
|
||||||
|
]
|
||||||
|
),
|
||||||
|
|
||||||
|
-- Layout Related KB
|
||||||
|
((modm, xK_space), sendMessage NextLayout),
|
||||||
|
((modm .|. shiftMask, xK_space), setLayout $ XMonad.layoutHook conf),
|
||||||
|
((modm, xK_comma), sendMessage (IncMasterN 1)),
|
||||||
|
((modm, xK_period), sendMessage (IncMasterN (-1))),
|
||||||
|
((modm, xK_f), sendMessage $ JumpToLayout "Full"),
|
||||||
|
|
||||||
|
-- Gaps Related KB
|
||||||
|
(
|
||||||
|
(modm, xK_g), visualSubmap def $ M.fromList $
|
||||||
|
[
|
||||||
|
((0, xK_g), subName "Toggle Gaps" $ sendMessage $ ToggleGaps),
|
||||||
|
((controlMask, xK_h), subName "Toggle Left Gap" $ sendMessage $ ToggleGap L),
|
||||||
|
((controlMask, xK_l), subName "Toggle Right Gap" $ sendMessage $ ToggleGap R),
|
||||||
|
((controlMask, xK_k), subName "Toggle Up Gap" $ sendMessage $ ToggleGap U),
|
||||||
|
((controlMask, xK_j), subName "Toggle Down Gap" $ sendMessage $ ToggleGap D),
|
||||||
|
((0, xK_h), subName "Inc Left Gap" $ sendMessage $ IncGap 5 L),
|
||||||
|
((0, xK_l), subName "Inc Right Gap" $ sendMessage $ IncGap 5 R),
|
||||||
|
((0, xK_k), subName "Inc Up Gap" $ sendMessage $ IncGap 5 U),
|
||||||
|
((0, xK_j), subName "Inc Down Gap" $ sendMessage $ IncGap 5 D),
|
||||||
|
((shiftMask, xK_h), subName "Dec Left Gap" $ sendMessage $ DecGap 5 L),
|
||||||
|
((shiftMask, xK_l), subName "Dec Right Gap" $ sendMessage $ DecGap 5 R),
|
||||||
|
((shiftMask, xK_k), subName "Dec Up Gap" $ sendMessage $ DecGap 5 U),
|
||||||
|
((shiftMask, xK_j), subName "Dec Down Gap" $ sendMessage $ DecGap 5 D)
|
||||||
|
]
|
||||||
|
),
|
||||||
|
|
||||||
|
-- Windows Related KB
|
||||||
|
((modm, xK_a), refresh),
|
||||||
|
((modm, xK_Tab), windows W.focusDown),
|
||||||
|
((modm, xK_j), windows W.focusDown),
|
||||||
|
((modm, xK_k), windows W.focusUp),
|
||||||
|
((modm, xK_m), windows W.focusMaster),
|
||||||
|
((modm, xK_Return), windows W.swapMaster),
|
||||||
|
((modm .|. shiftMask, xK_j), windows W.swapDown),
|
||||||
|
((modm .|. shiftMask, xK_k), windows W.swapUp),
|
||||||
|
((modm, xK_h), sendMessage Expand),
|
||||||
|
((modm, xK_l), sendMessage Shrink),
|
||||||
|
((modm, xK_t), withFocused $ windows . W.sink),
|
||||||
|
((modm, xK_m), withFocused minimizeWindow),
|
||||||
|
((modm .|. shiftMask, xK_m), withLastMinimized maximizeWindowAndFocus),
|
||||||
|
((modm .|. controlMask, xK_c), windows copyToAll),
|
||||||
|
((modm .|. controlMask .|. shiftMask, xK_c), killAllOtherCopies),
|
||||||
|
((modm .|. shiftMask, xK_c), kill1)
|
||||||
|
]
|
||||||
|
|
||||||
|
++
|
||||||
|
|
||||||
|
-- Workspace Related KB
|
||||||
|
[
|
||||||
|
((modm, xK_Page_Up), nextWS),
|
||||||
|
((modm, xK_Page_Down), prevWS),
|
||||||
|
((modm, xK_n), nextWS),
|
||||||
|
((modm, xK_p), prevWS)
|
||||||
|
]
|
||||||
|
|
||||||
|
++
|
||||||
|
|
||||||
|
[
|
||||||
|
((m .|. modm, k), windows $ f i)
|
||||||
|
| (i, k) <- zip (XMonad.workspaces conf) [xK_1 .. xK_9]
|
||||||
|
, (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask), (copy, controlMask)]
|
||||||
|
]
|
||||||
|
|
||||||
|
mouseBinds (XConfig {XMonad.modMask = modm}) = M.fromList
|
||||||
|
[
|
||||||
|
((modm, button1), \w -> focus w >> mouseMoveWindow w >> windows W.shiftMaster),
|
||||||
|
((modm, button2), \w -> focus w >> windows W.shiftMaster),
|
||||||
|
((modm, button3), \w -> focus w >> mouseResizeWindow w >> windows W.shiftMaster)
|
||||||
|
]
|
||||||
|
|
||||||
|
layouts = avoidStruts(tiled ||| Mirror tiled ||| gaped_tiled ||| tabbed shrinkText tabConfig) ||| noBorders Full ||| gaped_full
|
||||||
|
where
|
||||||
|
tiled = minimize(Tall nmaster delta ratio)
|
||||||
|
gaped_tiled = gaps surrounded_gap $ minimize(Tall nmaster delta ratio)
|
||||||
|
gaped_full = gaps surrounded_gap $ noBorders Full
|
||||||
|
surrounded_gap = [(U,10),(D,10),(L,10),(R,10)]
|
||||||
|
nmaster = 1
|
||||||
|
ratio = 1/2
|
||||||
|
delta = 3/100
|
||||||
|
tabConfig = def {
|
||||||
|
fontName = "xft:DejaVu Sans Mono",
|
||||||
|
activeColor = "#aaaaaa",
|
||||||
|
inactiveColor = "#8a8a8a"
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Manage Hook
|
||||||
|
mh = composeAll
|
||||||
|
[
|
||||||
|
title =? "Picture-in-Picture" --> doSideFloat SE,
|
||||||
|
isFullscreen --> doFullFloat,
|
||||||
|
isDialog --> doCenterFloat
|
||||||
|
]
|
||||||
|
-- Event Hook
|
||||||
|
eh = mempty
|
||||||
|
-- Log Hook
|
||||||
|
lh h = dynamicLogWithPP $ statbarPipe { ppOutput = hPutStrLn h }
|
||||||
|
|
||||||
|
-- Startup Hook
|
||||||
|
sh = do
|
||||||
|
spawn "launch-polybar-xmonadAppTray"
|
||||||
|
spawnOnce "feh --bg-scale ~/画像/wallpaper/85444653_p0.jpg"
|
||||||
|
|
||||||
|
-- Status bar used in WM
|
||||||
|
statbar :: String
|
||||||
|
statbar = "xmobar"
|
||||||
|
|
||||||
|
statbarPipe = xmobarPP {
|
||||||
|
ppOrder = \(ws:l:t:_) -> [ws,t],
|
||||||
|
ppCurrent = xmobarColor "red" "black" . \s -> wrap "[" "]" (s ++ " ●"),
|
||||||
|
ppUrgent = xmobarColor "gray" "black" . \s -> wrap "{" "}" (s ++ " ●"),
|
||||||
|
ppVisible = xmobarColor "red" "black" . \s -> pad (s ++ " ◎"),
|
||||||
|
ppHidden = xmobarColor "gray" "black" . \s -> pad (s ++ " ●"),
|
||||||
|
ppHiddenNoWindows = xmobarColor "gray" "black" . \s -> pad (s ++ " ○"),
|
||||||
|
ppTitle = xmobarColor "red" "black" . shorten 32,
|
||||||
|
ppLayout = id,
|
||||||
|
ppOutput = putStrLn,
|
||||||
|
ppWsSep = " ",
|
||||||
|
ppSep = " | "
|
||||||
|
}
|
||||||
|
|
||||||
|
main :: IO()
|
||||||
|
main = do
|
||||||
|
wsbar <- spawnPipe statbar
|
||||||
|
xmonad . docks $ myConfig wsbar
|
||||||
|
|
||||||
|
myConfig bar = def {
|
||||||
|
terminal = term,
|
||||||
|
focusFollowsMouse = ffm,
|
||||||
|
clickJustFocuses = cf,
|
||||||
|
borderWidth = bw,
|
||||||
|
modMask = modKey,
|
||||||
|
workspaces = ws,
|
||||||
|
normalBorderColor = bcn,
|
||||||
|
focusedBorderColor = bcf,
|
||||||
|
keys = keyBinds,
|
||||||
|
mouseBindings = mouseBinds,
|
||||||
|
layoutHook = layouts,
|
||||||
|
manageHook = mh <+> manageDocks,
|
||||||
|
handleEventHook = eh,
|
||||||
|
logHook = lh bar,
|
||||||
|
startupHook = sh
|
||||||
|
}
|
||||||
6
user/homed/zed-editor/default.nix
Normal file
6
user/homed/zed-editor/default.nix
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
environment.systemPackages = [ pkgs.zed-editor ];
|
||||||
|
|
||||||
|
homix.".config/zed/settings.json".source = ./settings.json;
|
||||||
|
}
|
||||||
47
user/homed/zed-editor/settings.json
Normal file
47
user/homed/zed-editor/settings.json
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
// Zed settings
|
||||||
|
//
|
||||||
|
// For information on how to configure Zed, see the Zed
|
||||||
|
// documentation: https://zed.dev/docs/configuring-zed
|
||||||
|
//
|
||||||
|
// To see all of Zed's default settings without changing your
|
||||||
|
// custom settings, run the `open default settings` command
|
||||||
|
// from the command palette or from `Zed` application menu.
|
||||||
|
{
|
||||||
|
"assistant": {
|
||||||
|
"default_model": {
|
||||||
|
"provider": "ollama",
|
||||||
|
"model": "mistral:7b"
|
||||||
|
},
|
||||||
|
"version": "2"
|
||||||
|
},
|
||||||
|
"base_keymap": "VSCode",
|
||||||
|
"theme": "Gruvbox Material",
|
||||||
|
"telemetry": {
|
||||||
|
"metrics": false
|
||||||
|
},
|
||||||
|
"vim_mode": true,
|
||||||
|
"buffer_font_family": "0xProto",
|
||||||
|
"buffer_font_size": 16,
|
||||||
|
"ui_font_size": 16,
|
||||||
|
"tab_size": 4,
|
||||||
|
"tabs": {
|
||||||
|
"close_position": "right",
|
||||||
|
"file_icons": true,
|
||||||
|
"git_status": true
|
||||||
|
},
|
||||||
|
"format_on_save": "off",
|
||||||
|
"language_models": {
|
||||||
|
"ollama": {
|
||||||
|
"api_url": "http://127.0.0.1:11434"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"terminal": {
|
||||||
|
"shell": {
|
||||||
|
"with_arguments": {
|
||||||
|
"program": "/run/current-system/sw/bin/bash",
|
||||||
|
"args": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"blinking": "on"
|
||||||
|
}
|
||||||
|
}
|
||||||
6
user/packages/cava/default.nix
Normal file
6
user/packages/cava/default.nix
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
cava
|
||||||
|
];
|
||||||
|
}
|
||||||
6
user/packages/chromium/default.nix
Normal file
6
user/packages/chromium/default.nix
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
chromium
|
||||||
|
];
|
||||||
|
}
|
||||||
6
user/packages/dbeaver/default.nix
Normal file
6
user/packages/dbeaver/default.nix
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
dbeaver-bin
|
||||||
|
];
|
||||||
|
}
|
||||||
31
user/packages/default.nix
Normal file
31
user/packages/default.nix
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
{ ... }: {
|
||||||
|
imports = [
|
||||||
|
./cava
|
||||||
|
./chromium
|
||||||
|
./dbeaver
|
||||||
|
./firefox
|
||||||
|
./firefox-dev-edition
|
||||||
|
./freecad
|
||||||
|
./fzf
|
||||||
|
./gimp
|
||||||
|
./gitui
|
||||||
|
./inkscape
|
||||||
|
./kdenlive
|
||||||
|
./keepassxc
|
||||||
|
./kicad
|
||||||
|
./krita
|
||||||
|
./libreoffice-fresh
|
||||||
|
./mangohud
|
||||||
|
./mpv
|
||||||
|
./obs-studio
|
||||||
|
./owncloud-client
|
||||||
|
./pandoc
|
||||||
|
./python3
|
||||||
|
./qtcreator
|
||||||
|
./thunderbird
|
||||||
|
./tldr
|
||||||
|
./vlc
|
||||||
|
./yt-dlp
|
||||||
|
./zoxide
|
||||||
|
];
|
||||||
|
}
|
||||||
10
user/packages/firefox-dev-edition/default.nix
Normal file
10
user/packages/firefox-dev-edition/default.nix
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
firefox-devedition-bin
|
||||||
|
];
|
||||||
|
|
||||||
|
environment.variables = {
|
||||||
|
MOZ_ENABLE_WAYLAND = 1;
|
||||||
|
};
|
||||||
|
}
|
||||||
10
user/packages/firefox/default.nix
Normal file
10
user/packages/firefox/default.nix
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{ pkgs, config, ... }:
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
firefox
|
||||||
|
];
|
||||||
|
|
||||||
|
environment.variables = {
|
||||||
|
MOZ_ENABLE_WAYLAND = 1;
|
||||||
|
};
|
||||||
|
}
|
||||||
3
user/packages/freecad/default.nix
Normal file
3
user/packages/freecad/default.nix
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{ pkgs, ... }: {
|
||||||
|
environment.systemPackages = [ pkgs.freecad ];
|
||||||
|
}
|
||||||
16
user/packages/fzf/default.nix
Normal file
16
user/packages/fzf/default.nix
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
fzf
|
||||||
|
];
|
||||||
|
|
||||||
|
environment.variables = {
|
||||||
|
FZF_ALT_C_OPTS = ''
|
||||||
|
--walker-skip .git,node_modules,target
|
||||||
|
--preview 'tree -C {}'
|
||||||
|
'';
|
||||||
|
FZF_COMPLETION_OPTS = "--border --info=inline";
|
||||||
|
FZF_COMPLETION_PATH_OPTS = "--walker file,dir,follow,hidden";
|
||||||
|
FZF_COMPLETION_DIR_OPTS = "--walker dir,follow";
|
||||||
|
};
|
||||||
|
}
|
||||||
6
user/packages/gimp/default.nix
Normal file
6
user/packages/gimp/default.nix
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
gimp
|
||||||
|
];
|
||||||
|
}
|
||||||
6
user/packages/gitui/default.nix
Normal file
6
user/packages/gitui/default.nix
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
gitui
|
||||||
|
];
|
||||||
|
}
|
||||||
6
user/packages/inkscape/default.nix
Normal file
6
user/packages/inkscape/default.nix
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
inkscape
|
||||||
|
];
|
||||||
|
}
|
||||||
6
user/packages/kdenlive/default.nix
Normal file
6
user/packages/kdenlive/default.nix
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
kdePackages.kdenlive
|
||||||
|
];
|
||||||
|
}
|
||||||
6
user/packages/keepassxc/default.nix
Normal file
6
user/packages/keepassxc/default.nix
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
keepassxc
|
||||||
|
];
|
||||||
|
}
|
||||||
3
user/packages/kicad/default.nix
Normal file
3
user/packages/kicad/default.nix
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{ pkgs, ... }: {
|
||||||
|
environment.systemPackages = [ pkgs.kicad ];
|
||||||
|
}
|
||||||
4
user/packages/krita/default.nix
Normal file
4
user/packages/krita/default.nix
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
environment.systemPackages = [ pkgs.krita ];
|
||||||
|
}
|
||||||
6
user/packages/libreoffice-fresh/default.nix
Normal file
6
user/packages/libreoffice-fresh/default.nix
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
libreoffice-fresh
|
||||||
|
];
|
||||||
|
}
|
||||||
6
user/packages/mangohud/default.nix
Normal file
6
user/packages/mangohud/default.nix
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
mangohud
|
||||||
|
];
|
||||||
|
}
|
||||||
6
user/packages/minecraft/default.nix
Normal file
6
user/packages/minecraft/default.nix
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
minecraft
|
||||||
|
];
|
||||||
|
}
|
||||||
6
user/packages/mpv/default.nix
Normal file
6
user/packages/mpv/default.nix
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
mpv
|
||||||
|
];
|
||||||
|
}
|
||||||
6
user/packages/obs-studio/default.nix
Normal file
6
user/packages/obs-studio/default.nix
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{ config, pkgs, libs, ... }:
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
obs-studio
|
||||||
|
];
|
||||||
|
}
|
||||||
6
user/packages/owncloud-client/default.nix
Normal file
6
user/packages/owncloud-client/default.nix
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
owncloud-client
|
||||||
|
];
|
||||||
|
}
|
||||||
6
user/packages/pandoc/default.nix
Normal file
6
user/packages/pandoc/default.nix
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
pandoc
|
||||||
|
];
|
||||||
|
}
|
||||||
6
user/packages/python3/default.nix
Normal file
6
user/packages/python3/default.nix
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
python311
|
||||||
|
];
|
||||||
|
}
|
||||||
6
user/packages/qtcreator/default.nix
Normal file
6
user/packages/qtcreator/default.nix
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
qtcreator
|
||||||
|
];
|
||||||
|
}
|
||||||
6
user/packages/thunderbird/default.nix
Normal file
6
user/packages/thunderbird/default.nix
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
thunderbird
|
||||||
|
];
|
||||||
|
}
|
||||||
6
user/packages/tldr/default.nix
Normal file
6
user/packages/tldr/default.nix
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
tldr
|
||||||
|
];
|
||||||
|
}
|
||||||
6
user/packages/vlc/default.nix
Normal file
6
user/packages/vlc/default.nix
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
vlc
|
||||||
|
];
|
||||||
|
}
|
||||||
6
user/packages/yt-dlp/default.nix
Normal file
6
user/packages/yt-dlp/default.nix
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
yt-dlp
|
||||||
|
];
|
||||||
|
}
|
||||||
6
user/packages/zoxide/default.nix
Normal file
6
user/packages/zoxide/default.nix
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
zoxide
|
||||||
|
];
|
||||||
|
}
|
||||||
5
user/userSettings.nix
Normal file
5
user/userSettings.nix
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
username = "kenryus";
|
||||||
|
name = "Kenryu Shibata";
|
||||||
|
email-dev = "kenryudev5894@gmail.com";
|
||||||
|
}
|
||||||
25
user/wrapped/alacritty/default.nix
Normal file
25
user/wrapped/alacritty/default.nix
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
let
|
||||||
|
alacrittyconf = pkgs.writeText "alacritty.toml" ''
|
||||||
|
[window]
|
||||||
|
opacity = 0.85
|
||||||
|
|
||||||
|
[scrolling]
|
||||||
|
history = 25000
|
||||||
|
multiplier = 5
|
||||||
|
|
||||||
|
[font]
|
||||||
|
normal = { family = "0xProto Nerd Font Mono", style = "Regular" }
|
||||||
|
bold = { family = "0xProto Nerd Font Mono", style = "Bold" }
|
||||||
|
italic = { family = "0xProto Nerd Font Mono", style = "Italic" }
|
||||||
|
size = 12.00
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
pkgs.symlinkJoin {
|
||||||
|
name = "alacritty-wrapped";
|
||||||
|
paths = [ pkgs.alacritty ];
|
||||||
|
buildInputs = [ pkgs.makeWrapper ];
|
||||||
|
postBuild = ''
|
||||||
|
wrapProgram $out/bin/alacritty --add-flags "--config-file ${alacrittyconf}"
|
||||||
|
'';
|
||||||
|
}
|
||||||
30
user/wrapped/bash/default.nix
Normal file
30
user/wrapped/bash/default.nix
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
let
|
||||||
|
lsCmd = "eza -la --git -s type";
|
||||||
|
bashrc = pkgs.writeShellScript ".bashrc" ''
|
||||||
|
[[ $- == *i* ]] || return
|
||||||
|
|
||||||
|
eval "$(fzf --bash)"
|
||||||
|
eval "$(zoxide init bash)"
|
||||||
|
|
||||||
|
HISTFILESIZE=100000
|
||||||
|
HISTSIZE=1000
|
||||||
|
|
||||||
|
alias cd=z
|
||||||
|
alias l="${lsCmd}"
|
||||||
|
alias ls="${lsCmd}"
|
||||||
|
alias update-flake="nix flake update"
|
||||||
|
|
||||||
|
if [[ ! -v BASH_COMPLETION_VERSINFO ]]; then
|
||||||
|
. "${pkgs.bash-completion}/etc/profile.d/bash_completion.sh"
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
pkgs.symlinkJoin {
|
||||||
|
name = "bash-wrapped";
|
||||||
|
paths = with pkgs; [ bash bash-completion];
|
||||||
|
buildInputs = [ pkgs.makeWrapper ];
|
||||||
|
postBuild = ''
|
||||||
|
wrapProgram $out/bin/bash --add-flags "--rcfile ${bashrc}"
|
||||||
|
'';
|
||||||
|
}
|
||||||
11
user/wrapped/default.nix
Normal file
11
user/wrapped/default.nix
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{ pkgs, config, ... }:
|
||||||
|
let
|
||||||
|
packages = {
|
||||||
|
alacritty = pkgs.callPackage ./alacritty {};
|
||||||
|
bash = pkgs.callPackage ./bash {};
|
||||||
|
fastfetch = pkgs.callPackage ./fastfetch {};
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
environment.systemPackages = builtins.attrValues packages;
|
||||||
|
}
|
||||||
130
user/wrapped/fastfetch/default.nix
Normal file
130
user/wrapped/fastfetch/default.nix
Normal file
@@ -0,0 +1,130 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
let
|
||||||
|
config_file = pkgs.writeText "fastfetch-config.jsonc" ''
|
||||||
|
{
|
||||||
|
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
|
||||||
|
"logo": {
|
||||||
|
"height": 24,
|
||||||
|
},
|
||||||
|
"modules": [
|
||||||
|
"title",
|
||||||
|
"separator",
|
||||||
|
{
|
||||||
|
"type": "os",
|
||||||
|
"key": "□ OS",
|
||||||
|
"keyColor": "yellow",
|
||||||
|
"format": "{2}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "os",
|
||||||
|
"key": "╠[]",
|
||||||
|
"keyColor": "yellow",
|
||||||
|
"format": "{2} {10} {11}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "kernel",
|
||||||
|
"key": "╠[]",
|
||||||
|
"keyColor": "yellow",
|
||||||
|
"format": "{1} {2} {4}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "initsystem",
|
||||||
|
"key": "╠[]",
|
||||||
|
"keyColor": "yellow",
|
||||||
|
"format": "{1} {3}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "packages",
|
||||||
|
"key": "╠[]",
|
||||||
|
"keyColor": "yellow",
|
||||||
|
"format": "Nix: {9} Flatpak: {14} All: {1}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "shell",
|
||||||
|
"key": "╚[]",
|
||||||
|
"keyColor": "yellow",
|
||||||
|
"format": "{1} {4}"
|
||||||
|
},
|
||||||
|
"break",
|
||||||
|
{
|
||||||
|
"type": "wm",
|
||||||
|
"key": "□ DE/WM",
|
||||||
|
"keyColor": "blue"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "lm",
|
||||||
|
"key": "╠[]",
|
||||||
|
"keyColor": "blue",
|
||||||
|
"format": "{1} {2} {3}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "wmtheme",
|
||||||
|
"key": "╠[]",
|
||||||
|
"keyColor": "blue"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "terminal",
|
||||||
|
"key": "╠[]",
|
||||||
|
"keyColor": "blue",
|
||||||
|
"format": "{5} {6}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "editor",
|
||||||
|
"key": "╚[]",
|
||||||
|
"keyColor": "blue",
|
||||||
|
"format": "{2} {4} ({1})"
|
||||||
|
},
|
||||||
|
"break",
|
||||||
|
{
|
||||||
|
"type": "custom",
|
||||||
|
"key": "□ PC",
|
||||||
|
"keyColor": "green"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "cpu",
|
||||||
|
"key": "╠[]",
|
||||||
|
"keyColor": "green"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "gpu",
|
||||||
|
"key": "╠[]",
|
||||||
|
"keyColor": "green"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "disk",
|
||||||
|
"key": "╠[]",
|
||||||
|
"keyColor": "green"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "memory",
|
||||||
|
"key": "╠[]",
|
||||||
|
"keyColor": "green"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "swap",
|
||||||
|
"key": "╠[]",
|
||||||
|
"keyColor": "green"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "display",
|
||||||
|
"key": "╠[]",
|
||||||
|
"keyColor": "green",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "uptime",
|
||||||
|
"key": "╚[]",
|
||||||
|
"keyColor": "green",
|
||||||
|
"format": "{1}d, {2}h, {3}m, {4}s, since {6}"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
pkgs.symlinkJoin {
|
||||||
|
name = "fastfetch-wrapped";
|
||||||
|
paths = with pkgs; [ fastfetch ];
|
||||||
|
buildInputs = [ pkgs.makeWrapper ];
|
||||||
|
postBuild = ''
|
||||||
|
wrapProgram $out/bin/fastfetch --add-flags "-c ${config_file}"
|
||||||
|
'';
|
||||||
|
}
|
||||||
0
user/wrapped/fish/config.fish
Normal file
0
user/wrapped/fish/config.fish
Normal file
3
user/wrapped/fish/default.nix
Normal file
3
user/wrapped/fish/default.nix
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
let
|
||||||
|
fish_config = import fishinit
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user