Compare commits
22 Commits
ae59ef84f8
...
organize-c
| Author | SHA1 | Date | |
|---|---|---|---|
| 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,5 @@
|
|||||||
# nixos-dotfiles
|
# nixos-dotfiles
|
||||||
|
|
||||||
dotfiles for nixos
|
dotfiles for nixos
|
||||||
|
|
||||||
|
referenced heavily on [librephoenix's nixos-config](https://github.com/librephoenix/nixos-config).
|
||||||
|
|||||||
63
flake.lock
generated
63
flake.lock
generated
@@ -7,27 +7,46 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1720042825,
|
"lastModified": 1741217763,
|
||||||
"narHash": "sha256-A0vrUB6x82/jvf17qPCpxaM+ulJnD8YZwH9Ci0BsAzE=",
|
"narHash": "sha256-g/TrltIjFHIjtzKY5CJpoPANfHQWDD43G5U1a/v5oVg=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "e1391fb22e18a36f57e6999c7a9f966dc80ac073",
|
"rev": "486b066025dccd8af7fbe5dd2cc79e46b88c80da",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"ref": "release-24.05",
|
"ref": "master",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"homix": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1720719665,
|
||||||
|
"narHash": "sha256-BKcOoDlMC86zExMKXFXQ04HO99fUNFmtEdvP+gB45Pk=",
|
||||||
|
"owner": "sioodmy",
|
||||||
|
"repo": "homix",
|
||||||
|
"rev": "62bc58f2350cbb061e61ac0f3d63018663fbe4cb",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "sioodmy",
|
||||||
|
"ref": "main",
|
||||||
|
"repo": "homix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixos-hardware": {
|
"nixos-hardware": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1723310128,
|
"lastModified": 1741325094,
|
||||||
"narHash": "sha256-IiH8jG6PpR4h9TxSGMYh+2/gQiJW9MwehFvheSb5rPc=",
|
"narHash": "sha256-RUAdT8dZ6k/486vnu3tiNRrNW6+Q8uSD2Mq7gTX4jlo=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixos-hardware",
|
"repo": "nixos-hardware",
|
||||||
"rev": "c54cf53e022b0b3c1d3b8207aa0f9b194c24f0cf",
|
"rev": "b48cc4dab0f9711af296fc367b6108cf7b8ccb16",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -39,25 +58,41 @@
|
|||||||
},
|
},
|
||||||
"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": 1741246872,
|
||||||
|
"narHash": "sha256-Q6pMP4a9ed636qilcYX8XUguvKl/0/LGXhHcRI91p0U=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "10069ef4cf863633f57238f179a0297de84bd8d3",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"id": "nixpkgs",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"type": "indirect"
|
||||||
|
}
|
||||||
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
|
"homix": "homix",
|
||||||
"nixos-hardware": "nixos-hardware",
|
"nixos-hardware": "nixos-hardware",
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs_2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
61
flake.nix
61
flake.nix
@@ -2,26 +2,21 @@
|
|||||||
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";
|
home-manager.url = "github:nix-community/home-manager/master";
|
||||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
homix.url = "github:sioodmy/homix/main";
|
||||||
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 = {
|
systemSettings = {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
hostname = "kenryu-nixos";
|
hostname = "kenryu-nixos";
|
||||||
machine = "workstation";
|
host = "syushiki";
|
||||||
timezone = "Asia/Tokyo";
|
timezone = "Asia/Tokyo";
|
||||||
locale = "ja_JP.UTF-8";
|
locale = "ja_JP.UTF-8";
|
||||||
bootConf = {
|
|
||||||
mode = "uefi";
|
|
||||||
mountPath = "/boot";
|
|
||||||
grubDev = "";
|
|
||||||
};
|
|
||||||
gpuType = "nvidia";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
userSettings = {
|
userSettings = {
|
||||||
@@ -29,39 +24,35 @@
|
|||||||
name = "Kenryu Shibata";
|
name = "Kenryu Shibata";
|
||||||
email-dev = "kenryudev5894@gmail.com";
|
email-dev = "kenryudev5894@gmail.com";
|
||||||
dotfilesDir = "/etc/nixos";
|
dotfilesDir = "/etc/nixos";
|
||||||
editor = "nvim";
|
|
||||||
editor-pkg = pkgs.neovim;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
pkgs = import inputs.nixpkgs {
|
pkgs = import inputs.nixpkgs {
|
||||||
system = systemSettings.system;
|
system = systemSettings.system;
|
||||||
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")
|
|
||||||
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;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
nixosConfigurations = import ./hosts inputs;
|
||||||
|
#nixosConfigurations.syushiki = lib.nixosSystem {
|
||||||
|
# system = systemSettings.system;
|
||||||
|
# modules = [
|
||||||
|
# ./hosts/syushiki
|
||||||
|
# ./overlays
|
||||||
|
# home-manager.nixosModules.home-manager {
|
||||||
|
# home-manager.useGlobalPkgs = true;
|
||||||
|
# home-manager.useUserPackages = true;
|
||||||
|
# home-manager.users.${userSettings.username} = import (./. + "/hosts/${systemSettings.host}/home.nix");
|
||||||
|
# home-manager.extraSpecialArgs = {
|
||||||
|
# inherit userSettings;
|
||||||
|
# };
|
||||||
|
# }
|
||||||
|
# ];
|
||||||
|
# specialArgs = {
|
||||||
|
# inherit inputs systemSettings userSettings;
|
||||||
|
# };
|
||||||
|
#};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
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";
|
||||||
|
}
|
||||||
50
hosts/syushiki/default.nix
Normal file
50
hosts/syushiki/default.nix
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
{ 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;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Open ports in the firewall.
|
||||||
|
networking.firewall.allowedTCPPorts = [ 3000 3001 22 ];
|
||||||
|
|
||||||
|
system.stateVersion = "24.05"; # Did you read the changelog?
|
||||||
|
}
|
||||||
22
hosts/syushiki/home.nix
Normal file
22
hosts/syushiki/home.nix
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
{ pkgs, userSettings, ... }:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
../../user/dev/tools/git.nix
|
||||||
|
../../user/dev/tools/gh.nix
|
||||||
|
../../user/dev/editor/vscodium.nix
|
||||||
|
../../user/dev/editor/zed-editor.nix
|
||||||
|
../../user/dev/lang/cc.nix
|
||||||
|
../../user/dev/lang/python.nix
|
||||||
|
../../user/dev/lang/rust.nix
|
||||||
|
../../user/dev/lang/ecmascript.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
home.username = userSettings.username;
|
||||||
|
home.homeDirectory = "/home/" + userSettings.username;
|
||||||
|
|
||||||
|
programs.home-manager.enable = true;
|
||||||
|
|
||||||
|
home.stateVersion = "24.05";
|
||||||
|
|
||||||
|
home.packages = with pkgs; [];
|
||||||
|
}
|
||||||
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";
|
||||||
|
}
|
||||||
@@ -13,6 +13,8 @@
|
|||||||
|
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
|
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
i18n.defaultLocale = systemSettings.locale;
|
i18n.defaultLocale = systemSettings.locale;
|
||||||
i18n.extraLocaleSettings = {
|
i18n.extraLocaleSettings = {
|
||||||
LC_ADDRESS = systemSettings.locale;
|
LC_ADDRESS = systemSettings.locale;
|
||||||
@@ -29,7 +31,7 @@
|
|||||||
users.users.${userSettings.username} = {
|
users.users.${userSettings.username} = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
description = userSettings.name;
|
description = userSettings.name;
|
||||||
extraGroups = [ "networkmanager" "wheel" ];
|
extraGroups = [ "networkmanager" "wheel" "docker" "podman" "input" "flatpak" "dialout" "video" "input" "audio" "libvirtd" ];
|
||||||
packages = with pkgs; [];
|
packages = with pkgs; [];
|
||||||
uid = 1000;
|
uid = 1000;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,7 +1,3 @@
|
|||||||
# 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, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -11,41 +7,37 @@
|
|||||||
../base.nix
|
../base.nix
|
||||||
../../system/services/cups.nix
|
../../system/services/cups.nix
|
||||||
../../system/services/ssh.nix
|
../../system/services/ssh.nix
|
||||||
|
../../system/services/polkit.nix
|
||||||
|
../../system/services/flatpak.nix
|
||||||
|
../../system/services/steam.nix
|
||||||
|
../../system/services/tailscale.nix
|
||||||
|
../../system/services/libvirtd.nix
|
||||||
|
../../system/services/podman.nix
|
||||||
../../system/hardware/kernel.nix
|
../../system/hardware/kernel.nix
|
||||||
|
../../system/hardware/nvidia.nix
|
||||||
|
../../system/hardware/opengl.nix
|
||||||
|
../../system/hardware/bluetooth.nix
|
||||||
|
../../system/wm/sddm.nix
|
||||||
|
../../system/hardware/inputMethods.nix
|
||||||
|
../../system/env.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# Use the systemd-boot EFI boot loader.
|
# Use the systemd-boot EFI boot loader.
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
# Configure keymap in X11
|
programs.appimage = {
|
||||||
# services.xserver.xkb.layout = "us";
|
enable = true;
|
||||||
# services.xserver.xkb.options = "eurosign:e,caps:escape";
|
binfmt = true;
|
||||||
|
};
|
||||||
|
|
||||||
# Open ports in the firewall.
|
# Open ports in the firewall.
|
||||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
networking.firewall.allowedTCPPorts = [ 3000 3001 22 ];
|
||||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||||
# Or disable the firewall altogether.
|
# Or disable the firewall altogether.
|
||||||
# networking.firewall.enable = false;
|
# networking.firewall.enable = false;
|
||||||
|
|
||||||
# This option defines the first version of NixOS you have installed on this particular machine,
|
system.stateVersion = "24.05"; # Did you read the changelog?
|
||||||
# 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?
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -24,6 +24,11 @@
|
|||||||
options = [ "fmask=0077" "dmask=0077" ];
|
options = [ "fmask=0077" "dmask=0077" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
fileSystems."/run/media/kenryus/hdd" = {
|
||||||
|
device = "/dev/disk/by-uuid/0d146628-12f4-4bb6-abde-bbf798a57c25";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
swapDevices =
|
swapDevices =
|
||||||
[ { device = "/dev/disk/by-uuid/d933c349-8e70-41e1-8d13-605656dba18b"; }
|
[ { device = "/dev/disk/by-uuid/d933c349-8e70-41e1-8d13-605656dba18b"; }
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,12 +1,47 @@
|
|||||||
{ pkgs, userSettings, ... }:
|
{ pkgs, userSettings, ... }:
|
||||||
{
|
{
|
||||||
|
imports = [
|
||||||
|
../../user/apps/browsers/firefox.nix
|
||||||
|
../../user/apps/browsers/chromium.nix
|
||||||
|
../../user/apps/thunderbird.nix
|
||||||
|
../../user/dev/tools/git.nix
|
||||||
|
../../user/dev/tools/gitui.nix
|
||||||
|
../../user/dev/tools/firefox-devedition.nix
|
||||||
|
../../user/dev/tools/dbeaver-bin.nix
|
||||||
|
../../user/dev/tools/tldr.nix
|
||||||
|
../../user/dev/tools/gh.nix
|
||||||
|
../../user/dev/editor/vscodium.nix
|
||||||
|
../../user/dev/editor/zed-editor.nix
|
||||||
|
../../user/dev/lang/cc.nix
|
||||||
|
../../user/dev/lang/python.nix
|
||||||
|
../../user/dev/lang/rust.nix
|
||||||
|
../../user/dev/lang/ecmascript.nix
|
||||||
|
../../user/dev/ide/qtcreator.nix
|
||||||
|
../../user/apps/utils/alacritty.nix
|
||||||
|
../../user/apps/utils/keepassxc.nix
|
||||||
|
#../../user/apps/utils/cava.nix
|
||||||
|
../../user/apps/utils/owncloud-client.nix
|
||||||
|
../../user/apps/utils/fzf.nix
|
||||||
|
../../user/apps/utils/zoxide.nix
|
||||||
|
../../user/apps/media/vlc.nix
|
||||||
|
../../user/apps/media/mpv.nix
|
||||||
|
../../user/apps/media/yt-dlp.nix
|
||||||
|
../../user/apps/media/kdenlive.nix
|
||||||
|
../../user/apps/media/obs-studio.nix
|
||||||
|
../../user/apps/graphics/gimp.nix
|
||||||
|
../../user/apps/graphics/inkscape.nix
|
||||||
|
../../user/apps/games/mangohud.nix
|
||||||
|
../../user/apps/office/texlive.nix
|
||||||
|
#../../user/apps/office/libreoffice-fresh.nix
|
||||||
|
../../user/shell/bash.nix
|
||||||
|
../../user/wm/xmonad/xmonad.nix
|
||||||
|
];
|
||||||
|
|
||||||
home.username = userSettings.username;
|
home.username = userSettings.username;
|
||||||
home.homeDirectory = "/home/" + userSettings.username;
|
home.homeDirectory = "/home/" + userSettings.username;
|
||||||
|
|
||||||
programs.home-manager.enable = true;
|
programs.home-manager.enable = true;
|
||||||
|
|
||||||
imports = [];
|
|
||||||
|
|
||||||
home.stateVersion = "24.05";
|
home.stateVersion = "24.05";
|
||||||
|
|
||||||
home.packages = with pkgs; [];
|
home.packages = with pkgs; [];
|
||||||
|
|||||||
63
newpkg.sh
Normal file
63
newpkg.sh
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo "newpkg.sh: create minimal nix file in current directory, Current Directory: $PWD"
|
||||||
|
|
||||||
|
if [ -z "$NIXOSSYSCONFIG" ]; then
|
||||||
|
echo "Error: Env Variable Missing, NIXOSSYSCONFIG"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$NIXOSHOMECONFIG" ]; then
|
||||||
|
echo "Error: Env Variable Missing, NIXOSHOMECONFIG"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$EDITOR" ]; then
|
||||||
|
echo "Error: Env Variable Missing, EDITOR"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo -e "Select installation destination:\n[1]: System\n[2]: User\n[q]: quit"
|
||||||
|
read dest
|
||||||
|
echo "Specifiy the package to add:"
|
||||||
|
read pkgName
|
||||||
|
|
||||||
|
touch "$PWD/${pkgName}.nix"
|
||||||
|
|
||||||
|
if [[ $dest -eq 1 ]]; then
|
||||||
|
echo -e "{ pkgs, ... }:\n{\n environment.systemPackages = with pkgs; [\n ${pkgName}\n ];\n}" > "$PWD/${pkgName}.nix"
|
||||||
|
echo "Open editor to modify system imports? [y/N]: "
|
||||||
|
read doEdit
|
||||||
|
if [ "$doEdit" == "y" ] || [ "$doEdit" == "Y" ]; then
|
||||||
|
$EDITOR $NIXOSSYSCONFIG
|
||||||
|
fi
|
||||||
|
elif [[ $dest -eq 2 ]]; then
|
||||||
|
echo -e "{ pkgs, ... }:\n{\n home.packages = with pkgs; [\n ${pkgName}\n ];\n}" > "$PWD/${pkgName}.nix"
|
||||||
|
echo "Open editor to modify home imports? [y/N]: "
|
||||||
|
read doEdit
|
||||||
|
if [ "$doEdit" == "y" ] || [ "$doEdit" == "Y" ]; then
|
||||||
|
$EDITOR $NIXOSHOMECONFIG
|
||||||
|
fi
|
||||||
|
elif [[ $dest == "q" ]]; then
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
echo "Error: Non-numeric or Out-ranged value inputed"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Would you like to edit new nix file for further configuration? [y/N]: "
|
||||||
|
read doNixEdit
|
||||||
|
if [ "$doNixEdit" == "y" ] || [ "$doNixEdit" == "Y" ]; then
|
||||||
|
$EDITOR "$PWD/${pkgName}.nix"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Would you like to execute nixos-rebuild? [y/N]: "
|
||||||
|
read doExec
|
||||||
|
|
||||||
|
if [ "$doExec" == "y" ] || [ "$doExec" == "Y" ]; then
|
||||||
|
cd ~/.dotfiles
|
||||||
|
sudo nixos-rebuild switch --flake '.#system'
|
||||||
|
else
|
||||||
|
echo "Exiting"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
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;
|
||||||
|
};
|
||||||
|
})
|
||||||
|
];
|
||||||
|
}
|
||||||
60
pkgs/AppMan/AppMan.nix
Normal file
60
pkgs/AppMan/AppMan.nix
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
stdenv,
|
||||||
|
fetchFromGitHub,
|
||||||
|
coreutils,
|
||||||
|
gnused,
|
||||||
|
gnugrep,
|
||||||
|
curl,
|
||||||
|
wget,
|
||||||
|
binutils,
|
||||||
|
unzip,
|
||||||
|
gnutar,
|
||||||
|
zsync
|
||||||
|
}:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "AppMan";
|
||||||
|
version = "7.7";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "ivan-hc";
|
||||||
|
repo = "AM";
|
||||||
|
rev = "e8abedace64c32023086a9c79fe646d84588a995";
|
||||||
|
hash = "sha256-n0m5VWdMTYWv18cB++NYWMQZXNKWfnj0iHgj0ZNdjy8=";
|
||||||
|
};
|
||||||
|
|
||||||
|
propagatedBuildInputs = [
|
||||||
|
coreutils
|
||||||
|
gnused
|
||||||
|
gnugrep
|
||||||
|
curl
|
||||||
|
wget
|
||||||
|
binutils
|
||||||
|
unzip
|
||||||
|
gnutar
|
||||||
|
zsync
|
||||||
|
];
|
||||||
|
|
||||||
|
buildPhase = ''
|
||||||
|
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
cp APP-MANAGER $out/bin
|
||||||
|
ln -sf $out/bin/APP-MANAGER $out/bin/am
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Database & solutions for all AppImages and portable apps for GNU/Linux!";
|
||||||
|
longDescription = ''
|
||||||
|
AppImage package manager to install, update (for real) and manage ALL of them (system-wide or locally) thanks to its ever-growing AUR-inspired database listing 2000+ portable apps and programs for GNU/Linux.
|
||||||
|
The first, real centralized repository to manage your AppImages with the ease of APT and the power of PacMan.
|
||||||
|
'';
|
||||||
|
homepage = "https://portable-linux-apps.github.io/";
|
||||||
|
changelog = "https://github.com/ivan-hc/AM/releases/tag/${version}";
|
||||||
|
license = licenses.gpl3;
|
||||||
|
platforms = platforms.all;
|
||||||
|
};
|
||||||
|
}
|
||||||
34
pkgs/badlion-client/badlion-client.nix
Normal file
34
pkgs/badlion-client/badlion-client.nix
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
{ lib, fetchurl, appimageTools }:
|
||||||
|
|
||||||
|
let
|
||||||
|
pname = "badlion-client";
|
||||||
|
version = "4.4.1";
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
name = "badlion-client-linux";
|
||||||
|
# https://www.badlion.net/download/client/latest/linux
|
||||||
|
url = "https://client-updates-cdn77.badlion.net/BadlionClient";
|
||||||
|
hash = "sha256-lyu0WQtkevCduGb5Hw5D79CekoHTQiKHvofnqS57mVU=";
|
||||||
|
};
|
||||||
|
|
||||||
|
appimageContents = appimageTools.extract { inherit pname version src; };
|
||||||
|
in
|
||||||
|
appimageTools.wrapType2 rec {
|
||||||
|
inherit pname version src;
|
||||||
|
|
||||||
|
extraInstallCommands = ''
|
||||||
|
install -Dm444 ${appimageContents}/BadlionClient.desktop $out/share/applications/BadlionClient.desktop
|
||||||
|
install -Dm444 ${appimageContents}/BadlionClient.png $out/share/pixmaps/BadlionClient.png
|
||||||
|
substituteInPlace $out/share/applications/BadlionClient.desktop \
|
||||||
|
--replace 'Exec=AppRun --no-sandbox %U' 'Exec=badlion-client'
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Most Complete All-In-One Mod Library for Minecraft with 100+ Mods, FPS Improvements, and more";
|
||||||
|
homepage = "https://client.badlion.net";
|
||||||
|
license = with licenses; [ unfree ];
|
||||||
|
maintainers = [ ];
|
||||||
|
mainProgram = "badlion-client";
|
||||||
|
platforms = [ "x86_64-linux" ];
|
||||||
|
};
|
||||||
|
}
|
||||||
4
pkgs/badlion-client/default.nix
Normal file
4
pkgs/badlion-client/default.nix
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
let
|
||||||
|
pkgs = import <nixpkgs> { };
|
||||||
|
in
|
||||||
|
pkgs.callPackage ./badlion-client.nix { }
|
||||||
7
pkgs/zen-browser/default.nix
Normal file
7
pkgs/zen-browser/default.nix
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
let
|
||||||
|
nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-24.11";
|
||||||
|
pkgs = import nixpkgs { config = {}; overlays = []; };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
zen-browser = pkgs.callPackage ./zen-browser.nix { };
|
||||||
|
}
|
||||||
21
pkgs/zen-browser/zen-browser.nix
Normal file
21
pkgs/zen-browser/zen-browser.nix
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
{ lib, stdenv, ... }:
|
||||||
|
let
|
||||||
|
version = "1.7b";
|
||||||
|
in
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
pname="zen-browser";
|
||||||
|
inherit version;
|
||||||
|
|
||||||
|
src = fetchTarball {
|
||||||
|
url = "https://github.com/zen-browser/desktop/releases/download/${version}/zen.linux-x86_64.tar.bz2";
|
||||||
|
sha256 = "0aig890fcynxwi7xi8jzd1w2gzg47n0jqfq76wvnkwcam611b2bp";
|
||||||
|
};
|
||||||
|
|
||||||
|
dontPatch = true;
|
||||||
|
dontConfigure = true;
|
||||||
|
dontBuild = true;
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
cp -r . $out
|
||||||
|
'';
|
||||||
|
}
|
||||||
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,7 +4,12 @@
|
|||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
vim
|
vim
|
||||||
wget
|
wget
|
||||||
|
file
|
||||||
|
eza
|
||||||
|
jq
|
||||||
htop
|
htop
|
||||||
|
btop
|
||||||
|
fastfetch
|
||||||
mc
|
mc
|
||||||
git
|
git
|
||||||
parted
|
parted
|
||||||
|
|||||||
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
|
||||||
|
];
|
||||||
|
}
|
||||||
8
system/wm/fonts/default.nix
Normal file
8
system/wm/fonts/default.nix
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
fonts.packages = with pkgs; [
|
||||||
|
_0xproto
|
||||||
|
ipafont
|
||||||
|
takao
|
||||||
|
];
|
||||||
|
}
|
||||||
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
|
||||||
|
];
|
||||||
|
}
|
||||||
16
user/dev/editor/neovim.nix
Normal file
16
user/dev/editor/neovim.nix
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
neovim
|
||||||
|
];
|
||||||
|
|
||||||
|
programs.neovim = {
|
||||||
|
enable = true;
|
||||||
|
vimAlias = false;
|
||||||
|
viAlias = false;
|
||||||
|
withRuby = true;
|
||||||
|
withPython3 = true;
|
||||||
|
withNodeJs = true;
|
||||||
|
package = pkgs.neovim-unwrapped;
|
||||||
|
};
|
||||||
|
}
|
||||||
4
user/dev/editor/vscodium.nix
Normal file
4
user/dev/editor/vscodium.nix
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.packages = [ pkgs.vscodium ];
|
||||||
|
}
|
||||||
4
user/dev/editor/zed-editor.nix
Normal file
4
user/dev/editor/zed-editor.nix
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.packages = [ pkgs.zed-editor ];
|
||||||
|
}
|
||||||
14
user/dev/lang/cc.nix
Normal file
14
user/dev/lang/cc.nix
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
gcc
|
||||||
|
gdb
|
||||||
|
cmake
|
||||||
|
autoconf
|
||||||
|
automake
|
||||||
|
gnumake
|
||||||
|
libtool
|
||||||
|
clang-analyzer
|
||||||
|
clang-tools
|
||||||
|
];
|
||||||
|
}
|
||||||
6
user/dev/lang/ecmascript.nix
Normal file
6
user/dev/lang/ecmascript.nix
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
nodejs_22
|
||||||
|
];
|
||||||
|
}
|
||||||
6
user/dev/lang/python.nix
Normal file
6
user/dev/lang/python.nix
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
python313Full
|
||||||
|
];
|
||||||
|
}
|
||||||
6
user/dev/lang/rust.nix
Normal file
6
user/dev/lang/rust.nix
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
rustup
|
||||||
|
];
|
||||||
|
}
|
||||||
6
user/dev/tools/gh.nix
Normal file
6
user/dev/tools/gh.nix
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
gh
|
||||||
|
];
|
||||||
|
}
|
||||||
7
user/dev/tools/git.nix
Normal file
7
user/dev/tools/git.nix
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{ config, pkgs, userSettings, ... }:
|
||||||
|
{
|
||||||
|
home.packages = [ pkgs.git ];
|
||||||
|
programs.git.enable = true;
|
||||||
|
programs.git.userName = userSettings.name;
|
||||||
|
programs.git.userEmail = userSettings.email-dev;
|
||||||
|
}
|
||||||
8
user/homed/default.nix
Normal file
8
user/homed/default.nix
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./git
|
||||||
|
./profile
|
||||||
|
./xmonad
|
||||||
|
];
|
||||||
|
}
|
||||||
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
|
||||||
|
'';
|
||||||
|
}
|
||||||
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}"
|
||||||
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;
|
||||||
|
}
|
||||||
33
user/homed/xmonad/xmobarrc
Normal file
33
user/homed/xmonad/xmobarrc
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
Config {
|
||||||
|
font = "IPAGothic 9",
|
||||||
|
bgColor = "black",
|
||||||
|
fgColor = "#646464",
|
||||||
|
position = Top,
|
||||||
|
border = BottomB,
|
||||||
|
borderColor = "#646464",
|
||||||
|
|
||||||
|
sepChar = "%",
|
||||||
|
alignSep = "}{",
|
||||||
|
template = "%multicpu% | %coretemp% | %memory% | %dynnetwork% }{ %date%",
|
||||||
|
|
||||||
|
lowerOnStart = True,
|
||||||
|
hideOnStart = False,
|
||||||
|
allDesktops = True,
|
||||||
|
overrideRedirect = True,
|
||||||
|
pickBroadest = False,
|
||||||
|
persistent = True,
|
||||||
|
|
||||||
|
commands =
|
||||||
|
[
|
||||||
|
Run DynNetwork [ "--template", "<dev>: <tx>kB/s|<rx>kB/s",
|
||||||
|
"--Low", "1000", -- units: B/s
|
||||||
|
"--High", "5000", -- units: B/s
|
||||||
|
"--low", "darkgreen",
|
||||||
|
"--normal", "darkorange",
|
||||||
|
"--high", "darkred" ] 10,
|
||||||
|
|
||||||
|
Run MultiCpu [
|
||||||
|
"--template", "Cpu: <total0>C|<core1>C"
|
||||||
|
] 10,
|
||||||
|
]
|
||||||
|
}
|
||||||
335
user/homed/xmonad/xmonad.hs
Normal file
335
user/homed/xmonad/xmonad.hs
Normal file
@@ -0,0 +1,335 @@
|
|||||||
|
--
|
||||||
|
-- xmonad example config file.
|
||||||
|
--
|
||||||
|
-- A template showing all available configuration hooks,
|
||||||
|
-- and how to override the defaults in your own xmonad.hs conf file.
|
||||||
|
--
|
||||||
|
-- Normally, you'd only override those defaults you care about.
|
||||||
|
--
|
||||||
|
|
||||||
|
import XMonad
|
||||||
|
import XMonad.Hooks.DynamicLog
|
||||||
|
import Data.Monoid
|
||||||
|
import System.Exit
|
||||||
|
|
||||||
|
import qualified XMonad.StackSet as W
|
||||||
|
import qualified Data.Map as M
|
||||||
|
|
||||||
|
-- The preferred terminal program, which is used in a binding below and by
|
||||||
|
-- certain contrib modules.
|
||||||
|
--
|
||||||
|
myTerminal = "alacritty"
|
||||||
|
|
||||||
|
-- Whether focus follows the mouse pointer.
|
||||||
|
myFocusFollowsMouse :: Bool
|
||||||
|
myFocusFollowsMouse = True
|
||||||
|
|
||||||
|
-- Whether clicking on a window to focus also passes the click to the window
|
||||||
|
myClickJustFocuses :: Bool
|
||||||
|
myClickJustFocuses = False
|
||||||
|
|
||||||
|
-- Width of the window border in pixels.
|
||||||
|
--
|
||||||
|
myBorderWidth = 1
|
||||||
|
|
||||||
|
-- modMask lets you specify which modkey you want to use. The default
|
||||||
|
-- is mod1Mask ("left alt"). You may also consider using mod3Mask
|
||||||
|
-- ("right alt"), which does not conflict with emacs keybindings. The
|
||||||
|
-- "windows key" is usually mod4Mask.
|
||||||
|
--
|
||||||
|
myModMask = mod4Mask
|
||||||
|
|
||||||
|
-- The default number of workspaces (virtual screens) and their names.
|
||||||
|
-- By default we use numeric strings, but any string may be used as a
|
||||||
|
-- workspace name. The number of workspaces is determined by the length
|
||||||
|
-- of this list.
|
||||||
|
--
|
||||||
|
-- A tagging example:
|
||||||
|
--
|
||||||
|
-- > workspaces = ["web", "irc", "code" ] ++ map show [4..9]
|
||||||
|
--
|
||||||
|
myWorkspaces = ["term", "web", "code", "debug", "docs"] ++ map show [6..9]
|
||||||
|
|
||||||
|
-- Border colors for unfocused and focused windows, respectively.
|
||||||
|
--
|
||||||
|
myNormalBorderColor = "#dddddd"
|
||||||
|
myFocusedBorderColor = "#ff0000"
|
||||||
|
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
-- Key bindings. Add, modify or remove key bindings here.
|
||||||
|
--
|
||||||
|
myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $
|
||||||
|
|
||||||
|
-- launch a terminal
|
||||||
|
[ ((modm .|. shiftMask, xK_Return), spawn $ XMonad.terminal conf)
|
||||||
|
|
||||||
|
-- launch dmenu
|
||||||
|
, ((modm, xK_p ), spawn "rofi -show drun")
|
||||||
|
|
||||||
|
-- close focused window
|
||||||
|
, ((modm .|. shiftMask, xK_c ), kill)
|
||||||
|
|
||||||
|
-- Rotate through the available layout algorithms
|
||||||
|
, ((modm, xK_space ), sendMessage NextLayout)
|
||||||
|
|
||||||
|
-- Reset the layouts on the current workspace to default
|
||||||
|
, ((modm .|. shiftMask, xK_space ), setLayout $ XMonad.layoutHook conf)
|
||||||
|
|
||||||
|
-- Resize viewed windows to the correct size
|
||||||
|
, ((modm, xK_n ), refresh)
|
||||||
|
|
||||||
|
-- Move focus to the next window
|
||||||
|
, ((modm, xK_Tab ), windows W.focusDown)
|
||||||
|
|
||||||
|
-- Move focus to the next window
|
||||||
|
, ((modm, xK_j ), windows W.focusDown)
|
||||||
|
|
||||||
|
-- Move focus to the previous window
|
||||||
|
, ((modm, xK_k ), windows W.focusUp )
|
||||||
|
|
||||||
|
-- Move focus to the master window
|
||||||
|
, ((modm, xK_m ), windows W.focusMaster )
|
||||||
|
|
||||||
|
-- Swap the focused window and the master window
|
||||||
|
, ((modm, xK_Return), windows W.swapMaster)
|
||||||
|
|
||||||
|
-- Swap the focused window with the next window
|
||||||
|
, ((modm .|. shiftMask, xK_j ), windows W.swapDown )
|
||||||
|
|
||||||
|
-- Swap the focused window with the previous window
|
||||||
|
, ((modm .|. shiftMask, xK_k ), windows W.swapUp )
|
||||||
|
|
||||||
|
-- Shrink the master area
|
||||||
|
, ((modm, xK_h ), sendMessage Shrink)
|
||||||
|
|
||||||
|
-- Expand the master area
|
||||||
|
, ((modm, xK_l ), sendMessage Expand)
|
||||||
|
|
||||||
|
-- Push window back into tiling
|
||||||
|
, ((modm, xK_t ), withFocused $ windows . W.sink)
|
||||||
|
|
||||||
|
-- Increment the number of windows in the master area
|
||||||
|
, ((modm , xK_comma ), sendMessage (IncMasterN 1))
|
||||||
|
|
||||||
|
-- Deincrement the number of windows in the master area
|
||||||
|
, ((modm , xK_period), sendMessage (IncMasterN (-1)))
|
||||||
|
|
||||||
|
-- Toggle the status bar gap
|
||||||
|
-- Use this binding with avoidStruts from Hooks.ManageDocks.
|
||||||
|
-- See also the statusBar function from Hooks.DynamicLog.
|
||||||
|
--
|
||||||
|
-- , ((modm , xK_b ), sendMessage ToggleStruts)
|
||||||
|
|
||||||
|
-- Quit xmonad
|
||||||
|
, ((modm .|. shiftMask, xK_q ), io exitSuccess)
|
||||||
|
|
||||||
|
-- Restart xmonad
|
||||||
|
, ((modm , xK_q ), spawn "xmonad --recompile; xmonad --restart")
|
||||||
|
|
||||||
|
-- Run xmessage with a summary of the default keybindings (useful for beginners)
|
||||||
|
, ((modm .|. shiftMask, xK_slash ), xmessage help)
|
||||||
|
]
|
||||||
|
++
|
||||||
|
|
||||||
|
--
|
||||||
|
-- mod-[1..9], Switch to workspace N
|
||||||
|
-- mod-shift-[1..9], Move client to workspace N
|
||||||
|
--
|
||||||
|
[((m .|. modm, k), windows $ f i)
|
||||||
|
| (i, k) <- zip (XMonad.workspaces conf) [xK_1 .. xK_9]
|
||||||
|
, (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]]
|
||||||
|
++
|
||||||
|
|
||||||
|
--
|
||||||
|
-- mod-{w,e,r}, Switch to physical/Xinerama screens 1, 2, or 3
|
||||||
|
-- mod-shift-{w,e,r}, Move client to screen 1, 2, or 3
|
||||||
|
--
|
||||||
|
[((m .|. modm, key), screenWorkspace sc >>= flip whenJust (windows . f))
|
||||||
|
| (key, sc) <- zip [xK_w, xK_e, xK_r] [0..]
|
||||||
|
, (f, m) <- [(W.view, 0), (W.shift, shiftMask)]]
|
||||||
|
|
||||||
|
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
-- Mouse bindings: default actions bound to mouse events
|
||||||
|
--
|
||||||
|
myMouseBindings (XConfig {XMonad.modMask = modm}) = M.fromList
|
||||||
|
|
||||||
|
-- mod-button1, Set the window to floating mode and move by dragging
|
||||||
|
[ ((modm, button1), \w -> focus w >> mouseMoveWindow w
|
||||||
|
>> windows W.shiftMaster)
|
||||||
|
|
||||||
|
-- mod-button2, Raise the window to the top of the stack
|
||||||
|
, ((modm, button2), \w -> focus w >> windows W.shiftMaster)
|
||||||
|
|
||||||
|
-- mod-button3, Set the window to floating mode and resize by dragging
|
||||||
|
, ((modm, button3), \w -> focus w >> mouseResizeWindow w
|
||||||
|
>> windows W.shiftMaster)
|
||||||
|
|
||||||
|
-- you may also bind events to the mouse scroll wheel (button4 and button5)
|
||||||
|
]
|
||||||
|
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
-- Layouts:
|
||||||
|
|
||||||
|
-- You can specify and transform your layouts by modifying these values.
|
||||||
|
-- If you change layout bindings be sure to use 'mod-shift-space' after
|
||||||
|
-- restarting (with 'mod-q') to reset your layout state to the new
|
||||||
|
-- defaults, as xmonad preserves your old layout settings by default.
|
||||||
|
--
|
||||||
|
-- The available layouts. Note that each layout is separated by |||,
|
||||||
|
-- which denotes layout choice.
|
||||||
|
--
|
||||||
|
myLayout = tiled ||| Mirror tiled ||| Full
|
||||||
|
where
|
||||||
|
-- default tiling algorithm partitions the screen into two panes
|
||||||
|
tiled = Tall nmaster delta ratio
|
||||||
|
|
||||||
|
-- The default number of windows in the master pane
|
||||||
|
nmaster = 1
|
||||||
|
|
||||||
|
-- Default proportion of screen occupied by master pane
|
||||||
|
ratio = 1/2
|
||||||
|
|
||||||
|
-- Percent of screen to increment by when resizing panes
|
||||||
|
delta = 3/100
|
||||||
|
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
-- Window rules:
|
||||||
|
|
||||||
|
-- Execute arbitrary actions and WindowSet manipulations when managing
|
||||||
|
-- a new window. You can use this to, for example, always float a
|
||||||
|
-- particular program, or have a client always appear on a particular
|
||||||
|
-- workspace.
|
||||||
|
--
|
||||||
|
-- To find the property name associated with a program, use
|
||||||
|
-- > xprop | grep WM_CLASS
|
||||||
|
-- and click on the client you're interested in.
|
||||||
|
--
|
||||||
|
-- To match on the WM_NAME, you can use 'title' in the same way that
|
||||||
|
-- 'className' and 'resource' are used below.
|
||||||
|
--
|
||||||
|
myManageHook = composeAll
|
||||||
|
[ className =? "MPlayer" --> doFloat
|
||||||
|
, className =? "Gimp" --> doFloat
|
||||||
|
, resource =? "desktop_window" --> doIgnore
|
||||||
|
, resource =? "kdesktop" --> doIgnore ]
|
||||||
|
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
-- Event handling
|
||||||
|
|
||||||
|
-- * EwmhDesktops users should change this to ewmhDesktopsEventHook
|
||||||
|
--
|
||||||
|
-- Defines a custom handler function for X Events. The function should
|
||||||
|
-- return (All True) if the default handler is to be run afterwards. To
|
||||||
|
-- combine event hooks use mappend or mconcat from Data.Monoid.
|
||||||
|
--
|
||||||
|
myEventHook = mempty
|
||||||
|
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
-- Status bars and logging
|
||||||
|
|
||||||
|
-- Perform an arbitrary action on each internal state change or X event.
|
||||||
|
-- See the 'XMonad.Hooks.DynamicLog' extension for examples.
|
||||||
|
--
|
||||||
|
myLogHook = return ()
|
||||||
|
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
-- Startup hook
|
||||||
|
|
||||||
|
-- Perform an arbitrary action each time xmonad starts or is restarted
|
||||||
|
-- with mod-q. Used by, e.g., XMonad.Layout.PerWorkspace to initialize
|
||||||
|
-- per-workspace layout choices.
|
||||||
|
--
|
||||||
|
-- By default, do nothing.
|
||||||
|
myStartupHook = do
|
||||||
|
spawn "feh --bg-scale ~/画像/wallpaper/85444653_p0.jpg"
|
||||||
|
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
-- Now run xmonad with all the defaults we set up.
|
||||||
|
|
||||||
|
-- Run xmonad with the settings you specify. No need to modify this.
|
||||||
|
--
|
||||||
|
main :: IO()
|
||||||
|
main = do
|
||||||
|
xmobar myConfig >>= xmonad
|
||||||
|
|
||||||
|
-- A structure containing your configuration settings, overriding
|
||||||
|
-- fields in the default config. Any you don't override, will
|
||||||
|
-- use the defaults defined in xmonad/XMonad/Config.hs
|
||||||
|
--
|
||||||
|
-- No need to modify this.
|
||||||
|
--
|
||||||
|
myConfig = def {
|
||||||
|
-- simple stuff
|
||||||
|
terminal = myTerminal,
|
||||||
|
focusFollowsMouse = myFocusFollowsMouse,
|
||||||
|
clickJustFocuses = myClickJustFocuses,
|
||||||
|
borderWidth = myBorderWidth,
|
||||||
|
modMask = myModMask,
|
||||||
|
workspaces = myWorkspaces,
|
||||||
|
normalBorderColor = myNormalBorderColor,
|
||||||
|
focusedBorderColor = myFocusedBorderColor,
|
||||||
|
|
||||||
|
-- key bindings
|
||||||
|
keys = myKeys,
|
||||||
|
mouseBindings = myMouseBindings,
|
||||||
|
|
||||||
|
-- hooks, layouts
|
||||||
|
layoutHook = myLayout,
|
||||||
|
manageHook = myManageHook,
|
||||||
|
handleEventHook = myEventHook,
|
||||||
|
logHook = myLogHook,
|
||||||
|
startupHook = myStartupHook
|
||||||
|
}
|
||||||
|
|
||||||
|
-- | Finally, a copy of the default bindings in simple textual tabular format.
|
||||||
|
help :: String
|
||||||
|
help = unlines ["The default modifier key is 'alt'. Default keybindings:",
|
||||||
|
"",
|
||||||
|
"-- launching and killing programs",
|
||||||
|
"mod-Shift-Enter Launch xterminal",
|
||||||
|
"mod-p Launch dmenu",
|
||||||
|
"mod-Shift-p Launch gmrun",
|
||||||
|
"mod-Shift-c Close/kill the focused window",
|
||||||
|
"mod-Space Rotate through the available layout algorithms",
|
||||||
|
"mod-Shift-Space Reset the layouts on the current workSpace to default",
|
||||||
|
"mod-n Resize/refresh viewed windows to the correct size",
|
||||||
|
"mod-Shift-/ Show this help message with the default keybindings",
|
||||||
|
"",
|
||||||
|
"-- move focus up or down the window stack",
|
||||||
|
"mod-Tab Move focus to the next window",
|
||||||
|
"mod-Shift-Tab Move focus to the previous window",
|
||||||
|
"mod-j Move focus to the next window",
|
||||||
|
"mod-k Move focus to the previous window",
|
||||||
|
"mod-m Move focus to the master window",
|
||||||
|
"",
|
||||||
|
"-- modifying the window order",
|
||||||
|
"mod-Return Swap the focused window and the master window",
|
||||||
|
"mod-Shift-j Swap the focused window with the next window",
|
||||||
|
"mod-Shift-k Swap the focused window with the previous window",
|
||||||
|
"",
|
||||||
|
"-- resizing the master/slave ratio",
|
||||||
|
"mod-h Shrink the master area",
|
||||||
|
"mod-l Expand the master area",
|
||||||
|
"",
|
||||||
|
"-- floating layer support",
|
||||||
|
"mod-t Push window back into tiling; unfloat and re-tile it",
|
||||||
|
"",
|
||||||
|
"-- increase or decrease number of windows in the master area",
|
||||||
|
"mod-comma (mod-,) Increment the number of windows in the master area",
|
||||||
|
"mod-period (mod-.) Deincrement the number of windows in the master area",
|
||||||
|
"",
|
||||||
|
"-- quit, or restart",
|
||||||
|
"mod-Shift-q Quit xmonad",
|
||||||
|
"mod-q Restart xmonad",
|
||||||
|
"mod-[1..9] Switch to workSpace N",
|
||||||
|
"",
|
||||||
|
"-- Workspaces & screens",
|
||||||
|
"mod-Shift-[1..9] Move client to workspace N",
|
||||||
|
"mod-{w,e,r} Switch to physical/Xinerama screens 1, 2, or 3",
|
||||||
|
"mod-Shift-{w,e,r} Move client to screen 1, 2, or 3",
|
||||||
|
"",
|
||||||
|
"-- Mouse bindings: default actions bound to mouse events",
|
||||||
|
"mod-button1 Set the window to floating mode and move by dragging",
|
||||||
|
"mod-button2 Raise the window to the top of the stack",
|
||||||
|
"mod-button3 Set the window to floating mode and resize by dragging"]
|
||||||
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
|
||||||
|
];
|
||||||
|
}
|
||||||
29
user/packages/default.nix
Normal file
29
user/packages/default.nix
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
{ ... }: {
|
||||||
|
imports = [
|
||||||
|
./cava
|
||||||
|
./chromium
|
||||||
|
./dbeaver
|
||||||
|
./firefox
|
||||||
|
./firefox-dev-edition
|
||||||
|
./freecad
|
||||||
|
./fzf
|
||||||
|
./gimp
|
||||||
|
./gitui
|
||||||
|
./inkscape
|
||||||
|
./kdenlive
|
||||||
|
./keepassxc
|
||||||
|
./kicad
|
||||||
|
./libreoffice-fresh
|
||||||
|
./mangohud
|
||||||
|
./mpv
|
||||||
|
./obs-studio
|
||||||
|
./owncloud-client
|
||||||
|
./pandoc
|
||||||
|
./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 ];
|
||||||
|
}
|
||||||
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/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
|
||||||
|
];
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user